packages/
17 kernel packages
Each package exposes a single public surface (src/index.ts), carries its own README, and declares its allowed dependencies in package.json.
Foundation
Composition root, extension API and primitives.
@marvia/core
Kernel: ports, registries, extension loader, snapshot pipeline.
@marvia/sdk
defineExtension and every registration contract.
@marvia/shared
Branded ids, Result, KernelError, pagination, clock.
@marvia/config
Env contract, feature flags, kernel limits.
Domain
Tenancy, identity, data access and money.
@marvia/database
Drizzle schema and ten repository contracts.
@marvia/auth
Auth adapter, roles, permissions, invitations.
@marvia/workspace
Tenant boundary, surfaces, scoping helpers.
@marvia/credits
Workspace wallet, cost policy, reserve/commit.
@marvia/billing
Payment adapter interfaces only.
Engines
Transport, schemas and pluggable pipelines.
@marvia/events
Event names, envelopes, bus contract.
@marvia/queue
Queue names, typed payloads, adapter contract.
@marvia/storage
R2 object storage, KV cache, scoped keys.
@marvia/report-engine
The universal report schema.
@marvia/content-engine
Content types, behaviour table, block documents.
@marvia/connector-engine
Connector adapter contract and registry.
@marvia/ai-router
Provider-agnostic model routing.
Surface
Design tokens, registry and themes.
@marvia/ui
Tokens, component registry, themes, layers.
Design system
Registered components
Schema-driven surfaces resolve components by id, so nothing renders a hardcoded import graph. Layers: primitives, compound, blocks, layouts.
| Id | Layer | Description |
|---|---|---|
| button | primitives | Action trigger |
| input | primitives | Text field |
| textarea | primitives | Multiline field |
| select | primitives | Option picker |
| checkbox | primitives | Boolean field |
| switch | primitives | Toggle field |
| badge | primitives | Status label |
| card | primitives | Surface container |
| dialog | primitives | Modal surface |
| tabs | primitives | Section switcher |
| table | primitives | Tabular data |
| progress | primitives | Determinate progress |
| separator | primitives | Visual divider |
| skeleton | primitives | Loading placeholder |
| tooltip | primitives | Contextual hint |
| command | primitives | Command palette |
| page-header | compound | Page title, kicker and actions |
| section-header | compound | Section title row |
| metric-card | compound | Report metric tile |
| stat-grid | compound | Grid of metric tiles |
| issue-card | compound | Severity-tagged finding |
| recommendation-card | compound | Improvement suggestion |
| search-box | compound | Inline search field |
| toolbar | compound | Page action bar |
| theme-switcher | compound | Light / dark / system |
| empty-state | compound | Guidance instead of emptiness |
| loading-state | compound | Skeletons, never spinners |
| error-state | compound | Recoverable failure surface |
| feedback | compound | Inline and banner messages |
| confirmation-dialog | compound | Confirm, delete, publish, pay |
| hero | blocks | Landing headline block |
| feature-grid | blocks | Feature card grid |
| data-panel | blocks | Titled data surface |
| activity-timeline | blocks | Chronological activity |
| prompt-input | blocks | Persistent AI prompt |
| markdown-content | blocks | The single content renderer |
| chart-container | blocks | Chart framing wrapper |
| sparkline | blocks | Mini trend line |
| progress-ring | blocks | Circular score |
| field | compound | Label, hint, error and ARIA wiring |
| form-shell | compound | One form engine |
| app-layout | layouts | Sidebar → header → toolbar → content → prompt |
| dashboard-layout | layouts | Header plus content stack |
| report-layout | layouts | Fixed report section order |
| documentation-layout | layouts | Table of contents plus reading column |
| split-layout | layouts | Two-column split |