Repository files navigation Collaborative diagram editor with real time multi user collaboration
Real-Time collaboration
CRUD operations
Keyboard shortcuts
File persistence
Save new diagrams to be accessed later
Load diagrams that were previously created
Websocket communication
Live synchronization between clients across multiple devices
Frontend
React, TypeScript
UI Components and state management
Backend
Diagram editor
ReactFlow
Interactive node/edge editor
Real time sync
Storage
File System, JSON
Diagram Persistence across devices
Deployment
Railway, Vercel
Server and client hosting
GET /api/diagrams - Lists all diagrams
POST /api/diagrams - Creates a new diagram
GET /api/diagrams/:id - Gets a specific diagram
DELETE /api/diagrams/:id - Deletes a specific diagram
DiagramYjs Responsibilities:
Main diagram editor
ReactFlow integration
Node and Edge selection
Keyboard shortcuts
useYjsDiagram Responsibilities:
Yjs document management
websocket connection handling
real time sync
CRUD operations for nodes and edges
DiagramManager Responsibilities:
Diagram list management
Save and load operations
DiagramService Responsibilities:
HTTPS API communication
error handling
Diagram Creation: User Action → ReactFlow → useYjsDiagram → Yjs Document → WebSocket → Other Clients
Diagram Persistence: User Save → DiagramService → HTTP POST → Server → JSON File Storage
Real time sync: User Edit → Yjs Document → WebSocket → Server → Other Clients → Yjs Document
Client -> Vercel
Server -> Railway
Single Collaboration Space
Save/Load is easily overwritten by collaborators
Undo history lost on load
Single node/edge type
No visual styling options
No node lookup
No auto save
New nodes are added to the diagram in a disorganized manner
Multiple saves can overwrite each other
Visual Features:
Multi Select for Nodes and Edges
Copy Paste Sections of a diagram
Node Resizing
Diagram templates
Node & Edge Features:
Multiple node/edge types
Node/Edge Styling (Colors, Backgrounds, etc...)
Search for Specific node
File Operations
Diagram Export functionality
Auto Save
Collaboration
Visual cursor tracking for all clients
Collaboration indicators
Room switching
Database Migration
Swap from File Storage to something like supabase or firebase
Data backup
Architectural Improvements
Dynamic room management
Conflict resolution between save and load
Security/Performance could be improved upon
About
A collaborative diagram editor similar to google docs
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.