Full-stack expense, budget, and savings-goal tracker with a React 19 frontend, Express/Prisma REST API, PostgreSQL persistence, JWT auth, and interactive Swagger docs. Budget enforcement is two-tiered: soft warnings at defaultBudget and hard rejections at maxBudget.
15
API endpoints
4
Data models
JWT
Auth strategy
Prisma
ORM
Register / login flow. Token persisted in localStorage and attached via Authorization: Bearer on every protected request.
Each category holds a defaultBudget (soft limit) and maxBudget (hard limit). Names are unique per user via a composite DB constraint.
Create, read, update, delete. On create: category ownership is verified, cumulative spend is checked against both tiers, and a warning flag is returned.
Create goals with a target amount. Funds are added incrementally via PATCH /:id/add-funds. Goals can be updated or deleted at any time.
Aggregated spend per category for the logged-in user, rendered with Recharts bar and pie charts on the React frontend.
Full OpenAPI 3.0 spec auto-served at /api-docs. Every endpoint, schema, and response code is documented and interactively testable.
defaultBudget: Soft Warning
When cumulative spend crosses defaultBudget, the API returns HTTP 200 with the expense plus a warning flag. The expense is still created.
maxBudget: Hard Reject
When cumulative spend would exceed maxBudget, the API returns HTTP 400 and the expense is not created. The controller computes currentSpent + newAmount before writing.