Engineering notes
P-Lens Engineering Notes
How P-Lens, an open-source, local-first bookkeeping app, is built: hledger in WebAssembly, Prolog on the device, encrypted sync over Nostr, and SolidJS.
- Law shapes the ledger: modeling Japanese pachinkoJapan's three-shop system from the ground up, and a ledger whose domain model never turns balls into cash inside the parlor.
- Modeling pachinko machines nobody has invented yetPachinko makers keep inventing features, so P-Lens writes each machine as ECS-style component tables, not one type per kind.
- A Discord-like layout in SolidJSA ledger app in SolidJS laid out like Discord: books as servers, two pure functions for which panes show, the URL as the place.
- Beyond money: hledger as an aggregation engineSeconds, kilometres, hours and parts in an hledger journal: virtual postings beside the money, real reports, and the limits.
- Encrypted ledger sync over NostrHow a local-first hledger app syncs a shared ledger over Nostr: keys from one 32-byte secret, AES-256-GCM with AAD, 3-way merge.