A personal spending tracker that reads the bank's notification emails and turns them into a dashboard its owner can trust.
Live and in daily use by one person. Private, so there is no public link.
Project facts
- Role
- Owner, product designer and builder, working alone with Claude as a partner
- Timeline
- July to October 2026, still in daily use
- Built with
- Cowork
- Claude Code
- Stack
- Next.js 16
- React 19
- TypeScript
- Tailwind CSS v4
- Vercel Edge
- GitHub Actions
- GitHub API via Octokit
- IMAP via imapflow
- JSONL in Git
- Resend
- Yahoo Finance
- CoinGecko
- AI inside
- Claude Opus 5, for the research briefs only
Why
The bank sends an email for every card purchase, however small. That is a complete spending log already sitting in the inbox, and as a pile of emails nobody can read it. Rido reads those emails, sorts each purchase into a category and shows spending by day, week, month and year. It is a personal tracker for one person in Indonesia, in Rupiah, with an Indonesian interface.
The brief was one question: how much has been spent this period, on what, and is that normal? The answer had to arrive in under 3 seconds and stay up to date by itself.
Four constraints came with it: no external database, free tiers only, a single user and a private repo. One rule of tone sat above them all: awareness, never guilt.

Messier Than It Looks
Before any spec was written, the real inbox was analysed. It changed several things that had seemed obvious.
- 2,487 bank emails from 29 March 2024 to 3 August 2026, including 2,303 charges, 164 reversals and 13 failed transactions. An early count of about 1,900 was wrong, because reading mail by thread undercounted by about 22%.
- Two email layouts, three amount formats and eight currencies, across three cards.
- About 38% of card charges are e-wallet top-ups. The email records the top-up, not what the wallet buys later, so counting both double-counts and ignoring both loses the money.
- Identical charges are real. The owner does make the same purchase twice in a day, so removing duplicates by content would silently delete real spending.
A proof of concept of 139 rows, with 0 parse failures, came before the full extraction.

One Tap, and the Month Tells the Truth
Every picture and film on this page tells one small story, on a demo ledger. It is Tuesday 13 October 2026, 09.41. The month so far reads Rp 12.521.690, which is Rp2,4jt above a normal month. Rp 5.000.000 of that is a brokerage top-up. No rule recognised it, so the app filed it under Lainnya ("other"), in plain sight, instead of guessing a category.
One tap re-tags it as a transfer. The month now reads Rp 7.521.690, Rp2,6jt under a normal month. Then Rp 25.000 of cash, typed in and saved, makes it Rp 7.546.690. Nothing was deleted to get there.

- Open it. Ringkasan, the summary, shows the month as one number, how it compares with a normal month, the categories, a calendar of the month and the latest transactions.
- Answer what it asks. When the same merchant charges the same amount twice within minutes, a card raises it as a question: fine, or flag it.
- Follow the odd number. Tapping a category opens the explorer already filtered to it.
- Correct it once. The detail sheet lists every field the bank sent. A new category is one tap.
- See the month move. Back on the summary, the total, the pace and the trend have moved together.
- Add what the card never saw. The add button takes an amount, defaults to cash and saves.
- Look further. Recurring needs against income, a projection, net worth, a live portfolio, a trading desk, daily habits and the goals they feed.
Follow the Odd Number, Fix It Once
A suspected double charge is a question, never a verdict. An odd category is a way in: the explorer opens already filtered, the detail sheet shows everything the bank sent, and one tap on a new category corrects the month. Each step of that correction, as stills, is in the Gallery.


Cash, Typed and Saved
The card never sees cash. The add button takes an amount, defaults to cash and saves, and the month updates.
A Plan, a Portfolio, Habits and Goals
Around the one number grew a monthly plan that works out what is already paid from the ledger itself, a projection driven by the owner's own assumptions, net worth, a live portfolio with delayed prices labelled as delayed, habits with grace days, goals that can count down as well as up, and a trading desk that researches and records but never trades. Each screen is in the Gallery.

