System inventory

Canonical map of the SpryDesign monorepo: packages, apps, tooling, CI, and boundaries. Source file: docs/SYSTEM.md.

Single reference for structure, packages, apps, tooling, docs, and automation in this monorepo.

In the Next.js docs app, the same content is rendered at /docs/system (sidebar: Foundations → System inventory).


Monorepo and toolchain

ItemDetails
Workspacesapps/*, packages/*, tooling/* via pnpm (packageManager: pnpm 10.6.0).
OrchestrationTurborepodev, build, lint, test across packages.
Language and qualityTypeScript (strict), ESLint, Vitest + Testing Library + jsdom where needed.
StylingTailwind CSS v4 + PostCSS (shared via @spry/config).
ReleasesChangesetspnpm changeset, pnpm version-packages, pnpm release (npm publishing path).

Packages (packages/)

PackageRole
@spry/tokensBrand and semantic tokens in TypeScript; CSS variables source (styles.css); unit tests.
@spry/themeLight/dark (data-spry-theme), density, locale, SpryProvider / useSpry; createSpryTheme, extendSpryTheme, applySpryThemeDefinition; global styles and Tailwind entry; tenant theme JSON: parse/validate, fetchSpryTenantTheme, in-memory cache with getOrFetch, useSpryTenantThemeDefinition; tests.
@spry/uiReact primitives on CSS variables (Radix-based): accordion, alert, avatar, badge, breadcrumb, brand-logo, button, card, checkbox, dialog, dropdown, empty, form, input, pagination, data-table, table, toast, popover, progress, radio-group, select, separator, skeleton, statistic, spin, switch, tabs, tag, textarea, timeline, tooltip, layout utilities; cn utils; re-exports @spry/icons.
@spry/iconsIcon set consumed by UI.
@spry/patternsComposed flows: AuthForm, DashboardLayout, HeroCta; Storybook stories; Vitest for all three.
@spry/configShared TSConfig, ESLint, and Tailwind presets for apps and packages.

Apps (apps/)

AppRole
@spry/docsNext.js documentation site (port 3002): getting started, tokens, theming, architecture, philosophy, troubleshooting, contributing, changelog, design resources, component catalog (registry + previews), patterns, recipes, etc.
@spry/next-webNext.js consumer sample (port 3001) — validates the design system in the App Router.
@spry/webVite consumer sample — theme switching and pattern demos.

Tooling (tooling/)

ToolRole
@spry/storybookStorybook for UI and patterns; a11y and essentials addons; Playwright visual regression (test:visual / test:visual:update).

Static docs and brand

LocationContents
docs/brand/Markdown brand specs: BRAND_GUIDE, COLOR_SPEC, TYPOGRAPHY_SPEC, README.
assets/branding/Logos, fonts — source assets as provided by design.

CI (.github/workflows)

WorkflowPurpose
ci.ymlOn push/PR: pnpm install --frozen-lockfile, pnpm build, pnpm lint, pnpm test, Storybook static build, Playwright Chromium install, visual regression tests.
release.ymlChangesets-driven release path (versioning and npm publish when configured).

Also: CODEOWNERS, pull request template.


End-to-end delivery

  1. Design tokenstheme layer (including optional multi-tenant / remote JSON theme pipeline) → UI primitivespatternsexample apps.
  2. Documentation — Next.js docs site plus markdown brand docs under docs/brand/.
  3. Storybook for components and patterns.
  4. Quality gates — lint; unit tests (tokens, theme, ui, patterns); CI build; Storybook build; visual tests.

Outside this repository (by design)

ConcernNotes
npm registryYou run Changesets / pnpm release when ready to publish packages.
HostingProduction hosting for docs and sample apps is your choice (e.g. Vercel); the repo does not mandate a host.
Tenant product logicTenant admin UI, authentication, and your APIs live in your applications; the design system supplies theme parsing, fetch, cache, and UI primitives only.

Layer diagram (mental model)

tokens → theme → ui → patterns → apps

For interactive documentation, run pnpm dev and open the @spry/docs app; for component exploration in isolation, run pnpm storybook.