Byte Heist conists of two main projects
- The lang runner provides an isolated environment for langugaes, it runs inside docker/podman
- The main server provides the frontend. It should be able to run directly inside Linux or WSL.
- Windows might work, but is untested
docker compose up
make restart-runner
First create a .env.local
file with the following contents:
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# The discord integration is optional, it should work fine without these vars set
DISCORD_WEBHOOK_URL=
DISCORD_TOKEN=
DISCORD_CHANNEL_ID=
Then create the datbase structure: (The database runs via the docker compose)
# Setup the development database
cargo install sqlx-cli --no-default-features --features rustls,postgres
sqlx migrate run
First, update the typescript definitions: (Optional, but allows the challenge editor to work)
npm install # install typescript compiler
make ts-build-runner
This creates typescript definition files used for the challenge ditor.
Now run Vite to build the JS:
npx vite
This should just run in the background as long as you are working on the main server.
Finally, you can start the main server:
cargo run --bin main-server
Ensure the postgres is running since it checks the schema at compile time.
Now you should be able to visit Byte Heist at http://localhost:3001