The problem, stated properly
The till has to work when the network doesn't. Load-shedding, a dropped LTE signal, a tablet in a container with thick walls: none of that can stop a sale. So the device holds the product master, the tiers, the customers and an outbox in IndexedDB, and syncs batches when it can. Everything downstream of that decision follows from it.
The site has a single call to action, pay less with card, and every page either supports it or gets cut. Prices are the whole reason someone visits a shop's website, so the price list is the product, not a sub-page. Prices live in one JSON file the owner edits; no rebuild, no developer.
The rule that shaped it
Stock and the wallet are append-only ledgers. A balance can never go below zero.
These are constraints in the database, not conventions in the app. All money is integer cents. A wallet adjustment without a reason is refused. A gateway reference can be credited once. A card holds no balance, only an id, so a lost card is voided and replaced without touching the money.





