Dashboard Overview & Layouts
Relevant source files
The following files were used as context for generating this wiki page:
The Speakeasy dashboard uses a standardized set of page templates to ensure design consistency and architectural reliability. Developers use these templates to define the "shape" of a page—handling breadcrumbs, headers, loading states, and error branches—while focusing on unique content implementation.
This system categorizes every dashboard page into a specific template type, such as collections, single entities, or analytical workbenches. By using these predefined layouts, the project prevents design drift and enforces Role-Based Access Control (RBAC) at the template level.
Sources: client/dashboard/src/components/page-templates/README.md:1-10, REVIEW.md:195-200
Page Template Architecture
The dashboard architecture relies on a "paint-by-numbers" approach where specific components own the global "chrome" and developers provide the data props.
Primary Templates
| Template | Usage Context | Key Features |
|---|---|---|
ResourceListPage | Searchable collections, tables, or card grids. | Toolbar, search, empty/loading states. |
DetailPage | Single entity view with multiple sections. | Hero section, routed or scrollable tabs. |
OverviewPage | Summary dashboards with metrics and charts. | Stat rows, chart cards, time range pickers. |
WorkbenchPage | Full-bleed analytics with sticky filters. | Persistent tabs, large data surfaces. |
SettingsPage | Titled configuration sections. | Standardized settings sections and panels. |
FormPage | Single create or edit forms. | Form wrapper with RBAC scope support. |
WizardPage | Multi-step sequential flows. | Step indicators and navigation controls. |
Sources: client/dashboard/src/components/page-templates/README.md:12-30, client/dashboard/src/components/page-templates/index.stories.tsx:88-260
Template Data Flow
Templates manage UI state transitions based on data availability. The following diagram illustrates how a template like ResourceListPage handles different states:
Detailed Layout Implementation
Resource List Layout
The ResourceListPage is the standard for listing project assets like MCP servers or sources. It integrates a toolbar that includes search, view toggles (grid vs. table), and primary actions.
- Scope Gate: Templates accept a
scopeprop to restrict access based on user permissions. - Empty States: Uses
InlineEmptyStateto render a square dashed frame with an icon and CTA. - Metrics: Optionally renders a
StatRowofMetricCardcomponents.
Sources: client/dashboard/src/components/page-templates/README.md:32-55, client/dashboard/src/components/page-templates/index.stories.tsx:105-120
Detail and Tabbed Layouts
DetailPage provides a rail and section pattern. It supports two layout modes:
- Routed: Renders one section at a time based on the URL path.
- Scroll: Stacks all sections vertically for continuous scrolling.
TabbedPage differs from DetailPage by representing distinct resources rather than sections of a single entity.
Sources: client/dashboard/src/components/page-templates/README.md:57-80, client/dashboard/src/components/page-templates/index.stories.tsx:150-192
Design System Constraints
The dashboard enforces strict styling rules to maintain the Moonshine design system:
- Colors: Developers must use token-based utilities. Hardcoded Tailwind colors (e.g.,
bg-neutral-100) are prohibited. - Components: Use shared widgets like
StatRow,ChartCard, andDetailBodyinstead of custom markup. - Structure: Components exceeding ~150 lines of JSX must be decomposed into smaller units.
- Tooltips:
App.tsxprovides a globalTooltipProvider. Individual components must not instantiate new providers.
Sources: REVIEW.md:202-215, client/dashboard/src/components/page-templates/README.md:118-135
Dashboard Data Structures
Dashboards are stored as project-level resources containing widget placements and filter configurations.
Dashboard Object Model
Analytical Components
The OverviewPage and analytical dashboards utilize specific data-driven components summarized below:
| Component | File Reference | Purpose |
|---|---|---|
ChartCard | components/chart/ChartCard | Titled panel for charts with built-in loading/error states. |
TimeRangePicker | components/DashboardTimeRangePicker | Standardized control for filtering analytical data by time. |
StatRow | components/stat-row | A horizontal row of metric cards for high-level KPIs. |
Sources: client/dashboard/src/components/page-templates/README.md:105-115, client/dashboard/src/pages/explore/Explore.test.tsx:288-305
Conclusion
The Speakeasy dashboard utilizes a robust template-driven architecture to simplify UI development and enforce design standards. By leveraging standard components for lists, details, and analytics, the system ensures that complex data surfaces remain accessible and maintainable while providing built-in support for loading states and RBAC.