Project File
Project File
Project-I Report
On
Echo Chat
Submitted By:
Submitted to:
Dr. Rakhi Sharma
(Assistant Professor)
(Jashanpreet Singh)
(Dipanshu)
(Natish Maan)
This is to certify that the above statement made by the candidate is correct to the best of my knowledge.
The B. Tech Project I Viva-voce examination of Jashanpreet Singh (1222628), Dipanshu (1222621), Natish Maan
(1222639) has been held on …………………… and is Accepted.
i
Acknowledgement
The writing of this project report has been assisted by the generous help of many people. I feel that I
was very fortunate to receive assistance from them. I wish to express my sincere appreciation to them.
First and foremost, I indebted to my principal supervisor, Dr. Rakhi Sharma (Assistant Professor,
Department of Information Technology) of JMIT, Radaur, who has been very supportive at every
stage of my project completion. I wish to express my utmost gratitude to her for the invaluable advice
and patience in reading, correcting and commenting on the drafts of this report and, more importantly,
for his generosity which I have received throughout my project completion.
I would like to acknowledge and extended my heartfelt gratitude to Co-guide Dr. Vikas Juenja
I wish to express my thanks to all staff members of JMIT Radaur, who also helped me in conducting
this study.
Dipanshu (1222621)
ii
Abstract
The rise of real-time communication in digital ecosystems demands responsive, scalable, and user-
friendly solutions. Traditional chat applications often fall short in delivering seamless bi-directional
communication and user control. In this proposed system, we introduce a MERN stack-based real-time
Echo Chat designed to facilitate dynamic interactions between users and administrators. The application
integrates secure authentication, instant messaging, and efficient socket-based data transmission using
Socket.IO. Built using MongoDB, Express.js, React.js, and Node.js, the system ensures low-latency,
event-driven communication with persistent data storage. Key features include live chat, user status
indicators, message history logging, and administrative controls. The architecture emphasizes modularity,
with clean UI/UX, RESTful APIs, and real-time socket connections that maintain synchronization across
clients. Testing tools such as Postman and JWT are used to validate secure access and simulate user
interactions. This Chat System provides a scalable foundation for future enhancements like media
sharing, chat analytics, and AI-driven moderation, offering a reliable and engaging platform for real-time
communication.
iii
TABLE OF CONTENTS
Declaration………………...
……………………………………………………………………….......................i
Acknowledgement……………………………………………………………………………………………….i
i
Abstract …………………………………………………………………………………………...……………iii
Table of Contents …………………………………………………………………………………...………….iv
List of Figures………………………………………………………………………….…………..…………...vi
List of
Tables…………………………………………………………………………………………………...vii
List of
Abbreviations…………………………………………………………………………………………..viii
CHAPTER 1 ............................................................................................................................. 1
1.1 Problem Background and Its Context ..................................................................... 2
1.2 System Objectives ................................................................................................................ 2
1.3 Functionality (Core and Enhanced) ......................................................................... 3
1.4 Academic, Technical & Economic Feasibility ........................................................ 4
1.5 Risk Factors Identification & Mitigation ...............................................................................
4
CHAPTER 2 ............................................................................................................................. 5
2.1 Requirement Analysis & System Design ..................................................... 6
2.2 Use Case Diagram ................................................................................................... 7
2.3 Activity Diagram ........................................................................................................... 8
2.4 Class Diagram ............................................................................................................... 9
2.5 ER Diagram .................................................................................................................. 10
2.6 Sequence Diagram ...............................................................................................................
11
CHAPTER 3 ........................................................................................................................... 12
3.1 System Implementation .......................................................................................... 13
3.2 Frontend Module ..................................................................................................... 13
3.3 Backend Module ...................................................................................................... 14
3.4 Database Schema .................................................................................................... 14
3.5 Stripe Integration .................................................................................................... 15
3.6 Role-Based Flow .............................................................................................................. 16
CHAPTER 4 ........................................................................................................................... 17
4.1 Unit Testing ..................................................................................................................... 18
4.2 Functional Testing .......................................................................................................................
19
iv
CHAPTER 5 ........................................................................................................................... 21
5.1 Future Scope & Limitations ................................................................................................ .... 22
CHAPTER 6 ........................................................................................................................... 24
6.1 Conclusion ...........................................................................................................................
25
CHAPTER 7 ........................................................................................................................... 26
7.1 Bibliography ...........................................................................................................................
27
CHAPTER 8 ........................................................................................................................... 28
8.1 Appendix .............................................................................................................................. 28
8.2 Project Log Sheet .................................................................................................... 29
8.3 Additional Screens ......................................................................................................... 30
8.4 Plagiarism Report .............................................................................................................
36
v
List of Figures:
vi
List of Tables:
vii
List of Abbreviation:
UI User Interface
UX User Experience
DB Database
ER Entity Relationship
viii
ix
x
Chapter 1: Introduction
1
I. Problem Background and its Context
Over the past decade, communication methods have evolved rapidly with advancements in mobile technology and
the rise of real-time messaging. Chat systems have become essential tools for personal, educational, and
professional interactions, offering instant connectivity and collaborative potential. However, many existing chat
platforms are overloaded with unnecessary features, lack user-friendly design, and do not support adaptive peer-to-
peer communication models effectively.
Peer-to-peer chat emphasizes real-time, collaborative conversation where users engage in meaningful dialogue
within a secure and accessible space. Traditional chat systems often fall short, especially in enabling users to create
focused conversation groups or manage communication flow with autonomy and privacy.
The growing demand for seamless, distraction-free messaging, encrypted communication, and customizable
interaction tools underlines the need for a modern chat solution. Echo Chat addresses these challenges with a
minimalistic, responsive design tailored for both individuals and teams, prioritizing user control, message privacy,
and reliable performance.
The project aims to minimize barriers in communication and simplify user experience by offering a clean, secure
chat interface — empowering users to interact naturally without confusion or clutter. This is increasingly crucial in
today’s digital-first society, where efficient and private communication is not just convenient but essential.
The primary goal of Echo Chat is to design and develop a web-based chat platform that offers a smooth and secure
peer-to-peer messaging experience for users. The objectives include:
• To build a secure login and registration system distinguishing user roles and permissions.
• To create a chat dashboard where users can initiate, join, and manage private or group conversations.
• To allow users to discover and connect with peers or contacts through a searchable interface.
• To implement end-to-end encryption ensuring all messages remain private and secure.
• To provide message history and allow users to search and filter previous conversations.
• To ensure the chat system is scalable, maintainable, and optimized for real-time performance.
• To develop a responsive and clean UI that adapts seamlessly to both desktop and mobile screens.
• To test backend APIs and messaging endpoints using tools like Postman and WebSocket clients.
• To integrate a modular system allowing future enhancements such as media sharing, voice, or video chat.
Core Functionalities:
2
1. Authentication & Role Management:
o Secure login/signup flow using JWT tokens.
o Role-based access for regular users and admins.
2. Chat Interface:
o Initiate one-on-one or group chats.
o Send and receive messages in real-time using WebSocket’s.
o Pin, delete, or mark messages for follow-up.
3. Contact & Group Management:
o Add, search, and organize contacts.
o Create and manage group chats with participant control.
o Assign group roles (admin, member) with permissions.
4. Message History & Search:
o View and search past conversations.
o Filter messages by date, keyword, or sender.
5. Notification System:
o Real-time push notifications for incoming messages.
o Badge indicators for unread conversations.
6. Database Architecture:
o MongoDB schemas for users, chats, messages, groups, and notifications.
Enhanced Functionalities:
1. UI/UX Enhancements:
o Responsive layout using Tailwind CSS.
o Smooth animations and transitions via ShadcnUI.
2. State Management:
o RTK Query for efficient API interaction.
o Optimistic updates for seamless user experience.
3. API Security:
o Auth middleware to protect private chat routes.
o Role-based restrictions for admin operations.
4. Real-Time Feedback:
o Toast alerts for actions (message sent, contact added, etc.)
5. SEO-Friendly Routing (Planned for future):
o Static public profiles with meta info and clean URLs.
Academic Feasibility:
• The project integrates concepts from core subjects like Web Development, Network Security, Software
Engineering, and Database Systems.
• It showcases practical knowledge of full-stack systems, with emphasis on real-time communication and user-
centric design.
3
• Academic knowledge has been effectively applied in building both frontend components and backend services for
messaging.
Technical Feasibility:
Economic Feasibility:
5
I. Requirement Analysis
Echo Chat was developed to fulfil the communication and collaboration needs of a modern, modular, and secure
Chat System. It emphasizes the user roles of participants and moderators. Each user has distinct features,
permissions, and access levels that define their interaction within the system. The objective of this phase is to
collect, specify, and document both functional and non-functional requirements of the system.
Functional Requirements:
Non-Functional Requirements:
Software Requirements:
Hardware Requirements:
Minimum 4 GB RAM
10 GB Disk Space
Stable Internet Connection
6
II. System Design (UML, ERD)
Actor: User
o Login / Logout
o Friend Request
o Chat List
o Friend List
o Configuration
7
Activity Diagram:
User --> Send Message --> Server --> Admin Notified --> Admin --> Send Reply --> Server --> User
User/Admin --> Continue? --> No --> End Chat --> Server Logs History
8
Class Diagram:
Classes:
o User: userId, username, email, password, status
o Chatapp : appId, version, users, chatgroups
o Notification: notificationId, userId, messageId, sequence
o ChatGroup: groupId, groupName, members, CreatedDate
o Message: messageId, senderId, receiverId,content ,timestamp,isread
o Chat : Chatid, users,messages
9
ER Diagram:
User Collection
ChatRoom Collection
Message Collection
Relationships:
10
Sequence Diagram (Course Purchase Flow):
11
Chapter 3:System Implementation
12
I. System Implementation (Functional briefing with Module code/Pseudo-code)
The implementation of Echo Chat was executed using the MERN stack along with Socket.IO for real-time
communication. The objective was to create a robust chat system that enables users to interact in real time with a
clean, scalable architecture. This chapter details the functional modules, code snippets, and the internal flow that
powers the platform.
The process began with designing the database schemas using Mongoose. Backend routes and socket logic were
then implemented with Express and Socket.IO. The frontend was built in React, and real-time updates were
integrated via WebSocket’s. Each part was tested individually and then combined for full integration.
Key development priorities included state management, modular codebase, real-time socket handling, and secure
APIs. React components were designed for reusability, while backend endpoints and socket listeners were tested
with Postman and client tools.
The frontend is implemented in React using functional components and hooks. The design is made responsive with
Tailwind CSS and ShadcnUI components.
Routing:
<Route path="/dashboard" element={<ProtectedRoute><Dashboard /></ProtectedRoute>} />
Protected Route:
const ProtectedRoute = ({ children }) => {
const token = localStorage.getItem('token');
return token ? children : <Navigate to="/login" />;
};
Backend APIs use Express.js. MongoDB serves as the database, and JWT is used for secure access control.
JWT Midddleware:
const authMiddleware = (req, res, next) => {
const token = req.headers.authorization;
if (!token) return res.status(403).send("No token");
const decoded = jwt.verify(token, process.env.JWT_SECRET);
req.user = decoded;
next();
};
Socket.IO powers the real-time capabilities of PeerChat. The server listens for connection, disconnection, message
send, and room join events.
15
VI. Role-Based Functional Flow
Admin Module:
User Module:
16
Chapter 4:Testing (Unit & Functional Testing)
17
1.Unit Testing:
Unit testing focuses on verifying the functionality of individual components of the Echo Chat in
isolation. Below are example unit tests for core modules:
• Test user registration: ensure new users can sign up with valid email/password and receive a
verification token.
• Verify user login: confirm successful login with correct credentials returns a JWT, and invalid
credentials yield an error.
• Test token validation: check that protected routes reject expired or malformed tokens
Check password reset flow: ensure reset links are generated, emailed, and accepted only once.
2. Feature Testing:
• Direct messaging: send and receive messages between two users, including read receipts and typing
indicators.
• Group chat: create a new channel, invite members, and verify all members see new messages in real
time.
• File sharing: upload an image in a chat, confirm inline preview, and test file download
functionality.
• Emoji reactions and threaded replies: react to a message and start a thread; verify correct
grouping in the UI.
3. Integration Testing:
• API and WebSocket: execute a chat flow (login → join channel → send message → receive
message) to ensure API and Socket.IO interactions function seamlessly.
• Database consistency: after messaging flows, query the database to verify message
documents include correct sender/channel IDs and timestamps.
18
• Third-party integrations: test webhook endpoint by posting a CI/CD alert and verifying it
appears in the specified channel.
4. Performance Testing:
• Load test with simulated users (e.g., 1,000 concurrent WebSocket connections) to measure message
latency and server CPU/memory usage.
• Stress test peak activity bursts (e.g., 100 messages/sec) to identify throughput limits and
potential bottlenecks.
• Monitor for memory leaks by running prolonged messaging sessions and observing
resource trends.
Functional Testing:
Functional testing evaluates the system's functionality against specified requirements. Here are
examples of functional tests for the college social media platform:
• Verify that the user interface elements are displayed correctly and consistently across
different devices and browsers.
• Check responsiveness of the user interface by testing on various screen sizes and
resolutions.
• Test error handling and validation messages to ensure they are displayed appropriately.
2. Feature Testing:
• Test messaging functionality: sending, editing, deleting messages, and viewing read receipts.
19
• Verify group chat flows: creating channels, inviting members, and managing channel privacy.
• Test group creation, discussion, and event management features.
• Check messaging functionality, including sending, receiving, and managing messages.
3. Integration Testing:
• Test interactions between modules, ensuring that data is passed correctly between
different components.
• Verify data consistency and integrity across the platform.
• Test API endpoints for data retrieval and updates.
4. Performance Testing:
• Test system response times under various loads to ensure scalability.
• Verify resource utilization and identify any performance bottlenecks.
• Check for memory leaks and ensure optimal performance.
5. Security Testing:
• Test authentication and authorization mechanisms to ensure secure access to the platform.
• Verify data encryption and secure transmission to protect user privacy.
• Check for vulnerabilities such as SQL injection and cross-site scripting to ensure the
platform's security.
20
Chapter 5:Future Scope & Limitations
2. Advanced Analytics and Insights: Implementing advanced analytics and machine learning
algorithms can provide deeper insights into user behavior, engagement patterns, and content
preferences. This data-driven approach can enable colleges to personalize content
recommendations, optimize communication strategies, and identify opportunities for
improvement based on real-time feedback.
3. AI-Powered Insights and Automation: Incorporating machine learning can analyze chat
trends—peak activity hours, topic popularity—and automatically suggest relevant channels
or resources. AI-driven chatbots could handle routine queries (e.g., “What’s today’s meeting
link?”), freeing users to focus on substantive discussions.
22
Limitations of Echo Chat:
1. Privacy and Data Security Concerns: College social media platforms may face
challenges related to privacy and data security, particularly concerning the
collection, storage, and use of personal information. Ensuring robust privacy
controls, data encryption, and compliance with regulations such as GDPR and CCPA
is essential to mitigate these concerns.
2. Digital Divide and Accessibility Issues: Not all students may have equal access to
technology or reliable internet connectivity, leading to disparities in participation
and engagement on college social media platforms. Addressing the digital divide and
ensuring accessibility for users with disabilities is crucial to promoting inclusivity
and equitable access to resources and opportunities.
3. Content Moderation and Online Safety: Chat System platforms may encounter
issues related to inappropriate or harmful content, cyberbullying, and harassment.
Implementing effective content moderation policies, reporting mechanisms, and user
guidelines is essential to maintain a safe and respectful online environment for all
users.
23
Chapter 6:Conclusion
In conclusion, a dedicated Chat System serves as a transformative tool for boosting real-time
communication, collaboration, and team cohesion in any group environment. By offering a
centralized space for users to exchange ideas, share files, and coordinate tasks instantly, this
platform plays a pivotal role in fostering an engaged and productive community.
Throughout this document, we have examined the Chat System’s background, objectives, and core
functionality—showcasing its ability to facilitate one-to-one and group messaging, secure media
sharing, and channel-based collaboration. We also reviewed its feasibility, architectural design,
rigorous testing strategies, and future enhancement avenues.
It is clear that the Chat System delivers significant advantages: seamless information flow,
accelerated decision-making, and unified project workflows. Leveraging real-time protocols, secure
authentication, and intuitive interfaces, the system can redefine how teams interact and manage
their day-to-day activities.
24
Nonetheless, we must remain mindful of potential challenges—data privacy, accessibility across
devices, content moderation, and long-term maintainability. Overcoming these requires a balanced
strategy that emphasizes robust security, inclusive design, proactive moderation, and sustainable
development practices.
In summary, the Chat System offers immense promise as a versatile communication backbone. By
continually innovating, addressing user needs, and upholding high standards for privacy and
reliability, organizations can unlock its full potential to empower teams, streamline collaboration,
and drive success across diverse projects and working environments.
Chapter 7: Bibliography
25
Mozilla Developer Network. (n.d.). JavaScript documentation.
https://developer.mozilla.org/en-US/docs/Web/JavaScript
React Team. (n.d.). React Documentation. https://react.dev
Redux Toolkit. (n.d.). RTK Query. https://redux-toolkit.js.org
Express. (n.d.). Express.js Docs. https://expressjs.com
MongoDB. (n.d.). MongoDB Docs. https://mongodb.com/docs
Stripe. (n.d.). Stripe API Reference. https://stripe.com/docs/api
Postman. (n.d.). API Tool. https://postman.com
Tailwind Labs. (n.d.). Tailwind CSS Docs. https://tailwindcss.com/docs
Shadcn UI. (n.d.). https://ui.shadcn.com
JWT.io. (n.d.). JSON Web Token Debugger. https://jwt.io
26
Chapter 8:Appendix
Feb 10, 25 Finalized project topic Confirmed "Echo Chat" with guide
Feb 12, 25 Created initial UI wireframes User and chat flow designed
Feb 20, 25 User authentication setup JWT configured with role checks
27
Mar 05, 25 Group Chat, Notification Admin Setup
Feature
Mar 10, 25 Admin Dashboard and Tracking Frontend sync with backend
complete
Apr 01, 25 Full round of testing Postman testing and bug fixing done
May 01, Final review and print prep Submitted to project coordinator
25
Screenshots:
Figure 1: Login Page Interface
28
Figure 3: search Panel
29
Figure 5: Group Panel
30
Figure 7: Admin Login:
31
32
33
34