Skip to content

Tech Stack Validation

apps/docs/src/content/docs/prototype/tech-stack-validation Click to copy
Copied! apps/docs/src/content/docs/prototype/tech-stack-validation

Status: In Progress Last Updated: 2026-02-13


Each technology choice was evaluated against alternatives. This document captures the rationale and validation status.

CriteriaLit 3.xStencilFastVanilla
Bundle size5KB14KB8KB0KB
TypeScriptNativeNativeNativeManual
Drupal compatExcellentGoodGoodExcellent
SSR supportYesYesNoYes
CommunityLargeMediumSmallN/A
StorybookNativePluginPluginManual

Decision: Lit 3.x - best balance of size, DX, and Drupal compatibility.

Validation: Build wc-button and verify Storybook integration, Drupal rendering, and bundle analysis.

CriteriaTerrazzoStyle DictionaryTheo
W3C DTCG specNativePluginNo
Output formatsCSS, JS, SCSSCSS, JS, SCSS+CSS, JS
Type safetyYesPartialNo
Active devYesYesArchived

Decision: Terrazzo - native DTCG support, successor to Cobalt UI.

Validation: Generate CSS custom properties from DTCG JSON and consume in Lit components.

CriteriaVitest BrowserJest + JSDOMWeb Test Runner
Real browserYesNoYes
SpeedFast (2-10x)SlowMedium
StorybookNative (v10)PluginManual
Watch modeYesYesYes

Decision: Vitest 4.x - real browser testing, native Storybook 10.x integration.

Validation: Write tests for prototype components and benchmark against Jest baseline.

Documentation: Astro/Starlight + Storybook

Section titled “Documentation: Astro/Starlight + Storybook”

Dual system approach:

  • Storybook: Interactive design system (component playground, visual testing)
  • Astro/Starlight: Comprehensive guides (architecture, integration, tutorials)

Bridge: Custom Elements Manifest (CEM) as single source of truth for API docs in both systems.

Validation: Generate API pages from CEM annotations on prototype components.

CriteriaViteRollupesbuild
Dev serverBuilt-inManualManual
Library modeNativeNativeLimited
StorybookNativePluginPlugin
Tree-shakingYesYesPartial

Decision: Vite - native library mode, powers both Storybook and component build.

Validation: Build prototype components and verify tree-shakeable ESM output.

  • Lit 3.x component renders in all target browsers (Chrome 90+, Firefox 88+, Safari 14+)
  • Terrazzo generates valid CSS custom properties from DTCG tokens
  • Vitest browser mode runs tests against real Chromium
  • Storybook autodocs generate from CEM annotations
  • Starlight API pages render from CEM data
  • Vite library mode produces tree-shakeable ESM bundle
  • npm workspaces resolve cross-package dependencies
  • TypeScript strict mode catches type errors at build time