Systems & Competitive ProgrammingActive Development

Primas OJ

Automated Online Judge & Contest System

A full-scale competitive programming platform featuring isolated Docker container execution, multi-language automated testcase judging, and live contest standings.

Primas OJ UI screenshot
docker_sandbox_worker.cpp
$g++ -O3 -std=c++20 solution.cpp -o judge_eval
$docker run --rm --memory=128m --cpus=1.0 -v /sandbox:/judge_runner
Test 01 (Basic Cases)12ms
Test 02 (Large Graph 10^5)14ms
Test 03 (Segment Tree Range)11ms
Test 04 (Extreme Constraints)18ms
ACCEPTED (AC)
All Tests Passed • 14ms • 2.1MB

System Architecture

Docker Sandbox Evaluation

Spawns ephemeral, resource-constrained containers with seccomp/cgroup security barriers to safely execute untrusted student code.

Multi-Verdict Judge Pipeline

Tokenized stdout matching engine generating Accepted (AC), Wrong Answer (WA), Time Limit Exceeded (TLE), and Memory Limit verdicts.

Contest Freeze Engine

Supports live scoreboards with customizable final-hour freeze and automated penalty resolution matching ICPC standards.

Key Features & Capabilities

  • Engineered an isolated Docker-based code sandbox evaluating C, C++, and Python submissions with strict CPU, time, and memory limits.
  • Implemented real-time ICPC contest management, frozen scoreboards, and penalty calculation rules.
  • Designed PostgreSQL schema optimized for concurrent submission ingestion and low-latency leaderboard updates.

Tech Stack

Next.jsDockerPostgreSQLNode.jsC++PythonTailwindCSS
Next Project

PlanWise

An offline-capable Progressive Web Application integrating Google Genkit AI to dynamically organize backlogs, suggest scheduling priorities, and visualize habit velocity.

View Project