mdcpp / mdoj

Mingdao OnlineJudge, A performant contest management system base on cutting edge stack.
https://mdcpp.github.io/mdoj/
5 stars 1 forks source link
docker grading-system grpc grpc-web leptos nsjail programming-competitions programming-contests rust

MDOJ

wakatime cargo check cargo test Deploy docs to GitHub Pages

Performance-oriented contest management system for IOI like contest

[!IMPORTANT] :construction: work in progress, please wait until first release

Highlights

Features

[!TIP] Because we use grpc-web(server-side stream), HTTP2 is recommended, otherwise users won't be able to see realtime submit update(it's still very usable)

Quick Start

Copy `docker/quickstart` file to your server and run `docker compose up -d`, then open [https://localhost](https://localhost) in your browser. login as `admin@admin` and start play arounds.

Full Setup(Docker)

1. Copy `docker/production` from source code to your folder 2. run migration by running `docker compose up migration` 3. generate config for judger by starting the judger once, and edit config 4. generate config for backend by starting the backend once 5. download and extract plugin(language support) of your choice to `./plugins` If you prefer to use default config, you can skip step 3 and 4. See [wiki](https://github.com/mdcpp/mdoj/wiki) for more details.

Setup for development

1. install following package: - From system package manager: `protobuf-devel`, `gcc` - From rustup: `rustup`, `cargo`, `just` - From their website: `docker`, `docker-compose` Then start reading documents in subfolder of your interest. > you may need to run ``just prepare`` in ``judger``, ``backend`` subfolder.

Configuration

[!TIP] Set CONFIG_PATH to change the path to config file, default value is config.toml

See wiki for more detail

Development

MDOJ contain three service:

  1. Frontend: Render first time html, serve wasm.
  2. Backend: Serve both frontend and web client(chrome...)
  3. judger: run user-submitted code and return resource usage(and output)

[!TIP] See DEV.md to understand how to get started.

See /backend/README.md, judger/README.md, frontend/README.md for more detail.