Simple video meeting app with authentication, room-based video calls, and in-room chat. Built with Express, Socket.IO, MongoDB, and simple-peer for WebRTC.
- Email/password signup/login (JWT + cookies)
- Create or join rooms for WebRTC video calls
- In-room chat panel (per room)
- Status indicator and copyable room code
- MongoDB persistence via Mongoose
- Node.js, Express
- Socket.IO
- WebRTC via simple-peer
- MongoDB Atlas (or local MongoDB)
- JWT auth, bcrypt password hashing
- Node.js 18+
- MongoDB Atlas cluster (recommended) or local MongoDB
- Install deps
npm install- Configure environment
- Copy
.env.exampleto.envand set values:
MONGODB_URI=mongodb+srv://<user>:<password>@<cluster>.mongodb.net/video-call-app?retryWrites=true&w=majority&appName=<app>
JWT_SECRET=replace_with_strong_secret
CLIENT_URL=http://localhost:3000
PORT=3002
NODE_ENV=development- If using Atlas, allow your IP in Network Access and ensure the DB user/password match your URI. URL-encode special characters in the password (
@->%40,#->%23,:->%3A). - For local MongoDB, use
mongodb://127.0.0.1:27017/video-call-app.
- Run the server
npm startServer defaults to http://localhost:3002.
- Open the app, sign up or log in.
- Click Create Room to get a room code (auto-joins); share the code.
- Click Join Room and enter a code to join an existing room.
- Video starts once permissions are granted; use the chat panel to exchange messages within the room.
npm start— run servernpm run dev— run with nodemon
- MongoDB auth/connection errors: verify
.envURI, DB user password, and Atlas IP allowlist. - Camera/mic blocked: allow permissions in the browser and ensure only one tab is using the camera.
- Ports: server defaults to 3002. Client access via the same origin unless you change CORS/CLIENT_URL.
server.js— Express app, Socket.IO, routespublic/— frontend (HTML/CSS/JS)middleware/auth.js— JWT auth middlewaremodels/User.js— Mongoose user schema