This is a real-time chat application built using the MERN stack (MongoDB, Express.js, React, and Node.js). The application allows users to sign up, sign in, and participate in real-time chat conversations with other users. It utilizes WebSockets to enable instant message delivery, providing a seamless and responsive chatting experience.
- User Registration: New users can sign up to create an account with a unique username and password.
- User Authentication: Registered users can sign in with their credentials securely.
- Real-Time Chat: Users can send and receive messages in real-time with other users in the chat rooms.
- Multiple Chat Rooms: The application supports multiple chat rooms, and users can join any chat room they prefer.
- Unread Messages: Users receive a notification for unread messages, ensuring they don't miss any important conversations.
-
MongoDB: Database for storing user information, chat rooms, and messages.
-
Express.js: Backend server framework for handling HTTP requests and WebSocket connections.
-
React: Frontend library for building the user interface and managing application state.
-
Node.js: Runtime environment for executing JavaScript code on the server-side.
-
Socket.IO: Library for enabling real-time communication through WebSockets.
-
bcrypt: For securely hashing and salting user passwords.
-
JWT (JSON Web Tokens): For managing user authentication and sessions.
- Node.js and npm (Node Package Manager) installed on your system.
Clone the repository to your local machine
git clone https://github.com/AnkitSingh-16/Chat-OnNavigate to the project directory
cd Chat-OnInstall the server dependencies
npm installInstall the client dependencies
cd frontend
npm installTo run this project, you will need to add the following environment variables to your .env file
MONGO_URI = your mongodb connection string
JWT_SECRET = your secret key for jwt
Navigate to the project directory
cd Chat-OnStart the server
npm startStart the Client
cd frontend
npm startThe application will run on http://localhost:3000 by default.



