This project is a full-stack web application built using the MERN stack (MongoDB, Express.js, React.js, Node.js) and Socket.IO for real-time communication.
- Real-time messaging: Users can send and receive messages instantly.
- Online user status: The application displays the online status of users, providing insights into who is currently active.
- User authentication: Secure user authentication system ensures that only authorized users can access the chat application.
- MongoDB: A NoSQL database used to store user information and chat messages.
- Express.js: A Node.js web application framework used for building the backend server.
- React.js: A JavaScript library used for building the frontend user interface.
- Node.js: A JavaScript runtime used to run the server-side code.
- Socket.IO: A library that enables real-time, bidirectional and event-based communication between web clients and servers.
To run this application locally, follow these steps:
-
Clone this repository to your local machine.
-
Navigate to the project directory in your terminal.
-
Install the dependencies by running
npm install
in the root directory. -
Create a
.env
file in the root directory and add the following environment variables:DB_URL=
JWT_SECRET=
NODE_ENV=
Replace
http://localhost:5000
with the appropriate URLs for your backend server.
5.npm run build
-
Start the development server by running
npm start
. -
Open your web browser and navigate to
http://localhost:5000
to view the application.
You can view a live demo of the application https://chatter-j0dv.onrender.com/
Contributions are welcome! If you would like to contribute to this project, please fork the repository and submit a pull request.