A full-stack real-time chat application built with React, Vite, Zustand, DaisyUI, Express, MongoDB, Socket.IO, and Cloudinary.
- Real-time messaging with Socket.IO
- User authentication (signup, login, logout)
- Profile management with avatar upload (Cloudinary)
- Theme switching (DaisyUI themes)
- Responsive UI with Tailwind CSS and DaisyUI
- User presence (online/offline status)
chat-app/
├── backend/
│ ├── src/
│ ├── .env
│ └── package.json
├── frontend/
│ ├── src/
│ ├── public/
│ ├── index.html
│ └── package.json
├── package.json
└── README.md
- Node.js (v18+ recommended)
- npm
- MongoDB Atlas account (or local MongoDB)
- Cloudinary account
Create a .env file in the backend/ directory with the following variables:
MONGO_URL=your_mongodb_connection_string
PORT=5001
JWT_SECRET=your_jwt_secret
NODE_ENV=development
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secretgit clone https://github.com/gup-abhi/chat-app.git
cd chat-app# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm install- Copy the example above into
backend/.envand fill in your values.
If you want to seed users for testing, run:
cd backend
node src/seeds/user.seed.jscd backend
npm run devcd frontend
npm run dev- The frontend will run on http://localhost:5173
- The backend will run on http://localhost:5001
# Build frontend
cd frontend
npm run build
# Serve with backend (make sure NODE_ENV=production in backend/.env)
cd ../backend
npm startMIT