QuickChat is a full‑stack real‑time chat application with user authentication, profile management, and live messaging using Socket.IO, React, and Node.js.
- Frontend: React, Vite, Tailwind CSS
- Backend: Node.js, Express, Socket.IO
- Database: MongoDB (Mongoose)
- Other: Cloudinary (for media), JSON Web Tokens (JWT)
- client: React frontend (Vite)
- server: Express/Socket.IO backend and API routes
- Node.js (LTS or newer)
- npm
- MongoDB running locally or a MongoDB connection string
Create a .env file inside the server folder:
MONGODB_URI=mongodb://127.0.0.1:27017/chatapp
SecretKey=your_long_random_jwt_secret
CLOUDINARY_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secretNote: Do not commit
.envto git. It is already ignored by.gitignore.
From the project root:
cd server
npm install
cd ../client
npm installcd server
npm run server # uses nodemon server.jsThe backend will start on http://localhost:5000 (or the port from PORT env).
Check that it is running:
curl http://localhost:5000/api/status
# → "Server is Live"Make sure client/vite.config.js includes the /api proxy to the backend:
server: {
proxy: {
'/api': {
target: 'http://localhost:5000',
changeOrigin: true,
},
},
},Then start the dev server:
cd client
npm run devThe app will be available at http://localhost:5173.
Build the frontend:
cd client
npm run buildStart the backend in production mode:
cd server
NODE_ENV=production PORT=5000 npm startConfigure your hosting platform to:
- Run
npm run buildinclientduring the build step. - Run
npm install && npm startinserveras the start command.
- npm run server: start backend with nodemon
- npm start: start backend with node
- npm run dev: start Vite dev server
- npm run build: build production assets
- npm run preview: preview built frontend locally
- Ensure MongoDB is running and accessible from
MONGODB_URI. - Update CORS, proxy, and environment values as needed when deploying.