mdxui

App Hierarchy

App → View → Panel → Collection → Thing

App Hierarchy

The App hierarchy parallels the Site hierarchy:

Site (Public)App (Authenticated)
SiteApp
PageView
SectionPanel
CollectionCollection
ThingThing

Structure

App (Root Container)

interface App {
  $type: AppType        // 'Admin', 'CRM', 'VibeCode', etc.
  $id: string           // 'https://acme.com/app'
  name: string
  shell: Shell          // Sidebar + Header + Main
  views: View[]         // Available routes
  auth: AuthConfig
  theme: Theme
}

View (Full-Screen Route)

interface View {
  $type: ViewType       // 'DashboardView', 'ListView', etc.
  path: string          // '/contacts', '/deals/:id'
  title: string
  layout: ViewLayout    // 'single' | 'column' | 'canvas' | 'vibe'
  panels: Panel[]
}

Panel (Region Within View)

interface Panel {
  $type: PanelType      // 'ListPanel', 'DetailPanel', etc.
  position: Position    // 'main' | 'sidebar' | 'detail' | 'top' | 'bottom'
  collection?: Collection
  content?: Content
}

View Layouts

Single Layout

┌─────────────────────────────────┐
│             main                │
└─────────────────────────────────┘

Column Layout

┌───────────────┬─────────────────┐     2-column
│    sidebar    │      main       │
└───────────────┴─────────────────┘

┌─────────┬───────────┬──────────┐     3-column
│ sidebar │   main    │  detail  │
└─────────┴───────────┴──────────┘

(Can be 2, 3, or N columns as needed)

Canvas Layout

┌─────────────────────────────────┐
│              top                │
├─────────┬───────────────────────┤
│ sidebar │         main          │
├─────────┴───────────────────────┤
│            bottom               │
└─────────────────────────────────┘

Vibe Layout

┌─────────┬───────────┬──────────┐
│  chat   │  preview  │   code   │
└─────────┴───────────┴──────────┘

Panel Types

PanelPurpose
NavPanelNavigation tree
TabsPanelTab navigation
BreadcrumbPanelLocation context
SidebarPanelCollapsible sidebar

Collection Display Panels

PanelPurpose
ListPanelCollection as list
TablePanelCollection as table/datagrid
CardsPanelCollection as cards
KanbanPanelCollection as kanban board
CalendarPanelCollection as calendar
TimelinePanelCollection as timeline
GalleryPanelCollection as image gallery
TreePanelCollection as tree/hierarchy

Detail/Form Panels

PanelPurpose
DetailPanelSingle Thing view
FormPanelEdit Thing
PreviewPanelLive preview
PropertiesPanelEdit properties
InspectorPanelObject inspector

Input/Editor Panels

PanelPurpose
ChatPanelAI conversation
CodePanelSource editor (Monaco)
EditorPanelRich text (WYSIWYG)
FilterPanelSearch & filter controls
QueryPanelQuery builder
JSONPanelJSON editor
MarkdownPanelMarkdown editor

Visualization Panels

PanelPurpose
MetricsPanelKPI display
ChartPanelCharts/graphs
StatsPanelStatistics
WorkflowPanelWorkflow diagram
StateMachinePanelState machine view
GanttPanelGantt chart
GraphPanelNode/edge graph
DiagramPanelGeneric diagram

Comparison Panels

PanelPurpose
ArenaPanelBlind A/B comparison (LLM Arena style)
DiffPanelSide-by-side diff view
ComparePanelFeature/attribute comparison
LeaderboardPanelRanked list with scores

Review Panels (PR Pattern)

PanelPurpose
ReviewPanelApprove/reject workflow
ReviewThreadLine-by-line comments
ChecksPanelValidation/CI status
ApprovalPanelMulti-reviewer approval
DeliverablePanelDeliverable review view

Execution Panels

PanelPurpose
BrowserPanelEmbedded browser/iframe
TerminalPanelTerminal emulator
ComputerPanelComputer use (AI)
ConsolePanelConsole output
REPLPanelInteractive REPL
SandboxPanelCode sandbox

Content Panels

PanelPurpose
ContentPanelStatic content/docs
ActivityPanelEvent timeline
FeedPanelActivity feed
LogPanelLog viewer
DocumentPanelDocument viewer
SignaturePanelE-signature flow

Communication Panels

PanelPurpose
ThreadPanelConversation thread
CommentsPanelComments list
NotificationsPanelNotifications

Action Panels

PanelPurpose
ToolbarPanelActions bar
ActionsPanelQuick actions
PalettePanelItem/command picker
CommandPanelCommand palette

Canvas/Workspace Panels

PanelPurpose
CanvasPanelDrag-drop workspace
WhiteboardPanelFreeform drawing
MapPanelGeographic map
FloorplanPanelSpatial layouts

Collections & Relationships

Collections are the data backbone of Apps. Inspired by ReactAdmin's resource model.

Collection Structure

interface Collection {
  $type: string           // 'posts', 'users', 'orders'
  $id: string             // Collection identifier

  // CRUD Views
  list: ListView          // Browse records
  show: ShowView          // View single record
  edit: EditView          // Edit single record
  create: CreateView      // Create new record

  // Relationships
  relationships: Relationship[]
}

Collection Views

Each Collection can have up to 4 standard views:

ViewPurposeData Operation
ListViewBrowse/filter recordsgetList()
ShowViewRead-only record detailgetOne()
EditViewEdit existing recordgetOne(), update()
CreateViewCreate new recordcreate()

Fields (Display Components)

Fields render record properties in read-only views (List, Show):

FieldPurpose
TextFieldString display
NumberFieldNumeric display
DateFieldDate/time display
BooleanFieldTrue/false display
ImageFieldImage preview
FileFieldFile download link
ChipFieldTag/badge display
RichTextFieldHTML content
ArrayFieldList of values
ReferenceFieldLink to related record
ReferenceManyFieldList of related records

Inputs (Edit Components)

Inputs handle record editing in forms (Edit, Create):

InputPurpose
TextInputString editing
NumberInputNumeric editing
DateInputDate picker
BooleanInputCheckbox/toggle
SelectInputDropdown selection
AutocompleteInputSearchable dropdown
RadioGroupInputRadio button group
CheckboxGroupInputMulti-select checkboxes
RichTextInputWYSIWYG editor
FileInputFile upload
ArrayInputEditable list
ReferenceInputRelated record picker
ReferenceArrayInputMulti-select related records

Relationship Types

Collections relate to each other through references:

┌─────────────┐         ┌─────────────┐
│   Author    │────────<│    Book     │
│             │ 1     n │  author_id  │
└─────────────┘         └─────────────┘

┌─────────────┐         ┌─────────────┐         ┌─────────────┐
│    User     │>───────<│  UserRole   │>───────<│    Role     │
│             │ n     n │  user_id    │ n     n │             │
│             │         │  role_id    │         │             │
└─────────────┘         └─────────────┘         └─────────────┘
RelationshipDescriptionComponent
One-to-OneAuthor → ProfileReferenceOneField
Many-to-OneBook → AuthorReferenceField
One-to-ManyAuthor → BooksReferenceManyField
Many-to-ManyUsers ↔ RolesReferenceManyToManyField

Reference Components

Display (Fields):

// Show author name for a book
<ReferenceField source="author_id" reference="authors">
  <TextField source="name" />
</ReferenceField>

// Show all books by an author
<ReferenceManyField reference="books" target="author_id">
  <DataTable>
    <TextField source="title" />
  </DataTable>
</ReferenceManyField>

Edit (Inputs):

// Select author for a book
<ReferenceInput source="author_id" reference="authors">
  <AutocompleteInput optionText="name" />
</ReferenceInput>

// Select multiple tags
<ReferenceArrayInput source="tag_ids" reference="tags">
  <CheckboxGroupInput optionText="name" />
</ReferenceArrayInput>

Context Pattern

Collections provide context to descendant components:

CollectionContext
├── RecordContext      // Current record data
├── ListContext        // List state (pagination, filters, selection)
├── FormContext        // Form state (values, validation, dirty)
└── ResourceContext    // Resource metadata

Components access context via hooks:

  • useRecordContext() - Get current record
  • useListContext() - Get list state
  • useFormContext() - Get form state

DataProvider Abstraction

Collections don't fetch data directly. A DataProvider adapts to any API:

