Atomic Sync overview
Sync exists so that your data lives on your devices, and you stay in control of it. Most apps keep your data on one company’s server, and the app on your phone is just a window onto it. That makes it hard to leave, and it gives the company a reason to keep it that way: a business model built on holding your data hostage, or on selling your attention. We argue in the motivation that this is what vendor lock-in does, and local-first is how we get out of it.
With Atomic Sync, every device that uses a Drive keeps a full local copy and reads and writes it directly. You’re not tied to one vendor’s cloud, because a server is just one more device that holds a copy. Sync runs in the background and passes changes between those copies, so they stay in agreement.
The idea in five points
- Every device has a full local copy. The app reads and writes the local store, so it keeps working offline. See local-first.
- Edits are signed commits. A change becomes a Commit: a Loro CRDT update plus an Ed25519 signature from the Agent that made it. Anyone can check who changed what.
- Copies merge automatically. Each Resource is a Loro document, so edits made at the same time on different devices merge without a coordinator. Merging does not check your business rules, though. Your application decides when a merged result needs review.
- Every receiving node checks permissions. A node verifies the signature and the signer’s write right before it applies a change, and it only sends a peer what that peer’s Agent may read. See permissions and identity.
- A server is just another peer. An AtomicServer runs the same sync engine as a phone or a browser tab. It’s usually the one that stays online, but it doesn’t own anything. See remote peers.
What happens to an edit
You change a Resource on your device, and the change lands in the local store at once. It is signed, and put in an outbox. When a peer is reachable, the device first compares what each side has, using version vectors, and then exchanges only what differs. While the link stays open, later edits are pushed as they happen. If you’re offline, the outbox keeps your edits, even across a restart, and sends them when a peer comes back.
Atomic Sync walks through this in more detail.
Over any transport
Every app that runs the engine is a node, in the browser or native. Nodes reach each other over WebSocket, HTTP, Iroh or WebRTC, whichever fits where they are. The transport only decides how two devices find each other: the commits and the checks are the same on every link.
Transports explains each one and when to use it.
Where to read next
| If you want to | Read |
|---|---|
| Choose how devices connect | Transports |
| Understand what two devices exchange | Drive reconciliation |
| Know who may read and write during sync | Permissions and identity |
| Keep a Drive available while your devices are off | Remote peers |
| Build an app on the engine | Building on the sync engine |
| Implement a client or peer | Wire protocol |
| Compare with a hosted backend | Atomic vs Supabase and Firebase |
The product-level pitch, and what you do not have to build yourself, is on Local-first Sync Engine.