2.2 KiB
2.2 KiB
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.jsonsrc/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
- Catalog messages remain complete localized strings. No runtime concatenation creates translatable sentences.
- Pair and triple helpers fail closed when required tuple content is absent.
- Product preview rows use fictional operational fixtures already present in locale catalogs.
- Vehicle identifiers remain separate
secondaryfields soProductPreviewisolates them withBidiText. - Demo, tour, pricing, and sales actions remain disabled and carry localized reasons from the shell contract.
- Outcome metrics are represented as measurement definitions and methodology, not invented numeric values.
- 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.tsverifies locale completeness, unresolved destination behavior, and identifier isolation.scripts/validate-phase13-homepage.mjsverifies approved composition, anchors, semantic tokens, route helpers, and required test artifacts.- Browser, accessibility, and visual scenarios are authored under
tests/browser,tests/a11y, andtests/visual.