A modern, real‑time chat app to collaborate with friends/teammates. Built with a classic Frontend / Backend split.
Live demo: real-time-collaboration-tool-livid.vercel.app (if deployed) Repo folders: Frontend/ and Backend/
- Real‑time 1‑to‑1 and/or group messaging (Socket-based)
- Message delivery and online presence indicators
- Typing indicator and unread counts
- Auth (signup/login) and protected routes
- Persistent conversations in a database
- Mobile‑responsive UI
Note: Adjust this list to exactly match what you’ve implemented.
Frontend: React + (Vite or CRA), Tailwind CSS Backend: Node.js, Express, Socket.IO Database: MongoDB (Mongoose) Auth: JWT cookies or headers Deployment: Vercel (frontend), Render/Railway (backend)
Replace items if your stack differs.
Real-Time-Collaboration-Tool/
├── Frontend/ # React app (UI)
│ ├── src/
│ ├── public/
│ └── package.json
└── Backend/ # API + WebSocket server
├── src/ or server.js
├── package.json
└── .env (local only)
- Node.js LTS and npm/yarn
- (Optional) MongoDB running locally or a cloud URI (MongoDB Atlas)
git clone https://github.com/Xabhi0811/Real-Time-Collaboration-Tool.git
cd Real-Time-Collaboration-Toolcd Backend
npm install # or yarnCreate Backend/.env:
Start backend:
npm run dev # or: npm startcd ../Frontend
npm installCreate Frontend/.env (Vite syntax shown):
Start frontend:
npm run devOpen http://localhost:5173 in your browser.
Backend
PORT– API/Socket server portMONGODB_URI– Mongo connection stringJWT_SECRET– signing secret for access tokensCLIENT_URL– allowed CORS origin for the frontend
Frontend (Vite)
VITE_API_URL– base URL for REST APIVITE_SOCKET_URL– URL for Socket.IO client
If you’re using CRA, change names to
REACT_APP_*.
Replace with your actual routes & payloads
Auth
POST /api/auth/signup– create userPOST /api/auth/login– login, returns token/cookieGET /api/auth/me– current user
Messages
GET /api/conversations– list conversationsGET /api/messages/:conversationId– fetch messagesPOST /api/messages– send a message
Replace with your actual events
Client → Server
join{roomId}typing{conversationId, isTyping}message:send{conversationId, text}
Server → Client
presence:update{userId, online}message:new{message}typing:update{conversationId, userId, isTyping}
Frontend (Vercel)
- Set
VITE_API_URLandVITE_SOCKET_URLto your backend URL
Backend (Render/Railway/VPS)
- Set
CLIENT_URLto your deployed frontend origin - Enable WebSockets on your host
- Configure CORS to allow your frontend domain
MongoDB
- Use a hosted MongoDB Atlas cluster and set
MONGODB_URI
Backend
{
"scripts": {
"dev": "nodemon server.js",
"start": "node server.js"
}
}Frontend
{
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
}
}- Add exact routes and socket events
- Confirm ports and env variable names
- Paste real screenshots/GIFs in the section below
- Update license if needed
Add UI screenshots or short GIF demos here.
Specify your license (e.g., MIT). Create a LICENSE file in the repo root.
PRs welcome! Please open an issue to discuss major changes.
- Socket.IO for realtime communication
- MongoDB/Mongoose for data persistence
- Vercel/Render for simple deployment
- CORS errors: ensure
CLIENT_URLmatches the frontend origin and that CORS is enabled on the backend - WebSocket not connecting on production: make sure your host supports WebSockets and you’re using the correct
VITE_SOCKET_URL - .env not loading: verify
.envplacement and that your process manager (or host) has vars configured