Complete type migration removing all 33+ local interfaces and as-unknown-as
casts. All components now use contracts types directly with type-safe
relationship resolution via payload-helpers.ts.
Key changes:
- New payload-helpers.ts: resolveRelation, getMediaUrl, getMediaAlt, socialLinksToMap
- types.ts: thin re-export layer from contracts (backward-compatible aliases)
- api.ts: direct contracts types, no bridge casts, typed getSeoSettings
- All 17 block components: correct CMS field names (headline, subline, cta group, etc.)
- All route files: page.seo.metaTitle (not page.meta.title), getMediaUrl for unions
- structuredData.ts: proper types for all schema generators
- Footer: social links from separate collection via socialLinksToMap()
- Header/Footer: resolveMedia for logo
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix getNavigation() to use contracts API (no broken type filter)
- Single nav fetch in layout, pass mainMenu/footerMenu to components
- Header, Navigation, MobileMenu use CMS mainMenu schema
- Footer uses CMS footerMenu schema with linkType field
- Add pnpm-workspace.yaml for onlyBuiltDependencies allowlist
- Update payload-contracts to latest (navigation fix a0eea96)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add @c2s/payload-contracts as shared API client dependency
- Create src/lib/cms.ts with tenant-configured PayloadClient instance
- Replace manual fetch logic in api.ts with contracts client calls
- Add transpilePackages config for TypeScript source imports
- Local types preserved for component compatibility (bridge pattern)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Initialize Next.js 16 with React 19, TypeScript, and Tailwind CSS 4
- Add prompts/ directory for concept AI instructions
- Add docs/ directory for project documentation
- Include README files explaining workflow and conventions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>