This project was developed mainly for educational/experimental purpose, if you want an OJ to set-up or for a more full-fledged and well-documented OJ, please refer to the followings:
- DMOJ Suitable for system that will be public and will serve many user because of their great permission controls and optimization. Although to set up a running server there is some trouble you have to go through
- CMS, DOMjudge Well-known and very stable system for contest creation/management such as IOI and ICPC.
- QingdaoU Online Judge A simple OJ but very functional, can be run in production and set-up in seconds with Docker technology. Can be a good starting point to developing an OJ.
A modern online judge that is developed using ReactJS and Django REST API Framework. Our motive is To further understand about Online Judges, we have built our own OJ system, taking a different technical approach when compare to others.
See it in action here.
The current version consists of a small set of functionality, though very necessary and allows us to demonstrate the core features our system can do.
- A bulletin board to post announcements
- Rich problem statements, with support for LaTeX math
- Support popular programming language:
C, C++, Python, Java
- Rich, comprehensive submission status page
- Great Permission controls for staffs
- Greeting message and the system's bulletin board.
- Rich Search, Filtering tools to help finding the correct problem.
- Supports LaTex for better paragraph styling and math expression
- Rich Search and Filtering tools
- Comprehensive Submission details
The DOJ admin interface is versatile, and can be efficiently used for anything from managing users to authoring problem statements, auditting submissions,..
- Admin dashboard with useful information and a Control Panel (on the left side)
- Control what is public via Visibility
- Easy-to-use, friendly interface
- Control over submissions
Our project has 3 components that you will need to run separately:
This is our site, we will need to serve this folder. One simple way to do it is to install npm module express
, then place the following script serve.js
in the same folder with the build
folder. And start the server with node serve.js
.
serve.js
var path = require('path');
var express = require('express');
var app = express();
app.use(express.static(path.resolve(__dirname, 'build')));
app.get('*', (req, res) => {
res.sendFile(path.resolve(__dirname, 'build', 'index.html'));
});
var server = app.listen(8080)
For this, we need Python 3.8's django
module. There are some more dependencies we have yet to note it down, but you can install them as you go because django
will let you know what you are missing. Also, the backend uses Postgresql
(version 13), make sure you install it as well.
To start the backend, run the following commands:
- Migrate the database if you haven't:
python manage.py makemigrations
python manage.py migrate
- Start the backend
python manage.py runserver 0.0.0.0:5000
Will run the API server on port 5000
.
We have yet to document the dependencies, some major ones you will need are:
- Docker engine
websockets
module Then download thedockerjudge
folder and run this command from the parent directory:
python -m dockerjudge 127.0.0.1:5001
This command will run it as an module, start the judge server and listening to port 5001
. Though the module needs some time to warm up first (initialize the Docker containers).
For more information, (eg. how our system was built, and how it performs,...) you can check them here (.PDF).
- For DOJ's website interface related issues, please refer to dev-frontend
- For DOJ's webserver-related issues, please refer to dev-backend
- For DOJ's Judge Server related issues, please refer to judgeserver