A real-time chat application with video calling functionality built using Node.js, Socket.IO, MongoDB, and Agora RTC. This application allows users to create individual and group chats, send messages in real-time, and make video calls.
- User Authentication: Simple email-based login and signup system
- Real-time Messaging: Instant message delivery using Socket.IO
- Individual & Group Chats: Create private conversations or group chats with multiple users
- Video Calling: Integrated video calling functionality using Agora RTC
- Responsive Design: Modern UI built with Tailwind CSS and DaisyUI
- Message History: Persistent message storage and retrieval
- Session Management: Secure session handling with client-sessions
- Node.js - Server runtime
- Express.js - Web framework
- Socket.IO - Real-time bidirectional communication
- MongoDB - Database for storing users, messages, and rooms
- Mongoose - MongoDB object modeling
- client-sessions - Session management
- EJS - Template engine
- Tailwind CSS - Utility-first CSS framework
- DaisyUI - Tailwind CSS component library
- Socket.IO Client - Real-time communication
- Agora RTC SDK - Video calling functionality
-
Clone the repository
git clone https://github.com/Harkit2004/chatapp-men-ejs.git cd chatapp-mem-ejs -
Install dependencies
npm install
-
Environment Configuration Create a
.envfile in the root directory:PORT=8080 URI=mongodb://localhost:27017/chatapp SECRET=your-session-secret-key-here
-
Start the application
npm start
-
Access the application Open your browser and navigate to
http://localhost:8080
GET /- HomepageGET /login- Login pagePOST /login- Process loginGET /signup- Signup pagePOST /signup- Process signupGET /logout- Logout user
GET /user- User dashboard with chat roomsGET /user/chatRoom/:roomId- Individual chat roomGET /user/addContacts- Add contacts pagePOST /user/addContacts- Create new room/group
GET /error- Error page with status and message
chat-message- Send a new messagedisconnect- User disconnects from chat
message-received- Receive new messageerror- Error notification
The application integrates Agora RTC for video calling functionality. Features include:
- Join/leave video calls
- Toggle microphone on/off
- Toggle camera on/off
- Multiple participants support
- Real-time video streaming