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 29 14

  2. mojtools mojtools Public

    MOJ tools to run, test and calibrate timelimits

    Shell 6 6

Repositories

Showing 8 of 8 repositories
  • moj-cli Public
    cd-moj/moj-cli's past year of commit activity
    Shell 1 3 0 0 Updated Nov 29, 2026
  • cdmoj Public

    CD-MOJ

    cd-moj/cdmoj's past year of commit activity
    Shell 29 14 0 0 Updated Nov 29, 2026
  • mojtools Public

    MOJ tools to run, test and calibrate timelimits

    cd-moj/mojtools's past year of commit activity
    Shell 6 GPL-2.0 6 0 0 Updated Nov 20, 2026
  • cdjudge Public
    cd-moj/cdjudge's past year of commit activity
    Shell 1 1 0 0 Updated Nov 11, 2026
  • .github Public
    cd-moj/.github's past year of commit activity
    0 0 0 0 Updated Jul 11, 2026
  • cd-moj.docs Public
    cd-moj/cd-moj.docs's past year of commit activity
    HTML 5 3 8 (1 issue needs help) 0 Updated Jul 28, 2024
  • cd-moj.docker Public archive
    cd-moj/cd-moj.docker's past year of commit activity
    Shell 1 1 0 0 Updated Oct 6, 2022
  • mojaj Public archive

    CD-MOJ AutoJudge

    cd-moj/mojaj's past year of commit activity
    Shell 0 0 0 0 Updated Mar 25, 2019

Top languages

Shell HTML

Most used topics

Loading…