Skip to content

HIMANSHU6001/remote-code-execution-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 CodeSpace

A secure, scalable online judge platform for running untrusted code in isolated environments.

Python FastAPI Docker Celery Redis PostgreSQL Next.js


📖 Overview

CodeSpace is a production-ready online judge and code execution platform. Users submit code that runs securely in isolated Docker containers, with real-time feedback and support for multiple programming languages.

Tech Stack: FastAPI (API) → Celery (Task Queue) → Docker (Sandbox) + PostgreSQL (Database) + Next.js (Frontend)

Key Features

  • 🔒 Secure Sandboxing — Rootless Docker containers with seccomp restrictions and network isolation
  • ⚡ Asynchronous Execution — Non-blocking task queue powered by Celery and Redis
  • 🛰️ Real-Time Results — WebSocket integration for instant submission feedback
  • 🌍 Multi-Language Support — Python, C++, Java, Node.js (easily extensible)
  • 🛡️ Rate Limiting — Built-in protection against abuse
  • 📦 Scalable Architecture — Horizontal scaling with multiple workers

🎬 Demo Videos

Successful Submission

accepted_execution_flow.mp4

Error Cases

wrong_execution_flow.mp4

AI Feature

ai_usage_flow.mp4


🚀 Quick Start

Prerequisites

  • Python 3.10+
  • Node.js 20+
  • Docker 24.x+
  • Docker Compose (included with Docker Desktop)

Setup & Run

  1. Clone & Setup Backend
   python -m venv .venv
   source .venv/bin/activate  # Windows: .venv\Scripts\activate
   pip install -e ".[dev]"
  1. Setup Frontend
   cd frontend
   npm install
  1. Build Sandbox Images
   bash scripts/build_images.sh
  1. Seed Database (Optional)
   python scripts/seed_db.py
  1. Start Services
   docker-compose up --build

The API will be available at http://localhost:8000, Frontend at http://localhost:3000


📚 Documentation


⚖️ License

MIT License — see LICENSE for details.

About

Repo for Remote Code Execution Engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors