- yarn
- virtualenv
- sqlite3
Initialize VirtualEnv
virtualenv -p python3.6 venv
Activate it (must be done in every new shell in the working directory) and install the python dependencies
source venv/bin/activate
pip3 install -r requirements.txt
Install npm dependencies
yarn install
cd client/ && yarn install
Create/Recreate database (also on changes to server/database/schema.sql)
yarn db-rewrite
Run the flask setup
pip3 install -e .
Start Vue Development Server and Flask Backend
yarn dev
// navigate to localhost:3000 for FrontEnd
// navigate to localhost:5000 for BackEnd
If you want to only serve the Frontend (not recommended)
cd client/ && yarn dev
We are applying the 12-factor principles to protect our application secrets. Therefore, the app settings are managed using dotenv. For the BackEnd to work, save the following values in your root .env file:
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
SECRET_KEY=...
Replace the dots with your own variables. For the Github Client ID and Secret, register contest.io as a new Github OAuth application here. You may name it something like 'contest.io-dev-YOUR_USERNAME'. Set the authorization callback url to http://localhost:5000/api/github-callback
The SECRET_KEY variable can be set to whatever you want.
For the returned objects, see the database schema
| Method | Parameter | HTTP Header and Body |
Description | Required | Example |
|---|---|---|---|---|---|
| GET | tags | - | Comma-seperated list of tags to be matched by the returned tasks Returns the task |
No | /api/tasks?tags=graphs,implementation |
| Method | Parameter | HTTP Header and Body |
Description | Required | Example |
|---|---|---|---|---|---|
| GET | code | - | The contest's hexadecimal code Returns the contest |
Yes | /api/contest?code=f9bf78b9a18ce6d46a0cd2b0b86df9da |
| POST | - | Content-Type = application/json { "contestname": "testContest-1", "date_start": "2017-05-12", "date_end": "2017-06-12", "visible": 1, "contestgroups": [1, 2, 3] } |
Add a new contest Return the new contest's code |
- | - |
| DELETE | code | - | The contest's hexadecimal code Deletes the contest |
Yes | /api/contest?code=f9bf78b9a18ce6d46a0cd2b0b86df9da |
