Requirements, application design (incl. concept-API-contract voor het contactformulier), units en functional design voor U1. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
4.9 KiB
4.9 KiB
Units of Work
Code organization: brownfield monolith SPA (Vite/React/TS) in the workspace root src/; no new deployable services. Target layout is described in components.md. Application code never goes in aidlc-docs/.
Frontend units (this repo)
U1 — theme-foundation
- Purpose: replace red/purple with variant (B|E) × mode (light|dark).
- Responsibilities:
ThemeProvider(mode from system preference + persisted choice; variant app-state only, always starts in B), tokens as CSS variable sets per[data-variant][data-mode],ModeToggle, icon-onlyVariantToggle,VariantRenderer(B eager, E lazy placeholder), removal of old themes and storage key migration, self-hosted fonts for B,usePrefersReducedMotion/usePrefersDark, tests. - Design stages: Functional Design (theme state rules). NFR: covered by requirements.
- Requirements: FR-3, FR-4, FR-5, FR-6 (shell), NFR-1 (focus/aria for toggles), NFR-3 (fonts), NFR-7.
U2 — b-modern-sections
- Purpose: design B default site (light and dark), without packages and form internals.
- Responsibilities: NavB, HeroB, AboutB (photo, existing WebP variants), ProcessB ("Van idee naar live in drie stappen" progress bar), FooterB, contact block frame (red block, white/dark panel container), section anchors without years in the menu, B accent
#7A1414, responsive 360px-1440px+, tests. - Design stages: none (design exists in the canvas).
- Requirements: FR-1, NFR-1, NFR-2.
U3 — packages-block
- Purpose: generic packages block for B.
- Responsibilities:
PackageCardData.category,usePackageFilter(chips from 4+ packages, counts, order of first appearance),useSwipeRow(mobile scroll-snap row, ~85% card width, dots, featured first), skeleton for any count, banner "Past er niets bij?", "Kies …" button feedingContactPreselectContext, mock data for 6 packages in tests, tests. - Design stages: Functional Design (filter and swipe behaviour).
- Requirements: FR-7, FR-8, FR-9, FR-10, FR-11, FR-12 (B part), NFR-1, NFR-2.
- External dependency: X-a (
categoryin the API) for real data; works without (no category → no chips).
U4 — contact-form
- Purpose: working contact form in B and the movable headless package.
- Responsibilities:
src/cms-client/(http,contact: reducer, validation,useContactForm,createContactClient, default messages), import-boundary lint rule,ContactFormView(B skin), privacy sentence, honeypot/idempotency/token handling, mailto fallback with feature flagVITE_CONTACT_FORM_ENABLED, CSP/connect-src notes, Sentry/Umami scrubbing, PBT for pure functions (partial), tests incl. contract tests against a mock server. - Design stages: Functional Design, NFR Requirements, NFR Design, Infrastructure Design (nginx route, CSP, env). Security Baseline enforced.
- Requirements: FR-13..FR-19, NFR-4, NFR-5, NFR-6.
- External dependencies: contract v0.3.x; X-b/X-c (rate limit, contact endpoint) for end-to-end; X-d (mail) and X-e (admin) are not needed for the frontend.
U5 — e-timetravel
- Purpose: variant E in full, lazy-loaded.
- Responsibilities:
LandingEwith eras 2026/2013/2006/1998/1989, year badges, Win98 Werkwijze step cards, packages 2006 style (glossy tabs/cards, star badge, "Maatwerk!" banner), terminal form skin (ContactFormTerminal) oncms-client, light/dark tokens, EffectsLayer (marquee, scanlines, dither, caret) fully disabled under reduced motion, E fonts only in the E chunk, tests (render per era, reduced motion, variant switch round-trip). - Design stages: NFR Requirements and NFR Design (performance with effects, accessibility). No Functional Design (design exists).
- Requirements: FR-2, FR-12 (E part), FR-19 (E part), NFR-1, NFR-2, NFR-3.
External units (CMS builder, SlpModularCms — feature contact-forms-module)
| Id | Content | Base |
|---|---|---|
| X-0 | RESTful refactor of the existing Offerings routes (no /admin segment) incl. admin-frontend call sites and tests (CMS-U0) |
master |
| X-a | category on Offerings as CMS-managed data (OfferingCategory CRUD, FK on Offering) + categories sub-section and dropdown in the Offerings admin (CMS-U1, CMS-U1b) |
master |
| X-b | OnRejected with Retry-After + ProblemDetails; [PublicSiteEndpoint] marker for the availability gate |
master |
| X-c | Contact module: token, submit, idempotency, spam, retention fields (mail behind own interface) | master |
| X-d | Mail with retry job (new MailKind) |
after merge of feature/identity-email-notifications + rebase |
| X-e | Admin API (list/detail/status/delete/resend) | master |
| X-f | Admin UI "Berichten" | after merge + rebase |
| X-g | RESTful Availability status route (PUT instead of POST admin/status), callers checked |
after merge + rebase |
Frontend integration with the real API happens in Build and Test once X-b/X-c exist on a test host.