A modern real-time chat application built with React, Node.js, Socket.IO, and MongoDB.
It supports instant messaging, online user status, authentication, and a clean responsive UI.
- 🔐 User authentication (Signup / Login / Logout)
- 💬 Real-time messaging using Socket.IO
- 🟢 Online / Offline user status
- 🖼️ Image & text messages
- 🕒 Message timestamps (12-hour format)
- 📅 Smart date labels (Today / Day name / Full date)
- 👤 Profile update with image upload (Cloudinary)
- 🍪 JWT authentication with HTTP-only cookies
- 📱 Responsive and modern UI (Tailwind CSS + DaisyUI)
- React (Vite)
- Tailwind CSS + DaisyUI
- Zustand (State Management)
- Axios
- Node.js
- Express.js
- Socket.IO
- MongoDB + Mongoose
- JWT Authentication
- Cloudinary (Image Uploads)
-
Clone the repository:
git clone https://github.com/danielace1/realtime-chat-app.git cd realtime-chat-app -
Install dependencies for both frontend and backend:
# Frontend cd client npm install # Backend cd ../server npm install
-
Create a
.envfile in theserverdirectory and add the following environment variables:PORT = MONGO_URI = NODE_ENV = JWT_SECRET = CLIENT_URL = RESEND_API_KEY = EMAIL_FROM = EMAIL_FROM_NAME = CLOUDINARY_CLOUD_NAME = CLOUDINARY_API_KEY = CLOUDINARY_API_SECRET = ARCJET_KEY = ARCJET_ENV =
-
Start the development servers:
# Start Backend cd server npm run dev # Start Frontend cd ../client npm run dev
-
Open your browser and navigate to
http://localhost:5173to access the application.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.
