Skip to content

Project Architecture ​

This document provides a high-level overview of the wedding website's architecture. The project is a full-stack application built with Next.js, leveraging its capabilities for both client-side rendering and server-side Route Handlers.

Core Components ​

The application is composed of three main parts:

  1. Frontend: A React-based user interface built with Next.js App Router.
  2. Backend: Serverless Route Handlers built with Next.js App Router.
  3. Database: A PostgreSQL database managed with Prisma ORM.

Deployment Architecture & Single-Site Default ​

The default supported architecture is one deployment = one wedding site:

  • Single Canonical Config: Every deployment loads a single canonical configuration (id: "global").
  • Simplified Setup: No wildcard DNS, tenant concepts, or subdomain routing are required for standard setups.
  • Provider-Neutral Host Filtering: Strict host and X-Forwarded-Host validation prevents host header injection and HTTP host spoofing without binding site data to incoming Host headers.
  • Optional Multi-Profile Subdomain Routing: Subdomain-based AppConfig profile routing (X-Forwarded-Host checked before Host in src/lib/config.ts) can be enabled via MULTISITE_ENABLED=true. MULTISITE_ENABLED switches AppConfig branding/profile rows only; prisma/schema.prisma shares the other 15 tables across subdomains without tenant row isolation.

Environment Specifications ​

For detailed runtime requirements, host configuration, environment variable specifications, and lifecycle expectations, see the authoritative Application Runtime Contract.

  • Node.js: v22.x
  • Next.js: 16.x
  • React: 19.x
  • Prisma: 7.x
  • Zod: 4.x

1. Frontend ​

The frontend is built using Next.js and React. It is responsible for rendering the user interface that guests and administrators interact with.

  • Location: src/app/
  • Key Technologies:
    • React: For building UI components.
    • Next.js: For App Router, server-side rendering, and client-side navigation.
    • Tailwind CSS: For styling.
    • Framer Motion: For animations.
    • React Query: For managing server state, caching, and data fetching.
  • Structure:
    • App Router (src/app/): Uses the Next.js App Router where directories define the routes and page.tsx renders the UI.
    • Components (src/components/): Reusable UI elements are located here.
    • Admin UI: A separate set of pages and components under src/app/admin/ provides an interface for managing the website.

2. Backend (API) ​

