A real-time chat application built with React, Express, MongoDB, and WebSockets.
- Frontend: React 18, Vite, Tailwind CSS, Material-UI
- Backend: Node.js, Express, Mongoose, WebSocket (ws)
- Auth: JWT with HTTP-only cookies, bcryptjs
- Node.js
- MongoDB instance
-
Backend
cd backend npm installCreate a
.envfile inbackend/:MONGO_URL=your_mongodb_connection_string JWT_SECRET=your_secret_key CLIENT_URL=http://localhost:5173node index.js
Server runs on
http://localhost:4000. -
Frontend
cd client npm install npm run devApp runs on
http://localhost:5173.
- User registration and login with JWT authentication
- Real-time online user presence via WebSocket
- Responsive UI with Tailwind CSS and Material-UI icons