Skip to content

Real-time collaborative IDE built using Django and Channels. Includes live code editing, cursor tracking, room-based collaboration, sandboxed execution for Python/C++/Java, built-in chat, AI-assisted code completion, bracket prediction, and smart indentation โ€” all inside a secure browser environment.

License

Notifications You must be signed in to change notification settings

RAHULPATEL2002/DevHeat-CodeColab2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

27 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Collaborative Python Code Editor

Python
Django
License
Docker

Transform your coding experience with real-time collaboration! Write, share, and execute Python/C++/Java code together in a powerful, intuitive environment.


Preview

Watch the demo


โœจ Key Features

  • Real-time collaboration with live editing, cursor tracking, and room-based sessions
  • Powerful editor with syntax completion, auto-indentation, and in-browser Python execution
  • ๐Ÿ”ฎ AI-Powered Code Completion for intelligent suggestions based on your code context
  • ๐Ÿง  Smart Auto-Indentation to keep your code beautifully structured
  • ๐Ÿ”— Bracket Auto-Completion to eliminate syntax errors while typing
  • Secure authentication, private rooms, and sandboxed code execution
  • Built-in chat for team discussions

๐Ÿš€ Quick Start

๐Ÿ“‹ Prerequisites

- Python 3.9+  
- Docker  
- Docker Compose  

๐Ÿง‘โ€๐Ÿ’ป Clone the Repository

git clone https://github.com/ShauryaDusht/CodeTogether.git  
cd CodeTogether  

๐Ÿ”ง Install Dependencies

  1. Create a Virtual Environment:
python3 -m venv venv  

For Linux:

source venv/bin/activate  

For Windows:

.
env\Scripts ctivate  
  1. Install Requirements:
pip install -r requirements.txt  

๐ŸŒ Set Up Environment Variables

Create a .env file in the root directory with the following content:

SECRET_KEY=your-secret-key  
DEBUG=True  
ALLOWED_HOSTS=127.0.0.1,localhost  
HUGGINGFACE_API_KEY=you-secret-key

๐Ÿ› ๏ธ Run Migrations

python manage.py migrate  

๐Ÿš€ Start the Server

python manage.py runserver  

Open your browser and access the app at http://127.0.0.1:8000.


๐Ÿณ Running with Docker Compose

๐ŸŒ Set Up Environment Variables

Ensure the .env file is present with the following content:

SECRET_KEY=your-secret-key  
DEBUG=True  
ALLOWED_HOSTS=127.0.0.1,localhost 
HUGGINGFACE_API_KEY=you-secret-key

๐Ÿณ Use Docker Compose

  1. Build and Run the Application:
docker-compose up --build  
  1. Stop the Application:
docker-compose down  

Open your browser and access the app at http://127.0.0.1:8000.


๐Ÿ› ๏ธ Technologies Used

โšก Backend:

  • Django & Django Channels for robust server-side operations
  • WebSocket implementation for real-time features
  • AI Assistant for intelligent code recommendations

๐ŸŽฏ Frontend:

  • Modern Bootstrap UI for responsive design
  • Advanced code editor integration
  • AI-enhanced smart editing (autocomplete, indenting, bracket handling)

๐Ÿ“Š Database:

  • SQLite (default) for easy setup
  • Scalable to PostgreSQL for production

๐Ÿ–ฅ๏ธ Development:

  • Docker Compose for container orchestration
  • Environment-based configuration

๐Ÿ“ Folder Structure

collaborative_code_editor/            # Root project directory
โ”œโ”€โ”€ collaborative_code_editor/        # Project configuration
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ asgi.py                       # ASGI configuration (needed for WebSockets)
โ”‚   โ”œโ”€โ”€ settings.py                   # Project settings
โ”‚   โ”œโ”€โ”€ urls.py                       # Main URL configuration
โ”‚   โ””โ”€โ”€ wsgi.py                       # WSGI configuration
โ”œโ”€โ”€ code_editor/                      # Main app
โ”‚   โ”œโ”€โ”€ migrations/
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ templates/                    # HTML templates
โ”‚   โ”‚   โ”œโ”€โ”€ code_editor/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ home.html
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ join_room.html
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ room.html
โ”‚   โ”‚   โ””โ”€โ”€ authentication/
โ”‚   โ”‚       โ”œโ”€โ”€ login.html
โ”‚   โ”‚       โ””โ”€โ”€ register.html
โ”‚   โ”œโ”€โ”€ admin.py                      # Admin interface configuration
โ”‚   โ”œโ”€โ”€ apps.py                       # App configuration
โ”‚   โ”œโ”€โ”€ consumers.py                  # WebSocket consumers
โ”‚   โ”œโ”€โ”€ models.py                     # Database models
โ”‚   โ”œโ”€โ”€ routing.py                    # WebSocket URL routing
โ”‚   โ”œโ”€โ”€ urls.py                       # HTTP URL routing
โ”‚   โ””โ”€โ”€ views.py                      # HTTP views
โ”œโ”€โ”€ static/                           # Static files
โ”‚   โ””โ”€โ”€ code_editor/
โ”‚       โ”œโ”€โ”€ css/
โ”‚       โ”‚   โ”œโ”€โ”€ auth.css              # Authentication styles
โ”‚       โ”‚   โ”œโ”€โ”€ join_room.css         # Join room page styles
โ”‚       โ”‚   โ””โ”€โ”€ style.css             # Global styles
โ”‚       โ””โ”€โ”€ js/
โ”‚           โ””โ”€โ”€ script.js             # Frontend JavaScript
โ”œโ”€โ”€ .gitignore                        # Git ignore file
โ”œโ”€โ”€ docker-compose.yml                # Docker Compose configuration
โ”œโ”€โ”€ Dockerfile                        # Docker configuration
โ”œโ”€โ”€ LICENSE                           # Project license
โ”œโ”€โ”€ manage.py                         # Django management script
โ”œโ”€โ”€ README.md                         # Project documentation
โ”œโ”€โ”€ .env                              # Environment variables file (to be created)
โ””โ”€โ”€ requirements.txt                  # Project dependencies

๐Ÿค Contributing

I welcome contributions! If you'd like to contribute, feel free to fork the repository, make changes, and create a pull request.
Please ensure your changes are well-documented.

For any issues or suggestions, open an issue in the repository.


๐Ÿ“ง Contact

Feel free to reach out to me via email for any queries or collaboration opportunities:
๐Ÿ“ง [email protected]

About

Real-time collaborative IDE built using Django and Channels. Includes live code editing, cursor tracking, room-based collaboration, sandboxed execution for Python/C++/Java, built-in chat, AI-assisted code completion, bracket prediction, and smart indentation โ€” all inside a secure browser environment.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •