- Real-Time collaboration
- CRUD operations
- Keyboard shortcuts
- Undo, Delete
- 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
- React, TypeScript
- Backend
- Node.js, websocket
- Relay
- Node.js, websocket
- Diagram editor
- ReactFlow
- Interactive node/edge editor
- ReactFlow
- Real time sync
- Yjs, y-websocket
- Collaborative editing
- Yjs, y-websocket
- Storage
- File System, JSON
- Diagram Persistence across devices
- File System, JSON
- Deployment
- Railway, Vercel
- Server and client hosting
- Railway, Vercel
- 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