Skip to content

Repository files navigation

💰 FinDash

Personal Finance & Wealth Dashboard

A full-stack, production-ready finance dashboard with real-time data visualization,
intelligent transaction categorization, and goal tracking.

Next.js TypeScript Tailwind CSS Express Prisma PostgreSQL FastAPI Docker


GitHub last commit GitHub repo size License PRs Welcome

Features · Tech Stack · Quick Start · API Docs · Deploy


✨ Features

Feature Description
📊 Interactive Dashboard Real-time charts for cash flow analysis, expense breakdowns, and investment tracking powered by Recharts
🏷️ Smart Categorization ML-ready keyword-based transaction categorization via a dedicated FastAPI microservice
🎯 Goal Tracking Set financial goals with a built-in monthly savings calculator and visual progress indicators
📥 CSV Import / Export Bulk import transactions from CSV files and export data for external analysis
🔐 Auth0 Authentication Enterprise-grade authentication with JWT validation, httpOnly cookie sessions, and demo mode for UAT
🐳 Docker-Ready One-command local development stack with Docker Compose
🚀 CI/CD Pipeline Automated builds and linting via GitHub Actions

🛠️ Tech Stack

🖥️ Frontend — apps/web

Next.js React TypeScript Tailwind CSS TanStack Query Recharts Framer Motion Lucide

App Router · Server state caching · Composable charts · Fluid animations

⚙️ Backend — apps/api

Express TypeScript Prisma PostgreSQL Zod JWT Helmet

REST API · ORM migrations · Schema validation · Security hardened

🧠 ML Service — apps/ml-api

FastAPI Python Uvicorn

Keyword categorization · ML-ready architecture · Hot reload

🏗️ Tooling & Infrastructure

npm Workspaces Docker GitHub Actions ESLint Prettier Vitest

Monorepo · Containerized · CI/CD · Linted & formatted


📁 Project Structure

findash/
├── apps/
│   ├── web/                  # Next.js frontend (App Router)
│   │   ├── app/              # Routes, API routes, components
│   │   ├── public/           # Static assets
│   │   └── package.json
│   ├── api/                  # Express REST API
│   │   ├── src/              # Routes, middleware, server entry
│   │   ├── prisma/           # Schema, migrations, seed
│   │   └── package.json
│   └── ml-api/               # FastAPI microservice (ML-ready)
│       ├── app/              # Application modules
│       └── requirements.txt
├── packages/
│   └── types/                # Shared TypeScript type definitions
├── .github/workflows/        # CI pipeline configuration
├── docker-compose.yml        # Local development stack
├── DEPLOYMENT.md             # Production deployment guide
├── .env.example              # Environment variable template
├── tsconfig.base.json        # Base TypeScript configuration
└── package.json              # Workspace root

🚀 Getting Started

Prerequisites

Node.js npm Docker

Installation

# 1. Clone the repository
git clone https://github.com/usmanrasheeddev/FinDash.git
cd FinDash

# 2. Install all workspace dependencies
npm install

# 3. Start PostgreSQL via Docker
docker compose up -d db

# 4. Configure environment
cp .env.example .env
cp apps/api/.env.example apps/api/.env   # if exists

# 5. Run database migrations & seed
cd apps/api && npx prisma migrate dev --name init && cd ../..
npm run seed --workspace @findash/api

# 6. Start development servers
npm run dev --workspace @findash/api     # API  → http://localhost:4000
npm run dev --workspace @findash/web     # Web  → http://localhost:3000

Tip

To start the optional ML service, run docker compose up -d ml-api

Full Docker Stack

Spin up the entire application with a single command:

docker compose up -d

This starts PostgreSQL, the Express API, the Next.js frontend, and the FastAPI ML service.


⚙️ Environment Variables

Copy .env.example to .env at the project root and configure:

Variable Service Description
DATABASE_URL API PostgreSQL connection string
NEXT_PUBLIC_API_URL Web API base URL (default: http://localhost:4000)
NEXT_PUBLIC_AUTH0_DOMAIN Web Auth0 tenant domain
NEXT_PUBLIC_AUTH0_CLIENT_ID Web Auth0 application client ID
AUTH0_CLIENT_SECRET Web Auth0 application secret
NEXT_PUBLIC_AUTH0_AUDIENCE Web Auth0 API identifier
AUTH0_ISSUER API Auth0 issuer URL for JWT validation
AUTH0_AUDIENCE API Auth0 API audience for JWT validation
ML_SERVICE_URL API ML microservice URL (default: http://localhost:8000)
ALLOW_DEMO API Enable demo mode without JWT (UAT only)
CORS_ORIGIN API Allowed frontend origin in production

🔐 Authentication

FinDash uses Auth0 for enterprise-grade authentication:

  • Login Flow: Users authenticate via the header login button → tokens stored in httpOnly cookies → forwarded to the API through an internal proxy at /api/proxy/*
  • Demo Mode: If Auth0 is not configured, the app operates with a demo user for local development
  • Production: The API requires valid JWTs for all non-public routes. Set ALLOW_DEMO=true temporarily during UAT, then disable for production

Auth0 Configuration

Setting Value
Application Type Regular Web Application
Callback URLs https://<your-domain>/api/auth/callback
Logout URLs https://<your-domain>/
Web Origins https://<your-domain>

📡 API Reference

Base URL: http://localhost:4000

Method Endpoint Description
GET /health Service health check
GET /config Non-sensitive readiness info
GET /transactions List all transactions
POST /transactions Create a transaction
GET /goals List all goals
POST /goals Create a goal
POST /data/import Import transactions from CSV (multipart)
GET /data/export Export transactions as CSV
POST /ml/categorize Categorize transactions via ML service
📋 ML Categorize — Request Body
{
  "items": [
    { "description": "Starbucks Coffee" },
    { "description": "Netflix Monthly" }
  ]
}

🚢 Deployment

FinDash is designed for modern cloud deployment:

Service Platform Directory
Frontend Vercel apps/web
API + Database Railway apps/api
ML Service Docker apps/ml-api

Note

See DEPLOYMENT.md for detailed step-by-step deployment instructions, required environment variables, and troubleshooting tips.


🧪 Development

# Run linting across all workspaces
npm run lint

# Format code with Prettier
npm run format

# Run tests
npm run test

# Build all workspaces
npm run build

🛣️ Roadmap

  • Auth0 integration (Web + API JWT validation)
  • Interactive dashboard charts (cash flow, expenses, investments)
  • Transactions CRUD with CSV import flow
  • Goal tracking with monthly savings calculator
  • Unit & E2E test coverage expansion
  • Real ML model integration for smart categorization
  • Budget alerts & notifications
  • Mobile-responsive PWA support
  • Multi-currency support

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is open source and available under the MIT License.


Built with ❤️ by Usman Rasheed

GitHub

About

A Personal Finance & Wealth Dashboard

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages