A full-stack, real-time collaborative coding platform built using React + Vite, Node.js, Express, Socket.IO, and the Monaco Editor, with features like shared file system, code execution, and room-based collaboration.
- Multi-user live editing
- Live cursor indicators
- Real-time user join/leave updates
- Auto-sync editor content
- Create / rename / delete files
- Create nested folders
- Sync instantly for all users
- File & folder download
Supports:
- JavaScript
- Python
- C
- C++
- Java
- Go
Executed safely using backend child-process handling.
- Create unique room with ID
- Join via room ID
- Wrong ID → error message
- Auto-reconnect after page refresh
- Session stored per browser tab
- Execution output
- System messages
- Download output
- Syntax-colored logs
- TailwindCSS-based design
- Modern VSCode-like layout
- Animated landing page
- Clean dashboard components
root/
├── backend/
│ ├── server.js
│ ├── package.json
│
├── src/
│ ├── components/
│ │ ├── CodeEditor.tsx
│ │ ├── FileExplorer.tsx
│ │ ├── Terminal.tsx
│ │ ├── UserList.tsx
│ │ ├── RoomManager.tsx
│ │ ├── LandingPage.tsx
│ ├── hooks/
│ │ └── useSocket.ts
│ ├── utils/
│ │ ├── api.ts
│ │ ├── fileSystem.ts
│ ├── App.tsx
│ ├── main.tsx
│ ├── index.css
│
├── package.json
├── tsconfig.json
├── index.html
git clone https://github.com/praveenh001/code-editor-and-collobrator.git
cd codesynccd backend
npm install
npm startBackend runs at:
http://localhost:3001
npm install
npm run devFrontend runs at:
http://localhost:5173
- Frontend calls
/api/rooms/create→ backend creates unique room ID - User enters username + room ID
- Backend validates & adds user to the room
- All users are synced instantly
Frontend emits events:
file-createdfolder-createdcode-updateitem-deleteditem-renamed
Backend broadcasts updates to all users in the same room.
- Frontend sends file content + language
- Backend:
- Creates temporary file
- Executes using correct runtime
- Captures stdout + stderr
- Returns output to terminal
- Cleans up temp files
Timeout: 10 seconds
- React 18
- Vite
- TypeScript
- Monaco Editor
- TailwindCSS
- Lucide Icons
- Node.js
- Express
- Socket.IO
- UUID
- tmp
- Child process executors
- Built-in chat
- Authentication system
- AI-assisted coding
- Cloud deployment
- CRDT-based syncing
- Docker sandbox for secure execution
Pull requests are welcome!
If this project helped you, please ⭐ the repo!