# plugin-dashboard

`@fayz-ai/plugin-dashboard` · preview · Visual surface

A SaaS home page is never owned by one team. Bookings wants today's agenda, finance wants revenue, the shop wants top products. The usual outcome is one god-component that imports everything and rots. This plugin kills that. It provides the / home surface and a widget registry: every plugin contributes its own dashboardWidgets, and the dashboard renders, orders, and lays them out into a single…

## Overview

The app's landing screen. It has no data of its own and no migrations: it's a **visual surface** that aggregates widgets from the registry — KPIs, custom sections, an onboarding checklist and the widgets other plugins (CRM, finance, inventory) contribute to the home.

It mounts the `/` route and renders `DashboardCanvas`. It's configurable through `metrics`, `sections`, `onboardingSteps`, `customWidgets` and `layout`; you can turn off the header (`showHeader`) or the "Customize" menu (`customizable`) for a clean B2C home, and share one time-range control (`range`) across widgets.

For AI, it exposes `getKpiSummary`. Status **preview / visual surface** — the API may still change.

## When to use it

- Build the home with KPIs and a first-steps checklist.
- Gather the widgets the other plugins expose in one place.
- Ship a lean B2C home without the customization chrome.

## Specs

- **Package:** `@fayz-ai/plugin-dashboard`
- **Version:** 0.1.6
- **Status:** preview
- **Capability:** Visual surface
- **Product type:** Management (Admin/SaaS)
- **Stable channel:** `^0.1.6`
- **Migrations:** none
- **Factory:** `createDashboardPlugin()`

## Data model

No tables of its own — this plugin uses the core / archetype library (same rule: tenant_id + RLS)..

## AI tools

| id | mode | description |
| --- | --- | --- |
| `dashboard.kpi-summary` | read | Returns a summary of all KPI metrics for the current dashboard, including trends and comparisons. |

## Integrations

No hosted connector — external providers come in via the connector spine (`@fayz-ai/core`).

## Integrate

Add the plugin to surfaces.admin.plugins in your app's app.manifest.json and run the doctor to validate:

```json
{ "surfaces": { "admin": { "plugins": [ { "id": "dashboard", "enabled": true } ] } } }
```

```bash
npx fayz doctor
```
