Front Ends
Server (chainvet-server)
The chainvet-server REST API — the backend consumed by the Chainvet Web UI.
chainvet-server is an axum REST front end. It
exposes scanning over HTTP and powers the Web UI.
Run it
CHAINVET_SERVER_ROOT=./contracts chainvet-server # listens on 127.0.0.1:8080| Env var | Default | Purpose |
|---|---|---|
CHAINVET_SERVER_ROOT | current directory | The directory that scans resolve against. |
CHAINVET_SERVER_ADDR | 127.0.0.1:8080 | The listen address. |
Prefer the launcher
The Web UI ships a serve.py launcher that starts
this server, serves the UI, waits until it's healthy, and opens your browser — one
command instead of wiring the two together by hand.
Endpoints
Core
| Method | Path | Body / result |
|---|---|---|
GET | /health | { "status": "ok", ... } |
POST | /scan | Body { "source": "...", "mode": "hybrid" } → ScanResult |
Project API (consumed by the Web UI)
| Method | Path | Purpose |
|---|---|---|
GET | /api/files | Browse the contracts root. |
GET | /api/file | Read a single file. |
POST | /api/analyze | Start an analysis (with filters / budget). |
GET | /api/analyze/status | Poll live progress. |
POST | /api/analyze/cancel | Cancel a running analysis. |
GET | /api/report | Render an audit report (md / html / pdf) of the most recent scan. |
The most recent completed analysis is retained so /api/report can render a report
without re-scanning.
Report generation
GET /api/report?format=md|html|pdf returns the same Cyfrin-style
audit report the CLI produces (the two front ends share
the chainvet-report crate). PDF rendering requires an HTML→PDF engine
(weasyprint or wkhtmltopdf) on the server host.