Skip to content

Random-Pikachu/Code-Sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Code Sync

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.

🚀 Demo

https://codesync-v8bl.onrender.com

💻 Technologies Used

react logo socket.io logo node logo mongoDB logo tailwind logo

📷 Project Screenshots:

project-screenshot



project-screenshot

🧐 Features

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

📩 Installation

1. Clone the repository

git clone https://github.com/<your-username>/Code-Sync.git
cd Code-Sync

2. Install Libraries

#Install Client libraries
cd client
npm install

#Install Backend libraries
cd server
npm install

3. Setup Enviroment variables

#Backend .env
PORT = 5600
MONGODB_USERNAME = <username>
MONGODB_PASSWORD = <password>

4. Run the files

#client side
cd client
npm run dev

#backend side
cd server
npm start

⚡ Websocket Events

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
Made with ❤ by Sangam

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages