What problem does it solve?
Streamline real-time communication integration in TypeScript by providing a unified guide for WebSocket servers (NestJS Gateway/Socket.io), WebSocket clients (React), and SSE, including authentication, reconnection, and subscription patterns for production readiness.
Core Features & Use Cases
- NestJS WebSocket Gateway: Socket.io integration with per-connection authentication and room-based messaging.
- React WebSocket Client Hook: Robust connection lifecycle management, message handling, and optional subscriptions.
- Server-Sent Events (SSE): Unidirectional server-to-client streams for notifications and progress updates.
- Reliability Patterns: Heartbeat, exponential backoff reconnect, and subscription restoration across disconnects for a seamless experience.
Quick Start
Install the required dependencies, start a NestJS gateway and a React client, then open the app to observe real-time messaging.