An all-Rust IoT template: ESP32 edge device, axum cloud API, and mutual TLS authentication—wired together with a single CLI.
{ "status": "ok" }
{ id, current } payload
./Quickstart orchestrates build, test, deploy, and device management through progressive stages.
| Command | What it does |
|---|---|
| ./Quickstart dev | Unit tests, build endpoint, start local server, run integration tests |
| ./Quickstart dev --serve | Same as above but keeps the server running for manual testing |
| ./Quickstart edge | Build + flash ESP32-C3 firmware via espflash 3.3.0 |
| ./Quickstart staging | Dev gate → deploy to dev stack → integration tests against live endpoint |
| ./Quickstart prod | Dev gate → staging gate → confirm → deploy prod → mTLS verification |
| ./Quickstart certs ca | Initialize the root CA for mTLS |
| ./Quickstart certs device <name> | Issue a device client certificate |
| ./Quickstart certs server <name> | Issue a server/TLS certificate |
| ./Quickstart certs verify | Verify the mTLS certificate chain |
| ./Quickstart certs handshake | Simulate mTLS handshake against a running server |
| ./Quickstart ping | mTLS GET to verify the server is reachable |
| ./Quickstart onboard | End-to-end device onboarding (certs + flash + verify) |
All commands accept -v (verbose) and --dry-run flags.
In-memory SQLite, no infra required. Validates handlers, models, and store logic.
cargo test --features sqlite
HTTP against the running endpoint. Requires Docker + Caddy for mTLS.
docker compose up
HTTPS + client certs against the deployed production endpoint.
./Quickstart ping --certs certs/device/
Local endpoint via docker compose with Caddy mTLS reverse proxy
Deployed dev stack on execute-api, no mTLS enforcement
Custom domain supervictor.advin.io with mTLS, Route53, ACM certificate
The ./Quickstart certs subcommand manages the full mTLS certificate lifecycle.
./Quickstart certs ca # Create root CA ./Quickstart certs device esp32 # Issue device cert ./Quickstart certs server caddy # Issue server cert ./Quickstart certs verify # Verify cert chain ./Quickstart certs handshake # Simulate mTLS handshake
Clone the repository
git clone git@github.com:JimothyJohn/supervictor.git cd supervictor
Run the guided path: toolchain check, .env, fleet CA and certificates, build, tests, a local mTLS endpoint on https://localhost:8443, then a simulated machine or a board over USB. Idempotent; prompts only where ambiguous. make help lists the same stages as make targets.
./Quickstart
Put a board on a reachable endpoint (certificate, registration, flash, first handshake)
./Quickstart onboard <device> <owner> <host>
Install the endpoint on a Linux box as one static binary (when ready)
make deploy # or scripts/install-endpoint.sh on the target
One static binary, a systemd unit, three PEMs and a SQLite file on any Linux box
(scripts/install-endpoint.sh, endpoint/deploy/). The reference
box is one EC2 instance from endpoint/template-staging.yaml; nothing in the
service depends on AWS.
| Resource | Description | Scope |
|---|---|---|
| EC2 instance | t4g.micro, Amazon Linux 2023, bootstraps the release install | Staging |
| Elastic IP + Route53 | A record for the box's hostname | Staging |
| Security group | 443 only; SSM for a shell, no SSH | Staging |
| Let's Encrypt | Public server certificate via DNS-01 (certbot-dns-route53); devices pin the fleet CA + ISRG Root X1 | Staging |
| GitHub release | Static musl tarballs (aarch64, x86_64) the installer verifies by sha256 | All |
| Component | Crate | Purpose |
|---|---|---|
| device | esp-hal, embassy, esp-mbedtls | no_std firmware with async WiFi + TLS |
| endpoint | axum, tokio, rusqlite | Cloud API with feature-gated store backends |
| cli | clap, ureq, toml | Build/test/deploy orchestration |