by borlando · 6mo ago · 0 comments
The tree structure is managed by a separate Yjs data structure. So if one person moves a node while another edits its text.
The sync layer is Hocuspocus (WebSocket server) on top of a NestJS backend. Documents are persisted to PostgreSQL and synced to all connected clients. When you go offline, changes queue in IndexedDB and merge automatically when you reconnect.
The mind map view and text editor view share the same Yjs document. Edits in one view appear instantly in the other, even across different users.