← Selected work

N2Banking / Banking demo · backend systems

Banking flows built
around the ledger.

N2Banking is a banking demo for deposits and transfers, built on N2BankCore, a Java double-entry ledger with transactional idempotency.

Status
Ledger core implemented · frontend planned
Stack
Java / PostgreSQL / Redis
Core ledger example · transfer EUR 125
Illustrative balanced journal entry for a transfer between two customer accounts.
AccountDebitCredit
Alice · liability125.00—
Bob · liability—125.00
Balanced entry125.00125.00

A matching command retry returns the original journal entry.

Core implemented; demo frontend planned.

01 / Project scope

Deposits and transfers,
with their history.

N2Banking is a larger project meant to demonstrate deposit and transfer banking flows. Its implemented foundation is N2BankCore, a Java ledger. The frontend demo is planned. Lending is out of scope.

The core supports deposits, transfers, withdrawals, fees, reversals, balances and statements. The surrounding application will supply its API, authentication and user interface.

02 / My build

Invariants held
at the transaction boundary.

I built the core around explicit monetary values, balanced debit/credit postings and append-only journal entries. PostgreSQL is the source of truth, and database constraints enforce the journal invariants. Redis is a best-effort balance cache.

Each operation claims an idempotency key, locks the affected accounts and persists its result in one transaction. A matching retry returns the original entry, and the core rejects conflicting inputs.

03 / Verification

Tests for the awkward cases.

The repository includes domain and database tests for balanced entries, duplicate commands, insufficient-funds rollback, concurrent spending, fees and reversals. CI runs against PostgreSQL and Redis.

The core is experimental. Current limits include one ledger per database, manual migrations, a cache consistency race and a precision policy that needs further hardening.

Implementation and invariant evidence ↗

04 / Frontend roadmap

A demo that shows
the ledger rules at work.

The planned demo will connect the core to user-facing deposit and transfer flows. The walkthrough I want to show: deposit funds, transfer between accounts, inspect balances and history, then retry a transfer without applying it twice.

Current milestone: the ledger core. Next milestone: the API and frontend demo.

Tell me what you're working on.

Let's talk ↗Next case study: OpenCode Evict →More work →