A real-time peer-to-peer video calling application built with WebRTC technology, enabling direct browser-to-browser video communication.
FaceLink is a video calling application that allows users to connect with each other through their browsers using WebRTC for peer-to-peer connections. The application features real-time user presence tracking, call management, and a clean, modern user interface.
- Node.js
- Express.js
- Socket.IO (WebSocket communication)
- CORS (Cross-Origin Resource Sharing)
- dotenv (Environment variable management)
- React 19
- Vite (Build tool and dev server)
- Socket.IO Client
- WebRTC API
- CSS3 (Modular styling)
- ESLint (Code quality)
- Real-time video calling using WebRTC
- Peer-to-peer connection establishment
- User presence tracking
- Online users list
- Incoming call notifications
- Call accept/reject functionality
- Camera preview testing
- Responsive design
FaceLink/
├── backend/
│ ├── handlers/
│ │ ├── userhandlers.js
│ │ └── webrtchandlers.js
│ ├── server.js
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── ControlPanel.jsx
│ │ │ ├── ErrorBoundary.jsx
│ │ │ └── VideoSection.jsx
│ │ ├── hooks/
│ │ │ ├── usecallhandlers.js
│ │ │ ├── usesocketconnection.js
│ │ │ └── usewebrtc.js
│ │ ├── styles/
│ │ │ ├── animations.css
│ │ │ ├── base.css
│ │ │ ├── buttons.css
│ │ │ ├── controls.css
│ │ │ ├── responsive.css
│ │ │ └── video.css
│ │ ├── App.jsx
│ │ ├── App.css
│ │ └── main.jsx
│ ├── index.html
│ ├── vite.config.js
│ └── package.json
└── README.md
- Node.js (version 16 or higher)
- npm or yarn package manager
- Modern web browser with WebRTC support
- Navigate to the backend directory:
cd backend- Install dependencies:
npm install- Create a
.envfile in the backend directory:
PORT=8181- Start the backend server:
npm startFor development with auto-restart:
npm run devThe backend server will start on http://localhost:8181
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Create a
.envfile in the frontend directory:
VITE_BACKEND_URL=http://localhost:8181- Start the development server:
npm run devThe frontend application will start on http://localhost:5173
To create a production build of the frontend:
cd frontend
npm run buildThe build output will be in the frontend/dist directory.
- Open the application in your web browser
- Set your unique user ID
- View the list of online users
- Click on any online user to initiate a video call
- The receiving user can accept or reject the call
- Once connected, use the call controls to manage your session
The application uses Google's public STUN server for NAT traversal:
- STUN Server: stun:stun.l.google.com:19302
For production deployments, consider using your own TURN servers for better connectivity in restricted network environments.
Backend:
npm start- Start the servernpm run dev- Start with nodemon for development
Frontend:
npm run dev- Start development servernpm run build- Create production buildnpm run preview- Preview production buildnpm run lint- Run ESLint