WhisperNet is a LAN-based offline chat application that allows multiple backend servers, terminal clients, and browser clients to communicate in a local network without requiring internet. It uses WebSockets for real-time messaging and mDNS (Bonjour) for automatic service discovery.
- Offline LAN chat – works without internet; all communication happens within the local network.
- Multiple backend servers – each server acts as a “person” in the chat.
- Browser clients support – connect to the gateway server via WebSocket.
- Command-line interface – send messages directly from terminal.
- Automatic discovery – backend servers and clients discover the main gateway server using mDNS.
- Sender identification – every message includes a sender name (
HOST-PORT) for clarity.
- Gateway Server (port 3000): central WebSocket server, broadcasts messages to all clients and backend servers.
- Backend Servers: connect to the gateway, send and receive messages like regular clients.
- Browser clients: connect to gateway via WebSocket, send and receive messages.
- Command-line: any server can send messages from the terminal, which are broadcast across the network.
- mDNS (Bonjour): used for automatic discovery of gateway and other servers.
- Clone the repository
git clone https://github.com/inloop20/WhisperNet.git
cd WhisperNet- Install dependencies
npm installStart the Gateway Server
PORT=3000 node server.jsThe gateway server will listen on port 3000. Terminal CLI is active; messages typed here will broadcast to all clients and backend servers.
Start a Backend Server
PORT=4000 node server.js
PORT=5000 node server.js
Connects automatically to the gateway using mDNS. Terminal CLI is active for sending messages. Messages include HOST-PORT as sender name.
All devices must be on the same LAN. Dynamic IPs are handled automatically by mDNS. Works best in home, office, or lab LAN networks.