managarten/services/mana-sync
Till JS ee831992de feat(mana-sync): unified WebSocket — one connection per user instead of 27
Add unified /ws endpoint that serves all app notifications over a single connection.
The server now includes appId in the sync-available message payload so the client
knows which app to pull. Legacy /ws/{appId} endpoint remains for backward compatibility.

Backend (Go):
- hub.go: Message struct gains AppId field, NotifyUser sends to all user clients
  (unified clients receive everything, legacy clients filtered by appId)
- main.go: new GET /ws route (empty appId = unified mode)

Frontend (sync.ts):
- Single connectUnifiedWs() replaces 27 per-app connectWs() calls
- Parses msg.appId from server to pull only the affected app
- Reconnect/offline logic simplified to one WS

This reduces WebSocket connections from 27 per user to 1, cutting server
connection overhead by ~96%.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 13:09:10 +02:00
..
cmd/server feat(mana-sync): unified WebSocket — one connection per user instead of 27 2026-04-02 13:09:10 +02:00
internal feat(mana-sync): unified WebSocket — one connection per user instead of 27 2026-04-02 13:09:10 +02:00
test refactor: rename ManaDeck to Cards across entire monorepo 2026-04-01 11:45:21 +02:00
CLAUDE.md feat(mana-sync): unified WebSocket — one connection per user instead of 27 2026-04-02 13:09:10 +02:00
Dockerfile feat(local-first): add local-first architecture with Dexie.js, Go sync server, and Todo pilot 2026-03-27 11:17:58 +01:00
go.mod feat(local-first): add local-first architecture with Dexie.js, Go sync server, and Todo pilot 2026-03-27 11:17:58 +01:00
go.sum feat(local-first): add local-first architecture with Dexie.js, Go sync server, and Todo pilot 2026-03-27 11:17:58 +01:00
package.json feat(local-first): add local-first architecture with Dexie.js, Go sync server, and Todo pilot 2026-03-27 11:17:58 +01:00