Engineering Ledger

Architecture Notes & Deep Dives

Honest technical writing on building 60 FPS canvas engines, resilient healthcare database architectures, and autonomous multi-agent developer swarms.

Architecting Offline-First Point-of-Sale: Integer Paisa Math and Transactional Sync Outboxes technical editorial banner
Local-First Systems
•9 min read

Architecting Offline-First Point-of-Sale: Integer Paisa Math and Transactional Sync Outboxes

In high-throughput retail environments with fluctuating connectivity, client-side point-of-sale software cannot afford network blocking or floating-point rounding errors. This architectural deep dive examines how 64-bit integer paisa math, Room SQLite WAL transactions, and an idempotent sync outbox state machine guarantee zero data loss and sub-second checkout speeds.

Native AndroidKotlinRoom SQLiteOffline-FirstDistributed Systems
Read Full Architecture Note
What 2 AM Hospital Bugs Taught Me About Database Isolation technical editorial banner
Systems Architecture
•8 min read

What 2 AM Hospital Bugs Taught Me About Database Isolation

When building the Pharma Compliance Engine for hospital pharmacies, an audit failure is not a mild inconvenience: it carries legal liability and patient safety risks. Here is how we designed append-only ledger tables, bi-temporal tracking, and row-level security in PostgreSQL that survive regulatory inspection.

PostgreSQLDatabaseHealthcareCompliancePrisma
Read Full Architecture Note