Files
SluijsensandClaude Opus 5.5 069c7cb7eb Adds AI-DLC construction docs for the front-end shell feature
Functional design, NFR requirements, code generation plan and summary,
and build-and-test instructions with results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 17:05:03 +02:00

7.5 KiB
Raw Permalink Blame History

Domain Entities — frontend-shell

The shell has no back-end data. Its "domain" is the site-wide content that will later come from the CMS API, plus the menus, which are code. Every content type is plain data (strings, objects, arrays), so it can later be replaced 1-on-1 by an API response.

Decisions: frontend-shell-fd-questions.md, frontend-shell-fd-clarification-questions.md.

Entity Relationships

graph TD
    SiteContent["SiteContent"]
    SocialLink["SocialLink"]
    EmailAddress["EmailAddress"]
    SocialPlatform["SocialPlatform registry"]
    HeroContent["HeroContent"]
    HeroSlide["HeroSlide"]
    HeroCta["HeroCta"]
    NavItem["NavItem"]
    Routes["Registered routes"]

    SiteContent -->|"has 0..n"| SocialLink
    SiteContent -->|"has 1"| EmailAddress
    SocialLink -->|"refers to"| SocialPlatform
    HeroContent -->|"has 1..n"| HeroSlide
    HeroContent -->|"has 1"| HeroCta
    HeroCta -->|"points to"| Routes
    NavItem -->|"points to"| Routes

    classDef content fill:#2196F3,stroke:#0d47a1,stroke-width:1px,color:#000;
    classDef value fill:#FF9800,stroke:#e65100,stroke-width:1px,color:#000;
    classDef code fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;

    class SiteContent,HeroContent content;
    class SocialLink,EmailAddress,HeroSlide,HeroCta value;
    class SocialPlatform,NavItem,Routes code;

Text alternative: SiteContent holds social links (each referring to a platform in the registry) and one e-mail address; HeroContent holds slides and a CTA pointing to a route; nav items point to routes (blue = CMS content, orange = value objects, green = code).

Content (later from the CMS) — content/types.ts

SiteContent

Field Type Required Description
footerIntro string yes Intro text under the footer logo
socials SocialLink[] yes (may be empty) Social profiles; shown in Hero (icons) and Footer (names)
email EmailAddress yes Contact address, stored in parts (anti-spam, clarification Q3 = A)

Static value until the API exists:

  • footerIntro: "Lifestyle fotograaf uit Huizen. Ik leg jouw mooiste momenten vast." (each sentence on its own line; line breaks in the content are kept, so the CMS can use a plain text area)
  • socials: Facebook and Instagram (the current links from heroContent.ts)
  • email: { user: 'info', domain: 'andreaslop.nl' }

EmailAddress (new value object)

Field Type Required Description
user string yes Part before the @
domain string yes Part after the @

Why parts: the complete address then appears in neither the HTML nor the JavaScript bundle nor (later) the API response. It is joined only in the browser at render time (BR-EMAIL-01). This refines FR-04 and the Application Design, where email was a string.

Field Type Required Description
platform SocialPlatform yes Key into the platform registry
href string yes Profile URL; only shown when it is a valid https:// URL (BR-SOC-01)

HeroContent, HeroSlide, HeroCta (moved from Hero/types.ts)

Unchanged, except that HeroContent.socials is removed. The Hero receives SiteContent.socials as a separate prop.

Entity Fields
HeroContent title, tagline, cta: HeroCta, slides: HeroSlide[]
HeroSlide id, src, alt
HeroCta label, to

Code (not content)

SocialPlatform registry — content/socialPlatforms.ts

A fixed set of supported platforms: facebook and instagram, each with a display name and bundled icon. The CMS supplies only links. A platform outside the registry is a type error.

NavItem — navigation.ts

Field Type Description
to registered route path A typo is a type error
label string Menu text
Menu Items, in order
mainNav Home /, Over mij /over-mij, Portfolio /portfolio, Soorten fotoshoots /soorten-fotoshoots, Contact /contact
footerNav Portfolio, Soorten fotoshoots, Contact, Privacyverklaring /privacyverklaring

Page copy (code until the real pages exist)

Placeholder, 404 and error page texts are fixed strings in their components. See frontend-components.md.

SEO entities (change request)

Decisions: frontend-shell-fd-change-questions.md ("CH").

graph TD
    SiteConfig["siteUrl and site defaults"]
    SitePage["SitePage registry"]
    Route["Route file"]
    Head["Page head"]
    Sitemap["sitemap.xml"]
    JsonLd["ProfessionalService JSON-LD"]
    Socials["SiteContent.socials"]

    Route -->|"looks up its"| SitePage
    SitePage -->|"feeds"| Head
    SiteConfig -->|"base URL for"| Head
    SitePage -->|"indexed pages generate"| Sitemap
    SiteConfig -->|"base URL for"| Sitemap
    SiteConfig -->|"name, url, logo"| JsonLd
    Socials -->|"sameAs"| JsonLd

    classDef code fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
    classDef output fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
    classDef content fill:#2196F3,stroke:#0d47a1,stroke-width:1px,color:#000;

    class SiteConfig,SitePage,Route code;
    class Head,Sitemap,JsonLd output;
    class Socials content;

Text alternative: the page registry is the single source for each route's head and for the generated sitemap; the site configuration supplies the base URL, and the JSON-LD block combines site data with the social links (green = code, blue = generated output, dark blue = content).

Site configuration — seo.ts

Constant Value Use
siteUrl https://andreaslop.nl (no www, no trailing slash) Canonical URLs, og:url, og:image, sitemap, JSON-LD (CH Q2 = A)
siteName Andrea Slop Fotografie og:site_name, title suffix, JSON-LD
defaultOgImage /og-image.jpg, 1200×630, a crop of a hero photo, with alt text Site-wide preview image; a page may override it (CH Q3 = A)

SitePage registry — sitePages.ts (new)

The single list of pages. Route heads and the sitemap both read it, so they cannot drift apart.

Field Type Description
path registered route path Type-checked against the route tree
title string Page title without the site suffix (≤ ~60 chars including suffix)
description string Meta description (≤ ~155 chars)
indexed boolean true: in the sitemap, no robots tag. false: noindex, not in the sitemap
ogImage? string Optional page-specific preview image

Initial values:

  • / is indexed.
  • /over-mij, /portfolio, /soorten-fotoshoots, /contact and /privacyverklaring are not indexed while they are placeholders.
  • Putting a real page live means flipping indexed to true.

The 404 and error pages are not in the registry. They are not routes, and always set noindex themselves.

Structured data — ProfessionalService (CH Q4 = A)

Property Value
@type ProfessionalService
name, url, logo, image siteName, siteUrl, absolute logo URL, defaultOgImage
address PostalAddress with addressLocality Huizen, addressCountry NL
areaServed Place "Huizen"
sameAs hrefs of visibleSocials(siteContent.socials)
e-mail Deliberately absent (BR-EMAIL-01)