A sample web application developed as part of a technical challenge, designed to demonstrate modern full-stack development practices. This project allows users to manage and visualize personal financial transactions using mock data sourced from ./data/transactions.json. It leverages Next.js App Router, NextAuth.js for Google authentication, and TypeScript for strong type safety.
- 🔐 Google OAuth2 authentication with NextAuth.js
- 📊 Dashboard for viewing and filtering financial transactions
- 💾 Server-side transaction loading with secure session validation
- 🎨 Styled with Styled Components and Radix UI primitives
- 📁 App Router (Next.js 15) structure
- 📦 Lightweight and optimized for performance
- Framework: Next.js 15 (App Router)
- Auth: NextAuth.js
- Tests: Jests
- Styling: Styled Components, Radix UI
- Language: TypeScript
- Icons: React Icons (Google logo)
git clone https://github.com/patpolts/financial-dashboard.git
cd financial-dashboardnpm install
# or
yarn installCopy env_example to .env
cp env_example .env and add the following:
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
NEXTAUTH_SECRET=your-secret-key
NEXTAUTH_URL=local next urlYou can generate NEXTAUTH_SECRET using:
openssl rand -base64 32npm run dev
# or
yarn devnpm run test
# or
yarn testVisit http://localhost:3000 to view the app.
src/
├── app/ # App Router structure (Next.js 13+)
│ ├── login/ # Public login page
│ ├── dashboard/ # Authenticated dashboard
│ └── api/ # API routes
│ └── auth/
│ ├── [...nextauth]/ # NextAuth handler
│ └── login-limit/ # Rate limiting endpoint (optional)
├── components/ # Reusable UI components
├── libs/ # Auth/session utilities, helpers
├── styles/ # Styled Components & theme setup
This project is open-source and available under the MIT License.