# Runbook ## First run ```bash cp .env.example .env docker compose -f infra/compose/docker-compose.yml up -d postgres cargo run -p server ``` In another terminal: ```bash cd apps/web && npm install && npm run dev ``` Open http://127.0.0.1:5173. Swagger UI is at http://127.0.0.1:8080/api/docs. ## RustRover 1. Open this folder as a Cargo workspace. 2. Run configuration: `cargo run -p server`. 3. Environment: `APP_ENV=development`. 4. Optional custom template: Settings → New Project → add this Git URL as a cargo-generate template. ## Config overrides | Knob | Where | | --- | --- | | Profile | `APP_ENV=development\|production` | | File | `config/{APP_ENV}.toml` | | Env | `APP__SERVER__PORT=8080` | | Explicit dir | `APP_CONFIG_DIR=/abs/path/to/config` | ## Generate the frontend client ```bash just generate-api ``` Vite also regenerates on dev/build if `packages/contracts/openapi.json` changes. ## Postgres URL Default: `postgres://app:app@127.0.0.1:5432/app` That user only exists if you start the bundled compose file. For a local cluster, override with `APP__DATABASE__URL` (two underscores after `APP`) or `config/local.toml`: ```toml [database] url = "postgres://YOUR_USER:YOUR_PASS@127.0.0.1:5432/YOUR_DB" ``` `DATABASE_URL` is for sqlx-cli only. The server does not read it.