03
Real-time Collaboration
Two editors connected to the same WebSocket room. Type in one, see it sync to the other.
OFFLINE
Sync Events
0
Sync Latency
0ms
Protocol
WS
WebSocket relay
Production Architecture
This Demo
Simple WebSocket relay -- messages broadcast to all clients in the same room. Good enough to demonstrate the concept.
Production: Yjs CRDT
Real implementation uses Yjs (CRDT) for conflict-free merging. Each keystroke generates a binary update that merges automatically, even offline.
Go Backend Role
Go handles WebSocket connections (goroutine per conn), room management, and periodic Yjs doc persistence to PostgreSQL JSONB.