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>
1.8 KiB
1.8 KiB
Services
Frontend services
ThemeService (inside ThemeProvider)
- Reads/writes mode in localStorage key
slp-software-mode(guarded try/catch); never writes the variant. Appliesdata-variant/data-mode. Migration: ignore the oldslp-software-themekey.
OfferingsService (usePackagesQuery)
GET /api/v1/offeringsvia TanStack Query; later replaced bycms-client/offerings.
ContactService (cms-client/contact)
Orchestration of one submission:
- On first focus (or mount),
getToken()fetches the server-signed timestamp token and captcha info. useContactFormvalidates on blur / submit; honeypot filled → no request, show success (silent drop).- Submit sends
POST /api/v1/contact-messageswithIdempotency-Key. 202→sent;400token expired → refetch token and retry once;400field errors → map to fields;429→failedwith retry-after message; other →failed(input kept).- No PII in logs, Sentry breadcrumbs or analytics events (Sentry
beforeBreadcrumb/beforeSendscrub for the form route).
Observability
- Existing Sentry and Umami remain. Umami event for form outcome without field data (
contact-sent,contact-failed).
Backend services (SlpModularCms, by SLS Software - CMS)
- ContactMessageService: validate → store (status
new) → send mail best-effort viaIEmailSender→ updatemailStatus. - ContactTokenService: issues and verifies HMAC-signed timestamp tokens (site-bound).
- SpamGuard: honeypot, minimum elapsed time from the token, optional captcha verification (Friendly Captcha), identical 202 response on spam.
- RetentionJob: deletes messages older than the configured retention (12 months).
- RateLimiting: extends
AddCmsRateLimitingwith policyContactForm; needsForwardedHeaders:KnownProxiesfor the real client IP.