# Dashboard architecture

Vifu publishes one deployment-local Dashboard. The same open application is
embedded in the `vifu` binary and can run beside a self-managed Vifu Server.

```mermaid
flowchart TB
  Runtime[Open @vifu/console views]
  Dashboard[Open Dashboard]
  Local[Vifu Server + local authority]
  Cloud[Hosted Vifu Cloud Console]
  Platform[Account and project control plane]

  Dashboard --> Runtime
  Dashboard --> Local
  Cloud --> Runtime
  Cloud --> Platform
```

## Open Dashboard

The open Dashboard is attached to one Vifu Server. Its server-side shell
uses the deployment Admin Key and creates an HttpOnly browser session. The
browser calls a same-origin proxy and never receives the Admin Key.

The release binary embeds the same views directly. Run `vifu`, use the TUI for
live activity, and press `B` to open the Dashboard served at the same Server
address.

It owns only Runtime operations: projects, Agents, Providers, endpoints, keys,
Gateway connections, traces, releases, deployment status, and Runtime settings.
It does not own account login, organizations, billing, cloud ownership, or
production deployment configuration.

## Hosted Vifu Cloud Console

The same Vifu.dev application serves login at `vifu.dev` and the Console at
`dashboard.vifu.dev`. The Console receives an HttpOnly parent-domain session,
asks the account API for projects visible to that user, and obtains short-lived
Runtime authority on the server. It imports the open `@vifu/console` views, but
keeps account sessions, identity integration, ownership checks, and Runtime
grants in the hosted application boundary.

## Dependency direction

Hosted products can import Vifu's open runtime views. The open Dashboard never
imports account or Cloud control-plane code.
