Deep dive
You do not need these pages to build an app. Read them to understand why the system behaves the way it does, to debug it, or to extend it with a handler of your own.
Time: the HLC
How peers order events without a shared clock — the hybrid logical clock of hlc_dart.
Documents and changes
The operation-based model — operations, changes, the causal graph, frontiers and identity.
Transactions
How operations are grouped, compacted into fewer changes, and published once.
Reactivity
The three signals a document gives — revision, updates and events — and which one to watch.
Handler deltas
What a change did to your copy of a handler, how it is built, and how to skip the echo of your own write.
State cache
Why reading a handler does not replay the whole history, and when it has to.
Snapshots
The compact state a document can start from, what it keeps, and the reserved entries inside it.
Binary format
How changes and snapshots are written as bytes, and how each layer is versioned.
Text positions
The text handlers count runes; Flutter counts UTF-16 code units. How to convert between them.
Handler specs
HandlerSpec — the tag, the builder and the formats of a handler kind, where a spec is used, and what a peer can rebuild.
Custom handlers
Write a handler of your own — its spec, its operations, its cache, and how to make it undoable.
Flutter internals
How the crdt_lf_flutter widgets decide to rebuild, and how the delta widgets keep a projection.
Building an editor binding
The layers between a handler and an editor — subscription, binding, binder — and how to bind an editor of your own.
DevTools
Inspect the documents of a running app in Flutter DevTools.
How fast all of this is: see Benchmarks.