Live app: https://tillbook-m-ahnaff.vercel.app (click Load sample data to explore)
A private, offline-first personal expense tracker. Accounts, transactions, transfers, budgets, recurring bills, reports and CSV import/export, in a dense ledger-style interface.
Your data never leaves your browser. There is no sign-in, no server and no analytics. Everything is stored in this browser's
localStorage. Use Settings → Export full backup to keep a copy or move to another device.
Built with Next.js (App Router, TypeScript strict, Tailwind CSS v4) and exported as a fully static site.
- Accounts: cash, bank, credit card and savings, each with an opening balance, a live balance and archive.
- Transactions: expenses, income and transfers between accounts. Fast entry (
nanywhere, amount first, last-used account and category, a known payee fills in its usual category and account), edit, delete with Undo, multi-select to re-categorize or delete. - Ledger: grouped by day with day totals, sticky header, running balance when filtered to one account. Search and filters (date range, account, category, type, amount range) live in the URL, so every view is linkable.
- Categories: sensible defaults for income and expenses; add, rename, recolor, archive.
- Budgets: a monthly limit per expense category that carries forward until changed, with on track / at risk / over based on spend versus how much of the month has passed.
- Recurring: weekly, monthly or yearly rules (every N periods, optional end date). Due items post automatically when the app opens or regains focus; the 31st means the last day of shorter months, 29 Feb falls back to 28 Feb in common years.
- Dashboard: this month's income, spending and net versus the same days last month, cumulative spending chart, spending by category, budgets, upcoming bills, accounts.
- Reports: any date range, category breakdown with share and change versus the previous period, 12-month income/expense trend, CSV export.
- CSV import: column mapping with auto-detection (delimiter, header, date format, decimal comma), signed or debit/credit amounts, a preview, duplicate detection against the account, per-row errors and an import summary.
- Polish: keyboard shortcuts (
nadd,/search,j/kmove,xselect,eedit,Backspacedelete,gthen a letter to navigate,?help), light and dark themes, responsive down to 360 px, reduced-motion support.
| Where it lives | localStorage key tillbook:v1 in this browser, on this device. Clearing site data, using a different browser or a private window means a separate (or empty) copy. |
| Backup | Settings → Export full backup downloads a JSON file with every record, your settings and a schema version. |
| Restore | Settings → Restore from backup. The file is validated, you see what it contains next to what you have now, then choose Replace (swap everything) or Merge (add missing records by id, keep the newer edit of a transaction). |
| Spreadsheets | Export transactions as CSV from the ledger, Reports or Settings; import CSV from your bank under Transactions → Import. |
| Start over | Settings → Clear all data (with confirmation). Load sample data fills six months of example data. |
- Versioned schema with migrations. Data is stored as
{ app, version, rev, savedAt, data }. Older versions are migrated on load (an untouched copy is kept first); data from a newer version is never overwritten. - Validated on every load (zod). If stored data is damaged, the app keeps an untouched recovery copy, pauses saving, and offers to download it, repair (keep every valid record), or start empty. It never silently wipes anything.
- Batched writes. Changes apply instantly in memory and are written shortly after, and immediately when the tab is hidden or closed.
- Several tabs at once. Saves are compare-and-swap on a revision number. If another tab saved first, this tab replays its own pending changes on top of the newer data, so neither tab's edits are lost. Tabs update each other live through the
storageevent. - Full storage or private mode. A full quota shows a clear banner and keeps your changes in memory until they can be saved. If the browser blocks storage entirely, the app runs in memory with a warning to export a backup.
- Content Security Policy on deploy (
connect-src 'self'), so the page can't send data to other hosts.
- Amounts are integers in minor units of your single currency (cents, yen, fils), never floats. Formatting goes through decimal strings with
Intl.NumberFormat. - Sign convention: a transaction's
amountis always positive;kinddecides the direction. Expense: account − amount. Income: account + amount. Transfer: one row withaccountId(−) andtoAccountId(+), so every transfer nets to zero and balances always reconcile. - Dates are calendar dates stored as
YYYY-MM-DDstrings; arithmetic is done in UTC so time zones and DST can't shift a day. "Today" is your browser's local date.
Requires Node 20+.
npm install
npm run dev # http://localhost:3110npm run lint # ESLint
npm run typecheck # next typegen + tsc
npm test # Vitest unit tests (domain logic and storage)
npm run build # static export to out/
npm start # serve out/ on http://localhost:3110src/
app/ routes (all static): dashboard, transactions, import, accounts,
budgets, recurring, reports, settings
components/ shell, dialogs, charts (hand-rolled SVG), views per route
lib/domain/ pure logic: money, dates, ledger, budgets, recurring, csv,
schema + migrations, backup merge, sample data (unit tested)
lib/store/ storage backends, versioned repository, the store
(useSyncExternalStore), actions (unit tested)
The site is a static export, so any static host works. On Vercel, import the repository as a Next.js project; no environment variables are needed. vercel.json adds a Content Security Policy and other security headers.
MIT © m-ahnaff