Design System & UI Governance
Shared accessible UI primitives, design tokens, responsive standards, and internationalization readiness across all frontend surfaces.
ArchitectureReference
Purpose & Scope
This reference defines the UI governance model, shared component system, theming standards, and responsive design rules for Storefront, Commerce, and Backoffice. It ensures visual consistency, accessible interaction patterns, and long-term maintainability across customer and staff experiences.
Architectural Principles & Rules
- Headless accessible primitives first: Interactive controls (dialogs, menus, popovers, selects, tabs) must be built on shared headless primitives that provide standardized ARIA roles, keyboard navigation, focus trapping, and focus restoration out of the box.
- Token-driven styling: Colors, typography, spacing, and elevation are governed by centralized design tokens rather than ad-hoc per-app values, ensuring WCAG-compliant contrast ratios across themes.
- Shared customer chrome: Storefront and Commerce share a unified navigation shell (header, footer, mobile bottom bar, basket indicator, and cross-zone links) so shoppers never perceive a visual seam when crossing microfrontend boundaries.
- Mobile-first responsive discipline: Customer surfaces prioritize touch-friendly targets, responsive grids, and zoom-safe layouts (remaining readable up to 200% zoom without horizontal overflow); Backoffice optimizes for dense data tables with responsive horizontal scrolling and clear hierarchy.
- Internationalization readiness: User-facing formatting (currency, dates, numbers) routes through centralized locale-aware utilities rather than hardcoded string concatenation, and layouts avoid fixed pixel widths that break under translated text expansion.
Governance Rule for New UI Components
Never hand-roll custom modal dialogs, dropdowns, or form controls inside an application feature slice. Extend or compose the shared UI primitive library so keyboard, focus, and contrast guarantees apply uniformly.
Patterns & Boundaries
| Concern / Surface | Architectural Approach | Responsibility Boundary | Key Trade-off |
|---|---|---|---|
| Shared UI Primitives | Centralized component library wrapping accessible headless primitives and utility tokens | Domain UI layer owns reusable primitives; feature slices own domain composition | Changes to core primitives affect all three surfaces and require cross-app regression checks |
| Customer Shell | Shared header, footer, mobile navigation, and basket badge across Storefront and Commerce | Domain shell layer owns chrome; Storefront and Commerce inject page content | Couples customer shell releases across both customer zones |
| Theming & Contrast | Semantic design tokens for surfaces, text, borders, and status states | Design tokens enforce 4.5:1 normal text and 3:1 UI/large text contrast | Restricts arbitrary one-off colors in feature components |
| Validation & Forms | Schema-driven form validation paired with explicit field labels and error associations | Shared validation layer owns schemas; feature slices own form layout | Adds upfront schema definition before rendering forms |
- Touch & Viewport: Interactive controls maintain minimum touch target sizing on mobile viewports, and Storefront provides dedicated bottom navigation for thumb-friendly browsing.
- Text Expansion & Zoom: Layouts use flexible containers and relative units so content reflows cleanly at mobile widths and 200% browser zoom.
- Locale-Safe Formatting: Price, date, and order-status formatting are encapsulated in shared utilities to simplify future multi-locale expansion.
Quality & Operational Impact
- Visual Continuity: Customers transition seamlessly between Storefront discovery and Commerce checkout with identical chrome and interaction behavior.
- Engineering Velocity: Teams compose pre-verified, accessible building blocks instead of rebuilding dialogs, tables, and form controls per surface.
- Inclusive Compliance: Tokenized contrast and headless primitives eliminate entire classes of keyboard and screen-reader defects at authoring time.