interface DataProvider {
  getList(resource, params): Promise<{ data, total }>
  getOne(resource, params): Promise<{ data }>
  getMany(resource, params): Promise<{ data }>
  getManyReference(resource, params): Promise<{ data, total }>
  create(resource, params): Promise<{ data }>
  update(resource, params): Promise<{ data }>
  updateMany(resource, params): Promise<{ data }>
  delete(resource, params): Promise<{ data }>
  deleteMany(resource, params): Promise<{ data }>
}

This enables:

  • Backend agnostic - REST, GraphQL, Payload, Supabase, etc.
  • Optimistic updates - UI updates before server confirms
  • Caching - Automatic query deduplication
  • Offline support - Local-first with sync

App Type Mappings

1. Dashboard App

DashboardApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── ChartPanel
│   └── ActivityPanel
├── AnalyticsView (single)
│   ├── FilterPanel
│   ├── ChartPanel
│   └── TablePanel
├── ReportsView (column)
│   ├── ListPanel
│   └── DetailPanel
└── SettingsView

2. Developer App

DeveloperApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── ChartPanel
│   └── ActivityPanel
├── KeysView (column)
│   ├── TablePanel
│   └── DetailPanel
├── WebhooksView (column)
│   ├── TablePanel
│   └── DetailPanel
├── UsageView (single)
│   ├── FilterPanel
│   ├── ChartPanel
│   └── TablePanel
├── LogsView (column)
│   ├── TablePanel
│   └── DetailPanel
├── DocsView (single)
│   └── ContentPanel
└── SettingsView

3. Admin App

AdminApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── ActivityPanel
│   └── StatsPanel
├── CollectionView (column) [per collection]
│   ├── ToolbarPanel
│   ├── TablePanel
│   └── DetailPanel
├── RecordView (single)
│   └── FormPanel
├── CreateView (single)
│   └── FormPanel
├── UsersView (column)
│   ├── TablePanel
│   └── DetailPanel
├── RolesView (column)
│   ├── ListPanel
│   └── FormPanel
└── SettingsView

4. SaaS App

SaaSApp
├── DashboardView (single)
│   └── [Product-specific panels]
├── [ProductViews] (varies)
├── TeamView (column)
│   ├── TablePanel
│   └── DetailPanel
├── InvitesView (single)
│   └── TablePanel
├── BillingView (single)
│   ├── MetricsPanel
│   ├── DetailPanel
│   └── TablePanel
├── PlansView (single)
│   └── CardsPanel
└── SettingsView

5. Data App

DataApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── ChartPanel
│   └── ActivityPanel
├── DatasetsView (column)
│   ├── CardsPanel
│   └── DetailPanel
├── DatasetView (single)
│   ├── DetailPanel
│   ├── TablePanel (schema)
│   ├── TablePanel (preview)
│   └── ChartPanel
├── SourcesView (column)
│   ├── ListPanel
│   └── DetailPanel
├── AccessView (column)
│   ├── TablePanel
│   └── DetailPanel
├── UsageView (single)
│   ├── ChartPanel
│   └── TablePanel
└── SettingsView

6. Headless App

HeadlessApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── ChartPanel
│   └── ActivityPanel
├── MCPView (column)
│   ├── TabsPanel
│   ├── ListPanel
│   └── DetailPanel
├── AgentsView (column)
│   ├── TablePanel
│   └── DetailPanel
├── UsageView (single)
│   ├── ChartPanel
│   └── TablePanel
├── LogsView (column)
│   ├── TablePanel
│   └── DetailPanel
└── SettingsView

7. CRM App

CRMApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── ChartPanel
│   └── ActivityPanel
├── ContactsView (column)
│   ├── ToolbarPanel
│   ├── TablePanel
│   └── DetailPanel
├── ContactView (single)
│   ├── DetailPanel
│   ├── TimelinePanel
│   └── ListPanel
├── DealsView (column)
│   ├── FilterPanel
│   ├── KanbanPanel
│   └── DetailPanel
├── DealView (single)
│   ├── DetailPanel
│   ├── TimelinePanel
│   └── ListPanel
├── ActivitiesView (single)
│   └── TimelinePanel
├── TasksView (column)
│   ├── ListPanel
│   └── DetailPanel
└── SettingsView

8. Booking App

BookingApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── CalendarPanel
│   └── ListPanel
├── CalendarView (single)
│   ├── ToolbarPanel
│   └── CalendarPanel
├── BookingsView (column)
│   ├── TablePanel
│   └── DetailPanel
├── BookingView (single)
│   ├── DetailPanel
│   ├── DetailPanel (customer)
│   └── ActionsPanel
├── AvailabilityView (single)
│   ├── CalendarPanel
│   └── FormPanel
├── ServicesView (column)
│   ├── ListPanel
│   └── FormPanel
├── CustomersView (column)
│   ├── TablePanel
│   └── DetailPanel
└── SettingsView

9. Support App

SupportApp
├── InboxView (column)
│   ├── ToolbarPanel
│   ├── ListPanel
│   └── DetailPanel
├── TicketView (column)
│   ├── ListPanel
│   ├── ChatPanel
│   └── DetailPanel
├── CustomersView (column)
│   ├── TablePanel
│   └── DetailPanel
├── KnowledgeBaseView (column)
│   ├── NavPanel
│   ├── ListPanel
│   └── DetailPanel
├── ArticleView (single)
│   └── EditorPanel
├── ReportsView (single)
│   ├── MetricsPanel
│   └── ChartPanel
├── MacrosView (column)
│   ├── ListPanel
│   └── FormPanel
└── SettingsView

10. Agency App

AgencyApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── KanbanPanel
│   └── ActivityPanel
├── ClientsView (column)
│   ├── CardsPanel
│   └── DetailPanel
├── ClientView (single)
│   ├── DetailPanel
│   ├── ListPanel (projects)
│   └── ListPanel (invoices)
├── ProjectsView (column)
│   ├── FilterPanel
│   ├── KanbanPanel
│   └── DetailPanel
├── ProjectView (single)
│   ├── DetailPanel
│   ├── TimelinePanel
│   ├── ListPanel (tasks)
│   └── ListPanel (deliverables)
├── TasksView (column)
│   ├── TablePanel
│   └── DetailPanel
├── DeliverablesView (column)
│   ├── ListPanel
│   └── DetailPanel
├── BillingView (single)
│   ├── MetricsPanel
│   └── TablePanel
└── SettingsView

11. Ops App

OpsApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── StatsPanel
│   └── ActivityPanel
├── ClientsView (column)
│   ├── TablePanel
│   └── DetailPanel
├── ClientView (single)
│   ├── DetailPanel
│   ├── MetricsPanel
│   └── TimelinePanel
├── TasksView (column)
│   ├── ToolbarPanel
│   ├── TablePanel
│   └── DetailPanel
├── IncidentsView (column)
│   ├── TablePanel
│   └── DetailPanel
├── IncidentView (single)
│   ├── DetailPanel
│   ├── TimelinePanel
│   └── FormPanel
├── RunbooksView (column)
│   ├── NavPanel
│   ├── ListPanel
│   └── ContentPanel
├── SLAsView (column)
│   ├── TablePanel
│   └── DetailPanel
├── OnCallView (single)
│   ├── CalendarPanel
│   └── ListPanel
├── ReportsView (single)
│   ├── ChartPanel
│   └── TablePanel
└── SettingsView

12. Agent App

AgentApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── ChartPanel
│   └── ActivityPanel
├── AgentsView (column)
│   ├── CardsPanel
│   └── DetailPanel
├── AgentView (single)
│   ├── DetailPanel
│   ├── ListPanel
│   ├── TimelinePanel
│   └── MetricsPanel
├── TasksView (column)
│   ├── TabsPanel
│   ├── ListPanel
│   └── DetailPanel
├── TaskView (single)
│   ├── DetailPanel
│   ├── ChatPanel
│   └── DetailPanel (result)
├── ToolsView (column)
│   ├── ListPanel
│   └── DetailPanel
├── ModelsView (column)
│   ├── ListPanel
│   └── FormPanel
├── CostsView (single)
│   ├── MetricsPanel
│   ├── ChartPanel
│   └── TablePanel
├── LogsView (column)
│   ├── TablePanel
│   └── DetailPanel
└── SettingsView

13. Workflow App

WorkflowApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── ChartPanel
│   └── ActivityPanel
├── WorkflowsView (column)
│   ├── CardsPanel
│   └── DetailPanel
├── WorkflowView (canvas)
│   ├── ToolbarPanel
│   ├── PalettePanel
│   ├── CanvasPanel
│   └── PropertiesPanel
├── RunsView (column)
│   ├── TablePanel
│   └── DetailPanel
├── RunView (single)
│   ├── CanvasPanel
│   ├── TimelinePanel
│   └── DetailPanel
├── TriggersView (column)
│   ├── ListPanel
│   └── FormPanel
├── TemplatesView (column)
│   ├── CardsPanel
│   └── DetailPanel
└── SettingsView

14. Infra App

InfraApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── StatsPanel
│   └── ActivityPanel
├── ComputeView (column)
│   ├── TablePanel
│   └── DetailPanel
├── ServerView (single)
│   ├── DetailPanel
│   ├── MetricsPanel
│   ├── ChartPanel
│   └── ActionsPanel
├── StorageView (column)
│   ├── TablePanel
│   └── DetailPanel
├── NetworkView (column)
│   ├── ListPanel
│   └── DetailPanel
├── DatabasesView (column)
│   ├── TablePanel
│   └── DetailPanel
├── SecurityView (column)
│   ├── TabsPanel
│   ├── ListPanel
│   └── DetailPanel
├── MonitoringView (single)
│   ├── ChartPanel
│   └── TablePanel
├── BillingView (single)
│   ├── MetricsPanel
│   └── TablePanel
└── SettingsView

15. Platform App

PlatformApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── ChartPanel
│   └── ActivityPanel
├── AppsView (column)
│   ├── CardsPanel
│   └── DetailPanel
├── AppView (single)
│   ├── DetailPanel
│   ├── MetricsPanel
│   └── ListPanel
├── DeploysView (column)
│   ├── TablePanel
│   └── DetailPanel
├── DeployView (single)
│   ├── DetailPanel
│   ├── TimelinePanel
│   └── ContentPanel
├── EnvsView (column)
│   ├── ListPanel
│   └── FormPanel
├── DomainsView (column)
│   ├── TablePanel
│   └── FormPanel
├── BuildsView (column)
│   ├── TablePanel
│   └── DetailPanel
├── LogsView (single)
│   ├── FilterPanel
│   └── ContentPanel
└── SettingsView

16. ClientPortal App

ClientPortalApp
├── DashboardView (single)
│   ├── MetricsPanel
│   ├── ActivityPanel
│   └── ActionsPanel
├── ProjectsView (column)
│   ├── CardsPanel
│   └── DetailPanel
├── ProjectView (single)
│   ├── DetailPanel
│   ├── TimelinePanel
│   └── ListPanel
├── InvoicesView (column)
│   ├── TablePanel
│   └── DetailPanel
├── SupportView (column)
│   ├── ListPanel
│   └── DetailPanel
├── TicketView (single)
│   ├── ChatPanel
│   └── DetailPanel
├── DocumentsView (column)
│   ├── NavPanel
│   ├── ListPanel
│   └── DetailPanel
└── SettingsView

17. VibeCode App

VibeCodeApp
├── EditorView (vibe)
│   ├── ChatPanel
│   ├── PreviewPanel
│   └── CodePanel
├── PagesView (column)
│   ├── ListPanel
│   └── PreviewPanel
├── ComponentsView (column)
│   ├── CardsPanel
│   └── DetailPanel
├── AssetsView (single)
│   └── CardsPanel
├── ThemeView (single)
│   ├── FormPanel
│   └── PreviewPanel
├── HistoryView (column)
│   ├── TimelinePanel
│   └── DetailPanel
├── DeployView (single)
│   ├── DetailPanel
│   └── ActionsPanel
└── SettingsView

Universal Views

Every App includes:

ViewPathLayout
DashboardView/single
SettingsView/settingssingle
ProfileView/profilesingle
NotificationsView/notificationscolumn
SearchView/searchsingle

Shell Components

Every App has a Shell with:

Shell
├── Sidebar
│   ├── Logo
│   ├── NavItems (views)
│   ├── Collapse toggle
│   └── UserMenu
├── Header
│   ├── Breadcrumb
│   ├── SearchBox
│   ├── Notifications
│   └── UserAvatar
└── Main
    └── [Current View]

Dashboard Widgets

Dashboards are composed of widgets - small, focused components that display data.

Metrics Widgets

