Add Planner session management with Yjs WebSocket (#1)

- Yjs WebSocket server at /sync/:sessionId for real-time collaboration
- Session creation API (POST /api/sessions) with optional GPX initialization
- Session join page with Planner layout (header, map area, sidebar)
- In-memory session store (PostgreSQL persistence deferred to infra setup)
- Custom production server entry with WebSocket upgrade handling
- Vite path aliases (~/) for clean imports
- Fix tsconfig for apps: noEmit, exclude build dir

Tasks completed: 4.1, 4.3, 4.4, 4.5
Deferred: 4.2 (PostgreSQL), 4.6-4.8 (need client-side Yjs from Group 6)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-03-22 13:26:03 +01:00 committed by GitHub
parent 6f90c59db9
commit 464ba0f64d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 413 additions and 42 deletions

View file

@ -30,11 +30,11 @@
## 4. Planner — Session Management
- [ ] 4.1 Set up Yjs with y-websocket in Planner backend (WebSocket endpoint at /sync)
- [x] 4.1 Set up Yjs with y-websocket in Planner backend (WebSocket endpoint at /sync)
- [ ] 4.2 Implement Yjs persistence to PostgreSQL (planner schema, sessions table)
- [ ] 4.3 Implement session creation endpoint (POST /api/sessions → returns session ID)
- [ ] 4.4 Implement session creation with initial GPX (parse GPX → Yjs document with waypoints)
- [ ] 4.5 Implement session join page (GET /session/:id → connect to Yjs document)
- [x] 4.3 Implement session creation endpoint (POST /api/sessions → returns session ID)
- [x] 4.4 Implement session creation with initial GPX (parse GPX → Yjs document with waypoints)
- [x] 4.5 Implement session join page (GET /session/:id → connect to Yjs document)
- [ ] 4.6 Implement session expiry (garbage collection cron, configurable TTL)
- [ ] 4.7 Implement manual session close (owner action, notify participants)
- [ ] 4.8 Implement user presence display (Yjs awareness, colors, names)