How offline-first sync actually works
Alan Turing
# How offline-first sync actually works
Offline-first is not a feature; it's a stance. In this post we walk through
the replication log, the conflict resolver, and the backpressure story that
keep your work consistent even on flaky networks.
## The replication log
Every change is captured as an immutable operation in a local log. When a
peer reconnects, the logs are merged deterministically.
## Conflict resolution
We lean on CRDTs for structural data and last-writer-wins with vector clocks
for scalar fields. Both strategies are designed so that the merge result is
the same regardless of the order peers reconnect.