Offline-First POS
IndexedDB-backed POS designed for low-connectivity retail environments. Works fully offline with Service Workers, queues transactions locally, and syncs cleanly when network returns.
A POS that doesn't care if your internet works.
The problem
Most cloud POSes die the moment Wi-Fi flickers, which is unacceptable in markets, rural shops, kiosks, and food trucks — exactly the kinds of merchants who can't afford backup connectivity. The store can't tell a customer 'sorry, the internet is down'.
The approach
Inverted the dependency: the local app is the source of truth, and the cloud is the eventually-consistent replica. Catalogue, transactions, and customer data live in IndexedDB and the entire UI works fully offline. A Service Worker queues every transaction with a monotonic local ID; when the network returns, a background sync replays the queue against the server with conflict resolution. The cashier never knows the network was down.
Tech decisions
Outcomes
- Full POS flow (catalogue → cart → checkout → receipt) works fully offline
- Transactions queue locally and sync on reconnect with no data loss
- Cashier UX is identical whether online or offline
- Tested across simulated connectivity drops and tab kills
What I learned
Offline-first is a design choice, not a feature to bolt on. You either own the local database from day one or you spend forever retrofitting consistency. Service Worker background sync is criminally underused — it's a one-line API for a hard problem.