A web application that allows multiple users to collaborate in real-time on code editing, execution, and communication within a shared workspace.
- Real-time code synchronization using Socket.IO.
- Support for multiple programming languages: JavaScript, Python, Java, and C
- Code execution with live output using Glot.io API.
- Customizable editor themes with CodeMirror.
- Real-time chat functionality for communication among users.
-
Clone the repository:
git clone https://github.com/darshank-70/collaborative-code-Editor.git -
Navigate to the project directory:
cd collaborative-code-Editor -
Install dependencies:
npm install -
Start the application:
npm start -
Access the application in your web browser at
http://localhost:3000
- Open the application in a web browser.
- Enter a room ID to join an existing room or create a new one.
- Share the room ID with others to invite them to join.
- Select a programming language from the available options.
- Collaboratively edit code in real-time.
- Run the code and view the output.
- Use the chat feature to communicate with other users in real-time.
codemirror: ^5.65.16driver.js: ^1.3.1node-fetch: ^3.3.2react: ^18.2.0react-avatar: ^5.0.3react-dom: ^18.2.0react-hot-toast: ^2.4.1react-router-dom: ^6.22.0react-scripts: 5.0.1socket.io: ^4.7.4socket.io-client: ^4.7.4uuid: ^9.0.1
The project includes a code compilation API that allows users to compile and run code in various programming languages. The API listens for POST requests to the /compile endpoint and expects the following JSON payload:
{
"language": "<programming_language>",
"files": [
{
"name": "<file_name>",
"content": "<file_content>"
}
],
"stdin": "<standard_input>"
}Here is an example of how to use the code compilation API:
curl -X POST http://localhost:9000/compile \
-H "Content-Type: application/json" \
-d '{
"language": "python",
"files": [
{
"name": "main.py",
"content": "print(\"Hello, World!\")"
}
]
}'Contributions to the project are welcome!
- Darshan K
- Jeevankumar J E
Special thanks to the developers of CodeMirror, Socket.IO, Glot.io, and other libraries used in this project.
For any inquiries or support, please contact: Darshan K at darshankdarsh01@gmail.com or Jeevankumar J E at jeevankumarje07@gmail.com .