Skip to main content
The Dashboard API is a set of 13 Convex query/mutation modules in convex/dashboard/ that serve as the exclusive data interface for UI consumers. Burgundy — and any future frontend — never imports internal Convex modules directly. All reads return domain-complete objects (no client-side joins), all writes check auth at the boundary, and a CI script enforces the contract.

Why It Exists

  • Schema coupling. Without a boundary, UI components imported internal table helpers directly — any schema change risked breaking the dashboard.
  • Client-side joins. Pages assembled objects by fetching multiple tables and joining in React — slow, error-prone, and duplicated across routes.
  • No enforced contract. Nothing prevented a new page from importing any internal Convex module — the “boundary” was a naming convention.
  • Multi-UI fragility. Adding a second frontend (mobile, CLI, partner portal) would require duplicating all the scattered data-fetching logic.

Architecture

Abstraction Boundary

BurgundyUI Consumers

Burgundy (Next.js 15), future UIs. Import only from convex/dashboard/*.

useQuery / useMutation
🔗 Dashboard API· 13 Domain Modules

Auth boundary. Domain-complete reads. Frequency-split queries. convex/dashboard/

internal imports
ConvexInternal Domain Modules· 45+ files

Schema, interpreter, governance engine, agents, chat, memory, budgets, and all other internals.

Domain Modules

ModuleCovers
sessionCurrent user, entitlements, notifications
gatewaysGateway registry, stats, configuration
workflowsDefinitions, versions, documents, deployments
runsExecution, steps, timeline, live state, checkpoints
orgOrg tree, departments, teams, positions, workers
agentsDefinitions, deployments, templates
resourcesSkills, models, step library
analyticsToken events, cost aggregation, pricing
settingsAlert rules, webhooks, feature flags
governancePolicies, approvals, audit log
chatChannels, sessions, messages
factoriesFactories, blueprints, dev tasks
opsAttention items, traces, knowledge, notifications

Design Principles

Design Principles

Domain-Complete Reads

Every query returns fully composed objects. A workflow includes its run count, deployment status, and pending approvals. No client-side joins.

Auth at the Boundary

Dashboard functions check auth once. Reads use requireAuth. Writes use requirePermission with domain-specific scopes. Internal modules are truly internal.

Reactive Frequency Splitting

Queries split by update frequency. Run data (moderate) is separate from timeline events (high-frequency) and live state (low-frequency). Prevents unnecessary re-computation.

Enforced Boundary

A CI script (check-dashboard-boundary.sh) fails the build if any Burgundy file imports an internal Convex module directly. The boundary is structural, not aspirational.


In Burgundy: The dashboard is the primary consumer of this API. See the Burgundy Overview for operator guides.