Skip to content

akramhossain-dev/CodeWizard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧙‍♂️ CodeWizard

CodeWizard is a production-hardened, full-stack programming practice and contest platform featuring real-time sandboxed code execution, programming tournaments, and automated AI assistance.


🚀 Quick Links

Explore the detailed platform documentation:

  • 📐 System Architecture: Client-server flow, judge worker architecture, and container sandbox design.
  • ⚙️ Setup & Deployment: Local installation guides, environment configurations, and Docker Compose scripts.
  • 🔌 API Endpoints: Complete route references, request payloads, and rate limits.
  • 🛡️ Security & Hardening: Protections against malicious code, rate-limiting, and credentials guard details.

✨ Features

  • Interactive Practice: Solve algorithmic problems using C, C++, Python, Java, or JavaScript with instant compiler and test case feedback.
  • Tournaments & Contests: Create, schedule, and join live contests. Dynamic rankings calculate user score and leaderboards.
  • AI-Powered Code Companion: Instantly query AI assistants for debugging, line-by-line code reviews, hints, or complete logic explanations.
  • Control Panel: Admin and Employee portals for managing problems, submissions, test cases, and user accounts.
  • Sandboxed Judging: Submissions compile and run inside secure, network-disabled Alpine-based Docker containers.
  • Production-Ready Architecture: Includes a full Docker Compose suite with automatic health checking, offline Redis queue handling, Express 5 compatibility, and persistent container socket access.

🛠️ Tech Stack

  • Frontend: Next.js 16 (App Router), React 19, Tailwind CSS v4, Lucide Icons.
  • Backend: Node.js, Express.js (v5 compatible), MongoDB (Mongoose), Redis (BullMQ).
  • Execution Judge: Docker Engine.
  • Logging: Pino (Structured JSON logging).

🚀 Local Development (Fast Track)

  1. Build the Sandbox Judge:

    cd server/docker
    chmod +x build.sh
    ./build.sh
  2. Configure Envs: Setup server/.env and client/.env following the Setup Guide.

  3. Install and Boot:

    # Terminal 1: Run Backend
    cd server && npm install && npm run dev
    
    # Terminal 2: Run Judge Worker
    cd server && node workers/submissionWorker.js
    
    # Terminal 3: Run Frontend
    cd client && npm install && npm run dev
  4. Access:

    • Frontend: http://localhost:3000
    • Backend API: http://localhost:8000
    • Control Panel: http://localhost:3000/cp

🐳 Production Deployment (Docker Compose)

Spin up the entire stack using Docker Compose:

docker compose up --build -d

Checking Deployment Status

Verify that all services are healthy and running:

docker compose ps

Monitor service logs:

docker compose logs -f server
docker compose logs -f worker

📄 License

Licensed under the MIT License.

About

CodeWizard is a full-stack coding practice and contest platform with a Next.js frontend, Node.js/Express backend, and Docker-based code judge for secure submissions, real-time verdicts, leaderboards, and admin management.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages