Revaer is a data-driven media orchestration platform that centralizes configuration, telemetry, and operational control in PostgreSQL. The repository is organized as a Rust workspace composed of focused crates that together deliver the initial torrent + filesystem management minimal lovable product.
- Single source of truth –
DATABASE_URLis the only required environment variable; all runtime configuration is stored in the database and hot-reloads across services. - Composable crates – Each domain area (configuration, API, engine, filesystem, telemetry) lives in its own crate with well-defined traits and DTOs.
- Observability first – Telemetry, health, and structured events are wired in from the outset.
- Safe defaults – Setup mode boots in a locked-down state until the operator unlocks the system through the API or CLI using a one-time token.
revaer/
├─ Cargo.toml
├─ justfile
├─ README.md
├─ docs/
│ ├─ adr/
│ └─ api/
├─ config/
│ └─ reference-config.md # Documentation only; no runtime reads
└─ crates/
├─ revaer-app # Composition root binary crate
├─ revaer-api # Axum HTTP + SSE services
├─ revaer-cli # Terminal client
├─ revaer-config # DB-backed settings service
├─ revaer-fsops # Filesystem post-processing
├─ revaer-telemetry # Tracing, metrics, health hooks
├─ revaer-torrent-core # Engine-agnostic traits & DTOs
└─ revaer-torrent-libt # libtorrent adapter
- Install the Rust toolchain (
rustup show) at MSRV1.91.0(pinned inrust-toolchain.toml) and ensurecargo,rustfmt, andclippyare available. - Provide a PostgreSQL connection string via the
DATABASE_URLenvironment variable. - Run
just checkto verify the workspace (all workflows must go throughjust; avoid callingcargo …directly).
just fmt– format sources.just lint– run clippy with warnings as errors.just test– execute the full test suite (integration + unit).just build– build the workspace with all features enabled.just udeps– detect unused dependencies (installscargo-udepson first run).just audit– scan dependencies for published advisories (cargo-audit).just deny– enforce the license and advisory policy (cargo-deny).just cov– run source-based coverage with LLVM (requiresllvm-tools-preview).just ci– execute all required quality gates locally.
The native libtorrent integration test suite is opt-in to keep default runs deterministic.
- Enable it with
REVAER_NATIVE_IT=1; it skips otherwise. - Ensure Docker is reachable (set
DOCKER_HOSTif not on/var/run/docker.sock). - Run
just ciorcargo test -p revaer-torrent-libt --all-featureswhen the native path should be covered (e.g., feature matrices). - See
docs/platform/native-tests.mdfor the full setup and CI matrix note.
revaer --output json lsemits JSON suitable for scripting workflows (table output remains the default).revaer config getandrevaer config set --file changes.jsonprovide a CLI wrapper around the/v1/configAPI so you can script updates without crafting HTTP requests manually.
Set REVAER_ENABLE_OTEL=true to attach the (stubbed) OpenTelemetry layer. The exporter is disabled by default; when the flag is present the app uses REVAER_OTEL_SERVICE_NAME (defaults to revaer-app) and records the optional REVAER_OTEL_EXPORTER endpoint for future wiring. This keeps the instrumentation tree dormant unless you explicitly request it in environments that provide an OTLP collector.
Install the following Cargo subcommands before running the quality gates locally (the just recipes will also install them on first use):
cargo install cargo-udeps --locked
cargo install cargo-audit --locked
cargo install cargo-deny --locked
cargo install cargo-llvm-cov --locked
rustup component add llvm-tools-previewThe documentation site is powered by mdBook and mirrors the auto-publishing pipeline used in RustyGPT.
- Install the tooling once with
just install-docs(installsmdbookandmdbook-mermaid). - Build and index the docs with
just docs(runsdocs-buildfollowed bydocs-index). - Preview locally via
just docs-serve.
Pushes to main invoke the docs workflow to rebuild the book, refresh the LLM manifests under docs/llm/, and publish the static site to GitHub Pages.
- Implement the migrations and configuration schema inside
revaer-config. - Wire the setup flow and runtime hot-reload between
revaer-app,revaer-api,revaer-torrent-*, andrevaer-fsops. - Author ADRs capturing architectural decisions, bootstrap flow, and configuration invariants.