Dashboards Package Mapping
How @mdxui/cockpit components map to AppComponents
Dashboards Package → AppComponents
This document maps the existing @mdxui/cockpit package components to the
AppComponents interface defined in mdxui.
Component Mapping
| mdxui Type | Dashboards Component | Status | Notes |
|---|---|---|---|
App | AppProviders | ⚠️ Pattern differs | Uses provider composition |
Shell | - | ❌ Missing | Layout shell needed |
Sidebar | - | ❌ Missing | Sidebar component needed |
Header | - | ❌ Missing | App header needed |
Dashboard | OverviewPage | ⚠️ Rename | Named as page |
Settings | SettingsProfile/Security/Sessions | ⚠️ Split | Multiple pages |
DeveloperDashboard | DeveloperDashboard | ✅ Exists | Takes config object |
APIKeys | KeysPage | ⚠️ Rename | Named as page |
Webhooks | Webhooks*Page | ⚠️ Split | Multiple pages (Activity, Endpoints, EventCatalog, Logs) |
Usage | RequestsPage | ⚠️ Rename | Named differently |
Team | TeamPage | ⚠️ Rename | Named as page |
Billing | BillingPage | ⚠️ Rename | Named as page |
ListView | - | ❌ Missing | Payload admin override |
EditView | - | ❌ Missing | Payload admin override |
CreateView | - | ❌ Missing | Payload admin override |
Additional in Dashboards (not in mdxui)
| Component | Purpose | Action |
|---|---|---|
DatabasePage | Database management | Consider adding to mdxui |
IntegrationsPage | Integration management | Consider adding to mdxui |
VaultPage | Secrets management | Consider adding to mdxui |
Architecture Differences
Provider Pattern vs Props Pattern
mdxui expects:
<App name="My App" auth={{ provider: 'workos' }}>
<Shell>
<Sidebar nav={nav} />
<Header user={user} />
<Dashboard />
</Shell>
</App>Dashboards uses:
<DeveloperDashboard config={{
identity: { clientId: '...' },
routes: { overview: true, keys: true },
theme: { preset: 'cyan' },
branding: { name: 'My App' },
}} />The DeveloperDashboard wraps everything internally with providers.
Page Routing
Dashboards has internal routing with separate page components:
OverviewPageKeysPageBillingPageTeamPageRequestsPageWebhooksEndpointsPage,WebhooksActivityPage,WebhooksLogsPage,WebhooksEventCatalogPageSettingsProfilePage,SettingsSecurityPage,SettingsSessionsPageDatabasePageIntegrationsPageVaultPage
Config Type Alignment
mdxui DeveloperDashboardProps:
{
project: string
showAPIKeys?: boolean
showWebhooks?: boolean
showUsage?: boolean
showLogs?: boolean
theme?: {
preset?: string
mode?: 'light' | 'dark' | 'system'
custom?: Record<string, string>
}
}Dashboards DashboardConfig:
{
basePath?: string
branding?: {
name?: string
logo?: ReactNode
}
routes?: {
overview?: boolean
requests?: boolean
keys?: boolean
team?: boolean
billing?: boolean
settings?: boolean
webhooks?: boolean
database?: boolean
integrations?: boolean
vault?: boolean
}
theme?: {
preset?: Theme
mode?: 'light' | 'dark' | 'system'
custom?: Record<string, string>
}
identity: {
clientId: string
apiHostname?: string
devMode?: boolean
redirectUri?: string
// ... more auth options
}
}Reconciliation options:
- Align mdxui to current implementation - Add
routes,branding,identityto mdxui types - Align implementation to mdxui - Refactor DeveloperDashboard to use simpler props
- Support both - Allow config object OR individual props
Action Items
-
Update mdxui types:
- Add
DashboardConfigas alternative to individual props - Add
routesconfiguration - Add
brandingconfiguration - Add
identityconfiguration (auth) - Add
Database,Integrations,Vaultcomponent types
- Add
-
Create missing layout components:
Shell- app shell with sidebar/header slotsSidebar- navigation sidebarHeader- app header bar
-
Export individual page components:
- The
*Pagecomponents should be exported separately - Consider making them usable standalone or composed
- The
-
Payload admin overrides:
ListView,EditView,CreateVieware for Payload customization- These may not be needed in the dashboards package