Personal project · built for my own household

Your bank tells you where the money went. Not what you bought.

A statement records a merchant and a total. One Costco line is groceries, washing-up liquid and a kid's winter coat, and no amount of categorising that single row will separate them. ez-finance parses the statements, reconciles every one against its own printed totals, and uses photographed receipts to split a shop into what it actually was.

What the bank tells you
Point of sale purchase | Costco Wholesale−$311.73
one line · category: groceries
photograph the receipt
What was actually bought
  • groceries$149.41
  • household$77.34
  • pets$44.99
  • clothing$39.99

Illustrative amounts. A database constraint, not application code, makes the split sum to the original charge.

The basket problem

Warehouse shops are the single biggest line in most household budgets and the least informative. Averaged over a year, “groceries” quietly absorbs furniture, clothes and pet food, and any conclusion you draw from it is wrong in a direction you cannot see.

A receipt fixes it, but only if the split is trustworthy. Here the allocations are required to sum to the original charge by a deferred database constraint. An unbalanced split cannot be committed, so a rounding slip can never quietly corrupt a category total.

The same mechanism turns ATM withdrawals into itemised spending. Without it, where that cash went is unknowable by construction.

Statements, parsed

Drop in the bank's PDFs; the filenames do not matter. Each is renamed from its own contents, and one you already have is detected by account and period rather than by name.

Receipts from your phone

Photograph a receipt, and its line items split the matching charge across real categories. Search them later by item name; the search is fuzzy, so a misspelling still finds it.

Spending that compares

Last month, last quarter and year to date are each set against the equivalent previous window, because a category being large is not a finding and a category growing is.

An assistant with no imagination

Ask questions in plain language. Every figure is computed in SQL and copied, never estimated, and the lookups are shown beside the answer so you can check them.

Two people, one household

Both partners upload, both see everything, and every row records who added it. Invitations are explicit: signing in grants nothing on its own.

Investments, as a balance

Quarterly statements become what the accounts are worth, checked to the cent against the totals they print. Contributions are told apart from what the market added, because they are not the same achievement.

Tax, as a capacity

Notices of Assessment become contribution room: what you are allowed to put in, which no bank statement knows. Room is valued at your marginal rate and labelled deferred, never saved.

Delete any of it

Every file you uploaded is listed on one page, and any of them can be deleted, record and stored document together. Or empty the whole thing in one go.

Your credentials, and your data

This app holds statements with account numbers on them and photographs of what a household buys. Two questions follow from that, and neither has a reassuring-adjective answer: what could someone else reach, and what can you take back.

Nothing to steal

  • No password to breach. Sign-in is Google. This app never sees a password, so there is none here to leak. Password sign-in is switched off outside development entirely, rather than left as an unused door.
  • No bank connection. Nothing here holds a banking credential, an OAuth token to your bank, or a screen-scraping login. Documents are uploaded by hand, which is slower and cannot be used to move money.
  • Signing in grants nothing. Google proves an email address and stops there. Access is a separate, server-checked membership, re-read on every single request, so revoking someone takes effect immediately rather than when their session expires.
  • Three locks, not one. An account has to pass the Google consent screen, an explicit address allowlist, and the membership check. The allowlist fails closed: misconfigure it and everyone is locked out, which is the safe direction to fail.

Nothing exposed

  • Documents are private objects. Statement PDFs and receipt photographs are stored with private access and served only through a route that checks who you are and that the document is your household's. Their storage addresses never reach a browser.
  • Every query is scoped by household at the point it is written, not by a filter someone has to remember. A linter stops queries being written anywhere else.
  • The assistant cannot improvise. It has typed tools that compute in SQL and no free-form query tool at all, so there is no prompt that makes it read something it was not built to read.
  • No public route reads your data. The one that once existed was deleted rather than hardened.

And you can take it all back

Your data lists every statement, notice and receipt you have ever uploaded, with what each one produced. Delete any of them and the record goes with the document: the transactions a statement produced, or a receipt's line items and its photograph. One button empties the account entirely.

Deletion is done a document at a time because that is the honest unit: a statement missing a single row would no longer add up to the totals the bank printed on it. And it is real deletion: the rows and files are removed, not hidden behind a flag that leaves the data in place and stops showing it to you.

How it's built

The interesting problems here were not the UI. They were about trusting numbers: how do you know a parser did not silently drop a row, and how do you stop a correction from quietly rewriting history.

177
statements parsed
four document types, since 2022
6,639
transactions
every one reconciled
100%
match printed totals
not the closing balance
96
test suites
TypeScript and Python
01

Reconcile against the statement's own totals, never the closing balance

The first parser reported 40 of 47 statements clean. It was wrong. A marketing sidebar was bleeding into the transaction column and dropping rows. The closing balance still matched, because a dropped row breaks the running balance only until the next row resets it.

Now every statement is checked against its own printed “total withdrawals” and “total deposits”, to the cent. A statement that does not reconcile is rejected rather than imported with a warning nobody reads.

02

An append-only ledger, with classification as a separate event

Transactions are immutable and a database trigger rejects UPDATE and DELETE. A category is not a column on the row; it is the current allocation set, and correcting one supersedes the old set rather than overwriting it. Every past classification stays queryable, with who decided it and when.

A correction also teaches the next import: it pins the merchant, so the fix applies to future statements without anyone editing a rule.

03

Refuse rather than guess

Receipts auto-match a transaction only when the evidence is unambiguous: exact amount, close date, matching merchant, and a clear gap to the runner-up. Two plausible candidates is precisely when guessing does the most damage, so it asks.

The same rule runs throughout. An extraction whose items do not sum to the printed total goes to review. A merchant the rules do not recognise is left uncategorised and listed, not assigned to something plausible.

04

The AI gets typed tools, not a SQL prompt

The assistant has seven tools that compute in SQL and return figures already formatted, so the model copies strings rather than doing arithmetic in prose. Exclusion rules live in the query, not the prompt: asking for transfers returns zero even though the rows exist.

There is no free-form SQL tool. Making one safe needs a restricted role, a query parser and a timeout, and it would still leave an exfiltration surface, since descriptions carry names and account numbers.

05

Deleting is a document at a time, and the ledger stays append-only

“Delete my data” and “you cannot rewrite history” sound like opposites. They are reconciled by choosing the right unit: a transaction exists because a statement produced it, so the statement is what gets deleted, and everything it produced goes with it in one step. Nothing partial is left behind to disagree with anything.

The append-only trigger was kept rather than dropped. It now carries a condition that only a purge sets, and only for its own database transaction. The app, every script and a hand-typed statement all still meet the same refusal, and the one exception has to be asked for out loud.

Stack

Frontend
Next.js 16 App Router, React 19, Tailwind 4, hand-rolled SVG charts
Data
Postgres on Neon, Drizzle ORM, deferred constraint triggers, pg_trgm + tsvector search
Parsing
Python and poppler in a container, pinned and covered by golden-output tests
AI
OpenAI-compatible models behind typed tools, with a rate limiter and confidence floor
Auth
Auth.js with Google; an allowlist that fails closed, plus explicit household membership
Hosting
Vercel, web and parser as bound services with no public route to the parser