Design component architecture for legaltech UIs - layer separation, data flow, design system selection
From 45blacknpx claudepluginhub 45black/uk-legal-pluginsThis skill is limited to using the following tools:
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
Design component architecture for 45Black legaltech products. This skill helps non-coders plan UI structure, separate product layers, and select appropriate design systems.
Ask the user about:
Based on user answers, recommend design system:
Is this CLIENT-FACING (trustees, advisers, external)?
├── YES → TRUSTEE EDITION v1.0
│ • Light-first, Paper White backgrounds
│ • Inter typography
│ • Governance Blue primary (#1A4F7A)
│ • Compliance status colours
│ • WCAG AAA target
│ • Print-ready
│
└── NO → Is this for 8+ hours DAILY USE?
├── YES → SAVILLE v5.0 CLARITY
│ • Matte OFF
│ • Hero weight 500
│ • Data-dense optimised
│
└── NO → SAVILLE v5.0 CORE
• Matte ON (15% dark, 8% light)
• Hero weight 300
• Developer/admin aesthetic
For apex ecosystem products, define these layers:
┌─────────────────────────────────────────────────────────────┐
│ PRESENTATION LAYER │
│ Components, Pages, Layouts (React/Next.js) │
│ Design System: [Selected System] │
├─────────────────────────────────────────────────────────────┤
│ INTERACTION LAYER │
│ State Management (Zustand), Form Handling (React Hook Form)│
│ User preferences, UI state, Session management │
├─────────────────────────────────────────────────────────────┤
│ DATA ACCESS LAYER │
│ React Query hooks, API clients, Data transformation │
│ Connects to: apex-helix | apex-governance | apex-precedent │
├─────────────────────────────────────────────────────────────┤
│ COMPLIANCE LAYER │
│ AI transparency markers, Audit logging, GDPR consent │
│ EU AI Act compliance, Hash-chained audit trails │
└─────────────────────────────────────────────────────────────┘
Create a component tree document:
## Component Hierarchy: [Product Name]
### Layout Components
- AppShell (header, sidebar, main content)
- PageLayout (breadcrumbs, title, actions)
- SplitPane (resizable document/panel views)
### Feature Components
- [Domain-specific components]
### Shared UI Components (from design system)
- Buttons, Cards, Badges, Tables, Forms
- Use shadcn/ui with design system tokens
### Data Components
- [Product].Provider (context for data)
- use[Product]Data (React Query hook)
Document how data moves between layers:
User Action → Interaction Layer → Data Layer → API Proxy → Backend Service
│
▼
UI Update ← Presentation ← State Update ← Query Invalidation ← Response
Create docs/UI_ARCHITECTURE.md with:
Reference for the apex constellation:
| Product | Data Source | Primary Users | Design System | Status |
|---|---|---|---|---|
| apex-lens | helix, precedent, kestrel | Prospects, trustees | Saville Clarity → migrate to Trustee? | Active |
| apex-governance | helix | Trustees, advisers | Trustee v1.0 | Active |
| apex-precedent | precedent DB | Legal researchers | Saville Clarity | Active |
| apex-tracker | helix | Scheme managers | Trustee v1.0 | Planned |
| apex-admin | helix (write) | Wills (admin) | Saville Core | Internal |
All backend requests go through Next.js API routes:
/api/helix/* → apex-helix (port 3001)/api/precedent/* → apex-precedent (port 3002)/api/kestrel/* → apex-kestrel (port 3003)All AI-generated content MUST include:
# UI Architecture: apex-lens v2.0
## Design System
**Trustee Edition v1.0** - Selected because:
- Primary users are pension trustees (external)
- Needs print-ready compliance reports
- Light-first suits office environments
## Component Layers
### Presentation (Trustee Edition)
├── LegislationViewer
│ ├── DocumentPane (Merriweather, cream background)
│ ├── ObligationPanel (cards with status badges)
│ └── NavigationTree (sidebar with sections)
├── SearchInterface
│ ├── SearchBar
│ ├── FacetedFilters
│ └── ResultsList
└── CollectionManager
├── FavouritesList
└── CollectionView
### Data Access
├── useLegislation(id) → /api/helix/acts/{id}
├── useObligations(sectionId) → /api/helix/obligations
└── useCaseLaw(query) → /api/precedent/search
### Compliance
├── AITransparencyBadge
├── AuditLogProvider
└── ConsentManager
opus - Architecture decisions require deep reasoning about trade-offs
Part of 45Black UI Expert Devstack For non-coders: This skill helps you plan before building