LiveDesk is a real-time collaboration workspace with a shared code editor, whiteboard, room-based sessions, file snapshots, authentication, and live presence via Socket.IO.
The production frontend is hosted at livedesk-live.vercel.app.
frontend/: Vite + React clientbackend/: Express + Socket.IO API server
- Real-time collaborative rooms
- Shared code editor and whiteboard
- Live cursors and participant presence
- Room snapshots and saved files
- Email-based auth flows
- Google and GitHub OAuth support
- Frontend: React, Vite, Tailwind, Socket.IO client
- Backend: Express, Socket.IO, MongoDB with Mongoose, Redis, JWT
- Deployment: Vercel frontend, Node backend
LiveDesk/
|- frontend/
| |- src/
| |- .env
| `- .env.example
|- backend/
| |- routes/
| |- models/
| |- .env
| `- .env.example
`- README.md
- Node.js 18+
- npm 9+
- MongoDB
- Redis
Optional services:
- Email API service for OTP and password reset emails
- Google OAuth app
- GitHub OAuth app
git clone <your-repo-url>
cd LiveDesk
cd frontend
npm install
cd ..\backend
npm installCopy the example files in both apps:
cd frontend
copy .env.example .env
cd ..\backend
copy .env.example .envThen update the values you need.
File: frontend/.env
| Variable | Required | Purpose |
|---|---|---|
VITE_API_URL |
Yes | Backend HTTP base URL |
VITE_SOCKET_URL |
Yes | Backend Socket.IO base URL |
Local defaults:
VITE_API_URL=http://localhost:3001
VITE_SOCKET_URL=http://localhost:3001File: backend/.env
| Variable | Required | Purpose |
|---|---|---|
PORT |
Yes | Backend server port |
MONGO_URI |
Yes | MongoDB server URI without the database name suffix |
DB_NAME |
Yes | MongoDB database name |
JWT_SECRET |
Yes | JWT signing secret |
FRONTEND_URL |
Yes | Frontend origin used in auth/reset redirects |
REDIS_URL |
Yes | Redis connection string |
EMAIL_API_URL |
Recommended | External email API used for OTP and reset emails |
EMAIL_SERVICE |
Optional | Mail provider label for your own reference |
EMAIL_USER |
Optional | Mail account username |
EMAIL_PASS |
Optional | Mail account password or app password |
GITHUB_CLIENT_ID |
Optional | GitHub OAuth client id |
GITHUB_CLIENT_SECRET |
Optional | GitHub OAuth client secret |
GOOGLE_CLIENT_ID |
Optional | Google OAuth client id |
GOOGLE_CLIENT_SECRET |
Optional | Google OAuth client secret |
GITHUB_CALLBACK_URL |
Optional | GitHub OAuth callback |
GOOGLE_CALLBACK_URL |
Optional | Google OAuth callback |
Important:
MONGO_URIshould be the server base, for examplemongodb://127.0.0.1:27017DB_NAMEis appended in code, so do not duplicate the database name in both places unless you also change the server connection logic- Email and OAuth features will not work until their related variables are configured
Start the backend:
cd backend
npm run devStart the frontend in a second terminal:
cd frontend
npm run devDefault local URLs:
- Frontend:
http://localhost:5173 - Backend:
http://localhost:3001
- Public frontend: https://livedesk-live.vercel.app
- When deploying the backend, set
FRONTEND_URLto your live frontend origin - OAuth callback URLs must match the backend deployment URL, not the frontend URL
- Socket and API frontend variables should point to the backend base URL
- Install dependencies in
frontendandbackend - Start MongoDB and Redis locally
- Copy both
.env.examplefiles to.env - Fill in backend required values first
- Start the backend, then the frontend
- Add OAuth and email credentials only if those flows are needed
Frontend:
npm run dev
npm run build
npm run previewBackend:
npm run dev
npm start- The frontend is intentionally desktop-first and shows a warning on small/mobile screens
- Redis is used for session handling
- Password reset and OTP flows depend on
EMAIL_API_URL