Development
How to build and test Contrail, what CI checks, and how the website is made. Where code goes is described in plan.md; the Rust patterns used are explained in the Rust notes.
Prerequisites
Section titled “Prerequisites”- Rust via rustup (the exact version is pinned in
rust-toolchain.tomland installed automatically) - Node.js ≥ 24 and pnpm 12
- Tauri’s system prerequisites for your OS
Running
Section titled “Running”cd apppnpm install # also installs the git hooks (lefthook)pnpm dev # run the app with hot reload (tauri dev)pnpm dev:demo # the same in demo mode: invented profiles, no AWSpnpm build # build installers for this OS (tauri build), into target/release/bundle/Checks
Section titled “Checks”The same ones CI runs; every commit must pass them:
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspacecd app && pnpm lint && pnpm typecheck && pnpm testpnpm test:e2e # Playwright UI flows (in app/; uses a fake backend, no Tauri)Tests never touch AWS: the AWS adapters are tested against SDK mocks, everything else against contrail-fake.
Commits follow Conventional Commits (enforced by a commit-msg hook).
Layout
Section titled “Layout”| Path | What |
|---|---|
crates/contrail-core/ |
Domain model, source traits, parsing, buffer, query — no AWS deps |
crates/contrail-aws/ |
AWS implementations of the core traits |
crates/contrail-fake/ |
Fake implementations and log generators (demo mode, tests) |
app/ |
The desktop app: Tauri CLI and repo tooling (pnpm workspace root) |
app/src-tauri/ |
Tauri app crate: commands, state, wiring |
app/ui/ |
React + Vite frontend (shadcn/ui, Tailwind); tests beside the code |
site/ |
The website (Astro + Starlight), deployed to GitHub Pages |
docs/ |
User and developer documentation, decisions |
CI builds
Section titled “CI builds”CI (.github/workflows/ci.yml) and the website (site.yml) are separate workflows. Changes to only site/,
docs/, Markdown files or the issue templates don’t run CI; changes to only the app don’t rebuild the website.
Pushes run lint and tests only. Installers are built on pull requests (all platforms) or when you start CI by hand: Actions → CI → Run workflow, tick the platforms (Windows and macOS Apple silicon by default) and whether to run lint and tests first. From the terminal:
gh workflow run ci.yml # Windows + macOS (Apple silicon)gh workflow run ci.yml -f macos-arm64=false -f checks=false # just a Windows installer, quicklygh run download <run id> -n contrail-windows # or download from the run's page (Artifacts)The artifacts (contrail-windows, contrail-macos-arm64, contrail-macos-x64, contrail-linux) are kept
14 days. Windows gets an NSIS .exe that installs per user (no admin rights needed). macOS runner minutes count
ten times, so tick only what you need.
The builds are unsigned: Windows SmartScreen asks once (“More info” → “Run anyway”); on macOS, right-click the app → Open the first time.
Website
Section titled “Website”site/ is the website: an Astro + Starlight site with a
landing page, quick start, downloads and pages generated from docs/.
cd sitepnpm installpnpm dev # http://localhost:4321/contrail/pnpm build # the static site in site/dist/- Pages from
docs/are listed insite/site.config.mjsand converted bysite/scripts/sync-docs.mjsbefore each build, sodocs/stays the single source (it also renders on GitHub). Links between docs become links between pages; links to other repository files go to GitHub. - Download buttons come from the latest GitHub release at build time (
src/lib/release.ts). If GitHub can’t be reached, they link to the releases page. - Screenshots are taken from the real UI against the demo backend, in light and dark. After visible UI changes:
pnpm --dir app/ui screenshots(writessite/src/assets/screenshots/and the link preview cardsite/public/og.png), then commit the PNGs. - Pushes to
mainthat touchsite/ordocs/deploy it (.github/workflows/site.yml).