A real-time chat application built with the MERN stack (MongoDB, Express.js, React.js, Node.js).
This project was created for learning purposes and demonstrates a full-stack chat solution with user authentication and real-time messaging.
- User registration and login with JWT authentication
- Real-time messaging (Socket.IO)
- Create and join chat rooms or direct messages
- Responsive, clean UI
- User online/offline status
- Message notifications
- (Optional) Emojis and profile avatars
- Frontend: React.js (JavaScript), CSS/HTML
- Backend: Node.js, Express.js
- Database: MongoDB
- Real-time: Socket.IO
- Authentication: JWT, bcrypt
- Node.js (v18+ recommended)
- npm or yarn
- MongoDB (local or Atlas)
git clone https://github.com/blezecon/ChatApp.git
cd ChatAppcd backend
npm installcd ../frontend
npm installFill the .env file in the backend directory:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLIENT_URL=http://localhost:3000
npm run devnpm start- Backend: http://localhost:5000
- Frontend: http://localhost:3000
- Register a new account or log in.
- Create or join a chat room, or start a private chat.
- Enjoy messaging in real time!
ChatApp/
backend/
models/
routes/
controllers/
...
frontend/
src/
components/
pages/
...
This project is for learning purposes.
You may use or modify it freely.