Skip to main content

Conflict-free Replicated Data Types

Collaborative, local-first apps in Dart and Flutter

Every user edits their own copy, even offline. When the copies meet, they merge on their own, and everyone sees the same result.

dart pub add crdt_lf
main.dart
final alice = CRDTDocument();
final note = CRDTFugueTextHandler(alice, 'note');
note.insert(0, 'Hello world');

// Bob, on another device, offline until now.
final bob = CRDTDocument();
bob.importChanges(alice.exportChanges());

print(CRDTFugueTextHandler(bob, 'note').value);
// Hello world

Offline first

Every edit is applied locally at once. It reaches the other peers when a connection exists.

No conflicts to solve

Concurrent edits merge on their own, and every peer converges on the same state.

Text that stays readable

Fugue keeps the text of two people apart, and Peritext merges their formats.

Undo your own edits

An undo takes back what you did, and leaves everyone else's work alone.

Plugs into your stack

Hive, SQLite or Drift on the device. Dart Frog, Serverpod or a relay on the server.

Pure Dart

One engine on the VM, in Flutter on every platform, and on the web.

See it working

Greyhound Markdown is a real-time collaborative markdown editor built on these packages. Open it on two devices, join the same room and type together: no install needed.

Greyhound Markdown home screen

Roadmap

Where the project is going. The board shows what is done, what is in progress and what comes next, for every package. Missing something? Ask for it in an issue: requests go on the board too.

To doIdeas and requests, waiting for their turn.
In progressWhat is being built right now.
DoneShipped, and released on pub.dev.