Build YNAB
YESreplaces $14.99/mosaves $179.88/yrback to the verdict
A zero-based budget you own: accounts and categories, a monthly grid where every dollar is assigned, a To Be Budgeted figure that turns red when you over-assign, CSV import with remembered column mappings and payee rules, reconciliation against the real bank balance, credit cards handled the way a budget should, and optional bank sync through SimpleFIN for about $15 a year instead of YNAB's price.
Before step 1
Everything below is assumed from the first step. Tick each one when you actually have it, not when you plan to.
- installfree
Why Everything in this build runs on it: the server, the scripts, the tests.
Get it Download the LTS installer from nodejs.org, or install with your package manager (brew install node, or nvm install 22). Restart the terminal afterwards. open ↗
Verify
node --version prints v22 or higher - installfree
Why Every step below is a command you type or a file you edit.
Get it VS Code (code.visualstudio.com), Cursor or Zed. Open a folder for the project and use the editor's built-in terminal. open ↗
Verify
You can open a folder and run a command in its terminal - installfree
Why History for your code, and the way most hosts deploy.
Get it Install from git-scm.com or with your package manager, then run git init in the project folder once it exists. open ↗
Verify
git --version prints a version - have readyfree
Why Phase 4 imports real data; you need a file per account to test column mapping and sign conventions.
Get it In your bank's web app, find Export or Download transactions, choose CSV, last 90 days. Save one per account, including a credit card.
- decidefree
Why The budget grid is built on them. Deciding in a spreadsheet first stops Phase 2 from becoming a planning session.
Get it Groups like Bills, Everyday, Savings Goals; six to fifteen categories total to start.
- have readyfree
Why Reconciliation in Phase 5 needs the true figure.
Get it Read them off the bank apps now and note the date.
- API keyabout $15 a year
Why Automatic bank sync, the one thing CSV import cannot replace. About $15 a year, and what Actual Budget uses for the same job. You never hold bank credentials; the aggregator does.
Get it beta-bridge.simplefin.org > sign up > connect your banks > create an access token (a setup token you exchange once for an access URL). Put the access URL in .env. open ↗
Data model
Create these before the first phase that stores anything. Changing a table later is the expensive kind of change.
- `accounts`: id, name, kind ('checking' | 'savings' | 'cash' | 'credit'),
on_budget (bool), closed (bool)
- `category_groups`: id, name, position
- `categories`: id, group_id, name, position, hidden
- `budgets`: id, month ('YYYY-MM'), category_id, assigned_cents
- `transactions`: id, account_id, date, payee, category_id (nullable),
amount_cents (negative is outflow), memo, cleared (bool), reconciled (bool),
transfer_transaction_id (nullable)
- `payee_rules`: payee_pattern, category_id
Every amount is signed from the account's perspective. A transfer is two rows
pointing at each other, not one row with two accounts · anything else makes
reconciliation impossible to reason about later.Environment variables
These go in a .env file the app reads at startup. The pack's .env.example is this table as a file · copy it, never commit the filled-in version.
| Variable | Needed | Example | Where the value comes from |
|---|---|---|---|
PORT | required | 4820 | Bound to 127.0.0.1 only. |
DATABASE_PATH | required | ./data/budget.db | Your money. Back it up. |
CURRENCY | required | USD | ISO code for formatting. |
DATE_FORMAT_HINT | required | MM/DD/YYYY | Your bank's CSV date format, asked once per account on import and stored. |
SIMPLEFIN_ACCESS_URLsecret | optional | https://...:...@beta-bridge.simplefin.org/simplefin | From SimpleFIN after exchanging the setup token. Empty disables sync. |
The build, in order
Accounts and transactions
Fast keyboard entry, balances computed by query, cents stored exactly.
accounts (id, name, kind, on_budget, closed), category_groups, categories, budgets (month, category_id, assigned_cents), transactions (id, account_id, date, payee, category_id, amount_cents signed, memo, cleared, reconciled, transfer_transaction_id), payee_rules.
terminalmkdir budget && cd budget && git init && npm init -y && npm pkg set type=module npm install express@4 better-sqlite3@13 mkdir data && cp .env.example .env
Keyboard-first: date, payee, category, amount, memo, enter to save. Parse 12.10 into 1210; never store a float.
A cached balance drifts and you cannot tell which number lies.
done when · tick each as it passesCategories and the budget grid
Assigned, activity and available per category per month, with rollover.
activity = sum of the category's transactions that month; available = last month's available + assigned + activity.
done when · tick each as it passesTo Be Budgeted
The header number the whole method rests on.
One query; reconcile it against a hand calculation on a fixture.
This number is the entire method: every dollar has a job, and the app's job is to tell you when one does not.
done when · tick each as it passesCSV import
Import any bank's CSV once you have mapped it, dedupe, and learn payees.
Date, payee, amount or debit/credit columns. Ask the date format once and store it; never guess between DD/MM and MM/DD.
done when · tick each as it passesReconciliation
Match the bank to the cent and lock what matched.
Enter the real balance, see the difference against cleared, tick transactions cleared until zero, lock them reconciled.
An auditable row rather than a silent edit of history.
done when · tick each as it passesCredit cards
Spending on a card moves the assigned money to the card's payment category.
A categorized purchase on a card reduces that category's available and raises the card's payment category by the same amount.
Show the payment category in the grid so the money set aside for the bill is visible.
done when · tick each as it passesReports and backups
Spending by category and net worth, and a backup you have restored.
- terminal
sqlite3 data/budget.db ".backup 'backups/budget-$(date +%F).db'"
done when · tick each as it passesOptional bank sync, honestly priced
SimpleFIN behind an interface, with CSV as the other implementation and no bank credentials in your app.
- terminal
curl -s $(echo $SETUP_TOKEN | base64 -d) # the decoded setup token is a claim URL; POST to it once to receive the access URL
GET the access URL's /accounts, map transactions to your model, dedupe against manual entries by date, amount and payee.
done when · tick each as it passesRun it on a server for two peopleproduct builder
Only if you share the budget: HTTPS, a login, off-box backups.
- terminal
age -r $AGE_RECIPIENT -o backups/budget-$(date +%F).db.age data/budget.db
done when · tick each as it passes
That is the whole plan for YNAB. What it deliberately does not cover is below · check the gaps before you call it a replacement.
- Mobile apps and family sharing beyond two logins.
- The educational method and habit design, which is a real part of what YNAB sells.
- Polished reports.
- bank sync
- mobile apps
- educational method/content
- family sharing
- polished reports
- support
- habit design
- Goals per category (save X by month Y) shown in the grid
- A PWA shell so the phone can add a transaction
Need the files? The project pack on the verdict page hands your agent the whole brief · more personal finance.