- Dr. Bhupendra Kumar
- Ayush Yadav (202252308)
- Shiv Chavda (202251124)
- Suryansh Sahay (202251137)
- M. Ram Bhumeshwar (202251073)
- Frontend Code: Available in
/frontend
directory - Backend Code:
server.js
and related files - Monitoring Dashboard: Access at
localhost:9090
after setup
- Node.js Backend with Express
- Socket.IO for real-time communication
- MongoDB for data persistence
- Prometheus for metrics collection
Our project delivers a robust real-time chat application built with modern web technologies. It features direct messaging capabilities, message history persistence, and comprehensive system monitoring. The application is designed to provide:
- Seamless real-time communication between users
- Persistent message storage and retrieval
- User online/offline status tracking
- System performance monitoring
- Frontend sends user details and messages via Socket.IO
- Backend processes requests and manages WebSocket connections
- MongoDB stores chat history and user status
- Prometheus collects performance metrics
-
Real-time Messaging
- Instant message delivery using WebSocket connections
- Support for direct user-to-user communication
- Message persistence across sessions
-
User Management
- Online/Offline status tracking
- User activity monitoring
- Session management
-
Message History
- Complete chat history retrieval
- Timestamp-based message ordering
- Persistent storage in MongoDB
-
System Monitoring
- Real-time performance metrics
- Prometheus integration
- System health tracking
const express = require('express');
const socketio = require('socket.io');
const mongoose = require('mongoose');
- Real-time event processing
- Message formatting with timestamps
- MongoDB persistence
- Socket-based user tracking
- Online status monitoring
- Session handling
- Prometheus metric collection
- Performance tracking
- System health monitoring
Component | Technology Used |
---|---|
Frontend | HTML, CSS, JS |
Backend | Node.js, Express |
Real-time Comm | Socket.IO |
Database | MongoDB |
Monitoring | Prometheus |
- Clone the repository:
git clone <repository-url>
- Install dependencies:
npm install
- Configure MongoDB:
const database = 'your-mongodb-connection-string';
- Start the server:
npm start
- Launch Prometheus (optional):
docker-compose up -d
- End-to-End Encryption
- Group Chat Functionality
- File Sharing Capabilities
- Voice and Video Chat
- Message Search Functionality
- User Authentication System
userDetails
: User connection managementchatMessage
: Message handlingdisconnect
: User disconnection handling
chatroom
: Message storageonlineUsers
: Active user tracking
-
Real-time Communication
- WebSocket-based messaging
- Instant message delivery
- Connection status tracking
-
Data Persistence
- MongoDB message storage
- User session management
- Chat history retrieval
-
System Monitoring
- Performance metrics
- System health tracking
- Real-time statistics
This Real-Time Chat Application demonstrates the implementation of modern web technologies to create a robust communication platform. The combination of Socket.IO for real-time features and MongoDB for data persistence provides a solid foundation for future enhancements. 🚀