Offline-first is an architecture, not a feature you add later
Bolting sync onto an online-first app is a rewrite wearing a trench coat. What offline-first actually costs, and what it buys.
Daniel Oyelaran
Senior Mobile Engineer

Every offline-first project we have taken over from another vendor had the same shape: an app that fetches from an API, plus a cache layer someone added in month five when the complaints started, plus a growing pile of special cases for what happens when the cache and the server disagree.
That is not offline-first. That is an online app with a memory, and it will lose data.
The actual difference
In an online-first app, the server is the source of truth and the device holds a copy. In an offline-first app, the device is the source of truth for its own writes and the server is where writes go to meet each other.
That is a data-model decision, not a networking decision, which is why it cannot be retrofitted cheaply.
Concretely:
- Every write goes to the local store first and the UI reflects it immediately. There is no spinner, because there is nothing to wait for.
- Writes are queued as intentions — "add 4.2 to this reading", not "set this record to X" — so two devices editing while offline can both be honoured.
- Every record carries a device-scoped identifier generated locally. The server never assigns the ID a client needs.
- Conflict resolution is explicit and per-field, decided in design. Last-write-wins is a decision to lose data, made quietly.
What it costs
Roughly 20–30% more engineering on the data layer, and a design phase that has to answer questions people would rather defer: what happens when two field agents survey the same farm on the same morning? What does the user see when their offline edit loses a merge?
Those questions do not go away in an online-first app. They just get answered at 2am by whoever is on call.
What it buys
Terra Field runs on $120 Android handsets in regions with no cellular coverage at all. Three thousand one hundred agronomists submitted four hundred thousand surveys in year one with zero data loss. There is no amount of retry logic that gets you there from an online-first architecture.
Helio Care's patients are in villages with one bar of signal. Adherence to daily readings went from 34% to 79% — the readings were always being taken; they were being lost.
Where it is not worth it
An internal dashboard on office Wi-Fi. A checkout flow that must be server-authoritative anyway. Anything where a stale read is more dangerous than no read — trading, medical dosing, access control.
Offline-first is a real cost. Pay it when your users are somewhere the network is not.
