SYNQ Workspace (Flux Whiteboard)
A collaborative whiteboard that syncs drawing across clients at 60 fps.

A real-time collaborative workspace with its own drawing engine. Local strokes render independently while state syncs across clients through a CRDT, which keeps sync lag out of the drawing loop.
Problem
Multiplayer whiteboards stutter and lag during fast drawing or when several people draw at once. Merging simultaneous edits while holding a high frame rate is a hard systems problem.
Approach
Yjs resolves shared state as a CRDT and WebRTC data channels sync peers directly. Firebase cursor updates are throttled, and local rendering is decoupled from remote state so drawing feels native on web and mobile.
What I built
- A drawing engine of its own: local strokes render independently of remote state.
- Shared state held in a Yjs document, a CRDT, so simultaneous edits merge.
- Peers synced directly over WebRTC data channels.
- Firebase for cursor updates, throttled.
- A tuned canvas render loop, with mobile touch events handled synchronously.
Architecture
Read the diagram as text
- Pointer and touch input to Local render loop
- Pointer and touch input to Yjs document (CRDT)
- Yjs document (CRDT) and WebRTC data channels, both ways
- WebRTC data channels and Peer clients, both ways
- Pointer and touch input to Throttled cursor updates
- Throttled cursor updates to Firebase
- Firebase to Peer clients
How a request flows
Read the diagram as text
- You to Local render loop: draw a stroke
- Local render loop to You: stroke appears at once
- You to Yjs document: add the stroke to shared state
- Yjs document to WebRTC data channel: send the update
- WebRTC data channel to Peer: deliver the update
- Peer: merge it (CRDT)
Decisions and trade-offs
Yjs as the shared state
It resolves simultaneous edits as a CRDT, so peers converge.
It needed a real understanding of operational transformation and CRDTs.
Render locally, decoupled from remote state
Sync lag stays out of the drawing loop, so drawing feels native on web and mobile.
The canvas render loop had to be tuned and touch events handled synchronously.
WebRTC data channels between peers, Firebase for cursors
Peers sync directly, and Firebase cursor updates are throttled.
Cursor positions travel on a second path from the drawing state.
What was hard
Collaborative editing needed a real understanding of operational transformation and CRDTs. Tuning the canvas render loop and handling mobile touch events synchronously changed how I approach frontend performance.
Screenshots


Smart Helmet AppNext project