Offline-First
ELI5 - The Vibe Check
Offline-first means you design your mobile app assuming the network is the exception, not the rule, because on a phone it genuinely is: subway tunnels, airplane mode, spotty rural coverage, a dead zone in a parking garage. The app reads and writes to a local database first and syncs with the server whenever a connection happens to show up, instead of freezing every time the signal drops.
Real Talk
Offline-first is an architectural approach where an app's primary source of truth is a local, on-device database, with changes synchronized to a remote server opportunistically when connectivity is available, rather than treating the network as required for basic functionality. It typically involves a local persistence layer, a sync engine that reconciles local and remote state, and a conflict resolution strategy for changes made while offline.
When You'll Hear This
"We rebuilt the app offline-first after users kept losing form data every time they went through a tunnel." / "The hardest part of going offline-first wasn't the local database, it was conflict resolution when two devices edited the same record."
Related Terms
CRDT (CRDT)
A CRDT (Conflict-free Replicated Data Type) is a data structure that multiple users can edit simultaneously without conflicts.
Eventual Consistency
Eventual consistency means 'give it a moment and everything will match up.' You write data to one server, and the other servers will get the update...
IndexedDB
IndexedDB is a full-on database living inside your browser.
Sync
Sync means one thing at a time, in order. You order food, stare at the kitchen wall, and only get to sit down when the food arrives.