Subsystem 01
Collaborative canvas UI
WebGL/Canvas rendering of shapes and presence cursors
Typical stack
Next.js + PixiJS / React Flow
Reference architecture
Collaborative multiplayer web apps in the style of Figma or Miro, built on conflict-free replicated data types (CRDTs) and optimistic canvas rendering.
Design constraints
Targets for the scenario this reference is sized for. A real engagement starts by replacing them with your own numbers.
Component topology
Subsystems with separate responsibilities, clear contracts between them and storage that scales on its own. The stack named for each is typical, not mandatory.
Stack topology
Multiplayer real-time whiteboard with CRDTs and WebSockets
Illustrative reference architecture
Collaborative canvas UI
WebGL/Canvas rendering of shapes and presence cursors
Next.js + PixiJS / React Flow
CRDT state layer
Shared document changes, merged without conflicts
Yjs / Automerge
Multiplayer signaling server
Room-based WebSocket coordination and ephemeral presence
Node.js (uWebSockets.js) / Cloudflare Durable Objects
Document persistence tier
Binary CRDT state vectors and document snapshots
PostgreSQL / Amazon S3
Subsystem 01
WebGL/Canvas rendering of shapes and presence cursors
Typical stack
Next.js + PixiJS / React Flow
Subsystem 02
Shared document changes, merged without conflicts
Typical stack
Yjs / Automerge
Subsystem 03
Room-based WebSocket coordination and ephemeral presence
Typical stack
Node.js (uWebSockets.js) / Cloudflare Durable Objects
Subsystem 04
Binary CRDT state vectors and document snapshots
Typical stack
PostgreSQL / Amazon S3
Data lifecycle
A user opens a shared canvas; the WebSocket connects to the room's Cloudflare Durable Object.
The room sends the binary Yjs state vector, and the client loads the canvas into memory.
Moving a shape updates the local Yjs document optimistically and re-renders within the next frame.
Yjs encodes the change as a binary delta and broadcasts it to the room's peers.
Peers merge the delta deterministically, so every client converges on the same state.
Reliability and resilience
Failure mode 01
Mitigation
Persist local edits in IndexedDB; Yjs merges the offline changes on reconnection.
Failure mode 02
Mitigation
Periodically compact CRDT history into snapshots stored in S3.
Failure mode 03
Mitigation
Throttle cursor updates to 30 per second and send them as ephemeral messages that are never persisted.
Questions
Operational Transformation, used by Google Docs, relies on a central server to order operations. CRDTs merge concurrent changes on any device without central coordination.
Every change carries a unique client ID and a logical clock, and Yjs orders concurrent edits deterministically from them, so all clients converge to the same state.
Send us your requirements, expected load and budget. We'll reply within one business day with an honest read on the design, and on whether we're the right team to build it.