Skip to main content

Glossary

CRDT

Meaning and details

A CRDT, or Conflict-free Replicated Data Type, is the math that lets two devices edit the same data independently and agree afterward. Each replica applies edits locally and exchanges them with the others; because the me...

CRDT meaning

A data structure that merges concurrent edits on replicas without central coordination, always converging to the same state.

What is CRDT?

A CRDT, or Conflict-free Replicated Data Type, is the math that lets two devices edit the same data independently and agree afterward. Each replica applies edits locally and exchanges them with the others; because the merge operation is commutative, associative and idempotent, the order of arrival and duplicated messages do not matter. Every replica converges to the identical result without a server arbitrating every keystroke.

Why it matters to an indie builder: collaborative editing and offline support are the two hardest product features to hand-roll, and both reduce to the same question, what happens when two people change the same thing. CRDTs answer it structurally instead of with conflict dialogs. This is the machinery inside Yjs and Automerge, the libraries powering most open collaborative editors, and inside sync engines like Jazz and PowerSync.

A concrete example: two teammates open a shared spec, one on a plane. Each edits a different section offline for an hour. On landing, the clients exchange operations and both documents settle into the same merged version, no prompt, no lost work, no merge screen. A naive last-write-wins storage would have silently destroyed one of the two sessions.

Common mistakes: treating CRDTs as a database replacement (they solve merge, not queries, indexing or permissions; you still back them with SQLite or Postgres), ignoring metadata growth (some implementations carry tombstones for deleted content forever; mature libraries garbage-collect, verify yours does), and hand-rolling merge logic for a document format when the battle-tested libraries exist. The local-first and crdt pages on IndieBoot collect the current tooling landscape side by side.

Performance is the frequent follow-up question. Modern CRDT libraries handle documents in the tens of megabytes and hundreds of concurrent editors without breaking a sweat, but every operation carries serialization overhead, so measure on realistic document sizes rather than marketing demos. The jump from collaborative text to collaborative structured data, where two users reorder the same list, is where libraries differ most; test that case before committing.

Keep exploring the glossary