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:

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

Run the backend with insecure cookies only for local HTTP:

Terminal window
GPROXY_INSECURE_COOKIES=1 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.

AreaWhat it manages
ProvidersProvider records, credentials, TLS presets, provider models, upstream model pull, routing rules, provider rule-set attachments.
RoutesAggregated route names, aliases, route members, strategies, and route settings.
RulesReusable rule sets and individual process rules.
UsersOrgs, teams, users, keys, permissions, rate limits, and quotas.
UsageUsage rows, rollups, downstream/upstream request logs, audit logs, credential statuses.
SettingsInstance settings, proxy, logging, usage, tokenizer download, retention, update channel.
UpdateNative self-update state where supported.

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.