Skip to main content

Source: docs/manual/ui-react.md

This page is generated by site/scripts/sync-manual-docs.mjs.

React Web UI

The React web UI replaces the original template-based UI with a modern single-page application built on React, TypeScript, and Tailwind CSS. It provides all operator console features — run management, approvals, cost dashboards, tool browsing, and flow building — in a responsive, component-based interface.

Source: cmd/ui/, cmd/ui/frontend/

Overview

The React Web UI is the primary operator interface for Cruvero. It replaces the earlier htmx-based operator console with a full-featured React 18 application served from a single Go binary. The UI surfaces every capability the Cruvero runtime has built across Phases 1-10, including run management, approvals, replay, causal tracing, tool browsing, memory exploration, cost dashboards, supervisor visualization, and a visual flow builder.

Architecture

The frontend is a React 18 + TypeScript application built with Vite. In production, the Go server (cmd/ui) embeds the built React assets via go:embed and serves them as static files. No Node.js is required at runtime.

LayerTechnology
FrameworkReact 18, TypeScript strict mode
BuildVite, output to cmd/ui/dist/
RoutingReact Router v6
Server stateTanStack React Query
Client stateZustand
StylingTailwind CSS (dark-mode-first)
ChartsECharts (echarts-for-react)
JSON editingMonaco Editor (@monaco-editor/react)
Flow builderReact Flow (@xyflow/react v12)
StreamingEventSource API for SSE

Development

Prerequisites

  • Node.js 20+
  • npm 10+
  • Go 1.25+

Running in development

Start the Go backend (serves API on :8081):

go run ./cmd/ui --addr :8081

Start the Vite dev server with hot reload (proxies API calls to :8081):

cd cmd/ui/frontend && npm run dev

Open http://localhost:5173 in your browser.

Building for production

Build the React app and embed in the Go binary:

make build-ui

Or separately:

cd cmd/ui/frontend && npm ci && npm run build
go build -o bin/cruvero-ui ./cmd/ui

Pages

RoutePageRequired Role
/Run ListViewer
/runs/:workflowIdRun DetailViewer
/runs/:workflowId/replayReplay ConsoleEditor
/approvalsApproval QueueEditor
/questionsQuestion QueueEditor
/toolsTool BrowserViewer
/tools/registryRegistry VersionsViewer
/tools/mcpMCP StatusViewer
/memoryMemory ExplorerViewer
/costCost DashboardViewer
/cost/modelsModel CatalogViewer
/cost/prefsModel PreferencesAdmin
/flowsFlow ListViewer
/flows/builderFlow BuilderEditor
/supervisorSupervisor RunsViewer
/supervisor/:workflowIdSupervisor DetailViewer
/traces/:runIdTrace ExplorerViewer
/diff-testDifferential TestingEditor
/agent-versionsAgent VersionsViewer
/inspect/:workflowIdLive InspectionEditor
/settingsSettingsViewer
/settings/tenantTenant SettingsAdmin
/settings/usersUser ManagementAdmin

Authentication

The UI uses OIDC authentication with Keycloak as the primary identity provider (Azure AD future-proofed). Tokens are stored in HTTP-only secure cookies. The frontend never handles raw JWTs — it reads user info from /api/auth/me.

Roles

  • Viewer: Read-only access to runs, logs, metrics, tools, memory
  • Editor: Execute runs, approve/reject, edit state, create/edit flows
  • Admin: Manage tools, registry, users, workflows, tenant settings
  • Super Admin: Tenant management, system config, role assignment

Configuration

VariableDefaultDescription
CRUVERO_UI_MODEreactreact or htmx
CRUVERO_UI_STATIC_DIRcmd/ui/distPath to React build output
CRUVERO_UI_DEV_PROXYVite dev server URL (dev only)
CRUVERO_AUTH_PROVIDERkeycloakIdentity provider
CRUVERO_UI_JWKS_URLOIDC JWKS endpoint
CRUVERO_UI_ISSUEROIDC issuer URL
CRUVERO_UI_AUDIENCEOIDC audience/client ID
CRUVERO_UI_SESSION_TIMEOUT8hSession timeout duration