Skip to content
@cd-moj

Contest Driven - Meta Online Judge

MOJ — an online judge built in bash

moj.naquadah.com.br · a competitive-programming judge where everything is bash + files — no database, no broker, no ORM.

MOJ runs contests, training, and problem authoring on a stack of bash scripts, jq, and plain files. This organization holds its independent repositories.

What makes it different

  • Bash + files, all the way down — no DB and no message broker; async work flows through a file spool with inotifywait + flock.
  • API-first — a single router.sh front-controller maps /a/b/c to handlers/a/b/c.sh, with a consistent JSON envelope and the right HTTP status every time. Access is enforced in the API, never only in the UI.
  • Pull-based judging — judge machines heartbeat the API, claim a job, download the problem package on demand, run it in a bubblewrap sandbox, calibrate the time limit on first sight, and report back. No master, no push.
  • No-build frontend — vanilla ES modules served static (CodeMirror 6 vendored, assets offline) so a contest can run on an isolated LAN.
  • Per-user store — every account lives in contests/<id>/users/<login>/; there is no global passwd, and renaming a user is just mv.

Repositories

Repo Role
cdmoj The web platform: bash API under nginx + fcgiwrap (server/) + no-build ESM frontend (web/) + docs. The web host.
mojtools Judging + statements: sandbox, time-limit calibration, statement renderer/validator, per-language runners.
cdjudge The pull agent that runs on judge machines — heartbeats the API and pulls jobs.
moj-cli The moj CLI for problem authoring — keyless (login only), mirrors the web editor.

Start with cdmoj/docs/OVERVIEW.md for the architecture and FLOW.md for the path of a submission.

Stack: bash · jq · nginx · fcgiwrap · systemd · inotifywait · flock · vanilla ESM · bubblewrap

Pinned Loading

  1. cdmoj cdmoj Public

    CD-MOJ

    Shell 24 8

  2. mojtools mojtools Public

    MOJ tools to run, test and calibrate timelimits

    C++ 3 3

Repositories

Showing 8 of 8 repositories

Top languages

Loading…

Most used topics

Loading…