CodeFusion is a multi‑user, real‑time code editor with live cursors, chat, session sharing, and multi‑language support. It pairs a React + Vite frontend with a Socket.IO + Express backend to deliver instant collaboration.
- Live collaboration with real‑time cursors and updates
- Session links to invite teammates instantly
- Multi‑language editor (JavaScript, Python, Java, C++)
- Syntax linting for quick feedback
- Session management (save, load, and list sessions)
- Team chat inside the editor
- Frontend: React, Vite, Tailwind CSS, CodeMirror 6
- Backend: Node.js, Express, Socket.IO
Collab-Code-main/
backend/
index.js
package.json
frontend/
src/
public/
package.json
.env
Backend
cd backend
npm install
Frontend
cd ../frontend
npm install
Create or update frontend/.env and set the backend URL:
VITE_BACKEND_URL=http://localhost:3000
Start backend
cd backend
npm start
Start frontend
cd ../frontend
npm run dev
Open the app at:
http://localhost:5173
- Open the app and create a new session.
- Copy the room link or ID to invite collaborators.
- Edit together with live cursors and chat.
- Save sessions to reload code later.
Frontend (in frontend)
npm run dev— start dev servernpm run build— production buildnpm run preview— preview buildnpm run lint— run ESLint
Backend (in backend)
npm start— start server with nodemon
- Backend Port: defaults to
3000(setPORTenv var to override) - Frontend Port: Vite default
5173 - Socket URL: set via
VITE_BACKEND_URLenv var
Backend (create .env in backend/ folder)
PORT=3000
Frontend (create .env in frontend/ folder)
VITE_BACKEND_URL=http://localhost:3000
For backend Web Service on Render:
PORT=3000
For frontend Static Site on Render:
VITE_BACKEND_URL=https://your-backend.onrender.com
- Frontend can’t connect to backend: verify
VITE_BACKEND_URLand that the backend is running. - Port conflict: change the backend
PORTand updateVITE_BACKEND_URL. - Socket connection errors: check CORS settings or firewall rules.
MIT