nestjs-real-time
Installation
SKILL.md
Real-Time & WebSockets
Priority: P1 (OPERATIONAL)
Workflow: Add Real-Time Feature
- Choose protocol — WebSocket for bi-directional (chat, collab); SSE for uni-directional (feeds, notifications).
- Implement gateway or SSE — Create
@WebSocketGateway()or@Sse()controller. - Add auth — Validate JWT in
handleConnection()for WebSocket; use standard guards for SSE. - Scale — Add
@socket.io/redis-adapterfor multi-pod WebSocket; use HTTP/2 for SSE. - Test connections — Verify WebSocket handshake auth rejects invalid tokens; confirm SSE streams data.