Anchor
Offline-First Notes with Conflict-Free Sync
Demo Video
Screenshots



Overview
A local-first collaborative notes app that persists every keystroke as a CRDT operation before any network call, enabling full offline functionality and deterministic multi-device sync — the same technology used by Figma and Notion.
Technical Details
Persisted every keystroke to IndexedDB as a CRDT operation before any network call — making the app fully functional offline across tab closures, browser restarts, and dropped connections with zero data loss.
Implemented conflict-free multi-device sync with Yjs: state-vector exchange on reconnect replays only missing operations and merges concurrent edits deterministically at the character level — no last-write-wins, no server arbitration.
Chose one Y.Doc per note for constant-time app load regardless of corpus size; BroadcastChannel tab sync via y-webrtc (no signaling server); stateless y-websocket relay for cross-device sync with offline-queue replay on reconnect.