OneRoomConnect is a real-time video chat web application built with React.js, Node.js, Socket.IO, and WebRTC. The app allows two users to join a "room" and start a live video/audio conversation directly in their browsers with peer-to-peer streaming for optimal performance.
- Gmail-based Room Access: Join a room using your Gmail and a unique room code
- Real-time Peer-to-Peer Video Calls: Direct WebRTC connection for high-quality video/audio
- Cross-Device Compatibility: Works seamlessly on desktop and mobile devices
- Responsive UI Design: Bootstrap-powered interface that adapts to all screen sizes
- Socket.IO Powered Signaling: Reliable real-time communication for WebRTC negotiation
- Low Latency Streaming: Direct peer-to-peer connection bypasses server for media data
- Simple Room Management: Easy-to-use room codes for instant connection
- Camera/Microphone Controls: Toggle video and audio during calls
- Connection Status Indicators: Real-time feedback on connection status
Frontend:
- React.js - Modern UI library for component-based architecture
- Bootstrap - Responsive CSS framework for mobile-first design
- Socket.IO Client - Real-time bidirectional event-based communication
- WebRTC APIs - Browser-native peer-to-peer media streaming
Backend:
- Node.js - JavaScript runtime for server-side development
- Express.js - Fast, unopinionated web framework
- Socket.IO - Real-time signaling server for WebRTC negotiation
Deployment:
- Render.com - Cloud platform for both frontend and backend hosting
Experience OneRoomConnect live: https://oneroomconnect.onrender.com/
- Open the demo link in two different browser tabs/windows
- Enter the same room code in both tabs
- Allow camera/microphone permissions when prompted
- Start your video call!
- Node.js (version 16 or higher)
- npm or yarn package manager
- Modern web browser with WebRTC support
- Camera and microphone (for video calls)
git clone https://github.com/I-am-Rishabh/oneRoomConnect.git
cd oneRoomConnectcd server
npm installCreate a .env file in the server/ directory:
PORT=8000
NODE_ENV=developmentStart the backend server:
node index.jsBackend will run on: http://localhost:8000
In a new terminal window:
cd client
npm installCreate a .env file in the client/ directory:
REACT_APP_API_URL=http://localhost:8000Start the frontend development server:
npm startFrontend will be available at: http://localhost:3000
Terminal 1 - Backend:
cd server
node index.jsTerminal 2 - Frontend:
cd client
npm start- Open
http://localhost:3000in your browser - Open the same URL in a different browser/incognito tab
- Enter the same room code in both windows
- Allow camera/microphone permissions
- Enjoy your video call!
- User enters Gmail and unique room code
room:joinevent sent to backend via Socket.IO- Server tracks connected clients per room
- Maximum of 2 users per room for optimal performance
- When second user joins, server notifies first user
- WebRTC peer connection initiated with offer/answer exchange
- Socket.IO handles signaling and ICE candidate exchange
- STUN servers used for NAT traversal
- Direct peer-to-peer WebRTC connection established
- Audio/video data streams directly between browsers
- No media data passes through server - ensuring low latency
- Socket.IO only used for initial signaling
- Desktop/Laptop: Side-by-side video layout
- Mobile/Tablet: Stacked video layout
- Adaptive UI: Automatically adjusts to screen size
- Touch-Friendly: Optimized controls for mobile devices
// Join a room
socket.emit('room:join', { email, room });
// WebRTC Signaling
socket.emit('user:call', { to, offer });
socket.emit('call:accepted', { to, ans });
socket.emit('peer:nego:needed', { to, offer });// Room management
socket.on('room:join', (data) => { /* User joined */ });
socket.on('user:joined', (data) => { /* Another user joined */ });
// Call handling
socket.on('incomming:call', (data) => { /* Incoming call */ });
socket.on('call:accepted', (data) => { /* Call accepted */ });
socket.on('peer:nego:needed', (data) => { /* Renegotiation needed */ });oneRoomConnect/
βββ client/ # React frontend
β βββ src/
β β βββ screens/ # React components
β β βββ context/ # Socket context
β β βββ service/ # Page components
β β βββ App.js # Main App component
β βββ public/ # Static assets
β βββ package.json # Frontend dependencies
βββ server/ # Node.js backend
β βββ index.js # Main server file
β βββ package.json # Backend dependencies
βββ README.md # Documentation
Backend (Node.js Web Service):
- Build Command:
npm install - Start Command:
node index.js - Environment Variables: Set in Render dashboard
Frontend (Static Site):
- Build Command:
npm install && npm run build - Publish Directory:
build - Environment Variables:
REACT_APP_API_URL=https://your-backend-url
Backend (.env):
PORT=8000
NODE_ENV=productionFrontend (.env):
REACT_APP_API_URL=https://your-backend-url.onrender.com- No Data Storage: No video/audio data is stored on servers
- Peer-to-Peer: Media streams directly between users
- Room-Based Access: Unique room codes for privacy
- HTTPS Required: Secure connection required for WebRTC
- Browser Permissions: User controls camera/microphone access
- β Chrome 70+ (Recommended)
- β Firefox 65+
- β Safari 12+
- β Edge 79+
- β Mobile Chrome (Android)
- β Mobile Safari (iOS)
Note: WebRTC requires HTTPS in production and camera/microphone permissions.
Camera/Microphone not working:
- Ensure HTTPS connection (required for WebRTC)
- Check browser permissions for camera/microphone
- Try refreshing and re-granting permissions
Connection fails:
- Check if both users are in the same room
- Verify backend server is running
- Check browser console for WebRTC errors
- Ensure firewall isn't blocking WebRTC
Audio/Video quality issues:
- Check internet connection speed
- Close other bandwidth-intensive applications
- Try using Chrome for better WebRTC support
- Multi-user rooms (more than 2 participants)
- Screen sharing functionality
- Chat messaging during video calls
- Recording capabilities
- Virtual backgrounds
- Room persistence and history
- Mobile app development
- Admin controls and moderation
Rishabh
Full-Stack Developer specializing in real-time applications
OneRoomConnect - Real-time video chat over WebRTC + Socket.IO