All projects

ledgr

Double-entry personal finance

status
Live demo on Fly.io
year
2026
areas
Backend, Data

A personal finance system built the way accounting software is: every transaction becomes balanced, permanent ledger entries. It reads my real bank statements, checks each one against its own printed totals, and stages every transaction for me to categorise before it posts, then shows where the money went. There’s a live demo.

The ledgr demo’s stats step for September 2026: spent, earned and net, a bar for each spending category, and a month-by-month chart of earned against spent.
The live demo’s stats: where the month went by category, and month by month. The demo account’s history is synthetic.

Details

  • Double-entry ledger in FastAPI and SQLAlchemy that enforces a balanced-entry invariant at write time.
  • Posts are idempotent via an external ID, so re-importing the same statement never duplicates money.
  • Entries are immutable: corrections are reversals, never updates or deletes.
  • Hierarchical accounts (Assets:Checking:HSBC, Income:Salary). Balances are always computed by query, never stored.
  • Bank-specific parsers for HSBC (PDF) and Revolut (Excel/CSV), each validating itself against the statement’s printed balance before posting anything.
  • Parsed transactions are staged for review instead of posted straight away: the app suggests a category from ledger history, and I confirm them one at a time or in bulk.
  • Deployed to Fly.io on SQLite (Postgres-ready via config): upload a statement, categorise it, see balances.
  • A stats view shows spend by category and month, the change from last month, and the share of income kept.
  • Every posted transaction keeps its statement date, so each month’s totals reflect when money actually moved.
  • Next, as a stretch: automatic categorisation.

Screenshots

Reviewing one of four imported transactions: TESCO STORES 4521, -41.20, with groceries suggested as its category.
Reviewing an imported transaction: a suggested category to confirm or change.
A table of every account in the demo ledger with its balance, from the checking account to expenses, income and transfers.
Every account’s balance in the double-entry ledger.

keys

`
open or close the terminal
j k
next or previous section
0-9
jump to a numbered section (0 is the top)
gg G
top or bottom of the page
/
search everything (a grep in the terminal)
?
this list
esc
close whatever's open

(single-letter keys can clash with screen readers and your own shortcuts)

In the terminal, help lists the commands. Not all of them: try what you'd try on a real one, and eggs keeps score.