The Same Dashboard, Smaller
Phone first for a check on the go, laptop for the longer look. It is the same dashboard on both, responsive.
One Repo, Two Writers, No Database
Rido has no server of its own and no database. Free services do the work, and a private Git repo holds every byte of data. Two things write to that repo: a scheduled job that reads the bank's emails, and the app itself when the owner types something. Every write is a commit, and every commit to the main branch rebuilds the site.
Read the map from the top left. The bank emails the owner for every card purchase. Three times a day a GitHub Actions job, a script GitHub runs on its own machines on a timer, opens the mailbox over IMAP, the standard protocol mail apps use to read a mailbox. It parses each new email and commits the rows. The push rebuilds the Next.js app on Vercel. The owner opens the app through a password gate that runs on Vercel's Edge: small servers that answer before the app itself does. Anything typed in the app goes to an API route, which commits to the same repo through the GitHub API.
Why This Stack
Each layer was chosen against an obvious alternative. Running cost: nothing beyond a subscription the owner already had.
| Layer | Choice | Why this, and not the obvious alternative |
|---|---|---|
| Web app | Next.js 16 (App Router), React 19, TypeScript | Server components read the data files directly, so reading a page needs no API call |
| Interface | Tailwind CSS v4, Lucide icons, charts drawn by hand | No chart or component library: a smaller bundle and one visual language |
| Tables | TanStack Table and TanStack Virtual | The explorer holds thousands of rows, and only the visible ones are in the page |
| URL state | nuqs | The period and the projection's assumptions live in the address, so a view is a link |
| Dates | date-fns, date-fns-tz | Every time is the bank's own WIB time (UTC+7), never the email's arrival time |
| Gate | Next 16 proxy.ts on Vercel's Edge | The one place that guards pages and API routes with a single rule |
| Storage | Plain files in Git: JSONL for logs, JSON for documents | Readable, comparable line by line, versioned and free |
| Writes, deployed | GitHub REST API through Octokit | Vercel's filesystem is read-only, so a write becomes a commit |
| Scheduler | GitHub Actions, Node 22 | It has Git, real network access to the mailbox and minutes of runtime |
| Mail in | IMAP through imapflow, with an app password | The first transport's OAuth token died every 7 days; an app password does not expire |
| Mail out | Resend | Plan alerts and the daily research digest, from the Actions |
| Market data | Yahoo Finance, CoinGecko and two free fallbacks | All free, and each has a fallback, because none is reliable alone |
| AI | Claude Opus 5, as scheduled routines | No cost per run on a subscription already paid for, and it writes research only |
| Tests | vitest, plus source-lint guards | Rules that matter fail the build instead of living in comments |
| Hosting | Vercel | Free, and a push is already what every write produces |
The Repo Is the Database
All data is 20 files and folders in one data/ folder, 5.1 MB in all. The ledger alone holds 2,876 rows as of 20 October 2026. Logs are JSONL, JSON Lines: one record per line, so adding a row means adding a line, and Git shows exactly which line arrived. Only one module, store.ts, reads or writes that folder, so swapping the files for SQLite or Postgres later means changing one file.
One Job per File
| File | What it holds | Written by, and how it changes |
|---|---|---|
transactions.jsonl | The ledger: one card purchase, reversal or cash entry per line | The mail job and the add sheet. Append-only, never edited |
category-overrides.json | The owner's corrections, row id to category | The correction route. Applied when a row is read |
duplicate-review.json | The owner's answer on each suspected double charge | The duplicate route |
merchant-rules.json | Merchant patterns and the category each one means | By hand. Applied when a row is read, so a fixed rule fixes history |
categories.json | The taxonomy: 10 spending categories and 3 system ones | By hand. Fixed |
meta.json | The sync watermark, settings, fallback exchange rates | The mail job and the settings route. Shared, so the route reads before it writes |
accounts.json, budget.json | Balances the owner types, and the monthly plan | Their routes. The whole document is replaced |
holdings.json, trading.json | Positions (never a value), watchlist, plans, journal | Their routes and the broker's emails. Fills dedupe on the broker's order number |
habits.json, habit-log.jsonl, goals.json | Habits, check-ins and goals | Their routes. The check-in log is append-only |
equity.jsonl | What the investments were worth, one row a day | The mail job. A second run that day overwrites its own row |
| Caches and the screen | Last known good prices and daily bars, the daily ranked screen, and the list of what the broker sells | The mail job. Each keeps its last good file when a fetch fails or comes back thin |
research/ | Briefs, backtests, the replay and the record of what was emailed | The merge job and the monthly backtest |
One Ledger Row, With Demo Values
This is the row from the story: the Rp 5.000.000 top-up that no rule recognised. Real rows carry the same fields. The bank's short name, which prefixes two of them, is written here as <bank>.
| Field | Demo value | Why it is there |
|---|---|---|
id | <bank>_19a2f4c07be35d18 | Built from the email's message id, so one email can never become two rows |
gmailMessageId | 19a2f4c07be35d18 | The key every dedupe checks |
type | charge | A charge or a reversal. Failed transactions and statements never become rows |
date | 2026-10-09T10:12:44+07:00 | The bank's own time, in WIB |
signedIDR | 5000000 | Whole rupiah, signed: a reversal is negative, so a total is one sum |
currency, amountOriginal | IDR, 5000000 | What the email said, before any conversion |
isEstimated, fxRate | false, null | A foreign amount is converted at a stored rate and flagged as an estimate |
merchant, rawDescriptor | Topup RDN Sekuritas, TOPUP RDN SEKURITAS | A cleaned name for people, and the bank's own words for rules to match |
category | uncat | No rule matched, so it shows as Lainnya. Nothing is guessed |
categoryLocked | false | A locked row keeps its category when the rules change |
excludeFromSpend | false | Stored, but worked out again from the category every time the row is read |
paymentMethod, source | <bank>-cc, <bank>-email | Where the row came from |
cardLast4 | 4821 | The demo card |
reversalOf | null | A reversal is a row of its own, never paired with its charge |
What the Data Model Enforces
- Identity is the message id, never the content. The row id is built from the email's message id, so reading the same email again can never add a second row, and two identical purchases on one day both survive.
- Money is whole rupiah. Integers only: no floating point, no sen.
- A reversal is its own row with a negative amount. Totals are a plain sum, so 164 reversals net out with no pairing logic.
- Append-only, with sidecars. A correction, a duplicate verdict and a rule change never edit the ledger. Each lives in its own small file beside it and is merged when the ledger is read.
- One door to the data. Every read and write goes through
store.ts, and every total goes throughlistTransactions().
From a Bank Email to a Ledger Row
The mail job runs at 04.30 WIB Tuesday to Saturday, just after the US market closes, so the trading desk is current by morning. It runs again at 06.00, and at 08.00 WIB as a backstop. Every run is idempotent: running it again changes nothing. It also runs by hand, with dry, verify and backfill switches, and from the app's Sync sekarang ("sync now") button. That button fires a repository_dispatch, GitHub's way of letting an outside caller start a workflow, much like a webhook. Two runs never overlap.
Each run asks Gmail for mail from the bank's known senders since a watermark, the time of the newest email already imported, minus 120 seconds. The overlap is on purpose: the dedupe removes it. The mailbox is opened as All Mail, read-only, because an archived notification is still a purchase. Reading is the only permission the feature has ever needed.
One Number, Written Two Ways
The ledger keys every row on Gmail's REST id, a lowercase hex string, because that is what the first transport returned. IMAP reports the same message as X-GM-MSGID, a 64-bit decimal: the same number in another base. The conversion is one line of arithmetic, and a wrong guess is expensive. On an append-only file it would import more than 2,600 old emails a second time.
So the code takes four precautions. It refuses to guess on an all-digit value, because "12345678" is legal in both bases. It refuses a mail server that would report a different kind of id. It aborts a run that lists mail and recognises none of it while the ledger holds a real history. And a verify run proved the mapping against the ledger before the first real import.
Reversals First, Guesses Never
The subject decides what an email is, and the order matters: a reversal's subject also says Transaction Notification, so reversal is tested first. Failed transactions and statements are ignored. The body is HTML only. It is stripped to text and read by one set of regular expressions that covers both email layouts and three amount formats, and in Indonesian numbers a dot separates thousands and a comma marks decimals. The time kept is the bank's own field, never the moment the mail arrived. A charge or reversal that cannot be read is flagged for review, never written half-read.
Categorising is rules, and the first match wins: the owner's own rules, then the seed rules by priority, then a default for QR payments. Anything left is uncat, shown in plain sight as Lainnya.
Best Effort, Then Commit
New rows are sorted by time and appended, and the watermark moves. The same window is then searched by subject as well. A notification whose subject matches but whose sender is not on the list fails the run, after the known rows are saved. It only detects: taking rows by subject would let any email with the right subject write to the ledger.
The same run then refreshes the price cache, the broker's tradeable list, asset logos, daily bars and the daily screen. It reads the broker's trade emails into the journal, gives any position without a stop its watch levels, records what the investments are worth and checks the plan alerts. Each step is best effort: one failing never stops the next. Then the bot commits data/, and pulls with rebase before it pushes, up to three tries, because a run lasting minutes can find main moved under it. A mail failure is raised again as the very last step, so the run still goes red without having skipped anything.
The broker's emails arrive in the same mailbox. Fills, the completed buys and sells, become journal entries, deduped on the broker's own order number and dated by when the email arrived, since the email's date field is when the order was placed. Other notices are read too: cash in and out, cancelled orders, and a rejected stop-loss order, which marks a position as unprotected.
A Tap, a Commit, a Rebuild
Here is the correction from the story, traced through the code: the owner re-tags the Rp 5.000.000 top-up from Lainnya to Transfer & Isi Saldo.
- Tap. The detail sheet sends
PATCH /api/transactionswith the row id and the new category. - Gate.
proxy.tschecks the signed cookie on the Edge. Without it an API call gets a 401 as JSON, never a login page. - Thin handler. The route parses the body and finds the row through
listTransactions(). It holds no rules of its own. - Pure rule.
applyOverride()checks the category against the taxonomy and compares it with the parser's original. Setting a row back to what the parser said clears the override instead of storing a redundant one. - Commit. Deployed, Octokit reads the file's current sha, Git's fingerprint of one version of a file, on main, and commits the new
category-overrides.jsonagainst it. Run locally, the same payload is written straight to disk, through the same validation. - A new commit.
category-overrides.jsonchanges on main.transactions.jsonldoes not. - Rebuild. The push rebuilds the site. Until the new build is live, the running one still serves its own snapshot, so the route answers
pendingRefresh: trueand the sheet keeps its own saved state instead of refreshing into old data. - Read again. The next render applies the overlay. The row reads Transfer, it no longer counts as spending, and the month drops from Rp 12.521.690 to Rp 7.521.690.
Every route that changes data has this shape: parse, validate in the pure core, then commit or write. Four variations are worth telling.
- Cash.
POST /api/transactionsbuilds a full row with a random id. Deployed, it reads the ledger at the head of main, appends one line to that and commits, so a row the mail job added a minute earlier is kept. - Settings.
meta.jsonis shared with the mail job, which moves the watermark several times a day. The settings route reads the file at the head of main before it writes, because writing back a stale copy would roll the watermark back and either re-read months of mail or skip new mail. - Habits. Check-ins are batched in the browser. A tap shows at once, and the queue is sent after 1,200 ms of quiet or when the tab is hidden: eight habits at breakfast are one request, one commit and one rebuild, not eight.
- Sync sekarang.
POST /api/syncreads no mail itself. It starts the mail job.
What a Row Means Is Decided When It Is Read
A page is a server component: it runs on the server and reads the files directly, with no API in between. store.ts parses the ledger once and keeps two cached copies, the rows as parsed and the rows with the overlay applied. Any write clears both, or a page would keep serving the old ledger.
The overlay decides what each row means at the moment it is read. For every row, a manual correction wins, then a locked row keeps its category, then the current merchant rules apply, then the stored value. Whether the row counts as spending is then worked out from that category and the owner's e-wallet setting, never trusted from the file. Pure functions compute the month, the normal-month comparison and the calendar from the result and hand plain data to the screen.
Why at read time: the ledger is append-only, so a rule that was wrong used to stay wrong forever. One e-wallet rule had kept 1,049 rows out of every total, and fixing the rule changed nothing while rules only ran when mail was read in. Now fixing a rule fixes history without rewriting a line. Before the switch, running the current rules over the whole ledger moved 3 rows out of about 2,600, all of them corrections made minutes earlier. That is what made the change safe.
Market Data and Email With No Paid API
Free Feeds, Each With a Fallback
- Server-side only.
GET /api/quotesprices the holdings, the watchlist and the open plans. Yahoo sends no CORS headers, the permission a browser needs to read another site's answer, and calling it from the browser would also put the owner's own IP address into its rate limit. - Sources. Stocks come from Yahoo Finance's chart API, one request per symbol, five at a time. Every coin comes from one CoinGecko call. Dollars to rupiah come in three tiers: Yahoo, then an open exchange-rate feed, then a fallback rate in
meta.json, so the page always has a number. A rate older than 24 hours is labelled a fallback. - The 8 s deadline. 4 s per request and 8 s for the whole route, however many symbols. Whatever has not answered by then falls back to its last known good price, flagged as stale. The route never returns an empty set that the screen would draw as Rp 0.
- Caching. A price stays fresh in memory for 60 s while markets are open and 15 minutes while they are closed, and the last known good copy is never thrown away on an error. The mail job commits a price cache on every run as the seed for a freshly started server, and the response is cached for 60 s at the CDN, the network of caches in front of the site.
- Checked before saved. A new holding's ticker is tried once before it is stored, so a typo cannot be saved and show "-" forever.
- Daily bars come from Yahoo first and a second free source for US symbols. Two traps were paid for: that source returns a year of someone else's bars for a ticker it does not carry, so the symbol is confirmed first, and its rows come back newest first while every indicator reads oldest first.
- Logos are downloaded and committed. Drawing them from a CDN told that CDN which stocks were held, on every page view. The files also sit behind the gate, because their names alone are the holdings list.
- Honest labels. Stock prices are about 15 minutes late, so the page shows the time and never says "live".

