Next.js app with Neon Postgres persistence for monthly budgets and expenses.
- Month navigation with previous/next arrows
- Editable monthly budget
- Budget progress bar (green → amber → red)
- Donut chart for category spending
- Add expense form (name, amount, category)
- Expense list with delete action
- Sidebar with category totals and remaining balance
- Next.js App Router
- TypeScript
- Neon Postgres (
@neondatabase/serverless) - Recharts
-
Install dependencies:
npm install
-
Create your environment file from the sample:
copy .env.example .env.local
-
Set
DATABASE_URLin.env.localusing your Neon connection string. -
Start the app:
npm run dev
-
Open http://localhost:3000.
- API routes auto-create required tables on first request.
- Reference schema is in
db/schema.sql.
GET /api/budget?month=YYYY-MMPUT /api/budgetGET /api/expenses?month=YYYY-MMPOST /api/expensesDELETE /api/expenses/:idGET /api/insights?month=YYYY-MM