A production-grade collaborative editor demonstrating Conflict-Free Replicated Data Types, Lamport vector clocks, and deterministic CRDT replay — the exact algorithms used at Notion, Figma, and Google Docs.
Not a toy. Every system demonstrates real distributed computing concepts.
Built on Yjs — a production-grade CRDT library. Every keystroke is an atomic operation encoded as a Lamport-clocked binary update that auto-merges across any network partition.
WebSocket-based Hocuspocus server broadcasts presence state instantly. See collaborators' cursors, selections and names update in real-time with zero polling.
Every snapshot stores the full Yjs update binary. Hit Replay to watch the document reconstruct itself character-by-character — visually proving CRDT convergence.
Fork any document at any point in time. Branch state is encoded as a Yjs binary update and propagated via the Hocuspocus WebSocket — zero data loss guaranteed.
FastAPI backend proxies to an LLM with Server-Sent Events (SSE) streaming. Rewrite, summarize, continue, or fix grammar — AI output streams token-by-token into the editor.
FastAPI + SQLAlchemy persists documents and snapshots. Redis Pub/Sub backplane enables horizontal scaling across multiple Hocuspocus nodes.
Create a document, type some text, open a second tab — watch CRDTs sync in real-time.
Launch Editor