Dart implementation of Conflict-free Replicated Data Types (CRDTs).

This project is heavily influenced by James Long's talk CRTDs for Mortals and includes a Dart-native implementation of Hybrid Local Clocks (HLC) based the paper Logical Physical Clocks and Consistent Snapshots in Globally Distributed Databases.

It has zero external dependencies, so it should run everywhere where Dart runs.


The Crdt class works as a layer on top of a map. The simplest way to experiment is to initialise it an empty map:

import 'package:crdt/crdt.dart';

main() {
  var crdt = Crtd();

You'll probably want to implement Store if you want to offer any sort of persistence though.


An example of how it can be used in an application can be found at https://github.com/cachapa/crdt_server.

Features and bugs

Please file feature requests and bugs at the issue tracker.