Built for Personal Finance · Next.js 16 · TypeScript · Prisma · PostgreSQL
Personal Budget Tracker
A personal-finance app that keeps accounts and wallets, income and expenses, monthly category budgets, savings goals, loans and subscriptions in one place, with a dashboard of balances and spending charts in light and dark themes. Built with Next.js 16 server actions and Prisma on PostgreSQL, with Google or GitHub sign-in. Wallet and card integrations run in a labelled demo mode that generates sample activity unless provider keys are set.
Server Actions → Prisma Ledger → Budget Rollups → Chart Views

Role
Full-Stack Developer
Duration
4 weeks
Tech Stack
The Problem
Money spread over several bank accounts, wallets, loans and subscriptions usually ends up in one spreadsheet per account, with no single answer to 'where do I stand this month'.
The goal was one place that records every account, shows balances and spending trends, tracks money owed in both directions, and shows how close each category is to its monthly limit.
My Approach
- Data model. A Prisma schema on PostgreSQL covers users, accounts (savings, current, wallet, investment, business and others), income, expenses, received and deducted transactions, categories, one monthly budget per category, goals, loans (payable or receivable), subscriptions (monthly or yearly), integrations and statements.
- App. Next.js 16 App Router with server components and server actions, Zod validation, and a proxy that sends visitors without a session to the sign-in page.
- Sign-in. Google or GitHub through NextAuth.js 5 with JWT sessions. A new account is given a starter set of categories, accounts, goals, subscriptions, budgets and sample transactions, so the dashboard is never empty.
- Screens. Dashboard (balance, debt, subscriptions and net-worth cards, a spending-trends line chart, a category radar, budget progress and recent transactions), plus pages for accounts, transactions, budgets, goals, loans, subscriptions and categories, in light and dark themes.
- Integrations. Tiles for the Khalti, eSewa and PayPal wallets and Visa and Mastercard cards. Without provider credentials they generate sample activity and say Demo Mode; Khalti payments are verified with a server-side lookup. A bank-text importer parses messages with a language model.
- Hardening. A review found four serious gaps: a session-signing secret that fell back to a value written in the source, cron routes that let everyone in when their secret was unset (one writes transactions), a function that adds transactions to a named user's account exported from a server-actions file (a public endpoint with no sign-in), and a payment callback that trusted the URL. All four were fixed and covered by tests, and a CSP and HSTS were added.
Results & Impact
Re-run on 2026-11-14: type-check, lint with zero warnings, and 201 tests in 8 files all pass.
Recorded in the repository's work-done.md (2026-11-09): - A mutation check that put 73 deliberate bugs back one at a time; the tests failed for all 73, including guards that fail if an unprotected server action or the old secret returns. - npm audit down from 31 vulnerabilities (4 critical, 11 high, 10 moderate, 6 low) to 0. - A real server run confirming CSP, HSTS and COOP headers, a cron request answered 401 without its secret and 200 with it, and a session token made with the old published secret refused. - Statement coverage of 89.29% and branch coverage of 86.82% over the files that pass touched; the rest of the app has no unit tests.
On 2026-11-14 the production build was also run locally against a real PostgreSQL 18 with the app's schema and its starter dataset, and the dashboard, accounts, transactions, budgets, goals, categories, loans, subscriptions and integrations pages all rendered with data (the screenshots).
Not verified: sign-in with a real Google or GitHub account (the local run used a session signed with a throwaway secret); the real Khalti service; the bank-text parser; which commit the deployed site is running; and the production database migration.