Skip to content

Console

The v2 console is a React app in console/. The native binary serves its built output from /console, and the Vite dev server proxies backend routes during local development.

The console talks to the same admin and user APIs that the edge runtime uses:

Surface Purpose
/admin/* Admin control plane, observability, settings, update, and operations.
/user/* User portal account, key, limit, audit, and usage views.
/healthz, /version, /metrics Admin-gated ops endpoints.
/v1/*, /v1beta/*, /{provider}/v1/* Gateway traffic, authenticated by user API key.

Run the backend:

Terminal window
cargo run --features full

Then run the console:

Terminal window
cd console
pnpm dev

console/vite.config.ts proxies /admin, /healthz, /version, and /metrics to http://127.0.0.1:8787 and rewrites origin for CSRF checks. The production native binary serves the built console and /user/* portal APIs from the same origin.

Area What it manages
Providers Provider records, credentials, TLS presets, provider models, upstream model pull, routing rules, provider rule-set attachments.
Routes Aggregated route names, aliases, route members, strategies, and route settings.
Rules Reusable rule sets and individual process rules.
Users Orgs, teams, users, keys, permissions, rate limits, and quotas.
Usage Usage rows, rollups, downstream/upstream request logs, audit logs, credential statuses.
Settings Instance settings, proxy, logging, usage, tokenizer download, retention, update channel.
Update Native self-update state where supported.

When an administrator opens Console, it checks the configured update channel once. If a newer stable release or rolling staging binary is available, a banner appears above every admin page and links to Update. Check failures stay silent outside the Update page.

For production native builds:

Terminal window
cd console
pnpm build

The build runs TypeScript, Vite, and scripts/sync-to-embed.mjs, which copies console/dist/ into assets/console/ for rust-embed. If that step has not run, the backend still compiles but only serves the placeholder embed directory.

The console should carry provider-specific policy as presets wherever possible. For transform behavior, that means wizards and templates should generate generic or existing rule config. The backend process engine remains permissive and operation-oriented.