Christoffer Johansen
CJ.OS / projects / finn-ai

$ open finn-ai

Finn.

A budgeting app that reads your bank, plans the month against it, and writes the review when the month closes.

Role
solo
Years
2026–
Status
live
Stack
typescript · hono · react · postgres · plaid · claude

Every budgeting app I tried made me do the bookkeeping first and gave me the insight never. Finn is the other way round. You connect a bank once, through Plaid, read-only, and from then on the transactions arrive on their own and land on a plan. While the month is open there is one number: safe to spend. When it closes, Finn writes a review of it, without being asked.

The shape of it

A month is a window: a plan, what was spent against it, and a written review once it is over. Everything in the product is a view on that window. The front page is the number and Finn’s read on the month. The ledger is the transactions, already sorted onto budget lines, with the bills that repeat picked out. Two years of history come with the connection, so the first month already has a last month to compare against.

Finn speaks first. There is no chat box. It asks one question a day, at the top of the page, and a tap answers it. If something is worth saying, it says so, in writing, from figures it has already worked out. It can explain a month. It cannot invent one.

What it cannot do

Move money. There is no payment screen and no transfer to disable, because none of it was built. Plaid holds the bank connection and Finn never sees a password. Sensitive fields are encrypted at rest. Cancel, and the connection closes; the history stays readable.

How the model is used

Sparingly, and never to do arithmetic. The first version had a chat drawer with a dozen read tools and a persona. It was deleted. Handed raw totals and asked to find patterns, a model either restates the dashboard or invents a story, and someone who does not know which question to ask gets neither.

What replaced it is a rule: the model narrates, the code computes. A closed month’s review is the only surface a model writes. Its drivers — what moved, against what baseline, by how much — are computed deterministically first, and the prompt forbids the model from working anything out on its own. The open month is explained by the same drivers with no model call at all. The daily question is picked by a ranked, model-free selector. Where a judgement is needed that was never prose to begin with — is this recurring charge a commitment or a habit — a typed-decision service answers a typed question and returns a typed answer, with a confidence, and is optional: without a key the product is worse, never broken.

Call sites pick a workload tier, deep, balanced or fast, and never name a model. The defaults are Opus, Sonnet and Haiku; a config change points a tier at OpenRouter or a local model instead. Providers are called with raw fetch() and no vendor SDKs, so the wire format is explicit and retries, timeouts and tracing are mine. Every call is booked against a global daily spend ceiling that lives in a Postgres row, so it stays exact if the API ever scales out.

The stack

A TypeScript monorepo, strict and ESM, on npm workspaces and Turborepo. Apps depend on packages and never on each other, and dependency-cruiser fails CI when they try.

  • API. Hono on Fly.io. It is deliberately thin: HTTP, auth middleware, the Inngest handler. Everything with business meaning lives in one use-cases package so the API, the MCP server and any future entry point run the same domain code. A use case is three files — orchestration, repository, Zod schemas — and returns a Result, never throws, so the failure set is in the type.
  • Web. React 19 on TanStack Start, deployed as a Cloudflare Worker. Router, Query and Form from one vendor. The API client’s types are generated from the OpenAPI spec, which is generated from the Zod schemas; CI fails on drift.
  • Database. Postgres through Drizzle, which is type-safe SQL rather than an ORM pretending not to be. Integrity lives in the schema: checks, foreign keys, partial indexes. Money is integer cents everywhere; the conversion happens at exactly one boundary. Nothing user-owned is ever hard-deleted. A plan line you remove ended today; a review of last March still shows the plan that was in force in March. For a financial product the past is the product.
  • Encryption. Sensitive columns are AES-256-GCM with a random IV per row, and lookups go through an HMAC blind index in a sibling column, so “is this email registered?” is answerable without decrypting anything. In production the data key is wrapped by AWS KMS and the raw key never sits in an environment variable.
  • Jobs. Inngest: durable steps, retries and a schedule without running a queue. Reviews are one idempotent rule — write up any closed month that has none — triggered after every sync and by a daily cron, so a night that failed and a workspace that predates the rule are the same code path.
  • Tests. Vitest, with the API suite running against a real Postgres in a container. No end-to-end suite; the browser is checked by hand.

The services

Plaid for the bank connection, and it is mandatory: there is no manual-entry mode. Clerk for identity, verified statelessly as a Bearer token on every request, which suits the cross-origin split between web and API; the internal user is provisioned lazily on first login. Stripe for billing, and there is no free tier, because the bank connection is the product. Resend for mail. Sentry for errors, with a Slack webhook for anything critical. OpenPanel for analytics. Infisical holds the API’s configuration and syncs it to Fly.

Production is one Fly machine in iad beside a managed Postgres. Migrations run in the release command, and the new machine takes traffic only after its health check passes. The web and marketing sites are two Workers, deployed by hand.

Over MCP

The API exposes one Model Context Protocol endpoint, with Clerk acting as the OAuth server, so a Claude session connects with one URL and one sign-in and reads the same figures and reviews the web app renders. Writes are a separate scope and start with annotations only: a note, a label, which budget line a transaction sorts onto. The rule is that an agent’s writes are interpretations of a verified row, never assertions about the world — no manual transactions, no merchant rewrites, nothing the bank did not say. Every annotation records its source, and the ledger says so: sorted by your Claude. The agent is an actor in the record. It is never a voice.