2026
Budget & Wealth Tracker
A mobile-first personal finance app (PWA) that replaced my Excel budget sheet.
- Problem
- Budgeting in Excel was slow to update on a phone and couldn't show where the month was heading.
- Decision
- Put the rules that must always hold in the database: row-level security, triggers and scheduled jobs.
- Result
- Replaced the spreadsheet; runs free on Vercel and Supabase, with CI checking the maths against Excel.
The problem
I tracked spending in Excel, which was clumsy on a phone and couldn't tell me where the month was heading, which bills were unpaid or how long my savings would last.
What I built
- Mobile-first Next.js and TypeScript PWA: log an expense in a few taps, with instant updates, undo, and rollback if a save fails.
- Supabase (PostgreSQL) with row-level security; a trigger seeds new accounts and a pg_cron job adds bills on their due day.
- Analytics beyond the spreadsheet: month-end forecast, category trends, insights, budgets and a Malaysian salary engine (EPF, SOCSO, EIS).
- Daily Web Push reminders via Vercel Cron, and a guest demo with generated data that never touches the database.
Key decisions
A PWA instead of a native app
One codebase runs on iPhone, Android and desktop, installs to the home screen without app store accounts, reviews or fees, and updates the moment Vercel deploys.
Trade-off: iOS limits web apps: push notifications only work from the home-screen app (iOS 16.4+), and the layout has to handle the notch and status bar itself.
Row-level security on every table
The database key in the browser is public by design, so what keeps accounts apart is an owner-only policy on every table. The sign-in redirect is only a convenience.
Trade-off: Security depends on every policy being right: a missing one would expose data.
Monthly bills added by the database, not the app
A daily pg_cron job adds fixed bills on their due day even if the app is never opened, running next to the data with no external scheduler.
Results
- Replaced my Excel budget; runs entirely on the free tiers of Vercel and Supabase.
- About 10,500 lines of TypeScript with versioned releases, and CI checking the formulas against the original spreadsheet.
What I learned
- Rules that must always hold belong in the database, not in client code that might not run.
- Optimistic updates need a clear rollback path, and a formula test against the old spreadsheet made refactoring safe.