Skip to content

Real-time collaborative code editor built with Django, supporting live code execution, AI-powered suggestions, team collaboration and in-room chat feature.

License

Notifications You must be signed in to change notification settings

ShauryaDusht/CodeTogether

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

42 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

You can view or download the file from the link: Video

✨ 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
  • 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:

    .\venv\Scripts\activate
  2. 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

πŸ› οΈ 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

🐳 Use Docker Compose

  1. Build and Run the Application:

    docker-compose up --build
  2. 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

🎯 Frontend:

  • Modern Bootstrap UI for responsive design
  • Advanced code editor integration

πŸ“Š 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

πŸ”§ Technologies Used

  • Backend: Django, Django Channels
  • Frontend: Bootstrap
  • Database: SQLite (default)
  • WebSockets: Real-time communication
  • Containerization: Docker

❀️ Made with Love and Teamwork

This project was crafted with dedication and collaboration by a passionate team committed to enhancing the coding experience with innovative features and seamless integration.

About

Real-time collaborative code editor built with Django, supporting live code execution, AI-powered suggestions, team collaboration and in-room chat feature.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •