Code Sync is a real-time collaborative code editor that lets multiple users write, edit, and execute code together with support for file management, syntax highlighting, and multi-language execution.
https://codesync-v8bl.onrender.com
Here're some of the project's best features:
- Real-time Code Collaboration
- Live Cursor Tracking
- Multi-language support with syntax highlighting
- Session sharing via unique URLs
- File system synchronization
- Code Execution
git clone https://github.com/<your-username>/Code-Sync.git
cd Code-Sync
#Install Client libraries
cd client
npm install
#Install Backend libraries
cd server
npm install
#Backend .env
PORT = 5600
MONGODB_USERNAME = <username>
MONGODB_PASSWORD = <password>
#client side
cd client
npm run dev
#backend side
cd server
npm start
Event | Use |
---|---|
join | User joins a new room |
init-file-struct | To send initial file structure in a room |
user-list | Object of users present in a room |
joined | User joins a existing room |
update-file-struct | Updating the file tree structure for every new file/folder creation |
update-file-content | Update & Store the content of files |
file-content-updated | Confirmation for updation of content |
file-open | Which file user is currently editing |
code-change | Checks for change in editor window |
sync-code | Synchronizes the code changes for all users |
cursor-position | Checks for change in cursor positon |
disconnect | User Disconnects from room |