Are you tired of sending code snippets back and forth, struggling to debug and collaborate with your team? Look no further! Sync Code is here to revolutionize the way you code together. This powerful and intuitive collaborative code editor is designed to empower developers, and teams to work seamlessly in real-time, regardless of their location. With Sync Code, you can code together, debug together, and ship faster, together.
- Multiple users can join a room and edit code together
- Changes are reflected in real time
- Copy button to copy the room id to clipboard
- Leave button to leave the room
- Supports syntax highlighting for different programming languages
- Users can choose theme based on their preferences
- Users can leave the room and rejoin later to continue editing
- Joining & leaving of users is also reflected in real time
- Docker (25.0.4)
- Docker Compose (1.29.2)
- Node.js (v20.11.1)
- npm (10.2.4)
- pm2 (5.3.1) : run
npm i -g pm2to install pm2 globally
Note: I have used nvm (v0.39.7) to manage my node versions. View nvm official documentation to install it.
- React.js
- Node.js
- Express.js
- Socket.io
- CodeMirror
- React-Toastify
- Clone this repository and cd into it
- Run
npm installto install the dependencies - Create .env file in the root folder and copy paste the content of example.env, and add necessary credentials.
- To start the react app client run
npm startin one terminal - To start the server run
npm server:devorpm2 start server.jsin another terminal - Go to
http://localhost:3000to view the app - Follow the steps 4-7 from the Running via Docker Image section to create and join a room
Note: To stop your server, press Ctrl+c or if you used "pm2", then use pm2 stop server.js in the terminal.
project-walkthrough.mp4
Note: If you find any bugs, create an Issue here. I will try to fix it as soon as possible :)
In case you want to fix it yourself, feel free to make a pull request.
- Added syntax highlighting for multiple languages
- Added support for multiple themes
- Added support for saving the last theme and language selected by the user in local storage
- Add support to accept or reject new users trying to join the room
- Add to implement video and voice chat feature inside the editor
- Add support for local code file uploading