# susovan777/wed architecture

> Architecture diagram of the GitHub repository susovan777/wed, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/susovan777/wed
- Repository: https://github.com/susovan777/wed

## Overview

This repository implements configurable wedding invitation pages. A visitor opens a slug-specific invitation, which loads its invitation data and renders an opening gate followed by ordered sections for the couple, events, countdown, story, and gallery. Invitation content and types provide the internal configuration layer; the invitation sections compose visual components and date/countdown helpers. The graph follows documented imports and sampled calls; unsampled modules are represented only where the source index establishes their relationships.

Main entry points: [`src/components/invitation/InvitationSections.tsx`](https://github.com/susovan777/wed/blob/main/src/components/invitation/InvitationSections.tsx) (Section dispatcher), [`src/app/[slug]/page.tsx`](https://github.com/susovan777/wed/blob/main/src/app/%5Bslug%5D/page.tsx) (Slug page), [`src/components/invitation/InvitationShell.tsx`](https://github.com/susovan777/wed/blob/main/src/components/invitation/InvitationShell.tsx) (Invitation shell), [`src/components/invitation/sections/Hero.tsx`](https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/Hero.tsx) (Wedding hero)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Page and content"]
  node_slugpage["Slug page<br/>[page.tsx]"]
  node_catalog["Invitation catalog<br/>[index.ts]"]
  node_sample["Sample invitation<br/>[sample-wedding.ts]"]
  node_schema["Invitation types<br/>[invitation.ts]"]
end

subgraph group_experience["Invitation experience"]
  node_shell["Invitation shell"]
  node_gate["Opening gate<br/>[OpeningGate.tsx]"]
  node_context["Open state<br/>[OpenContext.tsx]"]
  node_petals["Petal effects<br/>[PetalFall.tsx]"]
end

subgraph group_sections["Invitation sections"]
  node_dispatcher["Section dispatcher"]
  node_hero["Wedding hero<br/>[Hero.tsx]"]
  node_couple["Bride and groom<br/>[BrideGroom.tsx]"]
  node_events["Celebration events<br/>[Celebrations.tsx]"]
  node_countdown["Wedding countdown<br/>[Countdown.tsx]"]
  node_story["Couple story<br/>[Story.tsx]"]
  node_gallery["Photo gallery<br/>[Gallery.tsx]"]
end

subgraph group_components["Visual components and helpers"]
  node_motion["Motion effects<br/>[Reveal.tsx]"]
  node_blurtext["Blur text<br/>[BlurText.tsx]"]
  node_personmodal["Person details modal<br/>[PersonModal.tsx]"]
  node_galleryview["Gallery collage and lightbox<br/>[GalleryCollage.tsx]"]
  node_countcards["Countdown cards<br/>[CountdownCards.tsx]"]
  node_tick["Countdown timer<br/>[useCountdown.ts]"]
  node_dateformat["Date formatting<br/>[date.ts]"]
  node_eventformat["Event date formatting<br/>[eventDate.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens slug"| node_slugpage
node_slugpage -->|"loads invitation"| node_catalog
node_slugpage -->|"renders shell"| node_shell
node_slugpage -->|"renders sections"| node_dispatcher
node_catalog -->|"registers sample"| node_sample
node_shell -->|"renders gate"| node_gate
node_shell -->|"provides open state"| node_context
node_shell -->|"renders effects"| node_petals
node_dispatcher -->|"renders section"| node_hero
node_dispatcher -->|"renders section"| node_couple
node_dispatcher -->|"renders section"| node_events
node_dispatcher -->|"renders section"| node_countdown
node_dispatcher -->|"renders section"| node_story
node_dispatcher -->|"renders section"| node_gallery
node_hero -->|"formats wedding date"| node_dateformat
node_hero -->|"renders text"| node_blurtext
node_couple -->|"opens details"| node_personmodal
node_events -->|"formats event dates"| node_eventformat
node_countdown -->|"renders countdown"| node_countcards
node_countcards -->|"reads time left"| node_tick
node_story -->|"reveals content"| node_motion
node_story -.->|"uses date helpers"| node_dateformat
node_gallery -->|"renders collage"| node_galleryview
node_galleryview -->|"reveals images"| node_motion
node_blurtext -->|"reads open state"| node_context
node_motion -->|"reads open state"| node_context

click node_slugpage "https://github.com/susovan777/wed/blob/main/src/app/%5Bslug%5D/page.tsx"
click node_catalog "https://github.com/susovan777/wed/blob/main/src/content/invitations/index.ts"
click node_sample "https://github.com/susovan777/wed/blob/main/src/content/invitations/sample-wedding.ts"
click node_schema "https://github.com/susovan777/wed/blob/main/src/types/invitation.ts"
click node_shell "https://github.com/susovan777/wed/blob/main/src/components/invitation/InvitationShell.tsx"
click node_gate "https://github.com/susovan777/wed/blob/main/src/components/opening/OpeningGate.tsx"
click node_context "https://github.com/susovan777/wed/blob/main/src/components/invitation/OpenContext.tsx"
click node_petals "https://github.com/susovan777/wed/blob/main/src/components/invitation/PetalFall.tsx"
click node_dispatcher "https://github.com/susovan777/wed/blob/main/src/components/invitation/InvitationSections.tsx"
click node_hero "https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/Hero.tsx"
click node_couple "https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/BrideGroom.tsx"
click node_events "https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/Celebrations.tsx"
click node_countdown "https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/Countdown.tsx"
click node_story "https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/Story.tsx"
click node_gallery "https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/Gallery.tsx"
click node_motion "https://github.com/susovan777/wed/blob/main/src/components/motion/Reveal.tsx"
click node_blurtext "https://github.com/susovan777/wed/blob/main/src/components/motion/BlurText.tsx"
click node_personmodal "https://github.com/susovan777/wed/blob/main/src/components/ui/PersonModal.tsx"
click node_galleryview "https://github.com/susovan777/wed/blob/main/src/components/ui/GalleryCollage.tsx"
click node_countcards "https://github.com/susovan777/wed/blob/main/src/components/ui/CountdownCards.tsx"
click node_tick "https://github.com/susovan777/wed/blob/main/src/hooks/useCountdown.ts"
click node_dateformat "https://github.com/susovan777/wed/blob/main/src/lib/date.ts"
click node_eventformat "https://github.com/susovan777/wed/blob/main/src/lib/eventDate.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_slugpage,node_catalog,node_sample,node_schema toneBlue
class node_shell,node_gate,node_context,node_petals toneAmber
class node_dispatcher,node_hero,node_couple,node_events,node_countdown,node_story,node_gallery toneMint
class node_motion,node_blurtext,node_personmodal,node_galleryview,node_countcards,node_tick,node_dateformat,node_eventformat toneRose
class node_visitor toneIndigo
```

## Components

### Page and content

- [Slug page](https://github.com/susovan777/wed/blob/main/src/app/%5Bslug%5D/page.tsx): `src/app/[slug]/page.tsx`
- [Invitation catalog](https://github.com/susovan777/wed/blob/main/src/content/invitations/index.ts): `src/content/invitations/index.ts`
- [Sample invitation](https://github.com/susovan777/wed/blob/main/src/content/invitations/sample-wedding.ts): `src/content/invitations/sample-wedding.ts`
- [Invitation types](https://github.com/susovan777/wed/blob/main/src/types/invitation.ts): `src/types/invitation.ts`

### Invitation experience

- [Invitation shell](https://github.com/susovan777/wed/blob/main/src/components/invitation/InvitationShell.tsx): `src/components/invitation/InvitationShell.tsx`
- [Opening gate](https://github.com/susovan777/wed/blob/main/src/components/opening/OpeningGate.tsx): `src/components/opening/OpeningGate.tsx`
- [Open state](https://github.com/susovan777/wed/blob/main/src/components/invitation/OpenContext.tsx): `src/components/invitation/OpenContext.tsx`
- [Petal effects](https://github.com/susovan777/wed/blob/main/src/components/invitation/PetalFall.tsx): `src/components/invitation/PetalFall.tsx`

### Invitation sections

- [Section dispatcher](https://github.com/susovan777/wed/blob/main/src/components/invitation/InvitationSections.tsx): `src/components/invitation/InvitationSections.tsx`
- [Wedding hero](https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/Hero.tsx): `src/components/invitation/sections/Hero.tsx`
- [Bride and groom](https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/BrideGroom.tsx): `src/components/invitation/sections/BrideGroom.tsx`
- [Celebration events](https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/Celebrations.tsx): `src/components/invitation/sections/Celebrations.tsx`
- [Wedding countdown](https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/Countdown.tsx): `src/components/invitation/sections/Countdown.tsx`
- [Couple story](https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/Story.tsx): `src/components/invitation/sections/Story.tsx`
- [Photo gallery](https://github.com/susovan777/wed/blob/main/src/components/invitation/sections/Gallery.tsx): `src/components/invitation/sections/Gallery.tsx`

### Visual components and helpers

- [Motion effects](https://github.com/susovan777/wed/blob/main/src/components/motion/Reveal.tsx): `src/components/motion/Reveal.tsx`
- [Blur text](https://github.com/susovan777/wed/blob/main/src/components/motion/BlurText.tsx): `src/components/motion/BlurText.tsx`
- [Person details modal](https://github.com/susovan777/wed/blob/main/src/components/ui/PersonModal.tsx): `src/components/ui/PersonModal.tsx`
- [Gallery collage and lightbox](https://github.com/susovan777/wed/blob/main/src/components/ui/GalleryCollage.tsx): `src/components/ui/GalleryCollage.tsx`
- [Countdown cards](https://github.com/susovan777/wed/blob/main/src/components/ui/CountdownCards.tsx): `src/components/ui/CountdownCards.tsx`
- [Countdown timer](https://github.com/susovan777/wed/blob/main/src/hooks/useCountdown.ts): `src/hooks/useCountdown.ts`
- [Date formatting](https://github.com/susovan777/wed/blob/main/src/lib/date.ts): `src/lib/date.ts`
- [Event date formatting](https://github.com/susovan777/wed/blob/main/src/lib/eventDate.ts): `src/lib/eventDate.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Slug page: opens slug
- Slug page → Invitation catalog: loads invitation (evidence: `src/app/[slug]/page.tsx`)
- Slug page → Invitation shell: renders shell (evidence: `src/app/[slug]/page.tsx`)
- Slug page → Section dispatcher: renders sections (evidence: `src/app/[slug]/page.tsx`)
- Invitation catalog → Sample invitation: registers sample (evidence: `src/content/invitations/index.ts`)
- Invitation shell → Opening gate: renders gate (evidence: `src/components/invitation/InvitationShell.tsx`)
- Invitation shell → Open state: provides open state (evidence: `src/components/invitation/InvitationShell.tsx`)
- Invitation shell → Petal effects: renders effects (evidence: `src/components/invitation/InvitationShell.tsx`)
- Section dispatcher → Wedding hero: renders section (evidence: `src/components/invitation/InvitationSections.tsx`)
- Section dispatcher → Bride and groom: renders section (evidence: `src/components/invitation/InvitationSections.tsx`)
- Section dispatcher → Celebration events: renders section (evidence: `src/components/invitation/InvitationSections.tsx`)
- Section dispatcher → Wedding countdown: renders section (evidence: `src/components/invitation/InvitationSections.tsx`)
- Section dispatcher → Couple story: renders section (evidence: `src/components/invitation/InvitationSections.tsx`)
- Section dispatcher → Photo gallery: renders section (evidence: `src/components/invitation/InvitationSections.tsx`)
- Wedding hero → Date formatting: formats wedding date (evidence: `src/components/invitation/sections/Hero.tsx`)
- Wedding hero → Blur text: renders text (evidence: `src/components/invitation/sections/Hero.tsx`)
- Bride and groom → Person details modal: opens details
- Celebration events → Event date formatting: formats event dates (evidence: `src/components/invitation/sections/Celebrations.tsx`)
- Wedding countdown → Countdown cards: renders countdown (evidence: `src/components/invitation/sections/Countdown.tsx`)
- Countdown cards → Countdown timer: reads time left (evidence: `src/components/ui/CountdownCards.tsx`)
- Couple story → Motion effects: reveals content (evidence: `src/components/invitation/sections/Story.tsx`)
- Couple story → Date formatting: uses date helpers
- Photo gallery → Gallery collage and lightbox: renders collage (evidence: `src/components/invitation/sections/Gallery.tsx`)
- Gallery collage and lightbox → Motion effects: reveals images (evidence: `src/components/ui/GalleryCollage.tsx`)
- Blur text → Open state: reads open state (evidence: `src/components/motion/BlurText.tsx`)
- Motion effects → Open state: reads open state (evidence: `src/components/motion/Reveal.tsx`)
