Adds AI-DLC inception docs for the front-end shell feature
Workspace detection, reverse engineering of web/, requirements with answered verification questions, the execution plan and the open application design questions for the frontend-shell feature. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
# Application Design Plan — frontend-shell
|
||||
|
||||
Depth: **minimal**. Single front-end package; the design pins down component boundaries, props, shared pieces and what moves into the theme (NFR-02 reuse principle). Detailed behaviour rules follow in Functional Design.
|
||||
|
||||
## Plan
|
||||
|
||||
- [ ] 1. Answer the design questions below
|
||||
- [ ] 2. Analyze answers for ambiguities (follow-up questions if needed)
|
||||
- [ ] 3. Generate `components.md` — component definitions and responsibilities
|
||||
- [ ] 4. Generate `component-methods.md` — props/signatures of components, hooks and helpers
|
||||
- [ ] 5. Generate `services.md` — router configuration, head management, content provisioning
|
||||
- [ ] 6. Generate `component-dependency.md` — dependency matrix, data flow
|
||||
- [ ] 7. Generate `application-design.md` — consolidated design
|
||||
- [ ] 8. Validate completeness and consistency (requirements FR-01…FR-11, NFR-01…NFR-05, Security/PBT applicability)
|
||||
|
||||
## Already decided (no question needed)
|
||||
|
||||
These follow directly from the requirements and the reuse principle (NFR-02):
|
||||
|
||||
- **Skip link**: use Chakra's built-in `SkipNavLink` + `SkipNavContent` (`id="main"`, rendered `as="main"`). Restyle via the theme's `skipNavLink` recipe so it matches the design (ink background, white text).
|
||||
- **Back-to-top visibility**: reuse the existing `useScrolledPast` hook, with a module-level threshold function (60% of the viewport height).
|
||||
- **Icons**: `@iconify/react/offline` with the bundled `up-outlined` from `@iconify-icons/ant-design`.
|
||||
- **404 / error buttons**: the existing `LinkButton` (`linkButton` recipe).
|
||||
- **Footer column headings**: the existing `eyebrow` text style.
|
||||
|
||||
---
|
||||
|
||||
## Questions
|
||||
|
||||
Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe. Waar ik een voorkeur heb staat **(aanbevolen)**.
|
||||
|
||||
### Vraag 1: Mappenstructuur van de shell-componenten
|
||||
Nu staat `AppShell.tsx` los in `components/`, met `NavigationBar/` en `Hero/` als eigen mappen.
|
||||
|
||||
A) Per component een eigen map, zoals nu: `components/Footer/`, `components/BackToTop/`, `components/StatusPage/`… `AppShell.tsx` blijft waar het is. **(aanbevolen)** Dit sluit aan bij het bestaande patroon.
|
||||
B) Eén map `components/Shell/` met `AppShell`, `Footer/`, `BackToTop`, `NavigationBar/` erin (NavigationBar verhuist)
|
||||
C) Een aparte map `layout/` naast `components/` voor alles wat shell is
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]:
|
||||
|
||||
### Vraag 2: Waar komt de content-module te staan, en verhuist `heroContent` mee?
|
||||
A) Nieuwe map `src/content/` met `siteContent.ts` en de types. `heroContent.ts` en de types in `Hero/types.ts` verhuizen mee, zodat alle "straks-uit-de-API"-data op één plek staat. **(aanbevolen)**
|
||||
B) Nieuwe map `src/content/` alleen voor `siteContent`. `heroContent` blijft bij de Hero.
|
||||
C) `src/siteContent.ts` los naast `seo.ts`
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]:
|
||||
|
||||
### Vraag 3: Hoe krijgen Footer en Hero de site-content binnen?
|
||||
A) Via props: `AppShell` geeft `siteContent` door aan `Footer`, en de home-route geeft de socials door aan `Hero`. Dat is hetzelfde patroon als de Hero nu met `content` werkt, en makkelijk te testen. Als de API er is, wordt alleen de bron vervangen (bv. een route-loader). **(aanbevolen)**
|
||||
B) Componenten importeren `siteContent` direct. Dat is het simpelst, maar later moet elk component aangepast worden.
|
||||
C) Een React-context (`SiteContentProvider` + `useSiteContent()`) rond de app, klaar om later met data uit de API gevuld te worden
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]:
|
||||
|
||||
### Vraag 4: Waar staan de menu-items voor het footermenu?
|
||||
De items van het hoofdmenu (`navItems`) zijn routes, en routes zijn code: het CMS kan geen pagina's toevoegen. In de requirements (FR-04) stond het footermenu in `siteContent`.
|
||||
|
||||
A) Het footermenu staat naast `navItems` in de navigatiecode (bijvoorbeeld `navigation.ts` met `mainNav` en `footerNav`), getypeerd op bestaande routes. `siteContent` bevat alleen echte content (tekst, socials, e-mail). Ik pas FR-04 hierop aan. **(aanbevolen)**
|
||||
B) Het footermenu staat in `siteContent`, zoals in FR-04. De `to`-waarden zijn gewone strings, dus de router controleert de types minder streng.
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]:
|
||||
|
||||
### Vraag 5: Opbouw van de placeholder-pagina's
|
||||
Vijf routes krijgen voorlopig placeholder-inhoud: portfolio, soorten-fotoshoots, contact, privacyverklaring en over-mij.
|
||||
|
||||
A) Een herbruikbaar `PageIntro`-component: ruimte onder de header, `Container`, eyebrow en `h1`. De placeholders gebruiken het nu, en de echte pagina's straks als bovenste blok (het "Intro"-blok uit LAYOUT.md). **(aanbevolen)**
|
||||
B) Een apart `PagePlaceholder`-component, alleen voor de placeholders, dat later weer verdwijnt
|
||||
C) Per route inline, zonder gedeeld component
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]:
|
||||
|
||||
### Vraag 6: 404- en foutpagina
|
||||
A) Eén gedeeld `StatusPage`-component (titel, tekst, knop naar home). `NotFound` en `ErrorPage` zijn er dunne wrappers omheen. **(aanbevolen)**
|
||||
B) Twee losse componenten
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]:
|
||||
|
||||
### Vraag 7: Stijl van de footerlinks
|
||||
Footerlinks (socials, e-mail, footermenu) delen één stijl: zachte kleur, accent bij hover, en een zichtbare focusring. Die stijl komt op meer dan twee plekken voor, dus centraliseren is zinvol.
|
||||
|
||||
A) Chakra's ingebouwde `Link`-recipe uitbreiden met een variant `subtle` in het thema. Footerlinks worden `<Link variant="subtle">`, en voor router-links gebruiken we `<Link asChild><RouterLink …/></Link>`. Zo benutten we Chakra zelf. **(aanbevolen)**
|
||||
B) Een eigen nieuwe recipe `subtleLink`, naast `linkButton`
|
||||
C) Een klein `FooterLink`-component met style props, zonder thema-uitbreiding
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]:
|
||||
|
||||
### Vraag 8: Gedeelde router-link en bestaande code
|
||||
`chakra(Link)` wordt nu in drie bestanden apart gedefinieerd: `NavLink`, `MobileNav` en `LinkButton`.
|
||||
|
||||
A) Eén gedeelde `RouterLink` (in `components/RouterLink.tsx`) en de drie bestaande bestanden daarop omzetten. Dat is een kleine, veilige refactor. **(aanbevolen)**
|
||||
B) Alleen de nieuwe code gebruikt de gedeelde `RouterLink`. Bestaande bestanden blijven zoals ze zijn.
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]:
|
||||
|
||||
### Vraag 9: Het "volledig zichtbaar bij hover"-patroon
|
||||
`HeroArrows` en `HeroSocials` herhalen allebei hetzelfde patroon: opacity 0.6, bij hover of focus naar 1, met de transitie-tokens. De terug-naar-boven-knop gebruikt dat patroon niet (die heeft een rand en kleur zoals in het design).
|
||||
|
||||
A) Centraliseren in het thema, als recipe of als gedeelde style-set, en de twee Hero-componenten erop omzetten. Dat is een kleine, veilige refactor.
|
||||
B) Laten zoals het is. Het komt maar op twee plekken voor, beide in de Hero, en de shell gebruikt het niet. **(aanbevolen)** Hier doen we "niet forceren".
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]:
|
||||
@@ -0,0 +1,182 @@
|
||||
# Execution Plan — frontend-shell
|
||||
|
||||
## Detailed Analysis Summary
|
||||
|
||||
### Transformation Scope (Brownfield)
|
||||
- **Transformation Type**: Single package (`web/`), application-level changes only — no architectural or infrastructure transformation
|
||||
- **Primary Changes**: Complete the application shell: footer, back-to-top, skip link + main landmark, 404 and error pages, logo link, full navigation with placeholder routes, scroll restoration, shared site content module, theme additions for reused styling, test toolchain, security headers on dev/preview server, tech-debt clean-up
|
||||
- **Related Components**: `AppShell`, `NavigationBar` (+ `navItems`), `Footer`, `Hero` (socials source), `theme.ts`, `main.tsx` (router options), `routes/*`, `vite.config.js`, `package.json`
|
||||
|
||||
### Change Impact Assessment
|
||||
- **User-facing changes**: Yes — new footer, to-top button, skip link, 404/error pages, extra menu items and placeholder pages, footer contrast deviates from design (AA)
|
||||
- **Structural changes**: Yes (minor) — new shell components, shared `siteContent` module, shared router-link primitive; shell stays Header / main / Footer
|
||||
- **Data model changes**: Yes (minor) — new typed `SiteContent` shape; `HeroContent.socials` moves to it
|
||||
- **API changes**: No external API. Internal: Hero's content props change (socials no longer in `heroContent`)
|
||||
- **NFR impact**: Yes — accessibility (WCAG 2.1 AA), new test toolchain incl. PBT, security headers / CSP, supply-chain hygiene
|
||||
|
||||
### Component Relationships
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
Root["routes/__root.tsx"] --> AppShell["AppShell"]
|
||||
Root --> NotFound["NotFound page (new)"]
|
||||
Root --> ErrorPage["Error page (new)"]
|
||||
AppShell --> SkipLink["SkipLink (new)"]
|
||||
AppShell --> Nav["NavigationBar (changed)"]
|
||||
AppShell --> Main["main#main + Outlet (new)"]
|
||||
AppShell --> Footer["Footer (rebuilt)"]
|
||||
AppShell --> ToTop["BackToTop (new)"]
|
||||
Nav --> NavItems["navItems (changed)"]
|
||||
Footer --> SiteContent["siteContent (new)"]
|
||||
Hero["Hero (changed)"] --> SiteContent
|
||||
Footer --> Theme["theme.ts (changed)"]
|
||||
ToTop --> Theme
|
||||
Main --> Pages["placeholder routes (new)"]
|
||||
classDef existing fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
|
||||
classDef changed fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
|
||||
classDef added fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
|
||||
class Root,AppShell existing;
|
||||
class Nav,NavItems,Hero,Theme,Footer changed;
|
||||
class NotFound,ErrorPage,SkipLink,Main,ToTop,SiteContent,Pages added;
|
||||
```
|
||||
|
||||
Text alternative: the root route renders AppShell plus new NotFound/Error pages; AppShell gains SkipLink, a main landmark, a rebuilt Footer and a new BackToTop; Footer and Hero both read the new siteContent module; theme.ts is extended (blue = unchanged, yellow = changed, green = new).
|
||||
|
||||
- **Primary Component**: `web/` (React SPA) — Change Type: Minor (additive), Priority: Critical
|
||||
- **Infrastructure Components**: none (only `vite.config.js` dev/preview headers — Configuration-only)
|
||||
- **Shared Components**: `theme.ts`, `siteContent`, shared router-link primitive — Minor
|
||||
- **Dependent Components**: `Hero` (socials source) — Minor
|
||||
- **Supporting Components**: new test setup (Vitest config, test utils, generators) — Minor
|
||||
|
||||
### Risk Assessment
|
||||
- **Risk Level**: Low — isolated front-end, not deployed yet, every change reversible via git
|
||||
- **Rollback Complexity**: Easy
|
||||
- **Testing Complexity**: Moderate — new toolchain (Vitest + RTL + fast-check) and jsdom limits around scrolling/media queries
|
||||
|
||||
## Workflow Visualization
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Start(["User Request"])
|
||||
|
||||
subgraph INCEPTION["🔵 INCEPTION PHASE"]
|
||||
WD["Workspace Detection<br/><b>COMPLETED</b>"]
|
||||
RE["Reverse Engineering<br/><b>COMPLETED</b>"]
|
||||
RA["Requirements Analysis<br/><b>COMPLETED</b>"]
|
||||
US["User Stories<br/><b>SKIP</b>"]
|
||||
WP["Workflow Planning<br/><b>IN PROGRESS</b>"]
|
||||
AD["Application Design<br/><b>EXECUTE</b>"]
|
||||
UG["Units Generation<br/><b>SKIP</b>"]
|
||||
end
|
||||
|
||||
subgraph CONSTRUCTION["🟢 CONSTRUCTION PHASE"]
|
||||
FD["Functional Design<br/><b>EXECUTE</b>"]
|
||||
NFRA["NFR Requirements<br/><b>EXECUTE</b>"]
|
||||
NFRD["NFR Design<br/><b>SKIP</b>"]
|
||||
ID["Infrastructure Design<br/><b>SKIP</b>"]
|
||||
CG["Code Generation<br/>(Planning + Generation)<br/><b>EXECUTE</b>"]
|
||||
BT["Build and Test<br/><b>EXECUTE</b>"]
|
||||
end
|
||||
|
||||
Start --> WD
|
||||
WD --> RE
|
||||
RE --> RA
|
||||
RA -.-> US
|
||||
RA --> WP
|
||||
WP --> AD
|
||||
AD -.-> UG
|
||||
AD --> FD
|
||||
FD --> NFRA
|
||||
NFRA -.-> NFRD
|
||||
NFRA -.-> ID
|
||||
NFRA --> CG
|
||||
CG --> BT
|
||||
BT --> End(["Complete<br/>(Operations: ask again)"])
|
||||
|
||||
style WD fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
||||
style RE fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
||||
style RA fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
||||
style WP fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
||||
style CG fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
||||
style BT fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
||||
style AD fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
||||
style FD fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
||||
style NFRA fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
||||
style US fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
|
||||
style UG fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
|
||||
style NFRD fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
|
||||
style ID fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
|
||||
style Start fill:#CE93D8,stroke:#6A1B9A,stroke-width:3px,color:#000
|
||||
style End fill:#CE93D8,stroke:#6A1B9A,stroke-width:3px,color:#000
|
||||
style INCEPTION fill:#BBDEFB,stroke:#1565C0,stroke-width:3px,color:#000
|
||||
style CONSTRUCTION fill:#C8E6C9,stroke:#2E7D32,stroke-width:3px,color:#000
|
||||
|
||||
linkStyle default stroke:#333,stroke-width:2px
|
||||
```
|
||||
|
||||
Text alternative: completed Inception stages (green) lead to Application Design, Functional Design and NFR Requirements (orange, execute), then Code Generation and Build and Test (green); User Stories, Units Generation, NFR Design and Infrastructure Design are skipped (grey). The Operations phase is undecided and will be asked again after Build and Test.
|
||||
|
||||
## Phases to Execute
|
||||
|
||||
### 🔵 INCEPTION PHASE
|
||||
- [x] Workspace Detection (COMPLETED)
|
||||
- [x] Reverse Engineering (COMPLETED)
|
||||
- [x] Requirements Analysis (COMPLETED)
|
||||
- [x] User Stories (SKIPPED)
|
||||
- **Rationale**: One persona (site visitor), requirements already concrete per shell element with clear acceptance; stories would restate FR-01…FR-11
|
||||
- [x] Execution Plan (IN PROGRESS)
|
||||
- [ ] Application Design - EXECUTE (minimal depth)
|
||||
- **Rationale**: Several new components (Footer, BackToTop, SkipLink, NotFound, ErrorPage, placeholder page layout) and new shared pieces (`siteContent`, shared router-link primitive, theme additions such as a subtle-link style). Their boundaries, props and what gets centralised in the theme (NFR-02 reuse principle) should be decided once, before code
|
||||
- [ ] Units Generation - SKIP
|
||||
- **Rationale**: One package, one cohesive unit ("frontend-shell"); no parallel streams or deployment boundaries to split on
|
||||
|
||||
### 🟢 CONSTRUCTION PHASE
|
||||
- [ ] Functional Design - EXECUTE (minimal depth)
|
||||
- **Rationale**: Required by PBT-01 — identify testable properties of the shell's logic (to-top visibility threshold, footer/nav item derivation, current-year copyright, content shape). Also pins down the `SiteContent` data model and to-top / skip-link behaviour rules
|
||||
- [ ] NFR Requirements - EXECUTE (minimal depth)
|
||||
- **Rationale**: Tech stack decisions for the new test toolchain (Vitest, RTL, jsdom, fast-check — PBT-09), accessibility acceptance criteria, exact security header set and CSP (SECURITY-04), supply-chain checks (SECURITY-10)
|
||||
- [ ] NFR Design - SKIP
|
||||
- **Rationale**: The NFR patterns are small and concrete (one header config in `vite.config.js`, one Vitest setup, one generators file); they are specified directly in NFR Requirements and the code generation plan without a separate design document
|
||||
- [ ] Infrastructure Design - SKIP
|
||||
- **Rationale**: No infrastructure; hosting is out of scope (Operations undecided). Production header requirements are documented, not provisioned
|
||||
- [ ] Code Generation - EXECUTE (ALWAYS)
|
||||
- **Rationale**: Implementation planning and code generation needed
|
||||
- [ ] Build and Test - EXECUTE (ALWAYS)
|
||||
- **Rationale**: Build, test (incl. PBT with seed logging) and verification needed
|
||||
|
||||
### 🟡 OPERATIONS PHASE
|
||||
- [ ] Deployment Setup, Monitoring Setup, Production Readiness Validation - UNDECIDED
|
||||
- **Rationale**: Operations Configuration = Undecided (Q14 = C); asked again at Build and Test
|
||||
|
||||
## Package Change Sequence
|
||||
Single package (`web/`). Suggested order inside the unit (detailed in the code generation plan):
|
||||
1. Test toolchain + tech-debt clean-up (safe base, `pnpm build` green)
|
||||
2. Theme additions + shared primitives (`siteContent`, shared router link)
|
||||
3. Routes + `navItems` (placeholder pages, privacy page)
|
||||
4. Shell components (SkipLink + main, Footer, BackToTop, logo link)
|
||||
5. 404 + error pages, scroll restoration
|
||||
6. Security headers on dev/preview server
|
||||
7. Tests (example-based + property-based) per step, final full run
|
||||
|
||||
## Estimated Timeline
|
||||
- **Total Stages Remaining**: 5 (Application Design, Functional Design, NFR Requirements, Code Generation, Build and Test)
|
||||
- **Estimated Duration**: a few working sessions; each design stage is short (minimal depth), Code Generation is the bulk
|
||||
|
||||
## Success Criteria
|
||||
- **Primary Goal**: Every page renders inside a complete shell matching LAYOUT.md and the static design (minus the side area and mobile e-mail), with the agreed accessibility and contrast adjustments
|
||||
- **Key Deliverables**:
|
||||
- Footer, BackToTop, SkipLink + main landmark, logo link, full navigation
|
||||
- Placeholder routes `/portfolio`, `/soorten-fotoshoots`, `/contact`, `/privacyverklaring`
|
||||
- 404 and generic error pages inside the shell; scroll restoration
|
||||
- `siteContent` module used by Hero and Footer; reused/centralised styling per NFR-02
|
||||
- Vitest + RTL + fast-check setup with example-based and property-based tests
|
||||
- Security headers on dev/preview server + documented production header set
|
||||
- Tech-debt items from FR-11 resolved
|
||||
- **Quality Gates**:
|
||||
- `pnpm build` succeeds (type-check + bundle)
|
||||
- `pnpm test` passes, PBT seed logged on failure
|
||||
- `pnpm audit` reviewed, no unaddressed high/critical issues
|
||||
- Security Baseline and PBT compliance summaries have no blocking findings
|
||||
- Manual keyboard/screen check of the shell (skip link, focus styles, to-top, menus)
|
||||
- **Integration Testing**: Shell + routes together (navigation, 404, error boundary, scroll restoration)
|
||||
- **Operational Readiness**: Out of scope unless Operations is chosen at Build and Test
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
# Verduidelijkingsvragen — Front-end shell
|
||||
|
||||
Twee antwoorden zijn nog niet eenduidig genoeg om de requirements op vast te leggen.
|
||||
|
||||
---
|
||||
|
||||
## Ambiguïteit 1: Logo in de footer (Vraag 4)
|
||||
|
||||
Je antwoord: "Als je de achtergrond doorzichtig kan maken, dan kan hij erbij. Als dat niet lukt, dan kan dat deel uit de footer. Het lijkt mij sowieso onnodige vulling?"
|
||||
|
||||
Wat ik heb uitgezocht:
|
||||
- **Het lukt.** Het beeldmerk is zwart lijnwerk op wit. Ik heb de witte achtergrond omgezet naar transparantie en het lijnwerk in de ink-kleur van het thema gezet, met zachte randen. Proefversie op de footerachtergrond: `scratchpad/footer-mark-preview.png` (ik kan hem tonen).
|
||||
- **Het is hetzelfde beeldmerk als het logo in de header.** `web/src/assets/logo-dark.png` is al transparant en toont dezelfde cirkel met "AS" en "Andrea Slop Fotografie". Het verschil: de footerversie heeft dunnere lijnen en veel lege ruimte eromheen.
|
||||
- **Mijn mening over "onnodige vulling":** de eerste footerkolom bestaat in het design uit het beeldmerk met één zin eronder ("Lifestyle fotograaf uit Huizen…"). Zonder beeldmerk wordt die kolom een losse zin naast twee kolommen met een kopje, en dat oogt wat kaal. Een merkteken onderaan is gangbaar en sluit de pagina rustig af. Het is wel een herhaling van de header, dus weglaten is verdedigbaar. Mijn advies is A.
|
||||
|
||||
### Verduidelijkingsvraag 1
|
||||
Wat doen we met het beeldmerk in de footer?
|
||||
|
||||
A) Het bestaande `logo-dark.png` hergebruiken. Er komt geen extra bestand bij en het is al transparant.
|
||||
B) De omgezette footerversie gebruiken (dunnere lijnen, zoals op de live site), bijgesneden zonder lege rand, als `web/src/assets/footer-mark.png`
|
||||
C) Geen beeldmerk in de footer. De eerste kolom krijgt alleen de korte tekst.
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
---
|
||||
|
||||
## Ambiguïteit 2: Link naar de privacyverklaring (Vraag 5 en Vraag 1)
|
||||
|
||||
Je koos bij Vraag 5 voor het footermenu mét een link naar een privacyverklaring "die later komt". Bij Vraag 1 koos je voor placeholder-routes voor pagina's die nog niet af zijn. Het is nog niet duidelijk wat de privacylink nu moet doen.
|
||||
|
||||
### Verduidelijkingsvraag 2
|
||||
Wat doet de privacylink zolang de privacyverklaring er nog niet is?
|
||||
|
||||
A) Nu ook een placeholder-route `/privacyverklaring` aanmaken (net als bij Vraag 1). De link werkt meteen en de tekst komt later.
|
||||
B) De link pas tonen als de pagina bestaat. Tot die tijd is het footermenu zoals in het design (Portfolio, Soorten fotoshoots, Contact).
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
# Verificatievragen — Front-end shell
|
||||
|
||||
Al vastgelegd (geen vraag nodig):
|
||||
- Het **info-menu (side area)** en het **e-mailadres in het mobiele menu** blijven weg (jouw keuze).
|
||||
- Het **logo in de header** wordt een link naar de homepage, zoals in het design.
|
||||
- Het **jaartal** in de footer is altijd het huidige jaar.
|
||||
|
||||
Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe.
|
||||
|
||||
---
|
||||
|
||||
## Vraag 1: Menu-items voor pagina's die nog niet bestaan
|
||||
Het design heeft vijf menu-items (Home, Over mij, Portfolio, Soorten fotoshoots, Contact). Alleen voor Home en Over mij bestaat al een route. Wat doen we met de andere drie?
|
||||
|
||||
A) Nu lege placeholder-routes aanmaken (`/portfolio`, `/soorten-fotoshoots`, `/contact`) met eigen titel en beschrijving, en ze in het menu en de footer zetten. De shell is dan compleet en de pagina's worden later gevuld.
|
||||
B) Alleen menu-items tonen voor pagina's die af zijn. De andere komen erbij als die pagina's gebouwd worden.
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Vraag 2: Waar komt de footer-content vandaan?
|
||||
De footer bevat een korte tekst, sociale links, een e-mailadres en een footermenu. De sociale links staan nu ook al in `heroContent.ts`.
|
||||
|
||||
A) Eén gedeeld, API-vormig contentbestand voor sitebrede gegevens (bv. `siteContent.ts`: socials, e-mail, footertekst). Hero en footer lezen daaruit, en later komt het uit de CMS-API.
|
||||
B) Direct in de Footer-component zetten. De hero houdt zijn eigen socials.
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Vraag 3: Sociale links in de footer
|
||||
Hoe tonen we Facebook en Instagram in de footer?
|
||||
|
||||
A) Als tekstlinks ("Facebook", "Instagram"), precies zoals in het design
|
||||
B) Als iconen, net als in de hero
|
||||
C) Icoon met tekst ernaast
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Vraag 4: Logo in de footer
|
||||
Het design gebruikt een apart beeldmerk (`footer-mark.png`, op de live site `wp-content/uploads/2025/08/4.png`). Dat staat nog niet in `web/src/assets`.
|
||||
|
||||
A) Ik download het van de live site naar `web/src/assets/footer-mark.png`
|
||||
B) Het bestaande donkere logo (`logo-dark.png`) gebruiken
|
||||
C) Ik lever het bestand zelf aan
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: X, het huidige bestand heeft een witte achtergrond. Als je die wat kan aanpassen zodat de achtergrodnd doorichtig is dan kan hij in de footer erbij. Als dat niet lukt dan zou dat dele uit de footer kunnen. Het lijkt mij sowieso onnodige vulling?
|
||||
|
||||
## Vraag 5: Footermenu (onderste balk)
|
||||
In het design staan in de onderste balk naast "© jaar Andrea Slop Fotografie" de links Portfolio, Soorten fotoshoots en Contact.
|
||||
|
||||
A) Zoals in het design: Portfolio, Soorten fotoshoots, Contact
|
||||
B) Het volledige hoofdmenu (alle items uit `navItems`)
|
||||
C) Zoals in het design, plus een link naar een privacyverklaring (die pagina komt later)
|
||||
D) Geen footermenu, alleen de copyright-regel
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: C
|
||||
|
||||
## Vraag 6: Terug-naar-boven-knop
|
||||
Het design heeft een vierkante knop rechtsonder (↑). Die verschijnt na 60% van een schermhoogte scrollen en scrollt soepel terug, of direct als iemand minder beweging wil (reduced motion).
|
||||
|
||||
A) Bouwen zoals in het design
|
||||
B) Bouwen, maar met een icoon (bijv. Ant Design `up-outlined`) in plaats van de ↑-pijl
|
||||
C) Niet bouwen
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: B
|
||||
|
||||
## Vraag 7: Toegankelijkheid van de shell
|
||||
A) Skip-link "Direct naar de inhoud", een `<main id="main">`-landmark, zichtbare focusstijlen op alle shell-links en -knoppen, en de shell volledig met het toetsenbord te bedienen (WCAG 2.1 AA als richtlijn)
|
||||
B) Alleen skip-link en `<main>`-landmark, zoals in het design
|
||||
C) Niets extra's
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Vraag 8: Scrollpositie bij navigeren
|
||||
Wat gebeurt er met de scrollpositie als je van pagina wisselt?
|
||||
|
||||
A) Nieuwe pagina begint bovenaan. Met de terug-/vooruitknop van de browser kom je terug op de plek waar je was (scroll restoration).
|
||||
B) Altijd bovenaan beginnen, ook bij terug/vooruit (het huidige standaardgedrag)
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Vraag 9: Pagina niet gevonden (404)
|
||||
Een onbekende URL toont nu de standaardmelding van TanStack Router.
|
||||
|
||||
A) Een eenvoudige 404-pagina binnen de shell (header en footer blijven staan), met een knop terug naar home
|
||||
B) Nu niet, later apart oppakken
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Vraag 10: Technische schuld rond de shell opruimen
|
||||
Uit de analyse kwamen een paar punten naar voren:
|
||||
- `body { height: 250vh }` in `theme.ts` (tijdelijke scroll-test)
|
||||
- Tailwind-classes die niets doen in `Footer.tsx` en `over-mij.tsx`
|
||||
- `let` in plaats van `const` in `NavigationBar.tsx`
|
||||
- Ongebruikte Vite-startbestanden (`hero.png`, `typescript.svg`, `vite.svg`)
|
||||
|
||||
A) Alles meenemen in deze feature
|
||||
B) Alleen wat de shell direct raakt (de 250vh-hack en de Footer-classes)
|
||||
C) Niets, dat doe ik apart
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Vraag 11: Testen
|
||||
Het project heeft nog geen testframework.
|
||||
|
||||
A) Vitest + React Testing Library toevoegen en de shell-componenten unit-testen (footer-inhoud, to-top-zichtbaarheid, skip-link, 404)
|
||||
B) Geen testframework. Verificatie via `pnpm build` (type-check) en een handmatige checklist in de browser.
|
||||
C) Playwright toevoegen voor end-to-end tests van de shell
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Vraag 12: Beveiligingsextensies
|
||||
Moeten de beveiligingsregels als harde vereisten worden afgedwongen voor dit project?
|
||||
|
||||
A) Ja — dwing alle BEVEILIGINGSREGELS af als blokkerende vereisten (aanbevolen voor productietoepassingen)
|
||||
B) Nee — sla alle BEVEILIGINGSREGELS over (geschikt voor PoC's, prototypes en experimentele projecten)
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Vraag 13: Property-Based Testing Extensie
|
||||
Moeten de property-based testing (PBT) regels worden afgedwongen voor dit project?
|
||||
|
||||
A) Ja — dwing alle PBT-regels af als blokkerende vereisten (aanbevolen voor projecten met bedrijfslogica, datatransformaties, serialisatie of stateful componenten)
|
||||
B) Gedeeltelijk — dwing PBT-regels alleen af voor pure functies en serialisatie round-trips (geschikt voor projecten met beperkte algoritmische complexiteit)
|
||||
C) Nee — sla alle PBT-regels over (geschikt voor eenvoudige CRUD-applicaties, UI-only projecten of dunne integratielagen zonder significante bedrijfslogica)
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Vraag 14: Operations-fase
|
||||
Moet deze feature na de Construction-fase door de Operations-fase (deployment en monitoring inrichten)?
|
||||
|
||||
A) Ja — de Operations-fase doorlopen na Construction (deployment + monitoring)
|
||||
B) Nee — stoppen na Build and Test (deployment/monitoring vallen buiten deze feature)
|
||||
C) Weet ik nog niet — vraag het opnieuw na de Construction-fase
|
||||
X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: C
|
||||
@@ -0,0 +1,228 @@
|
||||
# Requirements — Front-end Application Shell
|
||||
|
||||
## Intent Analysis
|
||||
- **User Request**: "ik wil met aidlc de shell voor de front-end afmaken" (finish the front-end shell with AI-DLC)
|
||||
- **Request Type**: Enhancement (completing an existing, partially built feature) with some new capability (routes, footer, to-top, 404, error page)
|
||||
- **Scope Estimate**: Multiple components within one package (`web/`): shell components, routes, theme, content module, test setup
|
||||
- **Complexity Estimate**: Moderate — mostly UI work against an existing design, plus a new test toolchain and security/PBT constraints
|
||||
- **Requirements Depth**: Standard
|
||||
|
||||
## Source of Truth
|
||||
- Shell structure: [LAYOUT.md](../../../../../LAYOUT.md) — Header / Page content / Footer
|
||||
- Visual and markup reference: `design/andreaslop-static/` (header, footer, to-top, skip link in `index.html`; styles in `assets/css/style.css`)
|
||||
- Decisions: [requirement-verification-questions.md](requirement-verification-questions.md), [requirement-clarification-questions.md](requirement-clarification-questions.md)
|
||||
|
||||
## Out of Scope
|
||||
- **Side area / "Info menu"** panel from the design (owner decision)
|
||||
- **E-mail address in the mobile menu** (owner decision)
|
||||
- Real content for Portfolio, Soorten fotoshoots, Contact, Privacyverklaring and Over mij (placeholders only)
|
||||
- Contact form, Instagram feed, CMS/.NET API
|
||||
- Hosting/deployment (Operations phase undecided)
|
||||
|
||||
---
|
||||
|
||||
## Functional Requirements
|
||||
|
||||
### FR-01 Placeholder routes
|
||||
- Create routes `/portfolio`, `/soorten-fotoshoots`, `/contact` and `/privacyverklaring`.
|
||||
- Each has its own `head` via `pageHead()` with a title (≤ ~60 chars) and description (≤ ~155 chars), in the existing style (`"<Page> | Andrea Slop Fotografie"`).
|
||||
- Each renders a simple placeholder (page heading plus a short line) that sits below the fixed header, so no content is hidden behind it.
|
||||
- *Source: Q1 = A, Clarification 2 = A*
|
||||
|
||||
### FR-02 Main navigation items
|
||||
- `navItems` contains, in this order: Home, Over mij, Portfolio, Soorten fotoshoots, Contact.
|
||||
- Used by both the desktop navigation and the mobile menu (existing behaviour retained).
|
||||
- Privacyverklaring is **not** in the main navigation.
|
||||
- *Source: Q1 = A, design*
|
||||
|
||||
### FR-03 Header logo links home
|
||||
- The header logo is a link to `/` with accessible name "Andrea Slop Fotografie, naar de homepage" (as in the design).
|
||||
- The existing dark/light logo swap and shrink behaviour are unchanged.
|
||||
- *Source: design*
|
||||
|
||||
### FR-04 Shared site content module
|
||||
- Introduce one API-shaped, typed content module for site-wide data (working name `siteContent`). It holds:
|
||||
- the footer intro text
|
||||
- social links (`platform` + `href`, reusing `SocialPlatform`)
|
||||
- the contact e-mail address
|
||||
- the footer menu items
|
||||
- The Hero's social links come from this module instead of `heroContent.ts`, so both Hero and Footer read one source.
|
||||
- Plain data (strings and arrays), so it can later be replaced 1-on-1 by a CMS API response.
|
||||
- *Source: Q2 = A*
|
||||
|
||||
### FR-05 Footer
|
||||
The top section has three columns:
|
||||
1. **Brand**: the monogram, reusing `web/src/assets/logo-dark.png` (~150px wide), with the intro text "Lifestyle fotograaf uit Huizen. Ik leg jouw mooiste momenten vast met mijn camera." below it.
|
||||
2. **Socials**: an eyebrow heading "Socials", then **text links** "Facebook" and "Instagram". They open in a new tab with `rel="noopener noreferrer"`.
|
||||
3. **Contact**: an eyebrow heading "Contact", then a `mailto:` link to the e-mail address.
|
||||
|
||||
The bottom bar holds:
|
||||
- "© {current year} Andrea Slop Fotografie"
|
||||
- a footer navigation (`aria-label="Footermenu"`) with Portfolio, Soorten fotoshoots, Contact and Privacyverklaring
|
||||
|
||||
Layout and styling:
|
||||
- **Responsive**: three columns on desktop, two on tablet and one on mobile, as in the design breakpoints.
|
||||
- On mobile the bottom bar stacks and is centred.
|
||||
- **Styling** uses the theme tokens: `paper.alt` background, a `line` top border, link hover in the accent colour, with the contrast exceptions in NFR-01.
|
||||
- The year is always the current year.
|
||||
- *Source: Q3 = A, Q5 = C, Clarification 1 = A, Clarification 2 = A, design*
|
||||
|
||||
### FR-06 Back-to-top button
|
||||
- A fixed square button at the bottom right, styled like the design (`.to-top`), with an Ant Design `up-outlined` icon instead of the ↑ character.
|
||||
- It becomes visible when the page is scrolled more than 60% of the viewport height, and is hidden again otherwise.
|
||||
- **Click**: scrolls to the top, smoothly, or instantly when `prefers-reduced-motion: reduce` is set.
|
||||
- **Accessibility**:
|
||||
- accessible name "Terug naar boven"
|
||||
- while hidden it is not focusable, not announced and not clickable
|
||||
- It sits below the header and mobile menu in stacking order.
|
||||
- *Source: Q6 = B*
|
||||
|
||||
### FR-07 Skip link and main landmark
|
||||
- The first focusable element on every page is a skip link "Direct naar de inhoud", visually hidden until it receives focus.
|
||||
- It targets `<main id="main">`, which wraps the routed page content (`Outlet`). `main` can receive focus programmatically, so keyboard and screen-reader users land in the content.
|
||||
- *Source: Q7 = A*
|
||||
|
||||
### FR-08 Scroll position on navigation
|
||||
- Navigating to a new page starts at the top.
|
||||
- Browser back/forward restores the previous scroll position (router scroll restoration).
|
||||
- *Source: Q8 = A*
|
||||
|
||||
### FR-09 Not-found (404) page
|
||||
- An unknown URL renders a "Pagina niet gevonden" page **inside the shell**: header and footer stay.
|
||||
- The page shows a heading, a short explanation and a `LinkButton` back to home.
|
||||
- Head: title "Pagina niet gevonden | Andrea Slop Fotografie" plus `robots: noindex`.
|
||||
- *Source: Q9 = A*
|
||||
|
||||
### FR-10 Generic error page
|
||||
- Unexpected render or route errors show a generic error page inside the shell: a short Dutch message and a link home.
|
||||
- It shows no error message, stack trace or internal details to the visitor.
|
||||
- *Source: SECURITY-09, SECURITY-15*
|
||||
|
||||
### FR-11 Technical debt clean-up
|
||||
- Remove `globalCss.body.height: '250vh'` from `theme.ts`.
|
||||
- Remove the non-functional Tailwind-style `className`s (`Footer.tsx` is replaced; `over-mij.tsx` gets a placeholder in the same style as FR-01).
|
||||
- Make `over-mij.tsx` follow the project Prettier style.
|
||||
- `let [open, setOpen]` → `const` in `NavigationBar.tsx`.
|
||||
- Delete unused starter assets `assets/hero.png`, `assets/typescript.svg`, `assets/vite.svg`, after verifying they are unreferenced.
|
||||
- Move `@vitejs/plugin-react` from `dependencies` to `devDependencies`. It is a build tool (SECURITY-10 hygiene).
|
||||
- *Source: Q10 = A*
|
||||
|
||||
---
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
### NFR-01 Accessibility (WCAG 2.1 AA as guideline for the shell)
|
||||
- All shell links and buttons are keyboard operable and have a visible focus style.
|
||||
- Landmarks:
|
||||
- `header` contains `nav aria-label="Hoofdmenu"`
|
||||
- `main#main`
|
||||
- `footer` contains `nav aria-label="Footermenu"`
|
||||
- Placeholder, 404 and error pages each have exactly one `h1`.
|
||||
- **Text contrast ≥ 4.5:1** for small text. The design's colours do not all meet this. Measured on `paper.alt`:
|
||||
|
||||
| Token | Contrast on `paper.alt` | AA for small text |
|
||||
|---|---|---|
|
||||
| `ink.muted` (#8a827a) | 3.19:1 | fails |
|
||||
| `accent` (#7f8b76) | 3.03:1 | fails |
|
||||
| `ink.soft` | 6.72:1 | passes |
|
||||
| `accent.deep` | 4.80:1 | passes |
|
||||
|
||||
The shell therefore uses `ink.soft` instead of `ink.muted` for the footer headings and the bottom bar, and `accent.deep` instead of `accent` for link hover on light backgrounds. **This is a deliberate deviation from the design.**
|
||||
- `prefers-reduced-motion` is respected by every new animation or transition (to-top reveal, smooth scrolling).
|
||||
- *Source: Q7 = A*
|
||||
|
||||
### NFR-02 Styling: reuse first, use Chakra where it helps
|
||||
Principle: **reuse as much as possible and make good use of Chakra UI v3, where it is a natural fit — do not force it.** *Source: user feedback at Requirements review*
|
||||
|
||||
- **Reuse before adding.** Prefer what already exists over new styling:
|
||||
- **Theme tokens**: colours, spacing (`gutter`), `header` sizes, durations, easings
|
||||
- **Text styles**: `eyebrow` for the footer column headings and footer labels
|
||||
- **Recipes**: `linkButton` for the 404 and error page buttons
|
||||
- **Components**: `LinkButton`, `NavLink` and `navItems`
|
||||
- **Use Chakra's built-in components and layout primitives** where they fit, for example:
|
||||
- `Container`, `SimpleGrid`/`Grid`, `Stack`/`HStack`, `Heading`, `Text`, `Link`, `Image`, `VisuallyHidden`
|
||||
- responsive style props instead of custom media queries
|
||||
- `_hover`, `_focusVisible` and `_currentPage` pseudo props
|
||||
- **Centralise repeated styling.** When the same styling appears in two or more places, lift it into the theme rather than copy it:
|
||||
- Examples: the subtle-link style shared by footer links, or the "hover to full opacity" icon pattern already in `HeroArrows` and `HeroSocials`.
|
||||
- Lift it into a token, text style or recipe, or into a small shared component (e.g. one shared `chakra(Link)` instead of one per file).
|
||||
- Existing code is refactored to use it only where that is a small, safe change.
|
||||
- **Do not force it.** Use the `chakra.*` factory or plain style props when no built-in component fits. Do not add a recipe or token for a one-off style. Do not bend a Chakra component into something it is not meant for.
|
||||
- **No other styling approaches**: no hard-coded colours, no CSS files, no Tailwind.
|
||||
|
||||
### NFR-02a Consistency with the existing codebase
|
||||
- **Files and naming**:
|
||||
- Components follow the existing folder pattern, e.g. `components/Footer/`.
|
||||
- Code comments are in Dutch, matching the existing code.
|
||||
- Prettier style: 4 spaces, single quotes.
|
||||
- Icons use `@iconify/react/offline` with bundled `@iconify-icons/ant-design` data, so there are no runtime icon requests.
|
||||
|
||||
### NFR-03 Testing
|
||||
- Add **Vitest**, **React Testing Library** (with `jsdom` and `@testing-library/user-event`) and **fast-check** as dev dependencies. Add a `test` script to `package.json`.
|
||||
- **Example-based unit tests** cover:
|
||||
- footer content, links and current year
|
||||
- to-top visibility, click behaviour and reduced motion
|
||||
- skip link target
|
||||
- 404 and error pages rendering inside the shell
|
||||
- nav items order
|
||||
- external link attributes
|
||||
- **Property-based tests** (fast-check) cover the pure logic identified in Functional Design, e.g. the to-top visibility threshold and the derivation of footer and nav items. They log the seed on failure and keep shrinking enabled.
|
||||
- **`pnpm build`** (type-check and bundle) still succeeds.
|
||||
- *Source: Q11 = A, Q13 = A (PBT-01…PBT-10)*
|
||||
|
||||
### NFR-04 Security (Security Baseline extension enabled)
|
||||
- **External links**: every external link uses `target="_blank"` with `rel="noopener noreferrer"`.
|
||||
- **No visitor-facing internals**: 404 and error pages show no internal details (SECURITY-09, SECURITY-15).
|
||||
- **No remote scripts or fonts**: no scripts, fonts or styles from external CDNs. Fonts and icons stay self-hosted or bundled (SECURITY-13).
|
||||
- **Dependencies (SECURITY-10)**:
|
||||
- New dependencies are added via pnpm, so they are pinned by the committed `pnpm-lock.yaml`.
|
||||
- No unused dependencies remain.
|
||||
- `pnpm audit` is documented as the vulnerability scan in the build-and-test instructions.
|
||||
- **HTTP security headers (SECURITY-04)**:
|
||||
- A header set is defined and applied to the Vite dev and preview servers: `Content-Security-Policy`, `Strict-Transport-Security`, `X-Content-Type-Options: nosniff`, `X-Frame-Options: DENY` and `Referrer-Policy: strict-origin-when-cross-origin`.
|
||||
- The same set is documented as the required configuration for the future production host.
|
||||
- The CSP needs `style-src 'unsafe-inline'`, because Chakra/Emotion inject runtime `<style>` tags. This exception is documented with that justification.
|
||||
- **No secrets**: no secrets or credentials in front-end code. The site has no authentication.
|
||||
|
||||
### NFR-05 Performance
|
||||
- The shell adds no network requests beyond its bundled assets. The footer logo reuses the already-bundled `logo-dark.png`.
|
||||
- Scroll listeners are passive. The to-top button and the header share the existing scroll-hook approach; no layout thrashing.
|
||||
|
||||
---
|
||||
|
||||
## Security Baseline — Applicability at Requirements Level
|
||||
| Rule | Status | Rationale |
|
||||
|---|---|---|
|
||||
| SECURITY-01 Encryption at rest/in transit | N/A | No data stores |
|
||||
| SECURITY-02 Access logging on intermediaries | N/A | No load balancer/CDN/API gateway defined (hosting not in scope) |
|
||||
| SECURITY-03 Application-level logging | N/A | No server-side component; static SPA. Client error reporting to be revisited when the API/hosting exists |
|
||||
| SECURITY-04 HTTP security headers | Compliant (planned) | NFR-04 header set for dev/preview + documented for production |
|
||||
| SECURITY-05 Input validation | N/A | No API endpoints or user input in the shell |
|
||||
| SECURITY-06 Least privilege | N/A | No IAM |
|
||||
| SECURITY-07 Network configuration | N/A | No network infrastructure |
|
||||
| SECURITY-08 Application access control | N/A | Public site, no authentication or protected resources |
|
||||
| SECURITY-09 Hardening | Compliant (planned) | FR-10 generic error page; FR-11 removes starter assets |
|
||||
| SECURITY-10 Supply chain | Compliant (planned) | Lock file, `pnpm audit`, no unused deps (NFR-04, FR-11) |
|
||||
| SECURITY-11 Secure design | N/A | No security-critical logic or public endpoints in the shell |
|
||||
| SECURITY-12 Authentication | N/A | No authentication |
|
||||
| SECURITY-13 Integrity | Compliant (planned) | No CDN-loaded resources |
|
||||
| SECURITY-14 Alerting and monitoring | N/A | No server-side component; Operations phase undecided |
|
||||
| SECURITY-15 Exception handling | Compliant (planned) | FR-10 root error boundary as global handler; generic user-facing message |
|
||||
|
||||
## Summary of Key Decisions
|
||||
| # | Decision |
|
||||
|---|---|
|
||||
| Q1 | Placeholder routes for Portfolio, Soorten fotoshoots, Contact; full menu now |
|
||||
| Q2 | Shared API-shaped `siteContent` module (Hero + Footer) |
|
||||
| Q3 | Footer socials as text links |
|
||||
| Q4 / C1 | Footer monogram reuses `logo-dark.png` |
|
||||
| Q5 / C2 | Footer menu = design links + Privacyverklaring (placeholder route) |
|
||||
| Q6 | To-top with Ant Design `up-outlined` icon |
|
||||
| Q7 | WCAG 2.1 AA guideline for the shell (incl. contrast deviation from design) |
|
||||
| Q8 | Scroll restoration on back/forward |
|
||||
| Q9 | 404 page inside the shell |
|
||||
| Q10 | All listed tech debt cleaned up |
|
||||
| Q11 | Vitest + React Testing Library |
|
||||
| Q12 | Security Baseline enforced |
|
||||
| Q13 | Property-Based Testing enforced (full) |
|
||||
| Q14 | Operations phase undecided — ask again after Build and Test |
|
||||
Reference in New Issue
Block a user