Real-time collaboration (Yjs + WebSocket)

- Go WebSocket hub: rooms per document, broadcast updates, persist state
- Yjs integration: connect/disconnect, sync document state
- Collab toggle button in toolbar (Solo/Live)
- When Live: edits broadcast to all connected users in real-time
- Yjs state persisted to SQLite (survives server restart)
- gorilla/websocket dependency added
This commit is contained in:
2026-05-22 23:49:12 +02:00
parent 1a77d068a7
commit ed4d0b261f
6 changed files with 226 additions and 1 deletions
+1
View File
@@ -5,6 +5,7 @@ go 1.23
require (
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.3
golang.org/x/crypto v0.32.0
modernc.org/sqlite v1.34.5
)