Files
2026-06-25 19:06:59 -04:00

40 lines
2.2 KiB
Markdown

# Phase 13 Homepage Content Model
## Purpose
`src/content/homepage-model.ts` converts each locale catalog into one typed route-level object. The route consumes component semantics rather than translation-array positions or presentation-only flags.
## Inputs
- `src/content/locales/{en,fr,ar}/homepage.json`
- `src/content/locales/{en,fr,ar}/shell.json`
- Phase 12 component contracts for icons, preview rows, actions, cards, workflow, comparison, and CTA behavior
## Main types
- `HomepageContent`: complete route composition contract.
- `HomepageAction`: action label plus mandatory unavailable reason for unresolved destinations.
- `TitledDescription`: stable ID, title, description, and optional approved icon.
- `HomepageWorkflowStep`: stable ID, ordinal, title, and description.
- `HomepageFaqItem`: stable ID, question, and answer.
## Content transformation rules
1. Catalog messages remain complete localized strings. No runtime concatenation creates translatable sentences.
2. Pair and triple helpers fail closed when required tuple content is absent.
3. Product preview rows use fictional operational fixtures already present in locale catalogs.
4. Vehicle identifiers remain separate `secondary` fields so `ProductPreview` isolates them with `BidiText`.
5. Demo, tour, pricing, and sales actions remain disabled and carry localized reasons from the shell contract.
6. Outcome metrics are represented as measurement definitions and methodology, not invented numeric values.
7. Integrations, security certifications, pricing values, customer names, logos, and testimonials remain absent until governed approval exists.
## Route responsibilities
`src/app/[locale]/page.tsx` owns section order, headings, anchors, and composition. Components remain content-independent. Locale prefixes are generated with `localizedPath`; raw or guessed destinations are not permitted.
## Validation
- `tests/unit/homepage-content.test.ts` verifies locale completeness, unresolved destination behavior, and identifier isolation.
- `scripts/validate-phase13-homepage.mjs` verifies approved composition, anchors, semantic tokens, route helpers, and required test artifacts.
- Browser, accessibility, and visual scenarios are authored under `tests/browser`, `tests/a11y`, and `tests/visual`.