Files
SluijsensandClaude Opus 5.5 c81dcd3979 Adds the inception docs and design for the homepage sections
Refreshes the shared reverse engineering docs, adds the requirements,
application design and units for the homepage-sections feature, and
updates the static design: live prices and form fields, the new
Lieve woorden block and the coming-soon gate over the contact form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 23:46:30 +02:00

6.5 KiB

Application Design Plan — homepage-sections

Depth: standard. One front-end package; the design pins down component boundaries, props, content modules, the Prijzen → Contact interaction and what is reused from Chakra and the theme (NFR-HP-02). Detailed behaviour rules (validation, carousel, anti-spam) follow in Functional Design per unit.

Plan

  • 1. Answer the design questions below
  • 2. Analyze answers for ambiguities (follow-up questions if needed)
  • 3. Static design reference (FR-HP-01)
    • 3a. Download the live photos (gallery, Andrea, reviews) into design/andreaslop-static/assets/img and add them to manifest.txt
    • 3b. index.html: live content for Lifestyle fotografie (photos), Prijzen (packages), Contact (form fields); new Lieve woorden section between Prijzen and Contact
    • 3c. style.css: styles for Lieve woorden (and the select field); main.js: prev/next/dots for the reviews
    • 3d. LAYOUT.md: Home diagram with seven blocks, per .ai/layout-conventions.md
  • 4. Generate components.md — component definitions and responsibilities
  • 5. Generate component-methods.md — props/signatures of components, hooks and helpers
  • 6. Generate services.md — content provisioning, Prijzen → Contact handover, contact submission adapter
  • 7. Generate component-dependency.md — dependency matrix, data flow
  • 8. Generate application-design.md — consolidated design
  • 9. Validate completeness and consistency (FR-HP-01…12, NFR-HP-01…06, Security/PBT applicability)

Already decided (no question needed)

These follow from the requirements and the reuse principle (NFR-HP-02):

  • Shared section heading: one SectionHeading component (optional eyebrow, the h2, optional lead; centred or left), used by all six sections — the design's .section__head.
  • Section wrapper: one HomeSection component for the padding (--section-y), the optional paper.alt background and the accessible name (aria-labelledby on its heading).
  • Scroll reveal: a Reveal wrapper component on top of a useReveal hook (IntersectionObserver), no-op under reduced motion.
  • Form fields: Chakra's Field (label, error text, aria-invalid/aria-describedby wiring), Input, Textarea and NativeSelect, styled to the design's square fields via a recipe or theme slot overrides.
  • Buttons: the existing LinkButton (linkButton recipe) for "Boek je shoot"; a button variant of the same recipe for the submit button.
  • Form state: plain React state plus pure helpers in lib/ — no form library (no new dependencies).
  • Contact payload: { naam, email, shoot, bericht }; submitContactForm(payload): Promise<void> in its own module, the single place the API call goes later.
  • Images: imported from web/src/assets (Vite hashes them), with explicit width/height and loading="lazy".

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 componenten

  • A) Plat, net als nu: elk component een eigen map onder components/, met Engelse namen uit de README van het ontwerp: IntroGallery/, AboutBlock/, Pricing/, Testimonials/, ContactSection/ + ContactForm/, InstagramGrid/, en de gedeelde HomeSection/, SectionHeading/, Reveal/.
  • B) Gegroepeerd: de zes blokken onder components/home/ (bijv. components/home/Pricing/), en wat elders terugkomt (ContactForm, SectionHeading, HomeSection, Reveal) gewoon onder components/. Zo zie je in één oogopslag wat bij de homepage hoort, en blijft wat herbruikbaar is apart. (aanbevolen)
  • X) Anders (beschrijf hieronder na de Answer:-tag)

Vraag 2: Contentmodules

Hoe verdelen we de nieuwe vaste data over content/?

  • A) Per onderwerp: packages.ts (pakketten; straks ook nodig op Soorten fotoshoots), testimonials.ts (reviews; kunnen later ook op andere pagina's) en homeContent.ts (teksten van de blokken, galerij, Over mij-foto, Instagram). Dat sluit aan op de API-endpoints uit het ontwerp (/api/packages, /api/pages). (aanbevolen)
  • B) Alles in één homeContent.ts
  • C) Eén bestand per blok (zes bestanden)
  • X) Anders (beschrijf hieronder na de Answer:-tag)

Vraag 3: De slider van Lieve woorden

  • A) Chakra's ingebouwde Carousel (op Ark UI). Toegankelijkheid zit erin: rol en labels per slide, puntjes, toetsenbord en swipe. Wij voegen alleen de stijl en een melding voor schermlezers toe. Minder eigen code om te onderhouden. (aanbevolen)
  • B) Zelf bouwen met een kleine eigen hook, naar het voorbeeld van useHeroSlider (zonder autoplay)
  • C) Een gedeelde useCarousel-hook uit useHeroSlider halen, die zowel de hero als de reviews gebruikt. Dat refactort de hero, die net is opgeleverd.
  • X) Anders (beschrijf hieronder na de Answer:-tag)

Vraag 4: Hoe geeft "Boek je shoot" het pakket door aan het formulier?

  • A) Via de URL: de knop linkt naar /?pakket=newborn#contact. De route controleert de waarde (alleen bestaande pakketten), het formulier leest hem en de browser scrollt naar #contact. Werkt ook na een refresh, en de link is te delen ("boek een newbornshoot"). (aanbevolen)
  • B) Via gedeelde React-state op de homepage (de route geeft een callback aan Prijzen en een waarde aan Contact). Geen zichtbare URL-wijziging; gaat verloren bij een refresh.
  • X) Anders (beschrijf hieronder na de Answer:-tag)

Vraag 5: Waar staat de instelling contactFormEnabled?

  • A) In de content (siteContent.contactForm.enabled), naast het e-mailadres. Hoort bij de vorm die de API straks levert, zodat het formulier dan ook vanuit het CMS aan of uit kan. (aanbevolen)
  • B) Als constante in de code (bijv. src/features.ts), los van de content
  • C) Per omgeving via de hostname, net als monitoring: dan kan het formulier eerst alleen op test aan
  • X) Anders (beschrijf hieronder na de Answer:-tag)

Vraag 6: Foto in Lieve woorden

Hoe ziet de foto bij een review eruit? (De tekst krijgt in alle gevallen het grote aanhalingsteken in heidegroen.)

  • A) Zoals bij Over mij: een rechthoekige foto met de verschoven zandkleurige rand erachter (.about__media). Consistent met de rest van de site. (aanbevolen)
  • B) Een boogvorm (afgeronde bovenkant), een veelgebruikte, zachte stijl bij fotografen. Nieuw element in het ontwerp.
  • C) Een kleine ronde foto boven de tekst, de tekst zelf centraal
  • X) Anders (beschrijf hieronder na de Answer:-tag)