Skip to content
/ solve Public

API driven competitive programming system

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE.txt
MIT
LICENSE-MIT.txt
Notifications You must be signed in to change notification settings

udovin/solve

Repository files navigation

Solve

GoDoc codecov Go Report Card CII Best Practices

Solve is distributed under the terms of both the MIT license and the Apache 2.0 License.

How to start development

First of all you should build solve and safeexec binaries:

make all

Then create config file config.json with following contents:

{
  "db": {
    "driver": "sqlite",
    "options": {
      "path": "data/db.sqlite"
    }
  },
  "server": {
    "port": 4242
  },
  "invoker": {
    "workers": 1,
    "safeexec": {
      "path": "cmd/safeexec/safeexec"
    }
  },
  "security": {
    "password_salt": "qwerty123",
    "cookie_path": "/"
  },
  "storage": {
    "driver": "local",
    "options": {
      "files_dir": "data/files"
    }
  },
  "log_level": "debug"
}

Then apply database migrations:

mkdir -p data && ./cmd/solve/solve migrate && ./cmd/solve/solve migrate-data

Then run server (API will be available on http://localhost:4242):

./cmd/solve/solve server

Then you can register new admin user with password qwerty123:

./cmd/solve/solve client create-user \
  --login admin \
  --password qwerty123 \
  --email admin@gmail.com \
  --add-role admin_group