Skip to content
← All projects
Software EngineeringComplete & deployed

Verdex - Full-Stack Online Judge

A LeetCode-style online judge where users solve C++ and Python problems in the browser, submit to a compile-once/run-all-cases judge, and receive AC, WA, TLE, RE, or CE verdicts with leaderboard tracking.

Demo

Project walkthrough

5

Verdict types

2

Languages

18

Backend tests

5.9K

Lines of code

Overview

Verdex is a full-stack online judge for DSA practice. Users browse problems, write C++ or Python in the browser, submit solutions, and get automatic verdicts against hidden test cases.

The system is closer to a small LeetCode or Codeforces clone than a basic compiler: it includes problem authoring, submission history, user profiles, a leaderboard, AI code review, rate limiting, sandboxed execution, tests, CI, and deployment.

The backend follows a routers -> services -> repositories structure so API code, business logic, and SQL stay separated. SQLite is used through a hand-written repository layer, keeping the path to Postgres straightforward.

Impact

  • Full-stack judge with FastAPI, React/Vite, SQLite, Docker, GitHub Actions CI, and AWS EC2/ECR deployment.
  • Runs untrusted submissions in Docker sandboxes with networking off, 256 MB memory, 1 CPU, 64 PID caps, read-only FS, and rate limits.
  • Ships admin problem authoring, profiles, a leaderboard, Gemini AI code review, pagination, and 18 backend tests.

Core product flow

  • Browse seeded coding problems with metadata, difficulty, tags, and pagination.
  • Solve in-browser with a React/Vite frontend and a Monaco code-editor experience.
  • Submit C++ or Python and receive AC, WA, TLE, RE, or CE verdicts.
  • Track solved problems, recent submissions, profile statistics, and leaderboard rank.

Judge engine

  • Compiles a submission once, then runs it against all test cases until the first failure.
  • Normalizes whitespace before comparing expected and actual output, like real online judges.
  • Uses a language registry so adding another judged language is localized to one language spec.
  • Separates compile errors, runtime errors, wrong answers, and time-limit failures into clear verdicts.

Security and hardening

  • Executes untrusted submissions inside throwaway Docker containers with networking disabled.
  • Applies memory, CPU, PID, read-only filesystem, tmpfs, and non-root user restrictions.
  • Adds fixed-window rate limits of 30 runs/min and 20 submits/min per user or IP.
  • Uses PBKDF2 password hashing (260,000 iterations) with per-user salts and constant-time verification.

AI and admin features

  • Gemini 2.5 Flash Lite provides language-aware code review feedback through a constrained prompt.
  • Admins can create problems and hidden test cases for judged submissions.
  • Profiles and leaderboard SQL aggregate accepted solutions, solve counts, and submission activity.
  • Pagination and centralized error handling keep API responses stable for production-style use.

Scale and evidence

  • ~5.9K lines of application source across backend, tests, and frontend.
  • 45 Python files, 19 JSX files, 7 seeded problems, and 18 automated backend tests.
  • Dockerized backend and frontend, Nginx frontend serving, and GitHub Actions CI.
  • Deployed on AWS EC2 t3.micro with images in ECR.

Stack