Real-time chat with instant messaging, live user status, and seamless media sharing
- 🔐 Secure Authentication - JWT-based auth with bcrypt password hashing
- 💬 Real-Time Messaging - Instant delivery via Socket.io with message persistence
- 👥 Live User Status - See who's online/offline in real-time
- 📸 Media Sharing - Upload and share images with Cloudinary integration
- 🎨 Modern UI - Responsive design with Tailwind CSS and smooth animations
- 📱 Mobile Ready - Works seamlessly across all device sizes
Frontend: React 19 • TypeScript • Vite 7 • Tailwind CSS 4 • Socket.io Client • React Router v7
Backend: Node.js • Express 5 • TypeScript • Socket.io • MongoDB + Mongoose • JWT • Cloudinary • Zod
Deployment: Vercel (Frontend) • Render (Backend) • MongoDB Atlas
- Node.js 18.x or higher
- MongoDB (local or Atlas)
- Cloudinary account
1. Clone and Install
git clone https://github.com/Vedant1607/QuickChat.git
cd QuickChat
# Install backend dependencies
cd server && npm install
# Install frontend dependencies
cd ../client && npm install2. Configure Environment Variables
Create server/.env:
MONGODB_URI=your_mongodb_connection_string
PORT=5000
JWT_SECRET=your_secret_key
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secretCreate client/.env:
VITE_BACKEND_URL=http://localhost:50003. Run the Application
# Terminal 1 - Start backend
cd server
npm run build
npm start
# Terminal 2 - Start frontend
cd client
npm run devOpen http://localhost:5173 and start chatting! 🎉
QuickChat/
├── client/ # React frontend
│ ├── context/ # AuthContext, ChatContext
│ └── src/
│ ├── components/ # Reusable components
│ ├── pages/ # HomePage, LoginPage, ProfilePage
│ └── lib/ # Axios configuration
│
└── server/ # Express backend
└── src/
├── controllers/ # Business logic
├── models/ # Mongoose schemas
├── routes/ # API endpoints
└── middlewares/ # Auth & validation
POST /api/auth/signup- Register new userPOST /api/auth/login- User loginGET /api/auth/check- Verify authenticationPUT /api/auth/update-profile- Update profile
GET /api/messages/users- Get all usersGET /api/messages/:userId- Get chat historyPOST /api/messages/send/:userId- Send message
getOnlineUsers- Real-time online user updatesnewMessage- Instant message delivery
- Push code to GitHub
- Import repository on vercel.com
- Set Root Directory to
client - Add environment variable:
VITE_BACKEND_URL - Deploy!
- Create Web Service on render.com
- Set Root Directory to
server - Build Command:
npm install && npm run build - Start Command:
npm start - Add all environment variables
- Deploy!
Client:
npm run dev- Start dev servernpm run build- Production buildnpm run lint- Run linter
Server:
npm run dev- TypeScript watch modenpm run build- Compile TypeScriptnpm start- Run production server
Contributions are welcome! Fork the repo, create a feature branch, and submit a PR.
ISC License
Made with ❤️ by Vedant Sinha
⭐ Star this repo if you found it helpful!