WebSocket sync retired; WebRTC is the signed-out realtime path
Changed
Signed-out realtime is now peer-to-peer over WebRTC, not WebSockets. Since
the production target (Vercel) can't host a long-running socket, the custom
WebSocket server is no longer part of the app. Signed-out users get
localStorage-only persistence plus same-network WebRTC sharing; signed-in users
are unchanged (Supabase + Realtime). This matches what already shipped on Vercel
— the code now reflects it.
lib/sync.ts → lib/local-spaces.ts (useLocalSpaces()): a localStorage-only
space-list hook. The WS-only fields (remoteCards, users, self, connected,
broadcastCards) are gone; lib/use-workspace.ts and app/page.tsx were
simplified accordingly (signed-out per-space presence dropped — same-network
peers surface via LocalPeersDock instead).
package.json scripts now use next dev / next start (was node server.js);
the ws / @types/ws deps were removed.
Archived (not deleted)
legacy/websocket-sync/ holds the retired implementation — server.js and
the WS-capable sync.ws.ts — with RESTORE.md documenting how to bring it back
for a self-host / server deployment (where a shared socket gives signed-out
cross-device sync that WebRTC's same-network model can't).