This is a real-time chat application built using the MERN stack (MongoDB, Express.js, React.js, Node.js) and Socket.io for real-time messaging.
- Real-time messaging with Socket.io
- User authentication (Login & Signup)
- Group and one-on-one chat support
- Responsive UI
- React.js (with React Router DOM for navigation)
- CSS (for styling)
- Axios (for API calls)
- Socket.io-client (for real-time communication)
- Node.js with Express.js
- MongoDB (Database)
- Mongoose (ODM for MongoDB)
- Socket.io (for real-time communication)
- bcrypt (for password hashing)
- JWT (for authentication)
Make sure you have the following installed:
- Node.js (Latest LTS version recommended)
- MongoDB (Local or Cloud - MongoDB Atlas)
git clone https://github.com/yourusername/chat-app.git
cd chat-appcd backend
npm installCreate a .env file in the backend folder and add the following:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_keyStart the backend server:
npm startcd ../frontend
npm installStart the frontend server:
npm start- Start the backend first (
npm startinbackendfolder) - Start the frontend (
npm startinfrontendfolder) - Open the app in your browser at
http://localhost:3000(or the port your frontend runs on)
- Sign up or log in with your credentials
- Start a chat with a user or a group
- Send and receive messages in real time
Feel free to fork this repository and make improvements! PRs are welcome. 😊
Thanks to Socket.io and MERN stack for making real-time communication easy!
No license is applied to this project.