Real-Time Code Editor is a web-based collaborative coding platform developed using React, Node.js, Express, Socket.IO, and CodeMirror. The application allows multiple users to join the same room and edit code simultaneously with real-time synchronization.
The main objective of this project is to demonstrate how real-time communication works using WebSockets and how multiple users can collaborate on code within a shared environment.
- Real-time collaborative code editing
- Room-based collaboration system
- Unique Room ID generation
- Instant code synchronization using Socket.IO
- Live user join and leave notifications
- Copy Room ID functionality
- JavaScript code execution support
- Python code execution support
- Multi-user collaboration environment
- Responsive and user-friendly interface
- React.js
- Node.js
- Express.js
- Socket.IO
- CodeMirror
- JavaScript
- HTML
- CSS
- User creates or joins a room using a unique Room ID.
- Socket.IO establishes a real-time connection between client and server.
- Users write code inside the CodeMirror editor.
- Code changes are emitted to the server through WebSocket events.
- The server broadcasts updates to all users in the same room.
- New users automatically receive the latest code state.
- Users can execute JavaScript or Python code and view output instantly.
User
↓
React Frontend
↓
Socket.IO Client
↓
Socket.IO Server
↓
Broadcast to Room
↓
Connected Users
Real-Time-Code-Editor/
│
├── server.js
├── package.json
├── public/
│
├── src/
│ ├── Actions.js
│ ├── socket.js
│ │
│ ├── components/
│ │ └── Editor.js
│ │
│ ├── pages/
│ │ ├── Home.js
│ │ └── EditorPage.js
│ │
│ └── App.js
│
├── build/
├── README.md
└── .gitignore
git clone https://github.com/Coder-Priyan/Real-Time-Code-Editor.git
cd Real-Time-Code-Editornpm installnpm run start:frontnpm run server:devnpm starthttp://localhost:3000
or
http://localhost:5000
Click "Create New Room"
↓
Generate Room ID
↓
Enter Username
↓
Join Room
User A types code
↓
Socket Event Triggered
↓
Server Receives Update
↓
Broadcast to Room
↓
User B Sees Changes Instantly
JOIN
CODE_CHANGE
SYNC_CODE
JOINED
DISCONNECTED
RUN_JAVASCRIPT
RUN_PYTHON
OUTPUT
- Understanding WebSockets
- Real-Time Communication
- Socket.IO Event Handling
- React Component Architecture
- State Management
- Client-Server Communication
- Room-Based Collaboration Systems
- Full Stack Web Development
- Authentication System
- User Profiles
- Code History Tracking
- Multi-language Compiler Support
- Voice Collaboration
- Video Calling Integration
- Syntax Error Highlighting
- Cloud-Based Storage
- Priyanshu Dangi
- Akansha Joshi
- Deepak Kumar Kabi
This project is developed for educational and academic purposes.