---
url: https://kit.kambium.net/docs/dashboard.md
---
# Dashboard integration

For import paths and API contracts, see the [Kit frontend reference](https://kit.kambium.net/docs/kit-frontend.md).

The generated app owns its Vue host and engine pages. Kambium Kit supplies the shell,
configured stores and reusable engine UI. Use the generated wiring as the starting
point; custom hosts supply the same explicit inputs.

<span id="host-responsibilities"></span>

## Generated dashboard files

| Application file | Responsibility |
| --- | --- |
| `dashboard/main.ts` | Install the host's Pinia/router/plugins and configure request/session stores |
| `dashboard/auth.ts` | Create the Supabase browser client |
| `dashboard/App.vue` | Compose `Dashboard` and `Sidebar`, including branding |
| `dashboard/config.ts` | Set the company/product name, tagline and storage prefix |
| `dashboard/Home.vue` | Render the introduction and engine catalog; choose the returning-user entry route |
| `dashboard/router.ts` | Register public/authenticated routes, including the Auth callback |
| `dashboard/engines.ts` | Register engine pages and the creation catalog |
| `dashboard/EngineRoute.vue`, `EngineInstance.vue` | Load an instance and bind configuration saves to its page |

## Custom hosts

Use one installed Pinia for the host and engine pages. Configure
`useRequestStore(pinia)` before creating dependent stores, then call
`useSessionStore(pinia).configure(supabase.auth)` with the host's Auth client.
Disposing the session store unsubscribes its Auth listener.

Install PrimeVue and register its tooltip directive when using Kit components.
Provide notification callbacks with `app.provide(notificationsKey, callbacks)`
before mounting. The generated dashboard uses PrimeVue's ToastService for these
callbacks. [Kit frontend](https://kit.kambium.net/docs/kit-frontend.md#notificationskey)

For a custom host, include `#modals`, `#dropdowns`, `#dropdowns-within-modals`
and `#overlays` outside `#app` for shared Teleports. Import `@kambium/kit/styles`
once in the global stylesheet and forward `@kambium/kit/tokens` from the Sass
variables entry injected by Vite. Generated apps already supply this wiring.

## Engine pages

Import public runtime metadata into the page; keep the backend definition and
OAuth secrets on the server. Pass the current record and explicit `onUpdate`
callback to `EnginePage` from `@kambium/kit/frontend/ui`.

Without a `#setup` slot, the default setup connects declared Airtable/Slack
accounts, offers a base picker for primary Airtable and invokes lifecycle
activation/deactivation. A provider-free runtime shows activation directly.
Unknown providers need custom setup UI. A supplied `#setup` replaces the fallback,
including its account loading.

![Generated Airtable to Slack engine with both accounts connected, a base and channel selected, and activation available](https://kit.kambium.net/docs/assets/dashboard-engine-2026-11-28-1376x660.CK3kwzWD.webp)

The backend still validates activation. UI readiness, hidden controls and the
creation catalog do not authorize privileged operations. Configuration persistence
belongs to the host callback/store, not to an implicit component mutation.
::: details Complete EnginePage example and supported inputs

The example uses an `engineRuntime` exported by the page's `../shared/runtime`
module. Point that import at your engine's browser-safe declaration.

Pass `runtime` and `onUpdate` to `EnginePage` for connection-driven setup. Its
optional setup slot replaces the default; existing slot-only pages are unchanged.
The default uses account, connection and engine stores already configured by the
host. It supports Airtable and Slack OAuth, a base picker for the primary Airtable
connection, and authenticated activation/deactivation. Empty connection maps show
activation directly; Slack-only engines show Slack connection and activation
without an Airtable base picker. Pass the host's
`engineStatusStepItem` to retain billing or other activation presentation.

Use `defineEngineRuntime` from `@kambium/kit/shared/engine-runtime` to resolve
optional connection IDs identically in browser and server code. Shared metadata
contains capabilities only; OAuth credentials and Airtable processing policy
belong on the backend definition.

```vue
<script setup lang="ts">
import { EnginePage } from "@kambium/kit/frontend/ui";
import type { EngineComponentProps } from "@kambium/kit/frontend";
import { engineRuntime } from "../shared/runtime";
const props = defineProps<EngineComponentProps>();
</script>

<template>
  <EnginePage :sync="props.sync" :runtime="engineRuntime" :on-update="props.onUpdate"
    :is-development-target="props.isDevelopmentTarget"
    :engine-status-step-item="props.engineStatusStepItem" />
</template>
```

Omit `engineStatusStepItem` to use the normal lifecycle API directly. Configuring
Airtable OAuth in the backend is required before its connect step can succeed.

`EnginePageRecord` is the public record input for the default page. It requires
only the instance ID, kind, active state and selected base/table. It accepts the
engine store's API projection without requiring private database fields or casts;
existing full records remain valid. Legacy custom engine component contracts are
unchanged.

:::

## Route registration and creation

`Sidebar.engineCatalog` controls the creation picker. A backend-only engine can
stay registered without appearing in that picker. Register the corresponding
frontend routes before exposing a catalog item.

`createEngineRoutes` builds Vue Router records from a browser-safe registry keyed
by engine kind. It defaults to `/engine/:engine_id/<kind>` with names `Engine:<kind>`:

```ts
import { createEngineRoutes } from "@kambium/kit/dashboard";
import { engineFrontends } from "./engines";
import EngineRoute from "./EngineRoute.vue";

const routes = createEngineRoutes(engineFrontends, { component: EngineRoute });
```

The optional `component` is the host's common route wrapper, which receives
`engineId` and `kind` props and owns loading, errors and rendering the selected
engine page. Without that option, routes render each registration's `component`
directly and preserve its optional `props`. Registration `meta` and `children`
are preserved, including lazy page imports.

For an existing `/engine/:engine_id` parent that supplies engine state to its
children, use `createEngineRoutes(registrations, { nested: true, namePrefix: "Engine-" })`
as the parent's children. This keeps relative kind paths and existing route names.
`EngineFrontendRegistration` and `EngineRoutesOptions` are exported for host typing.

Engine registration, host route composition, billing/activation policy, support
integration and engine-specific command events remain host-owned.

Optional `bootstrapPrefetch` and `connectionPrefetch` accept core's existing
prefetch objects. The package reads no custom Window properties or Vite env vars.
`publicRouteNames` defaults to `AuthCallback`, `McpOAuthAuthorize` and
`WorkspaceInvitation`; these routes bypass the authenticated layout.
`authCallbackRouteName` defaults to `AuthCallback` and skips bootstrap while the
host consumes its auth response.

New generated apps offer engine creation on the welcome screen too. Customize
`#introduction` in `dashboard/App.vue` and the display copy in `dashboard/config.ts`.
The home screen opens the last visited engine in the selected workspace, falling
back to its first registered engine. Change this policy in `Home.vue` if your app
needs an overview. `Dashboard` forwards `#introduction` to the routed component; the generated home
renders it above the catalog. A custom home opts in with
`<slot name="introduction" />`. The exported `EnginePicker` accepts
`engineCatalog`, optional `engineTo` and `onCreated(engine)` callbacks, and
exposes `isCreating` for a modal host.

## Authentication and public settings

`Dashboard` restores the configured session and bootstraps workspace/engine state.
`hasStoredSession` is only an initial layout hint. Authorization comes from the
verified session and backend checks. The app owns the Auth callback route; sign-in
uses PKCE and returns to that configured frontend URL.

Local startup provides the dashboard's public inputs. Hosted builds must supply
the [dashboard settings](https://kit.kambium.net/docs/configuration.md#dashboard-inputs) and rebuild after they
change. Keep secret backend keys and encryption keys out of browser imports and
`VITE_` variables. The local Vite proxy maps `/api/*` to backend `/ui/*`; hosted
routing must provide the equivalent path and an SPA history fallback.

## Product policy and extensions

The app owns billing, activation eligibility, support integrations and account or
workspace deletion policy. Supply callbacks, slots and configured stores rather
than importing an application singleton into the Kit or the engine package.

Optional source detail (repository access may be required): [dashboard API](https://github.com/MartinMalinda/kambium/blob/main/packages/dashboard/README.md)
and [frontend foundations](https://github.com/MartinMalinda/kambium/blob/main/packages/core/frontend/README.md). For engine behavior,
start with [Engine definitions](https://kit.kambium.net/docs/engines.md).
