Description
Currently debate turns are fetched via polling. WebSocket support would enable real-time streaming of debate turns as they happen.
What to do
- Set up a WebSocket server alongside the Next.js app
-
- Create a
/ws/debate/[id] endpoint for real-time updates
-
- Emit events for new turns, score updates, debate status changes
-
- Update the debate frontend to use WebSocket instead of polling
-
- Add reconnection logic and error handling
Skills needed
- TypeScript
-
- WebSocket (ws or Socket.io)
-
References
- Debate API:
apps/web/app/api/debate/
-
- Next.js custom server docs
Description
Currently debate turns are fetched via polling. WebSocket support would enable real-time streaming of debate turns as they happen.
What to do
/ws/debate/[id]endpoint for real-time updatesSkills needed
References
apps/web/app/api/debate/