WidgetPurpose
KPICardSingle key metric
SparklineCardMetric with trend
CompareCardMetric vs previous period
GoalCardProgress toward goal
CountdownCardTime remaining

Chart Widgets

WidgetPurpose
LineChartTrend over time
BarChartComparisons
PieChartDistribution
AreaChartVolume over time
FunnelChartConversion funnel
GaugeChartCurrent vs max
HeatmapChartDensity/activity

Table Widgets

WidgetPurpose
DataTablePaginated data
LeaderboardTableRanked list
ComparisonTableSide-by-side
ChangelogTableRecent changes

Status Widgets

WidgetPurpose
StatusCardSystem health
UptimeCardService uptime
HealthGridMulti-service status
IncidentCardActive incidents

Activity Widgets

WidgetPurpose
ActivityFeedRecent events
NotificationsListUser notifications
TaskListPending tasks
EventCalendarUpcoming events

Action Widgets

WidgetPurpose
QuickActionsCommon actions
ShortcutsNavigation links
RecentItemsRecently accessed
FavoritesStarred items

Embeddable Widgets

Abstract widget categories for common embedded functionality:

Payment Widgets

WidgetPurpose
PaymentFormCheckout/payment collection
ExpressCheckoutWallet payments (Apple Pay, Google Pay)
AddressFormAddress collection
PricingTablePlan/pricing display

Identity Widgets

WidgetPurpose
UsersManagerTeam member management
SecuritySettingsUser security controls
OrgSwitcherOrganization/workspace switching
LoginButtonSSO/authentication trigger

Integration Widgets

WidgetPurpose
IntegrationTemplatesPre-built workflow templates
IntegrationDirectoryAvailable integrations browser
ConnectorSetupIntegration configuration

Communication Widgets

WidgetPurpose
LiveChatReal-time chat support
MessengerAsync messaging
VideoEmbedVideo player/recorder

Scheduling Widgets

WidgetPurpose
CalendarPickerDate/time selection
BookingWidgetAppointment scheduling
AvailabilityGridAvailable slots display

Content Widgets

WidgetPurpose
FormEmbedForms/surveys
DocumentEmbedDocument viewer
DesignEmbedDesign preview

Signature Widgets

WidgetPurpose
SignatureCaptureSignature drawing pad
DocumentSignerFull e-sign flow
SignatureFieldInline signature input
SigningStatusSignature request status

Our Widgets (@mdxui/widgets)

Core interactive widgets we provide:

ChatBox

AI-powered chat widget with email capture, typing indicators, and message history.

import { ChatBox, ChatProvider, ChatTrigger } from '@mdxui/widgets'

<ChatProvider config={{ endpoint: '/api/chat' }}>
  <ChatTrigger />
  <ChatBox position="bottom-right" />
</ChatProvider>

Command palette-style search with keyboard navigation.

import { SearchProvider, SearchTrigger, SearchPalette } from '@mdxui/widgets'

<SearchProvider onSearch={handleSearch}>
  <SearchTrigger />  {/* ⌘K trigger */}
  <SearchPalette />
</SearchProvider>

Editor

Monaco-based code editor with preview pane.

import { EditorPanel, EditorProvider } from '@mdxui/widgets'

<EditorProvider value={code} onChange={setCode}>
  <EditorPanel mode="split" />
</EditorProvider>

Onboarding

Multi-step wizard with field components and animations.

import { OnboardingProvider, OnboardingStep } from '@mdxui/widgets'

<OnboardingProvider steps={steps}>
  <OnboardingStep name="welcome" />
  <OnboardingStep name="profile" />
  <OnboardingStep name="preferences" />
</OnboardingProvider>

Design Patterns

Key patterns that inform our component architecture:

Resource/Collection Pattern

  • Each entity type has standard CRUD views (List, Show, Edit, Create)
  • Views compose Panels for layout flexibility
  • Fields display data, Inputs edit data

Provider Pattern

  • DataProvider - Abstracts data fetching (REST, GraphQL, etc.)
  • AuthProvider - Handles authentication/authorization
  • Context - State flows down, hooks pull up

Composition Pattern

  • Components accept children, not giant prop objects
  • Smart components handle data + rendering
  • Headless variants expose only logic (hooks)

Reference Pattern

  • Collections relate via foreign keys
  • Reference components auto-fetch related data
  • Prevents N+1 query problems via aggregation

On this page