A real-time, Secure chat where each user can only access their own conversations, built with the MERN stack and featuring direct messaging, image sharing, GIF support, and a modern responsive UI.
- User authentication (signup, login) with JWT and httpOnly cookies
- Real-time one-on-one messaging via Socket.io
- Online/offline user presence
- Image messages with client-side compression and Cloudinary storage
- GIF support via an in-app GIF picker
- Light/dark theme toggle with persistence (Tailwind + DaisyUI)
- Typing and loading feedback (skeleton loaders, smooth animations)
- Mobile-first, fully responsive layout
- Access control on conversations so a user can only see their own chats
- Node.js (LTS recommended)
- npm
- MongoDB instance (local or Atlas)
- Cloudinary account (for image storage)
- Giphy API key (for GIF picker feature)
- GitHub personal access token (for GitHub contribution stats on the Settings page)
git clone https://github.com/priyanshuwq/VibeChat.git
cd VibeChatFrom the project root:
npm run install-allThis installs packages for:
backend/frontend/- root tooling
If that script is unavailable, you can install manually:
cd backend
npm install
cd ../frontend
npm installCreate backend/.env and set:
MONGODB_URI=your-mongodb-connection-string
PORT=5001
JWT_SECRET=your-jwt-secret
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-cloudinary-api-key
CLOUDINARY_API_SECRET=your-cloudinary-api-secret
CLIENT_URL=http://localhost:5173
NODE_ENV=development
GITHUB_API_TOKEN=your-github-personal-access-tokenUse backend/.env.example as a reference.
Create frontend/.env and set:
# Get your free API key from: https://developers.giphy.com/dashboard/
VITE_GIPHY_API_KEY=your-giphy-api-keyUse frontend/.env.example as a reference.
Note: To get a Giphy API key:
- Go to Giphy Developers Dashboard
- Create a new app and select "API" type
- Copy the API key and paste it in your
.envfile
From the project root:
npm run devThis starts:
- Backend:
http://localhost:5001 - Frontend:
http://localhost:5173
Open the frontend URL in your browser and sign up / log in to start using VibeChat.
From the project root:
npm run build
npm startnpm run buildinstalls dependencies and builds the frontend intofrontend/distnpm startstarts the backend server and serves the built frontend as static files
The backend then exposes:
- API under
/api/* - Frontend SPA for all other routes (catch-all in
backend/src/index.js)
- React + Vite
- Tailwind CSS + DaisyUI
- Zustand (state management)
- Socket.io-client
- Axios
- Framer Motion
- Node.js + Express
- MongoDB + Mongoose
- Socket.io
- Cloudinary
- JWT authentication
Made with ❤️ Priyanshu