Back to projects

Personal finance tracker

Active development

Daily Expenses

An MSc coursework project that extends an open-source expense tracker into a multi-user personal finance app with budgets, spending alerts, analytics, AI-assisted receipt scanning, a plain-English spending assistant, and a savings plan.

My role
Full-stack developer — MSc coursework extending an open-source (MIT) project
Development status
Active development
Intended users
Students and young professionals managing a monthly budget

The context

Problem being solved

Recording expenses is only the first step. People also need to know whether they are within budget, how much they can safely spend, what they owe or are owed, and whether they are on track for their savings goals, without reconciling several tools by hand.

Audience

Intended users

  • Students and young professionals managing a monthly budget
  • People saving towards specific goals
  • Anyone who lends or borrows money informally with friends and family

My role and contribution

Full-stack developer — MSc coursework extending an open-source (MIT) project

  • Extended an existing open-source Next.js and Supabase expense tracker, which already provided expense logging, yearly charts, debt and savings trackers, and CSV and PDF import.
  • Added Supabase authentication, per-user Row Level Security, budgets, spending alerts, an analytics and reports page, and AI spending insights.
  • Built receipt scanning, the Ask AI assistant, a savings plan, lend & borrow, a wishlist, profile and account management, and first-run onboarding.
  • Redesigned the interface in staged, documented passes with a shared design system, accessible colour tokens, and mobile, tablet, and desktop checks.

Development status

The app is deployed and under active development as MSc coursework. It is not presented as production finance software with verified real-world usage.

Main features

01

Email sign-up and sign-in with password reset, protected routes, and Row Level Security on every user-owned table.

02

Monthly category budgets with spending alerts at 80% and 100% of a limit, and AI-generated spending insights.

03

Analytics and reports with spending trends, category breakdowns, budget versus actual, year-on-year comparison, and CSV export.

04

Receipt scanning that reads a photo into an editable expense draft, and an Ask AI assistant for questions such as “How much did I spend on TfL this month?”

05

Savings plan with fixed costs, goals, and a “left for everyday spending” figure, plus lend & borrow and wishlist tracking.

Technical architecture

Pages read the signed-in user's data under Row Level Security, pure calculation modules derive every figure, and server-only routes isolate AI providers from the browser.

  1. 01

    User interface

    Next.js + React

    Dashboard, expenses, budgets, analytics, money, plan, assistant, and profile pages.

  2. 02

    Calculation core

    Pure TypeScript modules

    Analytics, budget thresholds, and assistant answers computed in integer pence and covered by unit tests.

  3. 03

    Server routes

    Next.js route handlers + Zod

    Authenticated APIs for profile, money, plan, receipts, insights, and the assistant.

  4. 04

    Data and AI

    Supabase + Pollinations / Gemini

    Postgres with RLS for user data, with a provider-neutral AI call that falls back when no key is configured.

High-level architecture based on the project's current documented implementation.

Technology breakdown

A recruiter-focused view of the main technical responsibilities and service boundaries.

Frontend technology

Next.js 15, React 19, TypeScript, Tailwind CSS 4, shadcn/ui, and Recharts support a responsive finance dashboard in light and dark themes.

  • TanStack Query caching shared across the dashboard, yearly charts, and analytics
  • Lazy-loaded Recharts so chart code only loads on pages that need it
  • Shared page header, stat tile, meter, empty-state, and error-state components

Backend technology

Next.js route handlers validate input, act with the caller's own session, and keep AI calls and secrets on the server.

  • The assistant turns a question into a structured query, reads only the data it needs, and builds the reply in code
  • A rule-based parser takes over when the AI is unavailable or returns invalid output
  • Receipt uploads are authenticated, rate-limited, size-capped, and checked for a real JPEG, PNG, or WebP

Database and storage

Supabase Postgres stores expenses, budgets, alerts, profiles, IOUs, wishlist items, and savings-plan data through versioned SQL migrations.

  • Row Level Security restricts each table to the signed-in user's rows
  • A database trigger marks an IOU as settled exactly when it is fully paid
  • An append-only activity log records security-relevant account actions

External integrations

AI and data services support receipt reading, spending questions, insights, and statement import.

  • Pollinations AI, with Google Gemini as a fallback provider
  • Google Gemini for bank-statement PDF import
  • ExchangeRate-API for live currency rates, and Vercel for deployment

Authentication and security

Supabase Auth, Row Level Security, and server-side validation keep each user's financial data private.

  • Middleware and a protected layout redirect anonymous visitors to sign in
  • Reads add an explicit user filter on top of RLS as defence in depth
  • Receipt photos are re-encoded in the browser to strip EXIF location data, and are never stored
  • CSV exports neutralise spreadsheet formula injection

Most difficult challenge

The challenge

While building analytics, I found that the client-side query cache survived sign-out. On a shared browser tab, a second user could briefly see the first user's cached expenses, even though Row Level Security was correctly protecting the database.

How it was solved

The query cache is now cleared whenever the signed-in user changes, and data reads add an explicit user filter as a second layer behind RLS. I also paginated the yearly fetch after finding that Supabase's 1,000-row response limit was silently truncating large years.

Testing, accessibility and performance

Testing approach

  • Unit tests cover analytics, budgets, spending alerts, expense CRUD and validation, the assistant, insights, money, onboarding, profile, and PDF statement parsing.
  • Calculation tests cover pence-exact sums, year and leap-year boundaries, daylight-saving changes, empty datasets, and CSV formula-injection protection.
  • Browser checks run at 375, 768, 1024, and 1440 px in light and dark mode, recording console errors and horizontal overflow.

Recorded on 12 November 2026 at the analytics milestone: 327 unit tests passing, 0 TypeScript errors, and every app page loading without console errors in light, dark, and mobile layouts.

Accessibility considerations

  • Status is never shown by colour alone; each state pairs colour with a word, icon, or sign.
  • Layouts work down to 320 px phones, with 16 px form fields so iOS never auto-zooms.
  • Progress meters expose a progress-bar role and readable value text, and charts have report tables.
  • Visible focus rings, a skip link, and reduced-motion support throughout.

Performance considerations

  • Expenses are cached per calendar year, so changing filters within loaded years makes no new request.
  • At the analytics milestone, the analytics page loaded 266 kB of first-load JavaScript, with Recharts lazy-loaded.
  • Benchmarks show the analytics calculations summarising 10,000 records in under 4 ms.

Learning and next steps

What I learned

  • Extending an existing codebase means understanding its conventions before changing them, and documenting each change in stages.
  • Money is safest as integer pence, with dates compared as local calendar days rather than UTC instants.
  • AI features are more trustworthy when the model interprets a request but code calculates the answer.

What I would improve next

  • Move large-range aggregation to a Postgres view or RPC so long histories do not download raw rows.
  • Add end-to-end tests for sign-up, budgeting, and receipt-scanning journeys.
  • Validate the savings plan and assistant with real users before making any usefulness claims.

Screenshots from the current project build.

Daily Expenses personal finance tracker — sign-in page, desktop view
Sign-in page introducing expense tracking, budget alerts, AI insights, and analytics.

Interactive preview

Load the live project directly on this page. Requires an active deployment.

Interactive preview available

Loads the live site inside this page. Click to activate — the project must be publicly accessible.

Open in new tab instead

Explore the build

Review the current interface or inspect the repository and documented implementation.