Building so the app works without a connection by default — and treating connectivity as the exception, not the assumption.
An offline-first app stores data locally and treats the network as an optimisation rather than a requirement. The user works against the local database; changes queue and sync when a connection returns. The hard part is not storage — it is deciding what happens when two people changed the same record while both were offline.
Field applications fail on connectivity more than on features. A salesperson in a basement, a driver in a tunnel, an engineer on a plant floor — all are places where an app that needs the network is an app that does not work. Designing offline-first from the start is far cheaper than retrofitting it once users have decided the app is unreliable.
SQLite, Hive or Isar holds the working set. The UI reads from it exclusively, so screens never wait on the network.
Changes are written locally and appended to a durable queue. The queue survives restarts, because an app that loses queued work once loses user trust permanently.
On connectivity, the queue drains to the server and changes are pulled down. Idempotent operations matter — retries must be safe.
Last-write-wins, server-wins, or field-level merge. Whichever is chosen must be a decision, documented, and visible to the user where it matters.
Users need to know what has synced. Silent queues produce duplicate entry when people assume something failed.
Two warehouse staff count the same bin while the building's wifi is down. One records 47, the other 52. Both devices queue their change. Connectivity returns and both sync within a minute of each other.
Under last-write-wins, whichever arrives second overwrites the first and the app reports success to both users. One count is silently destroyed, and there is no record that a disagreement ever happened. The system is confident and wrong, which is worse than being uncertain.
A sound design detects that both edits derive from the same base version and flags a conflict rather than resolving it. Stock counts are exactly the case where a human must decide, because the discrepancy is itself the information. Other fields can safely take last-write-wins — a note, a status flag. The decision has to be made per field, before building, and written down. Conflict policy is a business rule that gets discovered as a technical problem when nobody specified it.
| Term | What it means |
|---|---|
| Local store | The on-device database the app reads and writes, rather than the network. |
| Sync queue | Pending changes waiting to reach the server, surviving app restarts. |
| Conflict | The same record changed in two places before syncing. Needs a resolution rule decided in advance. |
| Last-write-wins | The simplest conflict rule, and lossy. Acceptable for some fields, dangerous for others. |
| Tombstone | A deletion marker, so a delete propagates rather than being resurrected by another device. |
Two offline edits to the same record will happen. Without a defined policy, one silently disappears.
An in-memory queue loses work on a crash. Persist it.
Retries are inevitable. An operation that creates a duplicate on retry will create duplicates.
If users cannot see whether data has reached the server, they re-enter it to be safe.
| Metric | What it tells you | What distorts it |
|---|---|---|
| Sync queue depth | Pending changes per device. A growing queue means sync is failing quietly. | |
| Conflict rate | How often the same record is edited twice. Tells you whether your resolution rules matter in practice. | |
| Time to sync after reconnect | How quickly the device catches up, which shapes the user's trust in the app. | |
| Failed sync retries | Items repeatedly failing, which usually indicates a validation mismatch rather than a network issue. |
We build and support the systems this page describes. Start with a free working proof of concept — no cost, no commitment.