A real-time full-stack chat application built using the MERN stack (MongoDB, Express, React, Node.js) with Socket.io for real-time communication.
- 🔐 Authentication & Authorization using JWT
- 👾 Real-time messaging powered by Socket.io
- 🟢 Online user presence status
- ☁️ Cloudinary image upload support
- ✅ Error handling on both client and server
- 🔐 Passwords hashed using bcryptjs
- 🍪 JWT stored in HTTP-only cookies for session management
- ⚡ Modern UI with React, Lucide Icons, and Zustand for state management
- React
- Node.js
- Express
- MongoDB
- Cloudinary (for image storage)
- React Router DOM (for navigation and routing between different pages)
- Axios (for making HTTP requests to the backend)
- Zustand (for state management and storing application data globally)
- Lucide React (for providing icons to enhance UI)
- React Hot Toast (for showing toast notifications on the client)
- Mongoose (for MongoDB interactions)
- Socket.io (for real-time messaging)
- dotenv (for environment variables)
- jsonwebtoken (for JWT authentication)
- bcryptjs (for password hashing)
- cookie-parser (for handling cookies)
- cloudinary (for image uploading)
- cors (for Cross-Origin Resource Sharing)
git clone https://github.com/yourusername/your-chat-app.git
cd your-chat-appcd server
npm installcd ../client
npm installCreate a .env file in the /server directory and add:
MONGODB_URI=your_mongo_connection_string
PORT=5001
JWT_SECRET=your_jwt_secret
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
NODE_ENV=developmentcd server
npm run devcd client
npm run devclient/ # React frontend
server/ # Node.js + Express backend
This project uses:
Contributions are welcome! Fork the repo and create a pull request.