joint-online-judge / cb4

Licence: AGPL-3.0 license
Joint Online Judge

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
stylus
462 projects

Projects that are alternatives of or similar to cb4

aiohttp-login
Registration and authorization (including social) for aiohttp apps.
Stars: ✭ 53 (+165%)
Mutual labels:  oauth, aiohttp
Device-Flow-Proxy-Server
Add the OAuth 2.0 Device Flow to any OAuth server
Stars: ✭ 64 (+220%)
Mutual labels:  oauth
Identityserver
An open-source, standards-compliant, and flexible OpenID Connect and OAuth 2.x framework for ASP.NET Core
Stars: ✭ 223 (+1015%)
Mutual labels:  oauth
Bus
Bus 是一个基础框架、服务套件,它基于Java8编写,参考、借鉴了大量已有框架、组件的设计,可以作为后端服务的开发基础中间件。代码简洁,架构清晰,非常适合学习使用。
Stars: ✭ 253 (+1165%)
Mutual labels:  oauth
Spring Security Pac4j
pac4j security library for Spring Security: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 231 (+1055%)
Mutual labels:  oauth
code-executor
A CLI/library to execute code against test cases in various languages and obtain relevant results. 🚀
Stars: ✭ 9 (-55%)
Mutual labels:  online-judge
Reddift
Swift Reddit API Wrapper
Stars: ✭ 215 (+975%)
Mutual labels:  oauth
revolt.py
Python wrapper for https://revolt.chat
Stars: ✭ 58 (+190%)
Mutual labels:  aiohttp
ada-security
Ada Security - OAuth 2.0 client and server framework to secure web applications
Stars: ✭ 18 (-10%)
Mutual labels:  oauth
Authing
🔥Authing - IDaaS/IAM solution that can Auth to web and mobile applications.
Stars: ✭ 247 (+1135%)
Mutual labels:  oauth
Golang Url Shortener
URL Shortener written in Golang using Bolt DB or Redis. Provides features such as Deletion, Expiration, OAuth and is of course Dockerizable.
Stars: ✭ 240 (+1100%)
Mutual labels:  oauth
Sso
sso, aka S.S.Octopus, aka octoboi, is a single sign-on solution for securing internal services
Stars: ✭ 2,835 (+14075%)
Mutual labels:  oauth
react-linkedin-login-oauth2
Easily get Authorization Code from Linked In to log in without redirecting.
Stars: ✭ 83 (+315%)
Mutual labels:  oauth
Angularmaterialfirebase
🔥 Full stack starter app with Angular 8, Material Design and Firebase (+ demo)
Stars: ✭ 229 (+1045%)
Mutual labels:  oauth
HZNUOJ
Hangzhou Normal University Online Judge
Stars: ✭ 59 (+195%)
Mutual labels:  online-judge
Praw
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.
Stars: ✭ 2,675 (+13275%)
Mutual labels:  oauth
Gocialite
Social oAuth login in Go has never been so easy
Stars: ✭ 237 (+1085%)
Mutual labels:  oauth
Apijam
GitHub repo for API Jam Workshop
Stars: ✭ 254 (+1170%)
Mutual labels:  oauth
ApiJwtWithTwoSts
Web API authorization, multi-IDP solutions in ASP.NET Core
Stars: ✭ 43 (+115%)
Mutual labels:  oauth
codecourses
CodeCourses is an open-source online judge
Stars: ✭ 39 (+95%)
Mutual labels:  online-judge

vj4

Next generation of Vijos, built with asyncio on Python 3.5.


Overview

  • Problem Categories and Tags
  • Solution Sharing & Voting
  • Online Coding and Testing (a.k.a. Scratchpad Mode)
  • Discussions & Comments
  • Trainings
  • Contests (ACM & OI)
  • Dynamic Ranking System
  • Real-time Status Updates
  • Online Judge as a Service (a.k.a. Domain): create your own OJ website without dev-ops!
  • Management UI
  • Sandboxed & Distributed Judging: see jd4, winjudge and windows-container
  • Secure (we are also CTF players)
  • Modern Architecture & User Interface

Docker support

Prerequisites

Deployment

First download the docker-compose.yml and .env

curl -L https://raw.githubusercontent.com/joint-online-judge/cb4/master/docker-compose.yml -o docker-compose.yml
curl -L https://raw.githubusercontent.com/joint-online-judge/cb4/master/examples/docker-compose.env -o .env

After edit the .env file, run

docker-compose up -d

and the service will be started on port 34765 after a while. (You can also modify the docker-compose.yml to change the port or do something else.)

Run without Docker

Prerequisites

Install requirements

In the root of the repository, where requirements.txt and package.json locates:

python3 -m pip install -r requirements.txt
npm install   # cnpm install

You don't need root privilege to run npm install. It installs stuffs in the project directory.

You may want to use cnpm and tuna if you are in China. Make sure to use cnpm by adding alias to npm instead of installing cnpm cli-tool.

Some requirements may need Python.h. In Ubuntu/Debian simply use

apt install python3-dev

to solve the problem.

IP Geo-Location

To enable IP geo-location translation, you need to obtain a MaxMind GeoLite City DB and put it in the project root directory:

curl "http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz" | gunzip -c > GeoLite2-City.mmdb

You may also want to install libmaxminddb for higher performance.

Development

Update the dependencies

There are many conflicts when trying to update to webpack@4.

The code format is based on eslint-config-airbnb@5, don't try to change it and also don't change eslint-plugin-jsx-a11y@5.

react and react-dom are kept at version 15 now.

Deployment

In the root of the repository:

npm run build   # or: npm run build:watch
python3 -m vj4.server --debug

Set --listen (default: http://127.0.0.1:8888) to listen on a different address.

As an intuitive example, you may want to add a super administrator and a problem to start:

alias pm="python3 -m"
pm vj4.model.user add -1 icebox 12345 [email protected]
pm vj4.model.user set_superadmin -1
pm vj4.model.adaptor.problem add system "Dummy Problem" "# It *works*" -1 1000   # you can also use web UI

You need to run these scripts on a regular basis to maintain correct RP and ranks for all users:

pm vj4.job.rp recalc_all
pm vj4.job.rank run_all

Watch and Restart

Frontend source codes can be recompiled automatically by running:

npm run build:watch

However you need to manually restart the server for server-side code to take effect.

Production

npm run build:production
python3 -m vj4.server --listen=unix:/var/run/vj4.sock
  • Set --listen (default: http://127.0.0.1:8888) to listen on a different address.
  • Set --prefork (default: 1) to specify the number of worker processes.
  • Set --ip-header (default: '') to use IP address in request headers.
  • Set --url-prefix (default: https://vijos.org) to set URL prefix.
  • Set --cdn-prefix (default: /) to set CDN prefix.
  • Set --smtp-host, --smtp-user and --smtp-password to specify a SMTP server.
  • Set --db-host (default: localhost) and/or --db-name (default: test) to use a different database.
  • Set --oauth (default: '') now only jaccount is supported
  • Set --oauth-client-id (default: '') if oauth is set
  • Set --oauth-client-secret (default: '') if oauth is set

Better to use a reverse proxy like Nginx or h2o.

Judging

To enable vj4 to judge, at least one judge user and one judge daemon instance are needed.

  • Use following commands to create a judge user:
alias pm="python3 -m"
pm vj4.model.user add -2 judge 123456 [email protected]
pm vj4.model.user set_judge -2

Notes

Have fun!

Maximum line width: 100

Indentation: 2 spaces

JavaScript Style Guide

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].