- ⚡ Real-Time Messaging: Instant messaging powered by
Socket.io. - 🔐 Secure Authentication: JWT-based authentication and Bcrypt password hashing.
- 🟢 Online Status: See who is currently online in real-time.
- 🎨 Dynamic Themes: Choose your favorite aesthetic with DaisyUI theme integration.
- 🖼️ Image Uploads: Seamless profile picture updates using Cloudinary.
- 📱 Fully Responsive: Beautifully designed for both desktop and mobile devices.
- 🧠 State Management: Efficient global state handling using Zustand.
- React 18 (Vite)
- Tailwind CSS + DaisyUI
- Zustand (State Management)
- React Router DOM
- Framer Motion (Animations)
- Lucide React (Icons)
- Socket.io Client
- Node.js + Express.js
- MongoDB + Mongoose
- Socket.io (WebSockets)
- JSON Web Tokens (JWT)
- Cloudinary (Image Storage)
- Bcryptjs (Cryptography)
Follow these instructions to get the project up and running on your local machine.
- Node.js (v18+)
- MongoDB connection string
- Cloudinary account credentials
git clone https://github.com/your-username/chat-app.git
cd chat-appFrom the root directory, you can install both frontend and backend dependencies using the provided script:
npm run build(Alternatively, you can manually run npm install inside both the frontend/ and backend/ directories).
Create a .env file in the backend directory and add the following variables:
PORT=5001
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
NODE_ENV=development
# Cloudinary Configuration
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secretcd backend
npm run devOpen a new terminal and run:
cd frontend
npm run devThe app will typically be available at http://localhost:5173.
chat-app/
├── backend/ # Node/Express backend
│ ├── src/
│ │ ├── controllers/ # Route controllers
│ │ ├── lib/ # Database, Socket.io configs
│ │ ├── models/ # Mongoose schemas
│ │ ├── routes/ # Express routes (auth, messages)
│ │ └── index.js # Entry point
│ ├── .env # Environment variables
│ └── package.json
│
├── frontend/ # React/Vite frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page layouts (Home, Login, etc.)
│ │ ├── store/ # Zustand stores (useAuthStore, etc.)
│ │ ├── App.jsx # Main application component
│ │ └── main.jsx # React DOM rendering
│ ├── tailwind.config.js # Tailwind CSS configuration
│ └── package.json
│
└── package.json # Root package.json (build scripts)
This project is licensed under the ISC License.