Build YNAB

YESreplaces $14.99/mosaves $179.88/yrback to the verdict

0%0 of 25 items done

Saved on this device only. Tick prerequisites first, then work the phases in order · do not start one until the checks above it pass.

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.

estimated effort weekendthe files for this build are in the project pack

RuntimeNode 22 with Express and better-sqlite3MoneyInteger cents, never floatsDatesYYYY-MM-DD strings, not timestampsHostinglocalhost only

Before step 1

Everything below is assumed from the first step. Tick each one when you actually have it, not when you plan to.

  1. 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

  2. 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

  3. 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

  4. 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.

  5. 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.

  6. have readyfree

    Why Reconciliation in Phase 5 needs the true figure.

    Get it Read them off the bank apps now and note the date.

  7. 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.

VariableNeededExampleWhere the value comes from
PORTrequired4820Bound to 127.0.0.1 only.
DATABASE_PATHrequired./data/budget.dbYour money. Back it up.
CURRENCYrequiredUSDISO code for formatting.
DATE_FORMAT_HINTrequiredMM/DD/YYYYYour bank's CSV date format, asked once per account on import and stored.
SIMPLEFIN_ACCESS_URLsecretoptionalhttps://...:...@beta-bridge.simplefin.org/simplefinFrom SimpleFIN after exchanging the setup token. Empty disables sync.

The build, in order

  1. Accounts and transactions

    Fast keyboard entry, balances computed by query, cents stored exactly.

    1. 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.

      terminal
      mkdir 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
    2. Keyboard-first: date, payee, category, amount, memo, enter to save. Parse 12.10 into 1210; never store a float.

    3. A cached balance drifts and you cannot tell which number lies.

    done when · tick each as it passes
  2. Categories and the budget grid

    Assigned, activity and available per category per month, with rollover.

    1. activity = sum of the category's transactions that month; available = last month's available + assigned + activity.

    done when · tick each as it passes
  3. To Be Budgeted

    The header number the whole method rests on.

    1. One query; reconcile it against a hand calculation on a fixture.

    2. 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 passes
  4. CSV import

    Import any bank's CSV once you have mapped it, dedupe, and learn payees.

    1. 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 passes
  5. Reconciliation

    Match the bank to the cent and lock what matched.

    1. Enter the real balance, see the difference against cleared, tick transactions cleared until zero, lock them reconciled.

    2. An auditable row rather than a silent edit of history.

    done when · tick each as it passes
  6. Credit cards

    Spending on a card moves the assigned money to the card's payment category.

    1. A categorized purchase on a card reduces that category's available and raises the card's payment category by the same amount.

    2. Show the payment category in the grid so the money set aside for the bill is visible.

    done when · tick each as it passes
  7. Reports and backups

    Spending by category and net worth, and a backup you have restored.

    1. terminal
      sqlite3 data/budget.db ".backup 'backups/budget-$(date +%F).db'"
    done when · tick each as it passes
  8. Optional bank sync, honestly priced

    SimpleFIN behind an interface, with CSV as the other implementation and no bank credentials in your app.

    1. 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
    2. 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 passes
what this build does not replace
after v1, if you want it

Need the files? The project pack on the verdict page hands your agent the whole brief · more personal finance.