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
Check the toolchain
./Quickstart install
Generate certificates and start the local endpoint
./Quickstart certs ca && ./Quickstart certs device esp32 && ./Quickstart certs server caddy ./Quickstart dev --serve
Flash the device
./Quickstart edge
Deploy to production (when ready)
./Quickstart prod
Defined in endpoint/template.yaml using AWS SAM. Prod-only resources are gated behind a Condition: IsProd flag.
| Resource | Description | Scope |
|---|---|---|
| API Gateway | Regional REST API with CORS | All |
| Lambda | Rust binary via Lambda Web Adapter, arm64 | All |
| ACM Certificate | DNS-validated TLS for custom domain | Prod |
| Custom Domain | mTLS enforcement via S3 truststore | Prod |
| Route53 | A-record alias to API Gateway | Prod |
| Application Insights | CloudWatch monitoring + X-Ray tracing | 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 |