Anonymous real-time communication platform built with React, WebRTC, Socket.IO, Node.js, Redis, Docker, and Nginx.
- Real-time anonymous text chat
- Peer-to-peer video/audio communication using WebRTC
- Redis-backed random matchmaking queue
- Instant session switching ("Next Stranger")
- Socket.IO-based real-time signaling
- Responsive dark-mode UI
- Docker-based deployment setup
- Nginx reverse proxy with WebSocket support
- React 18
- Vite
- Tailwind CSS
- WebRTC APIs (
RTCPeerConnection, ICE, SDP)
- Node.js
- Express.js
- Socket.IO
- Redis
- Docker
- Docker Compose
- Nginx
Client A ──┐
│
▼
Socket.IO Server
│
▼
Redis Pub/Sub
│
▼
Socket.IO Server
│
▼
Client B <── WebRTC P2P Connection
Make sure Docker is installed.
docker-compose up -dThis starts Redis and PostgreSQL containers.
cd server
npm install
npm run devBackend runs on:
http://localhost:5000
cd client
npm install
npm run devFrontend runs on:
http://localhost:3000
For reliable WebRTC connections across strict NATs or mobile networks, a TURN server is recommended.
Update the ICE server configuration in:
client/src/hooks/useWebRTC.js
with your TURN server credentials.
The included nginx.conf handles:
- Static hosting for the React frontend
- Reverse proxying to the backend
- WebSocket upgrade handling for Socket.IO
docker build -t relay-client -f Dockerfile.client ./client
docker build -t relay-server -f Dockerfile.server ./server