Two Emails, Two Rules
Both go through Resend's API from GitHub Actions, which can reach any address on the internet. The AI routine never sends anything.
| Plan alerts | Daily research digest | |
|---|---|---|
| Sent by | The mail job, on every run | The research merge job |
| Built from | The owner's own entry, target and stop, against prices fetched seconds earlier | The day's validated brief, rendered by code |
| Uses AI | No: rule checks only | The brief was written by AI. The email is not |
| Will not send when | The quote is stale or older than 18 hours, or the same breach already alerted in the last 7 days | The recommendations are unchanged, or the brief is older than the last one sent |
Alerts have no AI in them because a skipped or failed brief must never silence a stop-loss. The digest has a fingerprint because the job once sent whenever the brief file changed, and every rerun of the routine changes it: three reruns that only reworded the prose sent three extra emails for one set of trades. The fingerprint is symbol, market, entry band, stop and target, sorted. The record of what actually reached Resend is written only after a successful send, and the merge job sends before it commits, so that record ships in the same push as the brief.
AI Writes Research, Code Decides What Ships
AI has one job in Rido: writing trading research. It never reads the mail, never categorises, never computes a total, never sends an alert and never places an order. Everything it writes passes three doors made of code before it reaches the page or the inbox.
| The AI layer | |
|---|---|
| Model | Claude Opus 5, run as two scheduled Claude Code routines: daily at 07.00 WIB, and a weekly deep dive on Sunday at 18.00 WIB. Pinned to Opus 5 after another model's usage limit stopped one run eight seconds after it started |
| Why a routine, not an API call | No cost per run on a subscription already paid for, and it runs whether or not the laptop is on |
| What it reads | A clone of the repo: the written trading method and the daily ranked screen. Its sandbox cannot reach the price feed, so the mail job computes the screen for it. The prompt lives on the routine, not in the repo |
| What it writes | One JSON brief, a market summary and zero or more ideas, pushed to a claude/* branch. It cannot push to main |
| Guardrail 1: the door | The merge job takes only data/research/ from the branch, keeps main's record of what was sent, and refuses a brief dated older than the one on main |
| Guardrail 2: the validator | A malformed brief fails the job, so yesterday's brief stays on the page |
| Guardrail 3: rules in code | Applied every time the brief is read. US stocks only. A symbol must be in the broker's own catalogue, which overrides the model's claim. Reward at least 2 times the risk. A stop closer than 1.8 ATR (average true range, how far the price usually moves in a day) is dropped, and under 2 ATR is warned. Theses stop at 200 characters, the summary at 900. The raw file stays on disk as the audit record |
| Ranking and sizing | Code ranks ideas by reward-to-risk times confidence and funds them down the list against free capital. Ideas past the money are printed as alternatives, not additions |
| How quality is checked | A monthly replay grades every shipped idea by what the price did next. The journal links each trade to the brief that named it. The scorecard compares closed trades with holding the index and refuses a verdict under 20 trades. A ten-year backtest tests the rules themselves |
| What AI never does | Read the mail, categorise, compute totals, alert, or place an order. No broker on offer has a retail order API, and the owner places every order by hand |
| When it fails | Nothing breaks. The page keeps the last valid brief, the alerts keep running because they never depended on it, and a brief with no ideas is a valid answer |
It Grades Itself
Ten years of prices were asked whether the desk's rules deserved it: 970 symbols, from 1 September 2016 to 1 September 2026, net of costs. Holding the index returned +13.2% a year. The desk's first rules returned +1.3%. Only a 3R target paid, at +14.1%, and stops at 1 ATR lost 46.3% a year. In the research document's own words: "Buying SPY and sleeping beat every variant tested, net of costs."
Those numbers carry their own caveats: today's symbol list flatters the strategies by about 1.6% a year, prices carry no dividends, ten years is one bull cycle, and the winner is the best of about 24 variants.
So the page grades itself. The scorecard compares every closed trade with holding the index over the same days, refuses a verdict below 20 closed trades, and says so outright when the index won. None of this is financial advice: it is one person's tool checking its own rules.


How It Fails, and What Each Failure Left Behind
The same few principles recur across the code.
- Idempotent by construction. Row ids come from message ids, broker fills dedupe on the order number, and a second value snapshot on the same day overwrites its own row. Running anything twice adds nothing.
- Look before writing to anything append-only. A dry run previews, a verify run proves the id mapping, and the guard stops a run that recognises nothing.
- Best effort never blocks what matters, and a failure is raised again at the end, so the run still goes red.
- Refuse to write a thin file. The broker's catalogue and the daily screen keep yesterday's file rather than commit a partial fetch.
- Last known good beats blank. Quotes, exchange rates, daily bars and the brief all fall back to the previous good value, labelled as such.
- Never overlap. Each workflow runs one at a time, and the push rebases and retries.
Seven Failures, Seven Fixes
| When | What happened | What changed |
|---|---|---|
| 27 Aug 2026 | A long run found main moved under it. The push was rejected and the whole sync was lost | Pull with rebase and retry the push, up to three times |
| Up to 9 Sep 2026 | The first mail transport's OAuth token died every 7 days, because its consent screen sat in testing. 11 runs failed in a row, and because a failed step ended the job, the stop-loss alert email was silent for six days | Mail moved to IMAP with an app password. Every later step became best effort, and the mail failure is raised again last |
| 9 Sep 2026, the IMAP move | IMAP ids are decimal and the ledger's are hex: a wrong mapping would have imported more than 2,600 emails again | A refusal to guess, a server capability check, the abort guard and a verify run |
| 14 Sep 2026 | A research retry from a day-old clone rolled the brief back, and both the old and the restored brief were emailed | The merge keeps main's newer brief, and the sender refuses any brief older than the last one sent |
| 22 Sep 2026 | The bank changed its sender address. Every run "succeeded" with 0 rows for a week | A subject search that fails the run on an unknown sender, without ever taking rows by subject |
| The bars cache | A double quote in an inline script closed the shell string early. The step "succeeded" on every run while the cache was never written once | The symbol list became a file, and the step reports how many symbols it actually cached |
| Ongoing | Yahoo answers 429, too many requests, on every host for hours at a time | Committed caches, a second source for bars, three tiers for exchange rates and the 8 s deadline |
One Gate, No Session Store
- One gate for everything.
proxy.tsruns on the Edge before every request. A page redirects to the password page and returns to where it was headed; an API call gets a 401 as JSON. - A stateless token. An expiry time plus an HMAC-SHA256 signature of it, a seal only the server can make, made with Web Crypto and compared in constant time. It lives in an http-only cookie for 90 days: "a phone should log in about four times a year". There is no session store.
- A patient login. The login route waits 400 ms before it answers, which slows guessing without bothering a real login.
- Secrets stay out of the repo. The mail password, the GitHub token and the Resend key live in GitHub Actions secrets and Vercel's environment. The repo is private because the data is real.
- No third-party requests from the portfolio page, since the logos were committed.


How It Was Built
Docs came first, in four phases: design, product, data and architecture. Then the build. It was one repo and two tools: planning and research in Cowork, execution in Claude Code.
Between 10 July and 20 October 2026 the main branch took 385 commits. 231 of them were made by the pipeline's own bot account: mail syncs and research merges. The other 154, made by hand or through the app's own write path, fall on 27 distinct days. The scaffold, the dashboard, the parser, ingestion and the write path all landed on one day, 13 July 2026.
No Database
- Context. A few thousand rows a year, one user, free tiers only.
- Decision. JSONL and JSON files in a private repo, with SQLite named as the swap if the volume ever grows.
- Consequence. Every change to the money is a commit that can be read or reverted. The price: the deployed app cannot write to its own filesystem, and the repo must stay private.
GitHub Actions as the Write Backend
- Context. Vercel's filesystem is read-only. The alternative was to read the mail on the laptop and publish Vercel as a snapshot.
- Decision. Scheduled Actions read the mail and commit; typed changes commit through the GitHub API.
- Consequence. The automation runs with the laptop shut. Every write costs a rebuild before it shows on the live site.
IMAP With an App Password, Not the Gmail API
- Context. The OAuth token expired every week, and leaving testing needs a verification that a restricted mail scope cannot realistically pass.
- Decision. IMAP, with OAuth kept as a fallback behind one mail-source interface.
- Consequence. A credential that does not expire, at the price of a second id space that had to be mapped and guarded.
Identity Is the Message Id
- Context. Identical real purchases exist, and the research advised removing duplicates by card, time and amount.
- Decision. Dedupe on the message id, never on content.
- Consequence. A double charge the owner does not want becomes a question instead: same merchant and same amount within 6 hours at Rp 150.000 or more, or within 14 days at Rp 2.500.000 or more. One tap answers it, stored in its own file. The naive rule, same merchant and amount within 14 days, had fired on 391 pairs, 294 of them e-wallet top-ups that are meant to repeat. Every threshold was measured against the real ledger.
Meaning Is Decided at Read Time
- Context. An append-only ledger cannot be corrected in place, and one wrong rule had kept 1,049 rows out of every total.
- Decision. Overrides and rules are applied when a row is read.
- Consequence. A correction or a fixed rule reaches all of history at once. In exchange, every total must be read through
listTransactions().
Thin Routes, a Pure Core
- Context. The test runner does not collect tests under
app/, where the routes live. - Decision. Every rule lives in
src/core; a route only parses, calls and commits. - Consequence. The rules in the 68 core modules are tested without a server or a mailbox.
AI Only Where Its Failure Is Harmless
- Context. A morning job must not depend on a usage quota, and an alarm must not depend on prose.
- Decision. Reading the mail, categorising and alerting are plain code. AI writes research and nothing else.
- Consequence. The system keeps working when the model does not.
A Comment Never Failed a Build
- Context. An audit of the shipped app found the same class of responsive bug five times in five places, and white on the accent green measured 2.7:1.
- Decision. The rules that matter are tests. Five source-lint guards fail the build: on responsive mistakes, on contrast ratios computed from the tokens in both themes, on the server and client boundary, and on how a dialog handles focus and the Escape key.
- Consequence. On a phone the explorer's chrome fell from 666px to 439px, taking visible rows from zero to 5. As of 20 October 2026, 1,251 tests in 70 files pass. Golden tests run against the real ledger and assert invariants and floors, never frozen totals, because the ledger grows every day.


Logos Are Downloaded, Never Hot-Linked
- Context. Drawing a logo from a CDN tells that CDN which stocks are held, on every page view.
- Decision. The mail job downloads each logo once and commits it, and the files are served behind the gate.
- Consequence. The portfolio page makes zero third-party requests.
Light First
- Context. The design started dark-first.
- Decision. Three days in it was turned around: "Restraint reads premium."
- Consequence. Categories are told apart by icon and name, never by colour, and green appears once or twice per screen. Dark mode comes from the same tokens.
Habits Forgive, and Say So
- Context. An unforgiving streak breaks once and is then abandoned.
- Decision. A grace day keeps a streak alive but never counts as done.
- Consequence. The streak is the motivating number and consistency is the truthful one. Keeping them apart stops forgiveness becoming a lie.
AI is deliberately not used for reading the mail, alerts, categorisation or trade execution. And the owner overrode the work five times: no database, light instead of dark, no paid API, no checklist on recurring bills, and the reward floor back from 3 to 2 against the backtest.
Design Details
Restraint Wins
Five research reports came before the design: inspiration, product benchmarks, stack, motion, and UX with data visualisation.
- One confident accent, one hero number and one signature chart.
- A first screen with more than about 7 competing elements loses people, so the target is one hero number and 3 to 5 supporting blocks.
- Bars and lines, not pies and donuts. A calendar heat-map answers "when do I spend?" better than a daily line.
- Red means "you crossed a line", never "you spent money". Ordinary spending is neutral ink.
- Rules alone categorise 60 to 75% of rows, and learning from corrections takes that past 95%. What cannot be placed is shown as uncategorised, never guessed.
- Forgiveness keeps habits alive: an unforgiving streak breaks once and is then abandoned.
One Number, One Accent
- One number. One hero number, framed as agency, with 3 to 5 supporting blocks around it.
- Colour. Light first, with a full dark mode. One slate-navy card holds the focus on each screen, and green appears once or twice.
- Type. One typeface, Plus Jakarta Sans.
- Charts. Every chart and control is hand-rolled. No chart library is installed.
- Money. Whole Rupiah, a dot as the thousands separator, shortened to rb, jt and M, where M is miliar, not million.
- Tone. A missed habit is normal and is never red. Being behind on a goal is a warning, never an error.
- Touch. The audit found about 20 controls under the touch target and 46 values on the home page that were tooltip-only.





Outcome and Next
Numbers as of 20 October 2026.
- Live and in daily use, at no running cost beyond a subscription the owner already had.
- The pipeline runs on its own: 231 of the 385 commits on main were made by its bot account.
- The seeded ledger was 95.8% categorised automatically.
- Twelve screens, plus a password page.
- Not measured: the original targets of nothing missed, no duplicates, 99% job success and an answer in under 3 seconds. They have not been audited, so they are not claimed.
- The honest result of the trading desk is the one its own page prints: holding the index beat every variant tested.
Stated Plainly
- A write shows on the live site only after a rebuild. Fine for one person, and the interface says so.
- One user. Every part of the design assumes one person writing at a time.
- Everything loads into memory. Right at about 3,000 rows. If that ever changes, the storage boundary is one file.
- The data folder is not yet encrypted at rest. It is listed as next.
- Free market feeds are unreliable. Any price can be stale, and the screen labels it.
Next: a wider sweep of trailing stops, encryption of the data folder at rest, goal progress read from account balances, and real habit reminders by email.

Gallery






































