Research · Experience report · 2026
How a four-lane supermarket keeps selling when the internet and the power drop — and the twenty field failures that shaped it.
Selling Through the Outage: An Experience Report on an Offline-First, Exactly-Once Supermarket Point-of-Sale in Duhok, Kurdistan
Serdar Dilshad · Independent researcher, Duhok, Kurdistan Region · 2026-10-09 · doi:10.5281/zenodo.23282763
Abstract
Retail software in regions with unreliable grid power and internet links cannot treat the network as part of the checkout. We report on the design, testing and installation of a point-of-sale (POS) and back-office system for a four-lane supermarket in Duhok, Kurdistan Region, built over three months by a single developer. Each till sells from a local SQLite replica and writes every finalized document into a hash-chained outbox in the same local transaction. Documents drain to an in-store Hub and, when the Hub is unavailable, directly to a cloud server. The server applies each document exactly once, keyed by a globally unique document identifier in the same transaction as its stock movements and ledger postings, and it never rejects a money document: anomalies such as oversell are accepted and flagged for human reconciliation. Replication downward uses cursors over a server-assigned sequence and a nightly integrity check. A pure, unit-tested failover function decides when a till may leave the Hub for the cloud, requiring proof before every switch, hysteresis, and monotonic time. We describe these mechanisms; a "direction law" that keeps store-to-cloud replication free of two-way conflicts; a single job-queue pattern through which the owner controls label scales and fingerprint attendance terminals from a phone or tablet; and a catalogue of twenty field failures found during benching and installation, from which we draw six engineering principles. The codebase comprises roughly 310,000 lines across 1,243 commits, 156 schema migrations and 736 test files, including property-based tests of idempotency and replay order-insensitivity. We are explicit about limits: the system is installed but had not yet traded with real customers at the time of writing, so we report design and verification evidence rather than production outage statistics.
Keywords
offline-first · local-first software · point of sale · exactly-once processing · transactional outbox · tamper-evident logs · failover · label scales · fingerprint attendance · developing regions · experience report
How to cite
Dilshad, S. (2026). Selling Through the Outage: An Experience Report on an Offline-First, Exactly-Once Supermarket Point-of-Sale in Duhok, Kurdistan. Experience report. https://doi.org/10.5281/zenodo.23282763
Built and run by Serdar Dilshad.
You don’t need to know the technical terms. Tell me what you want to make possible, or what isn’t working today.