Offline-first sync:
what actually breaks in production
We built offline sync into ClinicLoop and learned the hard lessons on our own product first. Here is what breaks, in the order it breaks.
Why offline-first is a promise, not a feature
ClinicLoop serves clinics in parts of Tasmania where reception is aspirational. Offline-first was not a nice-to-have; it was the product. That also meant every naive sync decision we made got found by a real user, usually within a week.
Three years in, the failures sorted into a clear order. If you are building sync, expect them in this sequence.
What breaks, in order
First: naive last-write-wins. Two devices edit the same appointment offline, and whoever syncs last silently erases the other change. Fixed by treating conflicts as a UI problem, not a storage problem: show both, let the user pick, log the decision.
Second: clock dependence. Devices with wrong times produce sync orders that look insane in the logs. Server-assigned sequence numbers ended that argument permanently. Third: the retry storm, where a flaky connection plus aggressive retries drains the battery and the user's patience. Exponential backoff plus a visible 'waiting for connection' state fixed both.
Sync conflicts are not an edge case. They are the product, wearing a disguise.
Fourth, and the one that took longest to learn: partial sync states that look complete. An appointment visible locally but unconfirmed server-side needs a marker, or staff book over it. The UI honesty requirement turned out to be bigger than the engineering one.
The rules that survived contact
What we now build into every offline-capable feature:
- Server-assigned ordering, never device clocks
- Conflicts surfaced to users, never silently resolved
- Local state labelled honestly: saved, queued, confirmed
- Back-off retries with a manual 'try now' escape hatch
Get these four right and offline stops being the feature that wakes you up. Get them wrong and the app store reviews will explain it to you in detail.
When offline-first is the wrong call
Honest answer: more often than vendors admit. If your users are reliably connected, read-through caching gets you ninety percent of the perceived benefit for twenty percent of the engineering cost. Reserve full sync for the apps where dead zones are guaranteed.
That trade-off conversation is part of every mobile app scoping call we run, because it changes the budget by more than any other single decision.
Daniel wrote the first version of ClinicLoop's sync engine in 2021 and has been fixing his own assumptions ever since.
Building an app for bad coverage?
Offline sync done right is expensive; done wrong it is unaffordable. We scope the difference before you commit.
