A lightweight personal finance management system featuring a FastAPI backend and a Next.js frontend. The goal is to track accounts, manage recurring transactions, and visualize spending patterns.
- Framework: FastAPI (Python 3.12+)
- Package Manager: uv
- Database: PostgreSQL
- ORM: SQLModel (Integration of SQLAlchemy + Pydantic)
- Authentication: OAuth2 with JWT (JSON Web Tokens)
- Framework: Next.js (App Router)
- Styling: Tailwind CSS
- UI Components: Shadcn/UI
- Data Visualization: Tremor
- Icons: Lucide-react
- Docker and Docker Compose installed on your machine.
-
Clone the repository:
git clone <repository-url> cd finance-manager
-
Environment Setup: The project uses a
.envfile for configuration. A sample file.env.sampleis provided. Copy it to.envand fill in your values:cp .env.sample .env
Important: You must generate a secure
JWT_SECRETfor authentication to work securely. You can generate one using:openssl rand -hex 32
Copy the output string into your
.envfile as the value forJWT_SECRET. This key is used to sign and verify user session tokens. -
Start the services:
docker compose up --build -d
-
Access the application:
- Backend API:
http://localhost:8000 - API Documentation (Swagger UI):
http://localhost:8000/docs - Frontend:
http://localhost:3000(Once implemented)
- Backend API:
- Username:
admin - Password:
admin
backend/: FastAPI application code, models, and API endpoints.frontend/: Next.js application code (Work in Progress).docker-compose.yml: Orchestration for Backend, Frontend, and Database.
- Dashboard: Overview of total net worth and recent activity.
- Account Detail: Specific analytics for one account + its transaction history.
- User Management: CRUD table for Admins to manage staff/family access.
- Use Environment Variables for all secrets (Postgres URI, JWT Secret).
- Passwords must be hashed using Bcrypt.
- Frontend forms must include Client-side validation (Zod/React Hook Form) to match Pydantic constraints.
docker-compose up -d- Backend: http://localhost:8000/docs (FastAPI Swagger UI)
- Frontend: http://localhost:3000
cd backend
uv run fastapi run app/main.py --port 8000cd frontend
npm install
npm run dev