Techon Innovations – home

Designing point-of-sale software that keeps selling when the internet drops

•5 min read•
#POS#Offline-first#Sync
Cover image for Designing point-of-sale software that keeps selling when the internet drops
“A checkout counter cannot wait for a connection. Here is how offline-first design keeps a POS usable, and what to get right when the data syncs back.”

A shop does not stop serving customers because the internet is slow. For a point-of-sale system, that means a lost connection must never mean a blocked sale. Offline-first design treats the network as something that may be missing, instead of something that is always there.

The core idea is simple: every action is saved on the device first, and sent to the server afterwards. When a cashier completes a sale, the sale is written to local storage on the device, the receipt is printed, and the record joins a queue of changes waiting to be uploaded. The cashier never sees a spinner waiting for the server.

The hard part is the sync. When the connection returns, queued sales have to be sent without being counted twice. The usual solution is to give every transaction a unique identifier on the device and make the server ignore any identifier it has already stored. That way a retry after a dropped request is harmless.

Receipt and invoice numbers need a plan as well. If two devices each assume they are issuing the next number, you end up with duplicates. Common approaches are to give each device or branch its own number series, or to assign the final number on the server and show a temporary reference until the sync completes.

Stock levels deserve honesty about what is known. While a device is offline, it only knows about its own sales, so the stock count it shows is an estimate. Good systems apply the queued sales to the central stock when they arrive and flag any item that went negative, so someone can review it instead of the system silently hiding the problem.

Finally, test the failure modes on purpose. Turn the network off in the middle of a sale, close the app, restart the device, and bring the connection back while a sync is half finished. A POS that behaves correctly in all of these cases is one a shop owner can trust on a busy day.

Share this articleLinkedInXWhatsAppEmail

More Insights