A WebRTC-based video chat application that enables users to create and join video rooms, participate in video/audio calls, and exchange messages in real-time.
- Create and join video rooms using unique room codes
- Real-time video and audio streaming
- Text chat functionality within rooms
- Screen sharing capability
- User presence indicators
- Real-time notifications for user join/leave events
- Persistent chat history using Redis
- Low-latency WebRTC connections with Socket.io signaling
- Node.js
- Express.js
- Socket.io (Signaling server)
- Upstash Redis (Chat persistence)
- Vue.js
- Socket.io-client
- WebRTC API
- Node.js >= 14.x
- NPM >= 6.x
- Upstash Redis account and credentials
- Modern browser with WebRTC support
- Clone the repository:
git clone https://github.com/akashMishraX/videoCallApp.git
cd videoCallApp
- Install backend dependencies:
cd app/backend
npm install
- Install frontend dependencies:
cd ../../app/frontend
npm install
- Configure environment variables:
Create a .env
file in the server directory:
REDIS_URL=''
CLIENT_URL=''
Create a .env
file in the client directory:
VITE_GOOGLE_CLIENT_ID=''
VITE_BACKEND_URL=''
- Start the backend server:
npm run dev
The application will be available at http://localhost:5173
- Open the application in your browser
- Create a new room or join an existing one using a room code
- Allow camera and microphone permissions when prompted
- Start video chatting and messaging with other participants
POST /api/rooms/create
- Create a new roomGET /api/rooms/:roomId
- Get room detailsPOST /api/rooms/join
- Join an existing room
join-room
- Join a specific roomleave-room
- Leave the current roomoffer
- Send WebRTC offeranswer
- Send WebRTC answerice-candidate
- Send ICE candidatechat-message
- Send chat message
room-joined
- Room successfully joineduser-joined
- New user joined the roomuser-left
- User left the roomreceive-offer
- Receive WebRTC offerreceive-answer
- Receive WebRTC answerreceive-ice-candidate
- Receive ICE candidatechat-message
- Receive chat message
├── app
│ ├── backend
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.ts
│ │ │ ├── redisData
│ │ │ │ ├── connectionManger.ts
│ │ │ │ └── roomManager.ts
│ │ │ └── services
│ │ │ ├── redisSetup.ts
│ │ │ └── socketSetup.ts
│ │ └── tsconfig.json
│ └── frontend
│ ├── certificate.pem
│ ├── index.html
│ ├── package.json
│ ├── package-lock.json
│ ├── private-key.pem
│ ├── public
│ │ └── video.png
│ ├── README.md
│ ├── request.csr
│ ├── src
│ │ ├── App.vue
│ │ ├── assets
│ │ ├── components
│ │ │ ├── ChatBox.vue
│ │ │ ├── HomeComponent.vue
│ │ │ ├── Login.vue
│ │ │ └── roomComponent.vue
│ │ ├── composables
│ │ │ ├── useAuth.ts
│ │ │ ├── useParticipants.ts
│ │ │ └── useSocket.ts
│ │ ├── main.ts
│ │ ├── shims-vue.d.ts
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tsconfig.app.json
│ ├── tsconfig.json
│ ├── tsconfig.node.json
│ ├── util
│ │ ├── generateId.ts
│ │ └── hashUserId.ts
│ └── vite.config.ts
├── dump.rdb
├── package.json
├── package-lock.json
└── README.md
This project is licensed under the MIT License - see the LICENSE file for details
- WebRTC API
- Socket.io
- Upstash Redis
- Vue.js community