botrix

Development

Code runs in the devcontainer (Rust toolchain, wasm32 target). The host needs just (brew install just), Podman and the devcontainer CLI. Run just to list all recipes.

Start the server

just dev

This creates .env from .env.example if missing, starts the devcontainer, creates dev-config/config.yaml and dev-data/ on first run, installs Trunk, builds the frontend, and runs the server. Open http://localhost:8080. The first start takes several minutes. Stop with Ctrl-C and rerun after code changes (frontend included).

Shell in the devcontainer

just shell

If builds are killed (out of memory), set CARGO_BUILD_JOBS=1 CARGO_PROFILE_DEV_DEBUG=0, or give the Podman VM more RAM with podman machine set --memory 8192. Set CARGO_TARGET_DIR=/home/vscode/target in the shell to keep Linux build output out of the host target/.

Checks (same as CI)

Run inside just shell:

cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --locked
cargo check -p botrix-frontend --target wasm32-unknown-unknown --locked

Scope to one crate (-p botrix-frontend, -p botrix-server) to go faster.

Run the container image (full UI)

Builds frontend and server, serves on http://localhost:8080:

just build-container
just run-container

Uses .env, dev-config/ and dev-data/. Connecting a real Matrix account needs an HTTPS public_url; see Matrix setup.

Layout

Conventions