A real-time peer-to-peer video calling application built with React, Node.js, Socket.IO, and WebRTC.
- Real-time video calling
- Audio mute/unmute functionality
- Video toggle functionality
- Room-based communication
- Peer-to-peer connection using WebRTC
- Responsive design with Tailwind CSS
- Frontend: React + Vite
- Backend: Node.js + Express
- Real-time Communication: Socket.IO
- Video Calling: WebRTC
- Styling: Tailwind CSS
- Routing: React Router
- Node.js (v14 or higher)
- npm or yarn
- Modern web browser with WebRTC support
- Clone the repository:
git clone https://github.com/yourusername/peer-connect.git
cd peer-connect- Install dependencies for both frontend and backend:
# Install backend dependencies
cd server
npm install
# Install frontend dependencies
cd ../client
npm install- Create
.envfiles:
Backend (.env):
PORT=8000Frontend (.env):
VITE_SOCKET_SERVER_URL=http://localhost:8000- Start the backend server:
cd server
npm start- Start the frontend development server:
cd client
npm run dev- Access the application at
http://localhost:5173
- Open the application in your browser
- Enter your email and a room code
- Share the room code with another user
- Once both users are in the room, click the "Call" button to initiate the video call
- Use the control buttons to:
- Toggle microphone
- Toggle video
- End call
The application is configured for deployment on:
- Frontend: Vercel
- Backend: Any Node.js hosting service (Render)
Make sure to update the VITE_SOCKET_SERVER_URL in your frontend environment variables to point to your deployed backend URL.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.