DoomChat is a real-time MERN chat application with friend requests, message history, Socket.IO messaging, and a responsive chat UI with light/dark mode.
- Cookie-based authentication
- Friend search and friend requests
- Real-time messaging with Socket.IO
- Message history with MongoDB
- Online connection status
- Responsive chat layout
- Light/dark mode switching with local persistence
- Frontend: React, Vite, Tailwind CSS, Axios, Socket.IO Client
- Backend: Node.js, Express, MongoDB, Mongoose, Socket.IO, JWT, bcryptjs
backend/
index.js
src/
configs/
controllers/
middleware/
models/
routes/
sockets/
frontend/
src/
components/
context/Create backend/.env:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secretCreate frontend/.env:
VITE_URL=http://localhost:3000Install backend dependencies:
cd backend
npm install
npm run devInstall frontend dependencies:
cd frontend
npm install
npm run devOpen the frontend URL shown by Vite, usually:
http://localhost:5173- The backend runs on
http://localhost:3000. - Socket.IO is attached to the main backend server in
backend/index.js. .envfiles are ignored and should not be committed.