The backend is a set of serverless functions implemented as Next.js Route Handlers. These routes handle business logic, data validation, and communication with the database.

  • Location: src/app/api/
  • Key Technologies:
    • Next.js Route Handlers: For creating serverless API endpoints.
    • Prisma: As the ORM for database access.
  • Route Groups & Access Tiers: Most API route handlers under src/app/api/**/route.{ts,tsx} wrap execution with withApiMiddleware (src/utils/withApiMiddleware.ts), while specialized binary, probe, and webhook endpoints stream responses directly (exact handler and wrapper totals are synchronized automatically in the inventory below). Edge perimeter and role rules are enforced by src/middleware.ts and src/lib/routes.ts: GET /api/og (src/app/metadata.ts), GET /api/admin/me, and POST /api/admin/logout bypass the Edge cookie gate as Public endpoints (retaining withApiMiddleware rate limits on /api/og, /api/admin/me, and /api/admin/logout); /api/media (GET, POST), /api/media/[id] (PUT and DELETE metadata mutations only, with no GET asset resolver), and /api/media/export (GET, POST) are strictly Admin-only routes gated by isAdminRequest; /api/guest/address and /api/rsvp require a personalized guest_invite_session cookie (Invite-only, verified via getGuestInviteSession); /api/cron/* routes require Authorization: Bearer <CRON_SECRET>; and /api/registry/webhook/stripe bypasses the Edge cookie gate on POST only while enforcing cryptographic stripe-signature verification (STRIPE_WEBHOOK_SECRET).

Total API route handlers: 88 across 14 route groups.

  • Middleware Wrapper (withApiMiddleware): 84 wrapped handlers; 4 unwrapped (/api/live, /api/ready, /api/registry/webhook/stripe, /api/uploads/[...path]).
  • Handler Session & Webhook Gates: Invite-only handlers (/api/guest/address, /api/rsvp, /api/rsvp/draft) require a verified guest_invite_session cookie via getGuestInviteSession; /api/registry/webhook/stripe bypasses the Edge cookie gate on POST in src/middleware.ts (retaining Edge cookie enforcement on other methods) and verifies stripe-signature (STRIPE_WEBHOOK_SECRET) in the handler.

Admin Routes (/api/admin — 51 handlers) ​

RouteHandlerMethodsAccess Tier
/api/admin/[entity]src/app/api/admin/[entity]/route.tsGET, POST, PUTAdmin-only
/api/admin/[entity]/[id]src/app/api/admin/[entity]/[id]/route.tsGET, PUT, DELETEAdmin-only
/api/admin/[entity]/batchsrc/app/api/admin/[entity]/batch/route.tsPOST, PUT, PATCH, DELETEAdmin-only
/api/admin/broadcast/[id]src/app/api/admin/broadcast/[id]/route.tsGETAdmin-only
/api/admin/broadcast/historysrc/app/api/admin/broadcast/history/route.tsGETAdmin-only
/api/admin/broadcast/previewsrc/app/api/admin/broadcast/preview/route.tsPOSTAdmin-only
/api/admin/broadcast/retrysrc/app/api/admin/broadcast/retry/route.tsPOSTAdmin-only
/api/admin/broadcast/schedule/[id]src/app/api/admin/broadcast/schedule/[id]/route.tsDELETEAdmin-only
/api/admin/broadcast/sendsrc/app/api/admin/broadcast/send/route.tsPOSTAdmin-only
/api/admin/broadcast/test-connectionsrc/app/api/admin/broadcast/test-connection/route.tsPOSTAdmin-only
/api/admin/broadcast/test-sendsrc/app/api/admin/broadcast/test-send/route.tsPOSTAdmin-only
/api/admin/contributors/[id]src/app/api/admin/contributors/[id]/route.tsPATCH, DELETEAdmin-only
/api/admin/contributors/[id]/actionsrc/app/api/admin/contributors/[id]/action/route.tsPOSTAdmin-only
/api/admin/featuressrc/app/api/admin/features/route.tsGET, PUTAdmin-only
/api/admin/geocodesrc/app/api/admin/geocode/route.tsGETAdmin-only
/api/admin/invitation-codes/batchsrc/app/api/admin/invitation-codes/batch/route.tsPOST, PUT, PATCH, DELETEAdmin-only
/api/admin/invitation-codes/batch/validatesrc/app/api/admin/invitation-codes/batch/validate/route.tsPOSTAdmin-only
/api/admin/invitation-codes/catalogsrc/app/api/admin/invitation-codes/catalog/route.tsGETAdmin-only
/api/admin/invitation-codes/exportsrc/app/api/admin/invitation-codes/export/route.tsGETAdmin-only
/api/admin/invitation-codes/mergesrc/app/api/admin/invitation-codes/merge/route.tsPOSTAdmin-only
/api/admin/invitation-codes/rsvpssrc/app/api/admin/invitation-codes/rsvps/route.tsGET, PUTAdmin-only
/api/admin/invitation-codes/validatesrc/app/api/admin/invitation-codes/validate/route.tsPOSTAdmin-only
/api/admin/loginsrc/app/api/admin/login/route.tsPOSTPublic
/api/admin/logoutsrc/app/api/admin/logout/route.tsPOSTPublic
/api/admin/maintenance/exportsrc/app/api/admin/maintenance/export/route.tsGETAdmin-only
/api/admin/maintenance/importsrc/app/api/admin/maintenance/import/route.tsPOSTAdmin-only
/api/admin/mesrc/app/api/admin/me/route.tsGETPublic
/api/admin/onboarding-milestonessrc/app/api/admin/onboarding-milestones/route.tsGETAdmin-only
/api/admin/photos/[id]src/app/api/admin/photos/[id]/route.tsPATCHAdmin-only
/api/admin/photos/moderationsrc/app/api/admin/photos/moderation/route.tsGET, PATCHAdmin-only
/api/admin/photos/moderation/batchsrc/app/api/admin/photos/moderation/batch/route.tsPOSTAdmin-only
/api/admin/photos/qrsrc/app/api/admin/photos/qr/route.tsGET, POSTAdmin-only
/api/admin/registry/items/[id]/unclaimsrc/app/api/admin/registry/items/[id]/unclaim/route.tsPOSTAdmin-only
/api/admin/sample-datasrc/app/api/admin/sample-data/route.tsGET, POST, DELETEAdmin-only
/api/admin/seating/assignsrc/app/api/admin/seating/assign/route.tsPOSTAdmin-only
/api/admin/seating/auto-assignsrc/app/api/admin/seating/auto-assign/route.tsPOSTAdmin-only
/api/admin/seating/exportsrc/app/api/admin/seating/export/route.tsGETAdmin-only
/api/admin/settingssrc/app/api/admin/settings/route.tsGET, POST, PUTAdmin-only
/api/admin/setupsrc/app/api/admin/setup/route.tsGET, POSTPublic
/api/admin/sub-events/accesssrc/app/api/admin/sub-events/access/route.tsGET, PUTAdmin-only
/api/admin/sub-events/access/batchsrc/app/api/admin/sub-events/access/batch/route.tsPOSTAdmin-only
/api/admin/sub-events/rsvp-summarysrc/app/api/admin/sub-events/rsvp-summary/route.tsGETAdmin-only
/api/admin/thank-you-notessrc/app/api/admin/thank-you-notes/route.tsGET, POSTAdmin-only
/api/admin/thank-you-notes/[id]src/app/api/admin/thank-you-notes/[id]/route.tsPATCHAdmin-only
/api/admin/thank-you-notes/[id]/send-emailsrc/app/api/admin/thank-you-notes/[id]/send-email/route.tsPOSTAdmin-only
/api/admin/thank-you-notes/batchsrc/app/api/admin/thank-you-notes/batch/route.tsPOSTAdmin-only
/api/admin/thank-you-notes/exportsrc/app/api/admin/thank-you-notes/export/route.tsGETAdmin-only
/api/admin/thank-you-notes/export-labelssrc/app/api/admin/thank-you-notes/export-labels/route.tsGETAdmin-only
/api/admin/uploadsrc/app/api/admin/upload/route.tsPOSTAdmin-only
/api/admin/versionssrc/app/api/admin/versions/route.tsGETAdmin-only
/api/admin/versions/[id]/restoresrc/app/api/admin/versions/[id]/restore/route.tsPOSTAdmin-only

Cron Routes (/api/cron — 1 handler) ​

RouteHandlerMethodsAccess Tier
/api/cron/broadcastssrc/app/api/cron/broadcasts/route.tsGET, POSTBearer (CRON_SECRET)

Guest Routes (/api/guest — 7 handlers) ​

RouteHandlerMethodsAccess Tier
/api/guest/addresssrc/app/api/guest/address/route.tsGET, PUTInvite-only
/api/guest/address/publicsrc/app/api/guest/address/public/route.tsPOSTPublic
/api/guest/loginsrc/app/api/guest/login/route.tsPOSTPublic
/api/guest/lookupsrc/app/api/guest/lookup/route.tsPOSTGuest / Admin
/api/guest/photos/uploadsrc/app/api/guest/photos/upload/route.tsPOSTGuest / Admin
/api/guest/recoversrc/app/api/guest/recover/route.tsGET, POSTPublic
/api/guest/sessionsrc/app/api/guest/session/route.tsGET, DELETEPublic

Health Check Routes (/api/health — 1 handler) ​

RouteHandlerMethodsAccess Tier
/api/healthsrc/app/api/health/route.tsGETPublic

Liveness Probe Routes (/api/live — 1 handler) ​

RouteHandlerMethodsAccess Tier
/api/livesrc/app/api/live/route.tsGETPublic

Media Routes (/api/media — 3 handlers) ​

RouteHandlerMethodsAccess Tier
/api/mediasrc/app/api/media/route.tsGET, POSTAdmin-only
/api/media/[id]src/app/api/media/[id]/route.tsPUT, DELETEAdmin-only
/api/media/exportsrc/app/api/media/export/route.tsGET, POSTAdmin-only

Open Graph Routes (/api/og — 1 handler) ​

RouteHandlerMethodsAccess Tier
/api/ogsrc/app/api/og/route.tsxGETPublic

Photos Routes (/api/photos — 2 handlers) ​

RouteHandlerMethodsAccess Tier
/api/photossrc/app/api/photos/route.tsGETGuest / Admin
/api/photos/uploadsrc/app/api/photos/upload/route.tsPOSTGuest / Admin

Readiness Probe Routes (/api/ready — 1 handler) ​

RouteHandlerMethodsAccess Tier
/api/readysrc/app/api/ready/route.tsGETPublic

Registry Routes (/api/registry — 14 handlers) ​

RouteHandlerMethodsAccess Tier
/api/registry/capabilitiessrc/app/api/registry/capabilities/route.tsGETGuest / Admin
/api/registry/claimsrc/app/api/registry/claim/route.tsGET, POSTPublic
/api/registry/contributesrc/app/api/registry/contribute/route.tsPOSTGuest / Admin
/api/registry/itemssrc/app/api/registry/items/route.tsGET, POSTGuest / Admin (GET); Admin-only (POST)
/api/registry/items/[id]src/app/api/registry/items/[id]/route.tsGET, PUT, DELETEGuest / Admin (GET); Admin-only (PUT, DELETE)
/api/registry/items/batchsrc/app/api/registry/items/batch/route.tsPOSTAdmin-only
/api/registry/payment-intentsrc/app/api/registry/payment-intent/route.tsPOSTGuest / Admin
/api/registry/payment-intent/reconcilesrc/app/api/registry/payment-intent/reconcile/route.tsPOSTGuest / Admin
/api/registry/scrapesrc/app/api/registry/scrape/route.tsPOSTAdmin-only
/api/registry/scrape/batchsrc/app/api/registry/scrape/batch/route.tsPOSTAdmin-only
/api/registry/sessionsrc/app/api/registry/session/route.tsGET, DELETEGuest / Admin
/api/registry/storessrc/app/api/registry/stores/route.tsGET, POSTGuest / Admin (GET); Admin-only (POST)
/api/registry/validate-codesrc/app/api/registry/validate-code/route.tsGET, POSTPublic
/api/registry/webhook/stripesrc/app/api/registry/webhook/stripe/route.tsPOSTstripeSignature (STRIPE_WEBHOOK_SECRET)

RSVP Routes (/api/rsvp — 2 handlers) ​

RouteHandlerMethodsAccess Tier
/api/rsvpsrc/app/api/rsvp/route.tsPOSTInvite-only
/api/rsvp/draftsrc/app/api/rsvp/draft/route.tsGET, PATCHInvite-only

Schedule Routes (/api/schedule — 2 handlers) ​

RouteHandlerMethodsAccess Tier
/api/schedulesrc/app/api/schedule/route.tsGETGuest / Admin
/api/schedule/[id]/icssrc/app/api/schedule/[id]/ics/route.tsGETGuest / Admin

Uploads Routes (/api/uploads — 1 handler) ​

RouteHandlerMethodsAccess Tier
/api/uploads/[...path]src/app/api/uploads/[...path]/route.tsGET, HEADGuest / Admin

Weather Routes (/api/weather — 1 handler) ​

RouteHandlerMethodsAccess Tier
/api/weathersrc/app/api/weather/route.tsGETGuest / Admin

3. Database ​

The database stores all application data using PostgreSQL managed via Prisma ORM.

  • Location: The schema is defined in prisma/schema.prisma.
  • Key Technologies:
    • PostgreSQL: Relational database implementing the project's standard database contract (compatible with local PostgreSQL, Neon, Supabase, Railway, AWS RDS, GCP Cloud SQL, etc. as labeled host examples).
    • Prisma: The ORM used to define the schema and interact with the database in a type-safe way.
  • Data Models:
    • AppConfig: Stores global site settings, partner details, wedding date and venue parameters, visual theme tokens, feature toggles, and email/SMS broadcast provider credentials.
    • Media: Stores uploaded media metadata (URLs, alt text, decorative/sample flags) referenced by wedding party members, attractions, and registry items.
    • WeddingPartyMember: Represents members of the wedding party with name, role, bio, side (BRIDE, GROOM, JOINT), display order, and optional media relationship.
    • Attraction: Represents local attraction and accommodation recommendations, including categories, map coordinates, booking URLs, promo codes, and shuttle information.
    • RegistryItem: Represents gift registry items with item type, price, display order, quantity, group gift / most wanted flags, purchase status, and total contributed amount.
    • ExternalRegistry: Stores linked external partner store registries (name, provider, url, optional guest note, displayOrder, isVisible, and isSample) in prisma/schema.prisma for the public /registry store directory without automated product scraping.
    • Contributor: Stores guest financial contributions towards registry items, including contributor contact info, contribution amounts, custom messages, and thank-you note status.
    • InvitationCode: Stores unique guest invitation passes, guest names, mailing addresses, dietary notes, plus-one allocations, party tags, assigned table and inline seat references (tableId, seatNumber, plusOneSeatNumbers), and projected aggregate RSVP state (used, usedAt, plusOneFirstName, plusOneLastName, dietaryNotes, and JSON extraFields).
    • HouseholdMember: Stores normalized per-person party member profiles (fullName, firstName, lastName, role, email, phone, standing dietaryNotes, tags, displayOrder, and seatNumber) in prisma/schema.prisma linked to InvitationCode with cascading deletes.
    • SeatingTable: Stores reception seating tables with table name, shape, seat capacity, and floor plan coordinate attributes (x, y, width, height, rotation).
    • ContentNode: Provides dynamic CMS content storage for site copy, FAQ entries, announcements, and key-value JSON attributes tagged by domain (including legacy or lightweight Schedule and Logistics entries that coexist as read-only schedule fallbacks when no SubEvent rows match).
    • SnapshotVersion: Stores audit logs and JSON entity snapshot history for change tracking and point-in-time state restoration.
    • SubEvent: Represents individual wedding schedule items (e.g., rehearsal dinner, ceremony, reception) in prisma/schema.prisma with start/end times, venue details, privacy settings (isPrivate), and structured JSONB configuration columns (mealOptions and customQuestions).
    • SubEventAccess: Junction table defining explicit access permissions for private sub-events mapped to guest invitation codes.
    • SubEventRsvp: Canonical per-event RSVP table in prisma/schema.prisma storing attendance status, plusOneCount, dietaryNotes, and structured JSONB response columns (mealSelections, customAnswers, and plusOneNames).
    • SubEventMemberRsvp: Stores relational per-member event response rows (status, mealOptionId, and event-specific dietaryNotes) in prisma/schema.prisma linked to SubEventRsvp and HouseholdMember.
    • BroadcastMessage: Stores outbound email and SMS communication broadcasts, tracking target filters, delivery status, send timestamps, and dispatch counts.
    • BroadcastRecipient: Stores individual delivery logs for broadcast messages, recording destination addresses, delivery status, and error details.
    • AuthLockout: Stores HMAC-SHA256 hashed IP rate-limit and authentication lockout counters (keyHash, count, resetAt) in prisma/schema.prisma to synchronize brute-force lockouts across application instances.
  • Canonical SubEventRsvp Projection & ContentNode Coexistence:
    • Canonical SubEventRsvp -> InvitationCode Synchronization: Guest submissions (POST /api/rsvp) and administrative RSVP overrides in SubEventService (src/features/sub-events/service.ts) transactionally project aggregate RSVP state from SubEventRsvp onto InvitationCode (used, usedAt, plusOneFirstName, plusOneLastName, dietaryNotes, and extraFields keys attendanceStatus, plusOneCount, plusOneNames, dietaryTags, mealSelections, mealSummary, customAnswers, customAnswersSummary, and eventRsvps). Downstream seating and roster helpers—specifically getGuestAttendanceStatus, isGuestEligibleForSeating, and getDietaryBadges in src/features/seating/utils/seatingHelpers.ts—consume those projected InvitationCode fields. SubEventRsvp remains authoritative for attendance, meal, and custom-question responses (batch InvitationCode edits strip reserved RSVP projection keys rather than back-populating SubEventRsvp attendance), while InvitationCodeAdminService.update (src/features/registry/invitation-code.admin.service.ts) synchronizes updated guest/plus-one names onto attending SubEventRsvp records and recomputes projected InvitationCode.extraFields summaries.
    • Read-Only ContentNode Schedule Fallbacks: When a requested schedule item has no SubEvent record, SubEventService (src/features/sub-events/service.ts) falls back to Schedule or Logistics ContentNode records with isReadOnly: true (enforcing isPrivateContentNode access checks and rejecting RSVP submissions against read-only fallback nodes with HTTP 400). On the homepage, HomePageClient (src/components/home/HomePageClient.tsx) renders InteractiveTimeline whenever structured Schedule or startTime entries exist in contentNodes and falls back to Logistics ceremony/reception summary cards (ceremonyTitle, receptionTitle) otherwise.

The use of Prisma allows for easy schema management through migrations and provides a type-safe client for querying the database from the backend API. The project uses PostgreSQL as the sole active database layer for both local development and production.

4. Core Framework Infrastructure ​

To establish consistent data access, transaction management, state auditing, and session security across all application features, the codebase utilizes a centralized core framework layer located in src/core/.

Infrastructure Data Access Layer (src/core/infrastructure/) ​

  • BaseRepository (src/core/infrastructure/repository.ts): The foundation for database interactions. It encapsulates standard Prisma CRUD queries (findMany, findUnique, create, update, delete), supports transactional execution via transaction(), and allows client context swapping with withClient(). Deletion operations automatically call createAuditSnapshot to record deletion audit logs.
  • BaseService (src/core/infrastructure/service.ts): The foundation for business logic services. It wraps BaseRepository instances, provides default query argument merging for sorting and relations, and enforces transactional mutation lifecycles. It includes extensibility hooks (validate, preSave) and manages point-in-time audit snapshot creation (createSnapshot) whenever records are created or updated. It also provides a built-in utility for record reordering (reorder).

Authentication Modules (src/core/auth/) ​

  • Shared Token & Cookie Primitives (src/core/auth/tokenCookieHelpers.ts): Centralizes compact token signing (signCompactToken producing base64url(payload).base64url(signature) via HMAC-SHA256), constant-time signature verification (verifyCompactToken using timingSafeEqualJS), and request cookie extraction (readRequestCookie reading from NextRequest.cookies, raw cookie headers, or Next.js Server Component cookies()).
  • Multisite Tenant Claims (src/core/auth/tenantClaims.ts, src/core/auth/tenantClaims.node.ts): Provides Edge-compatible subdomain claim helpers (isMultisiteAuthEnabled, resolveEdgeRequestSubdomain, verifyEdgeTenantClaims) alongside Node/Prisma AppConfig claim resolution and verification (resolveTenantClaimsForSigning, verifyNodeTenantClaims) so admin_auth, guest_auth, guest_invite_session, and guest_photo_session (plus printable /photos?qr= links) carry siteId and normalized subdomain claims and enforce tenant isolation whenever MULTISITE_ENABLED is true while remaining backward-compatible in single-site mode.
  • Signed Internal Guest Gating Headers (src/core/auth/guestHeaderSignature.ts): Strips incoming client-supplied x-guest-* headers (stripClientGuestHeaders) and signs/verifies internal x-guest-gated-page and x-guest-callback-url headers (signGuestInternalHeaders, verifyGuestInternalHeaders) via GUEST_SESSION_SECRET (resolveGuestSigningSecret) so SSR revocation checks cannot be bypassed by forged headers.
  • SSR Admin Page Guard (src/core/auth/adminPageGuard.ts): Enforces server-side isAdminRequest() checks (enforceAdminPageSession) on admin and registry management Server Components with HTTP 303 See Other redirects (redirectWithSeeOther) to /admin/login while remaining inert during STATIC_EXPORT builds (isStaticExportBuild).
  • Server Admin Authentication (src/core/auth/auth.server.ts): Handles administrative session signing and verification (signAdminToken, verifyAdminToken, isAdminRequest, setAdminAuthCookie, getAdminCookieOptions with httpOnly, sameSite: 'lax', secure in production, 8-hour default maxAge), enforcing stateless subdomain checks in Edge middleware (edgeOnly: true) and full AppConfig siteId/subdomain verification in Node API and SSR contexts.
  • Client Admin Authentication (src/core/auth/auth.client.ts): Provides client-side session verification via checkAdminClient(), which queries the Public GET /api/admin/me endpoint (returning { success: true, isAdmin: false } when unauthenticated) without requiring a guest cookie or exposing internal token secrets, while POST /api/admin/logout clears stale admin_auth cookies cleanly.
  • Server Guest Authentication (src/core/auth/guest.server.ts): Manages shared-passcode guest sessions (signGuestToken, verifyGuestToken, isGuestRequest) backed by GUEST_SESSION_SECRET (requiring a distinct secret of at least 32 characters in production and throwing an error whenever secret === passcode, i.e., GUEST_SESSION_SECRET === GUEST_PASSCODE), enforcing stateless subdomain checks in Edge middleware and full AppConfig siteId/subdomain verification in Node API and SSR contexts.
  • Stateless Edge Guest Invite Token (src/core/auth/guestInviteToken.ts): Implements Tier 1 Edge-safe token signing and stateless verification (signGuestInviteSessionToken, verifyGuestInviteSessionToken, getSignedGuestInviteSession) for the 7-day guest_invite_session cookie using GUEST_SESSION_SECRET (>= 32 characters in production, rejecting secret === passcode) with zero Prisma or Node-only dependencies so src/middleware.ts runs cleanly in the Edge runtime.
  • Stateless Edge Photo QR & Upload Session Token (src/core/auth/photoUploadToken.ts): Implements Edge-safe token signing, stateless verification, and strict route-scope predicates (signPhotoQrLinkToken, verifyPhotoQrLinkToken, signPhotoUploadSessionToken, verifyPhotoUploadSessionToken, getSignedPhotoUploadSession, buildSignedPhotoUploadUrl, isPhotoScopedRoute) for printable /photos?qr=<signedToken> deep links and the 7-day guest_photo_session (GUEST_PHOTO_COOKIE) HttpOnly cookie using GUEST_SESSION_SECRET, confining QR sessions strictly to /photos, /photos/slideshow, GET /api/photos, POST /api/guest/photos/upload, and POST /api/photos/upload.
  • Database-Backed Guest Invitation & Photo Session Revocation (src/core/auth/guestInviteSession.ts): Implements Tier 2 Node/Server session validation and immediate revocation (getGuestInviteSession, getActivePhotoUploadSession, enforceActiveGuestPageSession, backed by per-request hydration in src/lib/requestContext.ts). After verifying signed cookies via getSignedGuestInviteSession or getSignedPhotoUploadSession (and enforcing AppConfig tenant claims when MULTISITE_ENABLED is true), it queries prisma.invitationCode (isSample: false) and AppConfig.guestPhotoQrTokenVersion—immediately invalidating deleted invitations, rotated QR token versions, or purged sample sessions. On guest-gated SSR pages, RootLayout (src/app/layout.tsx) calls enforceActiveGuestPageSession(), issuing a 303 See Other redirect to /guest/login when a guest_invite_session or guest_photo_session is revoked and neither admin_auth nor guest_auth is valid. On non-excluded API routes (isInviteRevocationExcludedApiPath in src/utils/withApiMiddleware.ts), withApiMiddleware verifies active guest or photo sessions and responds with HTTP 401 while clearing stale session cookies (maxAge: 0) when no fallback admin_auth or guest_auth cookie exists.
  • Guest Login vs. Read-Only Lookup Endpoints (src/app/api/guest/login/route.ts, src/app/api/guest/lookup/route.ts): POST /api/guest/login authenticates credentials and mints 7-day HttpOnly cookies—issuing guest_auth when matching the shared GUEST_PASSCODE (via constant-time SHA-256 comparison) or guest_invite_session when matching a non-sample (isSample: false) InvitationCode. By contrast, POST /api/guest/lookup (throttled to 5 failed attempts per 15 minutes in withApiMiddleware) performs a read-only search across non-sample InvitationCode records by name, plus-one name, or email and returns only { guestName } without minting cookies or exposing invitation codes.

5. Feature Organization ​

To maintain modularity and prevent logic smear, the codebase adopts a strict layered feature architecture. All domain-specific logic is encapsulated in isolated feature directories under src/features/.

  • Location: src/features/
  • Structure: Each feature scaffolded by scripts/scaffold-feature.mjs contains:
    • api/: Route handlers and server-side logic (e.g., proxying).
    • components/: UI components specific to the feature.
    • hooks/: Custom React hooks.
    • lib/: Internal feature-scoped helper utilities.
    • repository.ts: Data access layer for Prisma queries.
    • service.ts: Business logic layer.
    • schemas.ts: Validation schemas (Zod).
    • types.ts: TypeScript interfaces.
    • index.ts: The public interface. To prevent cross-domain internal leakage, other modules must solely import from this file (enforced by no-restricted-imports in eslint.config.mjs against both @/features/*/* and relative ../features/*/* paths).

New features should be scaffolded using the included CLI utility (npm run scaffold <feature-name>) to ensure correct structural boundaries and naming conventions.

6. Architectural Boundaries & Shared Components Guidelines ​

To prevent code duplication and maintain clear ownership boundaries while preserving file-path stability for downstream template forks, the codebase balances feature encapsulation with documented shared-folder exceptions.

Folder Boundaries ​

  • Generic & Cross-Cutting Shared Directories (src/components/, src/components/ui/, src/utils/, src/lib/):
    • New reusable UI primitives (e.g., Button, Dialog in src/components/ui/) and stateless helpers (e.g., cn in src/utils/cn.ts) belong in these shared directories and should stay domain-agnostic.
    • Documented Shared-Folder Exceptions (Preserved for Downstream Fork Stability): Core runtime singletons and cross-cutting services intentionally reside at stable paths under src/lib/, src/utils/, and src/components/ so downstream adopters merge upgrades cleanly without path churn:
      • src/lib/: Database connection singletons (prisma.ts, postgresPool.ts), global AppConfig resolution (config.ts), snapshot audit logging (audit.ts), theme/preset engines (theme/presets.ts, theme/stylesheet.ts), module registry (modules.ts), base-path resolution (basePath.ts), sample and static archetype data builders (sampleData/generator.ts, sampleData/builder.ts), and the browser showcase demo state/interceptor layer (demo/demoStore.ts, demo/demoApiHandler.ts, staticDemo/runtime.ts).
      • src/utils/: Cross-route API middleware (withApiMiddleware.ts), backup/invitation/RSVP validation helpers (backupValidation.ts, invitationValidation.ts, rsvpDeadline.ts), and calendar/pagination utilities.
      • src/components/: Root layout providers (ThemeProvider.tsx, layout/RootLayoutClient.tsx), interactive showcase controls (demo/DemoContext.tsx, demo/DemoToolbar.tsx), multi-feature page orchestrators (home/HomePageClient.tsx), and onboarding/admin shells (setup/SetupWizard.tsx).

Interactive Static Showcase & Browser Demo Runtime (STATIC_EXPORT) ​

When compiled via npm run build:export (scripts/build-export.mjs with STATIC_EXPORT=true and optional NEXT_PUBLIC_BASE_PATH), the application runs as a database-free static HTML showcase powered by a browser-resident simulation layer:

  • Layout Bootstrap & Demo Context: RootLayoutClient in src/components/layout/RootLayoutClient.tsx invokes ensureStaticDemoRuntime (src/lib/staticDemo/runtime.ts), wraps the application tree in DemoProvider (src/components/demo/DemoContext.tsx) when isStaticExport is true, and mounts DemoToolbar (src/components/demo/DemoToolbar.tsx) with subpath-safe return links (resolveShowcasePath in src/lib/basePath.ts) to the documentation portal (/), OpenAPI explorer (/api/), and Storybook (/storybook/).
  • Persistent Browser State & Archetype Datasets: hydrateDemoStateFromStorage and resetDemoState in src/lib/demo/demoStore.ts persist visitor persona (guest, admin, setup), active wedding archetype (classic, destination, romantic), visual theme preset, guest invite sessions, and local mutations under the wedding_showcase_demo_v1 localStorage key, seeded from deterministic static datasets built by buildArchetypeSeedData and isStaticExportBuild in src/lib/sampleData/builder.ts.
  • Client-Side API Simulation, Checkout & Setup Preview: installDemoFetchInterceptor in src/lib/demo/demoApiHandler.ts intercepts same-origin /api/* and /api/admin/* browser fetch calls against the active demoStore dataset without server Route Handlers; SimulatedCardCheckout and SIMULATED_TEST_CARDS in src/features/registry/components/SimulatedCardCheckout.tsx simulate approved and declined card contributions without external payment processors; and AdminSetupPage in src/app/admin/setup/page.tsx renders <SetupWizard /> directly during static exports so visitors can walk through all five onboarding steps in-browser.
  • Feature Directories (src/features/<feature-name>/):
    • Feature directories contain UI components, hooks, internal lib/ helpers, schema definitions, repositories, and services scoped to a single domain (e.g., weather, registry, seating, sub-events, broadcast).
    • Feature internals must not be imported directly across module boundaries; external callers import exclusively through the feature's public barrel (@/features/<feature-name>, backed by src/features/<feature-name>/index.ts) as enforced by eslint.config.mjs.

Structural Rules for Shared UI Primitives ​

Shared UI primitives added to src/components/ui/ must adhere to the following design and quality patterns:

  1. React Ref Forwarding (DOM-Wrapping Primitives):

    • Interactive and layout primitives that wrap a single underlying DOM element (such as Button, Input, Select, Textarea, Checkbox, Dialog, Table, Icon, Skeleton, and Layout primitives) must forward ref to their root DOM node using React 19 ref props (React.ComponentPropsWithRef<'...'>, or React.forwardRef).
    • Stateful, context, portal/provider, or error-boundary components in src/components/ui/ that do not represent a single ref-target DOM element (ErrorBoundary, GlobalRadialGlow, RouteErrorFallback, ThemeSelector, and ToastProvider) are exempt from DOM ref forwarding.
    • Example:
      tsx
      import React from 'react';
      import { cn } from '@/utils/cn';
      
      export interface InputProps extends React.ComponentPropsWithRef<'input'> {}
      
      export function Input({ className, type, ref, ...props }: InputProps) {
        return (
          <input
            type={type}
            className={cn('border rounded px-3 py-2', className)}
            ref={ref}
            {...props}
          />
        );
      }
  2. Style Composition / Class Merging:

    • Primitives must be highly configurable from the outside. Default Tailwind styles must be composed with custom styles passed via the className prop.
    • Class composition uses the lightweight cn(...) helper in src/utils/cn.ts (classes.filter(Boolean).join(' ')), which filters falsy values and joins truthy class strings with spaces without performing Tailwind utility conflict resolution (tailwind-merge is not installed). Avoid passing conflicting Tailwind utilities in base and override class strings.
    • Example:
      tsx
      import { cn } from '@/utils/cn';
      // Usage inside a component:
      className={cn('base-classes-here', className)}
  3. Unit Tests:

    • Every new shared UI primitive must have a matching unit test file inside the respective __tests__ directory (e.g., src/components/ui/__tests__/<Component>.test.tsx).
    • Unit tests must verify proper rendering, prop-based configuration, custom ref forwarding, and interactive behavior (e.g., fire events).

Upstream Compatibility & Downstream Upgrade Architecture ​

To treat upstream compatibility as a product feature for downstream template adopters, the architecture enforces strict separation between application code, personal content, and deployment configuration:

  • Personal Content Isolation: Couple details, venue information, story text, wedding party members, registry items, and photos reside in PostgreSQL database models (AppConfig, Media, RegistryItem, WeddingPartyMember, ContentNode). Avoid hardcoding personal details into React page components (src/app/ or src/features/).
  • Deployment Isolation: Provider configurations and secret credentials are injected via environment variables (DATABASE_URL, ADMIN_PASSWORD, etc.) using a provider-neutral container setup.
  • Database Schema Evolution (Expand-Migrate-Contract): Schema updates are managed via immutable, forward-only Prisma migration scripts (prisma/migrations/) governed by the three-phase Expand-Migrate-Contract policy (npm run lint:migrations; see docs/versioning.md) and applied in production via npx prisma migrate deploy against DATABASE_URL / POSTGRES_URL_NON_POOLING (prisma.config.ts) or offline in containers via ./node_modules/.bin/prisma migrate deploy (reserving npm run migrate:deploy for local development; see docs/upgrading.md), preserving custom database records across upgrades.
  • Configuration Schema Versioning: AppConfig schema changes utilize Zod default value fallbacks (src/features/content/schemas.ts) to ensure non-destructive upgrades for existing database instances.
  • Detailed Documentation: See docs/upgrading.md for the downstream workflow, docs/versioning.md for semantic versioning and migration lifecycle policies, and DEPLOYMENT.md for production rollout and rollback runbooks.

System Configuration ​

Configuration Architecture & Precedence Hierarchy ​

The application follows a strict 4-layer configuration architecture with deterministic precedence:

  1. Deployment Configuration (Layer 1): Environment variables & secrets (DATABASE_URL, ADMIN_PASSWORD, ALLOWED_HOSTS, GUEST_PASSCODE, GUEST_SESSION_SECRET, S3_*) plus all 32 SITE_* environment variable overrides parsed by getEnvConfigOverrides in src/lib/config.ts:
    • Partner & Event Identity (6): SITE_BRIDE_NAME, SITE_GROOM_NAME, SITE_PARTNER1_NAME, SITE_PARTNER2_NAME, SITE_WEDDING_DATE, SITE_BASE_URL.
    • Venue, Coordinates, & Timezone (8): SITE_VENUE_NAME, SITE_VENUE_ADDRESS, SITE_VENUE_CITY, SITE_VENUE_STATE, SITE_VENUE_ZIP, SITE_LATITUDE, SITE_LONGITUDE, SITE_TIMEZONE.
    • Theme & Widget Overrides (6): SITE_COLOR_PRIMARY, SITE_COLOR_SECONDARY, SITE_THEME_PRESET, SITE_THEME_TOKENS, SITE_SHOW_COUNTDOWN, SITE_SHOW_ADD_TO_CALENDAR.
    • SEO, Branding Assets, & Contact (12): SITE_SEO_TITLE, SITE_SEO_DESCRIPTION, SITE_BRAND_MONOGRAM, SITE_BRAND_LOGO_URL, SITE_BRAND_LOGO_ALT, SITE_HERO_IMAGE_URL, SITE_HERO_IMAGE_ALT, SITE_BRAND_WATERMARK_URL, SITE_BRAND_WATERMARK_ALT, SITE_BADGE_GRAPHIC_URL, SITE_BADGE_GRAPHIC_ALT, SITE_CONTACT_EMAIL.
  2. Site Configuration (Layer 2): Database-persisted site settings (AppConfig table: partner names, wedding date, venue details, colors, sparse themeTokens, timezone, feature toggles, SEO metadata).
  3. Site Content (Layer 3): Editable content nodes (ContentNode table: stories, wedding party members, FAQs, travel advice, local attractions, registry items).
  4. Application Defaults (Layer 4): Domain-agnostic technical defaults (APP_DEFAULTS in src/lib/config.ts) with generic placeholder fallbacks and zero personal wedding content.

Theme Token Precedence, WCAG Contrast Calibration, & Zero-FOUC Hydration ​

  • Sparse themeTokens Diffing (stripPresetDefaultTokens, src/lib/theme/presets.ts): AppConfig.themeTokens stores only sparse custom --* CSS token overrides rather than full preset dumps. stripPresetDefaultTokens strips entries matching the active preset's light defaults, the previous preset's defaults, or legacy hydrated payloads (>= 25 matching preset keys) so switching themePreset never carries stale preset defaults forward. Effective token precedence resolves deterministically as APP_DEFAULTS -> THEME_PRESETS[themePreset] -> sparse database themeTokens -> sparse SITE_THEME_TOKENS.
  • WCAG Contrast Calibration & Dark Surface Tiers (src/lib/theme/stylesheet.ts): optimizeContrast binary-searches HSL lightness across 7 iterations (memoized in the bounded 1,000-entry contrastCache) to guarantee >= 4.5:1 text contrast and >= 3.0:1 UI/focus-ring contrast against target backgrounds. generateDynamicStyles and generateThemeStylesheet emit calibrated :root light-mode variables alongside .dark / [data-theme="dark"] dark-mode palettes across three surface tiers: base dark surfaces (800 / 900 / 950 / #000000), elevated 700 cards, and interactive 600 controls.
  • Zero-FOUC <head> Script & ThemeProvider Synchronization (src/app/layout.tsx, src/components/ThemeProvider.tsx): RootLayout injects the server-compiled <style id="dynamic-theme-style"> tag and a blocking inline themeScript in <head> that reads localStorage.getItem('theme_mode'), falls back to the theme_mode cookie or prefers-color-scheme: dark, and applies .dark / .light on <html> prior to first paint. On hydration, ThemeProvider (hasServerStylesheet) adopts the server stylesheet without FOUC and keeps localStorage and the theme_mode cookie synchronized when guests toggle modes.

Deterministic Precedence Hierarchy ​

Deployment Config (Environment Overrides / Secrets)
       ↓ (overrides)
Site Configuration (Database AppConfig)
       ↓ (falls back to)
Application Defaults (Generic Technical Fallbacks)

Every configurable value has one authoritative home. Ordinary site customization requires zero source code edits. At runtime boundaries (especially in production), configuration payloads are validated against Zod schemas (AppConfigSchema in src/features/content/schemas.ts, covering 89 persisted PostgreSQL columns in prisma/schema.prisma—including modules piped through ModuleConfigSchema—and 16 virtual DTO fields for 105 total schema fields), ensuring immediate, clear failure if misconfigured.

DTO sanitization in src/lib/config.ts and src/lib/backupPersistence.ts enforces three explicit visibility boundaries:

  • Public DTO (PublicAppConfigSchema in src/features/content/schemas.ts / toPublicAppConfig in src/lib/config.ts): Applies a strict 70-field allowlist for public SSR/client consumption, stripping all email/SMS delivery, secret, moderation/QR token, and RSVP grace-period fields while injecting runtime multisiteEnabled, isRsvpOpen, and isMessagingActive.
  • Backup Export Sanitizer (sanitizeAppConfigForBackup, src/lib/backupPersistence.ts): Iterates over the 85 APP_CONFIG_BACKUP_KEYS (src/lib/backupPersistence.ts, with sanitizeAppConfigForBackup re-exported by src/lib/config.ts) to retain all persisted non-secret PostgreSQL AppConfig columns (including modules, rsvpOpen, rsvpGracePeriodHours, and non-secret broadcast provider settings) while stripping the 4 raw provider secrets (APP_CONFIG_SECRET_KEYS: smtpPass, resendApiKey, sendgridApiKey, twilioAuthToken).
  • Admin DTO (AdminAppConfig / toAdminAppConfig, src/lib/config.ts): Extends toPublicAppConfig for authenticated admin settings endpoints (/api/admin/settings) with autoApproveGuestPhotos, rsvpOpen, rsvpGracePeriodHours, shipping/payment defaults, and the 13 non-secret email/SMS provider and batching fields (emailProvider, smtpHost, smtpPort, smtpUser, smtpFrom, smtpSecure, resendFrom, sendgridFrom, smsProvider, twilioAccountSid, twilioFromNumber, broadcastBatchSize, broadcastBatchDelayMs), while omitting the 4 raw provider secrets (smtpPass, resendApiKey, sendgridApiKey, twilioAuthToken) in favor of boolean presence flags (hasSmtpPass, hasResendApiKey, hasSendgridApiKey, hasTwilioAuthToken).

Import and export formats (src/app/api/admin/maintenance/export/route.ts) include versioning metadata (schemaVersion: "2.0") across the 18 exported domain models (excluding ephemeral AuthLockout lockout rows) to guarantee upgrade safety.

FieldTypeStorageDTO ExposureDescription
idstringPrismaPublicUnique configuration profile identifier (defaults to "global" in single-site deployments).
subdomainstringPrismaPublicOptional subdomain slug for AppConfig branding/profile routing when MULTISITE_ENABLED is active (the other 14 Prisma tables remain shared).
multisiteEnabledbooleanVirtual DTOPublicRuntime flag resolved from MULTISITE_ENABLED indicating whether subdomain AppConfig profile routing is active (14 other Prisma tables are shared).
partner1NamestringPrismaPublicPrimary display name for the first partner across headings, metadata, and monograms.
partner2NamestringPrismaPublicPrimary display name for the second partner across headings, metadata, and monograms.
brideNamestringPrismaPublicLegacy optional alias for the first partner name retained for backward compatibility.
groomNamestringPrismaPublicLegacy optional alias for the second partner name retained for backward compatibility.
weddingDatedatePrismaPublicScheduled wedding ceremony date and timestamp used by countdowns and calendar exports.
baseUrlstringPrismaPublicCanonical public base URL of the deployed wedding website used for SEO and Open Graph tags.
venueNamestringPrismaPublicDisplay name of the primary wedding ceremony or reception venue.
venueAddressstringPrismaPublicStreet address of the primary wedding venue.
venueCitystringPrismaPublicCity where the primary wedding venue is located.
venueStatestringPrismaPublicState, province, or region of the primary wedding venue.
venueZipstringPrismaPublicPostal or ZIP code of the primary wedding venue.
latitudenumberPrismaPublicGeographic latitude coordinate of the venue used for maps and live weather forecasts.
longitudenumberPrismaPublicGeographic longitude coordinate of the venue used for maps and live weather forecasts.
storyTextstringPrismaPublicCouple story narrative displayed on the homepage story section.
venueDescriptionstringPrismaPublicDescriptive overview of the wedding venue grounds, setting, and amenities.
travelAdvicestringPrismaPublicTravel, airport, parking, and local transit guidance for attending guests.
heroTitlestringPrismaPublicMain headline rendered inside the homepage hero banner.
heroSubtitlestringPrismaPublicSecondary tagline rendered beneath the homepage hero headline.
seoTitlestringPrismaPublicHTML document title and social preview title for search engines and link cards.
seoDescriptionstringPrismaPublicMeta description summarizing the wedding website for search engines and Open Graph previews.
contactEmailstringPrismaPublicPublic host contact email address displayed for guest inquiries.
photoAlbumUrlstringPrismaPublicOptional external shared photo album URL displayed on the public gallery page.
autoApproveGuestPhotosbooleanPrismaAdmin-onlyAdmin-only toggle controlling whether new guest photo uploads are automatically approved and published immediately without manual moderation; omitted from public DTOs.
guestPhotoQrTokenVersionnumberPrismaServer-onlyAdmin-only monotonic version counter for rotating signed guest photo upload QR links and invalidating previously issued photo sessions; omitted from public DTOs.
faviconUrlstringPrismaPublicAsset path or safe URL for the browser tab favicon icon.
ogImageUrlstringPrismaPublicDefault Open Graph social sharing preview image URL or asset path.
brandMonogramstringPrismaPublicCustom monogram text overriding initials derived from partner names.
brandLogoUrlstringPrismaPublicOptional custom brand logo image URL or asset path rendered in navigation.
brandLogoAltstringPrismaPublicAccessible alt text describing the custom brand logo image.
heroImageUrlstringPrismaPublicOptional custom hero background or featured image URL on the homepage.
heroImageAltstringPrismaPublicAccessible alt text describing the homepage hero image.
brandWatermarkUrlstringPrismaPublicOptional decorative watermark graphic URL rendered in page backgrounds.
brandWatermarkAltstringPrismaPublicAccessible alt text for the brand watermark graphic when non-decorative.
badgeGraphicUrlstringPrismaPublicOptional emblem or badge graphic URL displayed in headers or footers.
badgeGraphicAltstringPrismaPublicAccessible alt text describing the custom badge graphic.
seoKeywordsstringPrismaPublicComma-separated SEO meta keywords template supporting partner and venue placeholders.
colorPrimarystringPrismaPublicPrimary brand hex color applied to accents, buttons, and interactive highlights.
colorSecondarystringPrismaPublicSecondary brand hex color applied to complementary badges, borders, and highlights.
themePreset'classic' | 'modern' | 'romantic' | 'minimal' | 'editorial'PrismaPublicNamed visual theme preset controlling baseline palette and typographic styling.
themeTokensrecordPrismaPublicCustom CSS custom property overrides (--* tokens) merged atop the active theme preset.
typographyScaleobjectVirtual DTOPublicVirtual DTO typography scale tokens defining font sizes, weights, and line heights.
spacingScaleobjectVirtual DTOPublicVirtual DTO spacing scale tokens defining rhythm units, container width, grid gap, and card padding.
borderTreatmentobjectVirtual DTOPublicVirtual DTO border radius, width, and stroke style design tokens.
brandDimensionsobjectVirtual DTOPublicVirtual DTO composite dimensions for brand logos, hero height, watermarks, and badges.
brandLogoWidthstringVirtual DTOPublicVirtual DTO CSS width token for the header brand logo.
brandLogoHeightstringVirtual DTOPublicVirtual DTO CSS height token for the header brand logo.
brandHeroHeightstringVirtual DTOPublicVirtual DTO CSS height token for the homepage hero banner.
brandWatermarkWidthstringVirtual DTOPublicVirtual DTO CSS width token for background watermark graphics.
brandWatermarkOpacitystringVirtual DTOPublicVirtual DTO CSS opacity value (0 to 1) applied to brand watermark graphics.
brandBadgeSizestringVirtual DTOPublicVirtual DTO CSS size token for decorative brand badge graphics.
layoutContainerMaxWidthstringPrismaPublicMaximum CSS width token for primary page content containers.
layoutGridGapstringPrismaPublicDefault CSS gap token between multi-column layout grid items.
layoutCardPaddingstringPrismaPublicDefault internal CSS padding token for surface cards and panels.
layoutBorderRadiusstringPrismaPublicDefault CSS border-radius token applied to cards, inputs, and dialogs.
fontHeadingstringVirtual DTOPublicVirtual DTO CSS font-family token used for display headings and titles.
fontBodystringVirtual DTOPublicVirtual DTO CSS font-family token used for body copy and UI controls.
fontMonostringVirtual DTOPublicVirtual DTO CSS font-family token used for invitation codes and tabular values.
timezonestringPrismaPublicIANA timezone identifier used to format event schedules and countdown timers.
showCountdownbooleanPrismaPublicToggle controlling whether the live wedding countdown widget renders on public pages.
showAddToCalendarbooleanPrismaPublicToggle controlling whether Add-to-Calendar links and ICS downloads are shown.
rsvpOpenbooleanPrismaPublicManual toggle controlling whether online guest RSVP submissions and edits are enabled.
isRsvpOpenbooleanVirtual DTOPublicVirtual server-evaluated flag indicating whether online RSVPs are currently open after evaluating manual lock, cutoff date, and grace period.
isMessagingActivebooleanVirtual DTOPublicVirtual server-evaluated flag indicating whether an outbound email or SMS provider is active for self-service guest sign-in link delivery.
rsvpDeadlineDatestringPrismaPublicOptional global RSVP cutoff calendar date (YYYY-MM-DD) enforced at midnight in the venue timezone.
rsvpGracePeriodHoursnumberPrismaAdmin-onlyAdmin-only silent grace window in hours (0, 12, 24, 48, 72, or 168) after the midnight RSVP cutoff; omitted from public DTOs.
rsvpClosedMessagestringPrismaPublicSanitized custom message displayed to guests and returned by RSVP APIs once online RSVPs close.
emailProviderstringPrismaAdmin-onlyActive outbound email transport provider identifier (smtp, resend, or sendgrid).
smtpHoststringPrismaAdmin-onlyHostname of the outbound SMTP relay server for guest broadcasts.
smtpPortnumberPrismaAdmin-onlyTCP port number used when connecting to the outbound SMTP server.
smtpUserstringPrismaAdmin-onlyAuthentication username for the configured outbound SMTP server.
smtpPassstringPrismaMasked secret (hasSmtpPass)Authentication password for the SMTP server; omitted from public DTOs and masked as hasSmtpPass in admin DTOs.
smtpFromstringPrismaAdmin-onlySender email address used in the From header of SMTP broadcast emails.
smtpSecurebooleanPrismaAdmin-onlyWhether the SMTP transport establishes implicit TLS on connection.
resendApiKeystringPrismaMasked secret (hasResendApiKey)API key for Resend email delivery; omitted from public DTOs and masked as hasResendApiKey in admin DTOs.
resendFromstringPrismaAdmin-onlyVerified sender email address used for outbound Resend broadcasts.
sendgridApiKeystringPrismaMasked secret (hasSendgridApiKey)API key for SendGrid email delivery; omitted from public DTOs and masked as hasSendgridApiKey in admin DTOs.
sendgridFromstringPrismaAdmin-onlyVerified sender email address used for outbound SendGrid broadcasts.
smsProviderstringPrismaAdmin-onlyActive outbound SMS broadcast provider identifier (none or twilio).
twilioAccountSidstringPrismaAdmin-onlyTwilio Account SID used for dispatching SMS guest broadcasts.
twilioAuthTokenstringPrismaMasked secret (hasTwilioAuthToken)Twilio Auth Token secret; omitted from public DTOs and masked as hasTwilioAuthToken in admin DTOs.
twilioFromNumberstringPrismaAdmin-onlyTwilio E.164 sender phone number or messaging source for SMS broadcasts.
broadcastBatchSizenumberPrismaAdmin-onlyMaximum number of broadcast recipients processed per delivery batch.
broadcastBatchDelayMsnumberPrismaAdmin-onlyDelay in milliseconds between consecutive outbound broadcast batches.
shippingRecipientNamestringPrismaAdmin-onlyRecipient full name for registry gift shipping; omitted from public DTOs and served only to authenticated guests and admins.
shippingAddressLine1stringPrismaAdmin-onlyPrimary street address line for registry gift deliveries; omitted from public DTOs.
shippingAddressLine2stringPrismaAdmin-onlyOptional apartment, suite, or unit line for registry gift deliveries; omitted from public DTOs.
shippingCitystringPrismaAdmin-onlyCity for registry gift deliveries; omitted from public DTOs.
shippingStatestringPrismaAdmin-onlyState, province, or region for registry gift deliveries; omitted from public DTOs.
shippingZipstringPrismaAdmin-onlyPostal or ZIP code for registry gift deliveries; omitted from public DTOs.
shippingCountrystringPrismaAdmin-onlyDestination country for registry gift deliveries; omitted from public DTOs.
shippingPhonestringPrismaAdmin-onlyCarrier contact phone number for registry gift deliveries; omitted from public DTOs.
shippingDeliveryNotesstringPrismaAdmin-onlyOptional carrier or concierge instructions for registry gift deliveries; omitted from public DTOs.
defaultPaymentHandleTypestringPrismaAdmin-onlySite-wide fallback peer-to-peer payment service (Venmo, PayPal, Cash App, Zelle, or Custom) for group gifts without an item-level handle; omitted from public DTOs.
defaultPaymentHandlestringPrismaAdmin-onlySite-wide fallback peer-to-peer payment handle or username for group gifts without an item-level handle; omitted from public DTOs.
registryGiftAccessTier'PASSCODE_GUESTS' | 'INVITED_HOUSEHOLDS'PrismaAdmin-onlyControls whether website passcode guests (PASSCODE_GUESTS) or only verified invited households (INVITED_HOUSEHOLDS) can claim physical gifts and record zero-fee direct transfers; omitted from public DTOs.
shippingDisclosureTier'PASSCODE_GUESTS' | 'INVITED_HOUSEHOLDS' | 'POST_CLAIM_ONLY'PrismaAdmin-onlyControls when the couple shipping address is revealed: to passcode and invited guests (PASSCODE_GUESTS), verified invited households only (INVITED_HOUSEHOLDS), or strictly after claiming a gift (POST_CLAIM_ONLY); omitted from public DTOs.
maxPendingReservationsnumberPrismaAdmin-onlyMaximum concurrent RESERVED physical gift holds allowed per household or email before requiring confirmation or release; omitted from public DTOs.
setupCompletedbooleanPrismaAdmin-onlyAdmin-only flag tracking whether the five-step onboarding setup wizard has been completed; omitted from public DTOs.
modulesobjectPrismaPublicPersisted feature module enablement map validated against ModuleConfigSchema with dependency resolution.
featuresobject[]PrismaPublicOrdered homepage content section definitions controlling section titles, visibility, and copy.
createdAtdatePrismaPublicTimestamp recording when the configuration record was initially created.
updatedAtdatePrismaPublicTimestamp recording when the configuration record was last modified.

Released under the AGPL-3.0 License.