Skip to main content
@kneeraazon
Live ProductFinance & QuantCase Study

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.

OUTCOME.01201Automated tests passing
OUTCOME.0273 / 73Seeded bugs caught by the tests
OUTCOME.0331 to 0npm audit vulnerabilities
2D SYSTEM TOPOLOGY // END-TO-END REQUEST PIPELINE4-STAGE DATA FLOW

Server Actions → Prisma Ledger → Budget Rollups → Chart Views

FIG.01 // INTERFACE & SYSTEM CAPTURE1 / 10
Budget Tracker dashboard: four summary cards (total balance, active debt, subscriptions, net worth) above a spending-trends line chart and a category radar chart, drawn from sample data.
Budget Tracker dashboard: four summary cards (total balance, active debt, subscriptions, net worth) above a spending-trends line chart and a category radar chart, drawn from sample data.

Role

Full-Stack Developer

Duration

4 weeks

Tech Stack

Next.js 16React 19TypeScript 6Prisma 6PostgreSQLNextAuth.js 5Tailwind CSS 4Radix UIChart.js 4Zod 4Vitest 5
SECTION 01 // PROBLEM STATEMENT

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.

SECTION 02 // SYSTEM ARCHITECTURE & EXECUTION

My Approach

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
SECTION 03 // VERIFIED OUTCOMES

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.