A full-stack personal finance management app built with React, Express, and PostgreSQL. Track transactions, set budgets, monitor savings goals, and visualize your spending — all in one place.
- Dashboard — Balance overview, income vs expense charts, monthly trends, and recent transactions
- Transactions — Add, edit, and delete transactions with categories, accounts, and notes
- Budget — Set monthly spending limits per category with real-time progress rings
- Goals — Create savings goals and track contributions over time
- React 18 + TypeScript
- Vite — dev server & bundler
- Tailwind CSS + shadcn/ui — component library
- Recharts — charts and data visualization
- Framer Motion — animations
- TanStack Query — data fetching & caching
- Node.js + Express + TypeScript
- Drizzle ORM — type-safe database queries
- PostgreSQL — relational database
- Zod — runtime schema validation
| Package | Purpose |
|---|---|
lib/db |
Drizzle schema + migrations |
lib/api-spec |
OpenAPI YAML spec |
lib/api-zod |
Generated Zod validators from spec |
lib/api-client-react |
Generated React Query hooks from spec |
finance-ledger/
├── artifacts/
│ ├── api-server/ # Express REST API
│ │ └── src/
│ │ ├── routes/ # accounts, transactions, budgets, goals, dashboard
│ │ └── index.ts
│ └── ledger/ # React frontend
│ └── src/
│ ├── pages/ # dashboard, transactions, budget, goals
│ ├── components/ # layout + shadcn/ui components
│ └── lib/ # utilities, category colors
├── lib/
│ ├── db/ # Drizzle schema & migrations
│ ├── api-spec/ # OpenAPI spec
│ ├── api-zod/ # Generated Zod schemas
│ └── api-client-react/ # Generated React Query hooks
├── package.json
└── pnpm-workspace.yaml
- Node.js 20+
- pnpm —
npm install -g pnpm - PostgreSQL database
git clone https://github.com/samiullah9118/finance-ledger.git
cd finance-ledgerpnpm installCreate a .env file in the root of the project:
DATABASE_URL=postgresql://user:password@localhost:5432/finance_ledger
SESSION_SECRET=your-random-secret-string
PORT=3000pnpm --filter @workspace/db run pushOpen two terminals:
# Terminal 1 — API server
pnpm --filter @workspace/api-server run dev
# Terminal 2 — Frontend
pnpm --filter @workspace/ledger run devThen open http://localhost:5173 in your browser.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/accounts |
List all accounts |
| POST | /api/accounts |
Create an account |
| GET | /api/transactions |
List transactions (filterable) |
| POST | /api/transactions |
Create a transaction |
| PUT | /api/transactions/:id |
Update a transaction |
| DELETE | /api/transactions/:id |
Delete a transaction |
| GET | /api/budgets |
List budgets |
| POST | /api/budgets |
Create a budget |
| GET | /api/goals |
List savings goals |
| POST | /api/goals |
Create a goal |
| POST | /api/goals/:id/contribute |
Add funds to a goal |
| GET | /api/dashboard/summary |
Balance, income, expenses |
| GET | /api/dashboard/monthly-trends |
Monthly income vs expense |
| GET | /api/dashboard/spending-by-category |
Category breakdown |
| GET | /api/dashboard/recent-transactions |
Latest 5 transactions |
Dashboard, Transactions, Budget, and Goals pages
MIT
