Architecture

Understand how Feature Kits packages compose from UI primitives to product workflows.

Feature Kits separates low-level UI from workflow-level behavior. The ui package provides primitives and tokens; the feature/* packages combine them into reusable form, table, layout, and import workflows. Your application owns domain data, business rules, and API calls.

Dependency direction

apps/web
  ↓
feature/form   feature/data-table   feature/layout   feature/uploader
  ↓             ↓                   ↓              ↓
                 packages/ui

Feature packages may depend on ui, but application code should not reach into another feature package's internal files. Use the exports documented by each package.

Package responsibilities

PackageOwnsDoes not own
uiPrimitives, semantic tokens, shared stylesProduct workflows
formField rendering, validation wiring, submit lifecycleAPI calls or business rules
data-tableTable state, filters, selection, URL synchronizationQueries, authorization, or persistence
layoutBreadcrumbs, sections, empty states, confirmationsRoute policy or page data
uploaderFile parsing and import validation workflowImport persistence or background jobs
Host applicationDomain data, API calls, permissions, business rulesReimplementing shared workflow behavior

Choosing an abstraction

Use a primitive when you need one control. Use a feature kit when the screen needs repeated workflow behavior:

  • Input or Select for a local control.
  • FormKit for a validated create or edit flow.
  • FieldKit when the parent owns filter values.
  • DataTable for a listing with search, filters, paging, or selection.
  • Uploader when a file must pass through an import pipeline.

State ownership

The boundary between a kit and the host application should stay explicit:

FormKit       → field state + validation + submit lifecycle
DataTable     → interaction state + optional URL synchronization
Uploader      → parsing + client-side validation
Application   → API calls + business rules + persisted data

For server-driven screens, fetch data in the application and pass the current result into the kit. For client interactions, mount the required providers in the application root.

Monorepo locations

PathPurpose
apps/webDocumentation site and runnable examples
feature/*Feature package source and public exports
packages/uiShared primitives and global styles
packages/export, packages/formatSupporting public workspace packages

See Installation for workspace setup and Providers for runtime requirements.

On this page