Insights / Engineering

Designing an offline-first point of sale

A shop cannot ask a customer to wait for the internet. If a point of sale depends on a live connection for every sale, each outage becomes lost revenue and a queue at the counter. Offline-first design treats the connection as a bonus, not a requirement.

Start with a local record of every action

The till should write each sale, refund and stock change to local storage first, and show it as done immediately. A background process then sends the records to the server. The cashier never waits for the network.

Make every sync safe to repeat

Connections fail halfway. If the same sale is sent twice, the server must recognise it and ignore the duplicate. Give every record a unique identifier created on the device, and have the server treat each identifier as processed once.

Decide how conflicts are resolved before you build

Two tills may change the same product's stock while both are offline. Agree the rule in advance. For stock, it is usually better to record movements (sold one, received ten) than to overwrite a total. Movements add up correctly in any order.

Show the state of sync clearly

  • Show whether the till is online, offline or catching up.
  • Show how many records are waiting to be sent.
  • Make failures visible and give staff one clear action to resolve them.

Test the bad days

Test with the connection off for hours, with it dropping mid-sync, and with two devices editing the same item. These cases decide whether a shop trusts the system.

Offline-first design takes more thought at the start, but it removes a whole class of problems for the shop owner. It is one of the first questions we ask when we plan retail and field-work software.

Have a question about your project?

Talk to the teamDownload company profile
Need a break?