Personal project: a multi-room chat application built with raw WebSockets for bidirectional, real-time communication.
What I built
A WebSocket server using the ws library, without Socket.io.
Multi-room messaging with isolated broadcast groups.
Per-room presence tracking to show connected users.
Heartbeat checks and reconnection handling with exponential backoff.
A lightweight browser client for connection handling, message rendering, and room participation.
Architecture
The HTTP server serves the client application and runs the WebSocket server. Rooms are held in memory, with each room maintaining its set of connected clients.
Stack
Node.js, raw WebSockets with ws, JavaScript, HTML, and CSS.
Repository
The source code and local setup instructions are available on GitHub.