Collaboration — Live Multiplayer
Concurrent multi-user flowsheet editing over a self-hosted Yjs CRDT relay (`api/routes_collab.py`, no third-party SaaS) — nodes/edges sync live, presence avatars show who's on the canvas, and Run/Save still write through to the persisted flowsheet.
collaborationyjsrealtime
Concept
Concurrent multi-user flowsheet editing over a self-hosted Yjs CRDT relay — no third-party multiplayer SaaS. A FastAPI WebSocket endpoint is wrapped as a pycrdt Channel handed to a shared WebsocketServer started in the app lifespan; the room id is the simulation id.
Execution
Mechanics
- Connection is authorized from the session cookie via
authorize_room. - Clients seed the room from the persisted flowsheet on join.
- Nodes/edges sync live through the CRDT; presence (who's on the canvas) shows as colored avatars in the header.
- Run/Save still write through to the persisted flowsheet — multiplayer state and the saved record never diverge.