The problem
YNAB is a good budgeting app. It is a bad database. It shows the present clearly and the past dimly, and it cannot join your budget to anything else: a retirement projection, a tax calendar, a list of what needs doing this week.
I wanted one database where every household record lands, where every dashboard reads the same tables, and where a family chat bot and an AI assistant can answer from the same truth.
The shape
- A shell script pulls the budget from the YNAB API once an hour, using the API's delta cursor so each run is two requests.
- Every response is stored as it arrived, in an append-only JSON table.
- Pure SQL functions transform the raw rows into normalized tables with soft deletes.
- Views on top compute FIRE progress and the action items for each cadence.
- Metabase reads it all through a read-only role. So does a Signal bot. So does a local model through a tool server.
Principles I set before writing a line
- Raw first. If a transform is wrong, replay it. Never re-fetch history you already have.
- Idempotent everything. Any script or SQL file can be run twice without harm.
- One small machine. The whole thing fits in a few gigabytes of RAM and costs less than a streaming subscription.
- Reconcile on every run. If the computed balance drifts from the app's balance, say so loudly.
A YNAB account with a personal access token, a Hetzner account, a domain on Cloudflare, and a terminal. Everything else is in the repo.
Free to borrow for your feed · Square edition
Where you are: two questions, eight stages, four rules. Next, a machine to put them on.
