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>
3.0 KiB
3.0 KiB
Component Dependencies — homepage-sections
Dependency matrix
Rows depend on columns (✓).
| Component | HomeSection | SectionHeading | Reveal | FramedImage | LinkButton | ContactForm(+Gate) | lib/ helpers | content types | Chakra built-ins |
|---|---|---|---|---|---|---|---|---|---|
| IntroGallery | ✓ | ✓ | ✓ | ✓ | Grid, Image | ||||
| AboutBlock | ✓ | ✓ | ✓ | ✓ | ✓ | Grid, Text, Link | |||
| Pricing / PriceCard | ✓ | ✓ | ✓ | ✓ | formatPrice | ✓ | SimpleGrid, List | ||
| Testimonials | ✓ | ✓ | ✓ | ✓ | slideLabel | ✓ | Carousel, Blockquote | ||
| ContactSection | ✓ | ✓ | ✓ | ✓ | shootOptions | ✓ | — | ||
| ContactForm | linkButton recipe | validateContact, toContactPayload, isLikelySpam | ✓ | Field, Input, Textarea, NativeSelect | |||||
| ContactFormGate | ✓ (mail button) | emailAddress (exists) | ✓ | — | |||||
| InstagramGrid | ✓ | ✓ | ✓ | ✓ | Grid, Link, VisuallyHidden | ||||
| routes/index.tsx | packageFromSearch, visibleSocials (exists) | content modules | — |
No section depends on another section; the only cross-section link (Prijzen → Contact) goes through the URL.
Data flow
graph LR
Content["content/ homeContent, packages, testimonials, siteContent"] --> Route["routes/index.tsx"]
URL["URL search pakket"] --> Route
Route -->|"props"| Sections["Six home sections"]
Route -->|"preselected id"| Contact["ContactSection / ContactForm"]
Sections -->|"Link with pakket + #contact"| URL
Contact -->|"ContactPayload"| Adapter["submitContactForm"]
Adapter -.->|"later"| API["POST /api/contact"]
classDef data fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
classDef comp fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
classDef ext fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,stroke-dasharray:5 5,color:#000;
class Content,URL data;
class Route,Sections,Contact,Adapter comp;
class API ext;
Text alternative: static content and the URL's pakket parameter flow into the home route, which passes props to the sections and the preselected package to the contact form; price cards write the package back into the URL; the form sends its payload through the single adapter, which will call the API later.
Communication patterns
- Props down from the route; no context or global store.
- URL as the shared channel between Prijzen and Contact.
- Callback-free sections: sections emit nothing upward.
- Injectable submit on ContactForm for tests; default is the real adapter.
Coupling notes
ContactFormdepends onShootOption[], not onPricingPackage, so the/contactpage can reuse it with the same options.InstagramGridreceivesprofileUrlfrom the route (derived fromsiteContent.socialsviavisibleSocials), so the Instagram URL has one source.FramedImageis the only new shared visual primitive; anything else reuses theme tokens, text styles and recipes.