Rapid Prototype
apps/docs/src/content/docs/prototype/rapid-prototype Click to copy Copied!
apps/docs/src/content/docs/prototype/rapid-prototype Status: In Progress Timeline: February 2026
Prototype Strategy
Section titled “Prototype Strategy”The rapid prototype focuses on building a thin vertical slice through the entire architecture. Rather than building many components, we build 2-3 components that exercise every integration point.
Why Prototype First?
Section titled “Why Prototype First?”- Reduce risk - Validate technology choices before committing to 40+ components
- Expose integration issues - Find problems where systems connect (Lit ↔ Storybook ↔ Drupal ↔ Docs)
- Establish patterns - The first component sets the pattern for all future components
- Build confidence - Demonstrate working software early
Target Components
Section titled “Target Components”1. wc-button (Atom)
Section titled “1. wc-button (Atom)”The simplest interactive component - validates the core authoring pattern.
Validates:
- Lit 3.x component authoring with TypeScript
- CSS custom properties for theming
- Slot-based content projection
- Form association via ElementInternals
- Accessibility (focus management, ARIA)
- Storybook controls and autodocs
- CEM generation from JSDoc
2. wc-card (Organism)
Section titled “2. wc-card (Organism)”A complex content component - validates composition patterns.
Validates:
- Multi-slot composition (image, heading, body, footer)
- Responsive layout with container queries
- Design token consumption
- Event dispatching (
wc-card-click) - Drupal field mapping (node → component props)
- Visual regression testing with Chromatic
3. wc-text-input (Atom)
Section titled “3. wc-text-input (Atom)”A form component - validates form integration.
Validates:
- Form-associated custom elements (ElementInternals)
- Validation states and error messaging
- Label association and accessibility
- Drupal Form API integration
- Custom event dispatching (
wc-input,wc-change)
Build Sequence
Section titled “Build Sequence”Week 1: Environment setup ├── npm workspaces + Turborepo initialization ├── TypeScript strict configuration ├── Lit 3.x + Vite library mode ├── Storybook 10.x installation └── Terrazzo token pipeline
Week 2: First component ├── wc-button implementation ├── Storybook stories + controls ├── Vitest browser tests ├── CEM generation └── Accessibility audit
Week 3: Complex components ├── wc-content-card implementation ├── wc-text-input implementation ├── Drupal TWIG integration test └── Documentation generation
Week 4: Integration validation ├── Full build pipeline test ├── npm package dry-run publish ├── Drupal site integration └── Phase 0 retrospectiveOutcome
Section titled “Outcome”At the end of Phase 0, we will have:
- A working monorepo with 3 published components
- Validated build pipeline (author → test → build → publish → integrate)
- Confidence in technology choices
- Patterns documented for Phase 1+ component development