Balance
Opinionated personal finance, built around one promise: every coin is located and explained.
Balance is a personal-finance app for developers who want full control over their money model. It is built on top of Supabase, ships a TypeScript CLI, and uses the **Balance Assertion with Reconciliation** pattern at its core: your real positions (cash in accounts, cards, investments, debts) must always equal the sum of your registered transactions. Delta = 0 or you find out fast.
This is not a YNAB or Mint replacement. It is a self-hosted, code-first alternative for people who like spreadsheets, the command line, and the idea that their financial system should be auditable end to end.
Status: **Beta — building in public.** Used daily by the author to migrate 9 years of Excel history. Schema is stable; UI iterating.
---
## Demo

> Replace `docs/assets/demo.gif` with a real recording. A 20-second loop showing `bal balance` + the dashboard works well.
---
## Features
- **Balance assertion engine.** Position vs. accumulated, delta = 0, or you debug it.
- **First-class CLI.** Add expenses, income, transfers, and debt payments without touching the browser.
- **Web dashboard.** React + Vite SPA: net worth, cash flow, debts, recurring charges, snapshots.
- **Multiple account types.** Cash, debit, credit cards, investments (Fintual integration), debts, receivables, properties.
- **Real-time purchases from Apple Pay (recommended).** An iOS Shortcut posts every Wallet payment to an edge function; the card is mapped to its account and bank emails or Fintoc never book it twice. See `docs/setup-apple-pay.md`.
- **Installment-aware debts.** Buy now, register later: full expense at purchase, monthly debt payments tracked separately.
- **Recurring charges.** Automatic ones (subscriptions, debt installments) are auto-registered by an edge-function cron with month catch-up; manual ones are surfaced at reconciliation so you know what's still on you to pay.
- **Snapshots & immutable history.** Transactions are never edited or deleted — corrections happen via undo / refund / adjustment.
- **Strict isolation.** Postgres RLS on every table. CLI uses short-lived JWTs minted from API keys, never `service_role`.
- **Fully self-hostable.** Supabase free tier is enough for personal use.
## Stack






| Layer | Tech |
| --- | --- |
| Database | Supabase Postgres + RLS + PL/pgSQL functions |
| Edge runtime | Supabase Edge Functions (Deno) |
| Web | React 19, Vite 8, TanStack Router/Query, Tailwind v4 |
| CLI | Node 22+, TypeScript, commander |
| Monorepo | npm workspaces + Turborepo |
| Deploy | Vercel (web) + Supabase (db/functions) |
---
## Quick start (CLI)
The published CLI is `@dreamxist/bal-cli`. You still need a Supabase backend with the Balance schema deployed — see [SETUP.md](./SETUP.md).
```bash
# 1. Install
npm install -g @dreamxist/bal-cli
# 2. Point at your backend + log in with an API key
export SUPABASE_URL="https://