Highlights:
- 🌟 Tech stack: MERN + Socket.io + TailwindCSS + Daisy UI
- 🎃 Authentication && Authorization with JWT
- 👾 Real-time messaging with Socket.io
- 🚀 Online user status
- 👌 Global state management with Zustand
- 🐞 Error handling both on the server and on the client
MONGODB_URI=mongodb+srv://shah125roz_db_user:W67gclLudQvohv56@cluster0.8a42jed.mongodb.net/chat_db?appName=Cluster0
PORT=5001
JWT_SECRET=mysecret
CLOUDINARY_CLOUD_NAME=dayajes8o
CLOUDINARY_API_KEY=665847369657562
CLOUDINARY_API_SECRET=QXFYb6K2L4HjSxFuUvhaLeTEBKQ
NODE_ENV=productionnpm run buildnpm startcd frontend
npx vite --host To run the app on multiple devices on the same network (LAN):
The backend is already configured to listen on all network interfaces (0.0.0.0).
The frontend is configured to listen on all network interfaces for LAN access.
-
Find your computer's IP address:
- Windows: Run
ipconfigin Command Prompt - Linux/Mac: Run
ifconfigorip addr - Look for IPv4 address (e.g.,
192.168.1.100)
- Windows: Run
-
Access the app:
- Frontend:
http://YOUR_IP:5173 - Backend API:
http://YOUR_IP:5001
- Frontend:
-
Example:
Frontend: http://192.168.1.100:5173 Backend: http://192.168.1.100:5001
Make sure ports 5001 and 5173 are open in your firewall for LAN access.
- If login doesn't work, check browser console for CORS errors
- Ensure both devices are on the same WiFi network
- Try disabling firewall temporarily for testing