A real-time chat application built with the MERN (MongoDB, Express, React, Node.js) stack, Socket.io, and Chakra UI.
- Real-time messaging: Users can send and receive messages in real-time.
- User authentication: Users can sign up, log in, and log out securely.
- Room-based chat: Users can join different chat rooms and have separate conversations.
- Online status: Users can see who is currently online.
- MERN Stack:
- MongoDB: Document-oriented NoSQL database for storing user data and chat messages.
- Express: Fast and minimalist web application framework for Node.js.
- React: JavaScript library for building user interfaces.
- Node.js: JavaScript runtime environment for server-side development.
- Socket.io: Real-time bidirectional event-based communication library.
- Chakra UI: Simple and modular component library for building user interfaces.
To run the chat app locally, follow these steps:
-
Clone the repository:
git clone https://github.com/PoorvKumar/MERN-ChatApp.git
-
Navigate to the project directory:
cd MERN-ChatApp
-
Install dependencies(in both backened and frontend):
npm install
-
Set up the environment variables:
- Create a
.env
file in the root directory. - Define the following environment variables:
MONGODB_URI
: Connection URI for your MongoDB database.JWT_SECRET
: Secret key for JWT authentication.
- Create a
-
Start the development server(both server and client):
npm start