A modern, peer-to-peer video chat web application built with React, Vite, Socket.IO, and WebRTC. Connect instantly with anyone, share your video and audio, and experience seamless real-time communication — all in your browser.
- Peer-to-peer video calls using WebRTC
- Room-based connection — join with a room ID and email
- Live connection status and remote user display
- Share your video/audio with a single click
- Mute/unmute microphone and toggle camera
- Responsive UI with dark mode and event notifications
- No media server required — only signaling via Socket.IO
- Mobile and desktop support
You can use the deployed site here: https://rtc-roan-eight.vercel.app/
Or run locally:
- Node.js (v18+ recommended)
- npm
git clone https://github.com/harkirath1511/RTC.git
cd RTCcd server
npm install
cd ../client
npm installCreate a .env file in the server/ directory:
ALLOWED_ORIGINS=http://localhost:5173 || http://localhost:5174
You can add deployed frontend URLs as needed.
cd server
node index.jscd client
npm run devVisit http://localhost:5173 in your browser.
- Frontend: Deploy the
client/folder to Vercel, Netlify, or any static hosting. - Backend: Host the
server/folder on a Node.js server (e.g., Heroku, Render, or your own VPS). - Signaling: The backend uses Socket.IO for signaling only — no media is relayed through the server.
- Signaling: When you join a room, your browser connects to the backend via Socket.IO. The server relays signaling messages (SDP offers/answers, ICE candidates) between peers.
- WebRTC: Once signaling is complete, media flows directly peer-to-peer. No media server is required.
- UI: The frontend provides a modern, responsive interface with live status, event notifications, and controls for video/audio.
- All media is end-to-end encrypted via WebRTC.
- The server only relays signaling data — it never sees your video/audio.
- Common browser developer tools are blocked for casual users (see
index.html).
Pull requests and suggestions are welcome! Please open an issue for bugs or feature requests.
MIT