◀ All case studies← All case studies

World 1-3Case study 3

AfterPayday

Budgeting apps tell you where your money went. I built one that answers the question people actually ask after payday, how much is safe to spend today, and shipped it solo as a local-first PWA on its own domain.

My role
Solo builder. Product, UX, code, testing and operations, end to end.
Team
Just me, pairing with Claude Code as my engineer
Timeline
May – Oct 2026 · first commit → v1.0 live at afterpayday.ihsanshahrir.com
Tools & stack
  • React 19
  • Vite
  • Tailwind CSS v4
  • PWA + Workbox
  • Supabase
  • Tesseract.js
  • Cloudflare
  • Vitest

01 · The problemPaid on the 25th. Broke by the 10th.

For a lot of salaried Malaysians, payday isn’t the start of a budget, it’s the start of a countdown. Rent, utilities and subscriptions come out first, then the buy-now-pay-later and phone installments, and whatever is left has to last until the next payslip.

Budgeting apps answer the wrong question. They show where the money went after the fact, in categories and charts. The question people ask standing at the counter is simpler: can I afford this today?

02 · StrategyOne number, zero friction, nothing leaves the phone

I wrote the goals down before the first line of code, and the non-goals just as firmly: no bank integrations, no multi-currency, no budgeting categories, no analytics, no telemetry.

How safe-to-spend is worked out
  1. Monthly salaryEntered once in onboarding.
  2. Minus fixed billsRent, utilities and subscriptions, each marked paid per month.
  3. Minus installments dueDebt groups (a phone plan, a BNPL purchase) split into dated installments, with overdue tracking.
  4. Minus daily spendingTwo-tap quick add by category. Refunds lift the number back up.
  5. Safe to spendOne figure on the home screen, updated on every entry. At month end it rolls into history and unpaid items turn overdue.

Here’s the live app:

  • AfterPayday dashboard showing RM 2,385.10 safe to spend, RM 2,000.90 spent of RM 4,800 this month, fixed and debt totals, and two expenses logged today.Today: one safe-to-spend number, with fixed bills and debt underneath.
  • The add-expense sheet with an amount field, recent descriptions as chips, category buttons and a Scan button for receipts.Quick add: amount, a recent description, a category, done. Scan reads a receipt.
  • The commitments screen: 2 of 4 fixed bills paid with RM 198 still due, and installment debt with RM 216 due this month and a car loan due 15 November.Commitments: bills to tick off and installment debt with the next due date.
ScreenshotThe live app at afterpayday.ihsanshahrir.com, filled with sample data.

Three principles shaped everything after that:

  • Single-glance clarity. The home screen answers one question. Everything else lives one tap away.
  • Local-first. No account needed. Data lives on the device, and the app works on a plane.
  • Resilient. It has to survive full storage, crashes, corrupted backups and month boundaries without the user doing anything.

03 · The hard partMoney apps can’t be “mostly right”

A finance app that’s wrong once doesn’t get opened again. The bugs that matter are the quiet ones:

  • The timezone trap. new Date('2026-05-01') is read as UTC midnight, which is the evening of April 30th west of Greenwich. One of those at a month boundary and an expense lands in the wrong month. Every date check in the app compares local-time ISO strings instead, and month rollover runs again whenever the app comes back into focus, so a PWA left open past midnight still closes the month correctly.
  • Data that outlives the code. Saved state carries a schema version and is migrated forward on load. Every field of every backup is validated, so a hand-edited or truncated file drops bad rows instead of skewing the number.
  • Storage that disappears. iOS can evict a web app’s storage after a week of non-use, so the app asks for persistent storage and offers one-tap JSON export and import as the recovery path.

04 · Build & shipSync without silent merges

Cloud backup was the most-requested addition, and the riskiest one, because it’s where local-first apps quietly lose data. I kept it strictly optional: sign in with Google and the app mirrors your data to one private, row-level-secured row. Skip it and there’s no account UI and no network call at all.

The real decision was what happens when two devices edit offline and disagree:

Auto-merge (rejected)

Per-field merging needs stable row identity, tombstones for deletes, and a merge rule for every field type.

When it guesses wrong, an expense quietly disappears and the user finds out at month end.

Compare-and-swap (shipped)

Every push checks a revision counter. If another device wrote first, nothing is overwritten: a review sheet shows both versions and the user picks which one wins.

Coarser conflicts, but they’re rare for one person’s finances, and nothing is ever lost without asking.

Data pulled from the cloud runs through the same validator as a backup import, and an older build refuses data written by a newer one, so a staggered deploy can’t silently downgrade an account.

05 · OperationsRunning it like a product, not a demo

A side project people rely on needs the boring parts too, so I set them up as automated GitHub workflows:

  • Every pull request runs lint, the unit tests, a production build and a bundle-size budget. Anything meant to load lazily, like the sync client or the OCR engine, fails the build if it sneaks into the first load.
  • Hourly uptime checks probe the site, sign-in and database, and open an issue on failure and close it on recovery.
  • Weekly encrypted backups of the cloud data, kept for 90 days, plus a keep-alive so the free-tier database never pauses.
  • Releases carry a version number shown in Settings, and a new version waits for the user to tap “update” instead of reloading under them.

06 · Key decisionsThe calls I made

  1. D1

    One number on the home screen, not a dashboard.

    The question people ask is "can I afford this?", not "where did it go?". Everything else is one tap away.

  2. D2

    Local-first, cloud optional.

    No account means no sign-up drop-off and no data to leak. Sync only ever adds a backup; it never becomes the primary copy.

  3. D3

    Let the user resolve sync conflicts.

    A guessed merge that drops an expense is worse than one honest question. Rare conflicts, zero silent loss.

  4. D4

    On-device OCR over a cloud vision API.

    Less accurate on faded receipts, but free, offline and private. Editable fields cover the accuracy gap.

  5. D5

    Whole-state undo for every delete.

    Five seconds to take back any deletion, and restoring a snapshot is trivially correct, so there's no per-item re-insertion logic to get wrong.

  6. D6

    No telemetry, ever.

    It's the promise on the front page. I enforced it even when my own host started adding analytics by default.

07 · ResultsWhat shipped

  • 71pull requests shipped solo, from first commit to a live app on its own domain
  • 133unit tests on the money maths, storage, migrations and sync
  • 100 KiBfirst-load JavaScript budget (gzip), enforced on every pull request

It’s live at afterpayday.ihsanshahrir.com, installable on Android, iOS and desktop, and it works fully offline.

08 · Lessons learnedWhat I’d tell the next playerWhat I’d tell the next PM

  • Write the non-goals first. “No bank sync, no categories, no analytics” killed a dozen features before they cost a week each.
  • Trust is the product in finance. Most of the engineering went into making sure the number is never quietly wrong, not into adding screens.
  • Building it myself made me a sharper PM. Owning the timezone bugs, the migrations and the uptime alerts changed how I write acceptance criteria for engineers.