All field notes

Build a Finance App With Claude Code or Codex Using Synthetic Bank Data

Give your coding assistant a realistic fixture and keep your household ledger in production. Test refunds, transfers and missing accounts before connecting a bank.

By BankSync4 min read
A paper house prototype and a sample ledger on a drafting desk.

Design the app so the household owns its financial record independently of the coding assistant. The production database holds transactions, reviewed categories and decisions. A replaceable local model explains query results. That lets you improve the interface or change models without asking a conversation to reconstruct the ledger.

Give Claude Code or Codex a fictional ledger that behaves like yours. The assistant can build a useful application against that contract while your real bank records stay in a different environment. A local terminal and a locally hosted web page say little about where model inference happens. The files and services a development session can access determine what could enter its context.

Start with an invented household

Use two imaginary accounts, a checking account and a card, in one currency. Create a grocery debit of 62, a refund of 10, a 100 payment to the card and the corresponding 100 credit. Set your fixture's sign convention explicitly. The grocery spending report should return 52. The card repayment should contribute zero to household spending across those accounts. Add another real-looking grocery debit of 62 with a different ID: two equal purchases can be legitimate.

Write those expected outputs in the repository with the fake inputs. Use invented merchants, dates and account IDs throughout, including screenshots, stack traces and API examples. Redacting a name on a real statement leaves a recognisable pattern of places and times. A fixture you invent is also easier to discuss in a bug report.

The coding assistant reads invented records in development. Only reviewed application code moves to the private production environment.
Move the reviewed build across environments. Keep the bank key and the real database in production.

Give the coding assistant a precise brief

A productive first request is: “Build a local report for the supplied fixture. For each complete calendar month, return posted spending grouped by currency and category. Deduplicate by account and source ID, preserve genuine repeated purchases and exclude the two matched transfer legs. Link each total to the included fixture IDs. Make the tests fail if an account is missing.” This describes behaviour detached from any live credentials.

Open only the development workspace. Leave production database mounts, environment files, cloud backup folders and banking connectors outside it. Run the model-assisted session as an account without access to production. Review file contents and command output before sharing diagnostics. Anthropic documents what Claude Code sends during normal operation. For Codex, confirm the provider selected for your installation. Claude Code data usage · Codex CLI

Fixture assertions for the first pull request

InputExpected resultWhy it matters
EUR 62 purchase and EUR 10 refundEUR 52 net spendingExercises signed amounts
EUR 100 credit-card payment on both accountsEUR 0 household spendingSeparates transfers from purchases
Second distinct EUR 62 grocery debitEUR 114 net spending including refundEqual values can be distinct events
Replayed source IDPrior total stays EUR 114Retrying must be safe

Promote the build without promoting its permissions

Have the app depend on a narrow storage interface such as monthly_spend(period, currency) and evidence(report_id). Development reads the fixture. The deployed process reads a restricted view from the household database. The collector owns the bank credential. The runtime model only sees the small evidence packet assembled for the current report. Use a locally installed runner in production and present a visible failure if it is unavailable.

A particularly revealing acceptance test is to uninstall or sign out of the coding tool after building the application. The deployed report should still work. Then stop the local model runner. The figures should still agree with the fixture while the explanatory paragraph disappears. These two failures exercise different dependencies.

What the fixture must prove. Overlapping import, Same source identity twice, One posted expense. Transfer pair, Opposite account legs, No household spending.
What the fixture must prove.

Give the first screen a definition of done

A fixture-only pull request is ready when a reviewer can start the dashboard, choose the sample month, see EUR 52 and click through to the two entries that produce it. Include a visible period label and currency. Offer a second fixture that intentionally drops one account. This makes an incomplete import a design case somebody can see during development.

Three tests before connecting a real account

  1. Introduce a late refund

    Keep the original charge and the later credit. Check the month recognised by the chosen accounting rule.

  2. Break one account import

    Verify that the web page shows the missing input and suppresses misleading comparisons.

  3. Read the deployed configuration

    Confirm the model URL points to the intended private host and production logs contain only run IDs and counts.

What stays with the household?

The application source can be reviewed by a coding assistant using the fabricated data. Live records, reports and local inference belong in the isolated runtime you configured. Automatic collection still uses BankSync and its bank connection provider. If the same application accepts a manual CSV adapter, you can rehearse a complete run offline or continue using it when a bank connection needs attention.

Continue building with Analyse Spending With Ollama and a Small Local LLM and Sync Bank Transactions to Local PostgreSQL With BankSync.

Related field notes