# harsh0519/bday architecture

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

- Interactive diagram: https://gitdiagram.com/harsh0519/bday
- Repository: https://github.com/harsh0519/bday

## Overview

1. This repository is a Next.js App Router project built as a polished, single-page interactive experience rather than a traditional multi-route app. The main entry points are `app/page.tsx` for content composition and `app/layout.tsx` for global shell and metadata.

2. The UI is organized around a set of full-page or scroll-based sections under `app/components/sections`. The section names—`Intro`, `Timeline`, `Gallery`, `LoveLetter`, `Wish`, and `Stars`—suggest a narrative/romantic storytelling flow where the page is meant to be consumed vertically in a sequence.

3. Shared page chrome and reusable controls live in `app/components/ui`. These include `AudioPlayer`, `CustomCursor`, `PageProgress`, `SectionWrapper`, and `DebugPanel`, which indicates the experience is heavily interactive and likely relies on client-side state, scroll position, and pointer behavior.

4. `SectionWrapper` is probably the main composition boundary between content sections and the rest of the page chrome. That makes the architecture centered on a repeated section pattern, with each content block receiving shared layout/styling behavior while remaining independently authored.

5. The `app/lib` folder contains effect-oriented helpers rather than business logic: `gsap.ts` for animation setup, `three-scene.ts` for 3D/canvas scene logic, and `confetti.ts` for celebratory effects. This implies the app blends DOM animations, WebGL/Three.js-style rendering, and discrete visual effects inside the same page.

6. The data flow appears mostly one-way and local: `page.tsx` assembles the sections and UI, sections render content, and interactive components read browser state such as audio, cursor movement, and scroll progress. There is no sign of backend APIs, persistence, or external data fetching, so the experience is likely static/client-driven.

7. `app/globals.css` and `app/config.ts` suggest centralized styling and content/configuration values. That points to a design where theme, spacing, copy, or feature toggles are managed outside the individual sections to keep the page coherent.

8. The project uses TypeScript throughout and is wired with standard Next.js tooling: `next.config.*`, `tsconfig.json`, `eslint.config.mjs`, and `postcss.config.mjs`. This is a frontend-only build pipeline with generated production output handled by Next.js and static assets served from `public`.

9. The `public` directory likely holds the media assets that make the page feel experiential—images, audio, and possibly decorative icons or scene assets. Given the presence of an audio player and gallery section, asset management is a material part of the architecture.

10. For an architecture diagram, the key boundary is between the page composition layer and the effect/interaction layer. The composition layer assembles themed sections; the interaction layer provides cross-cutting behaviors like cursor, progress, audio, animation, and 3D visuals. The result is a self-contained, client-heavy Next.js presentation app with no visible server-side domain logic.

Main entry points: [`app/page.tsx`](https://github.com/harsh0519/bday/blob/main/app/page.tsx) (Home page), [`app/components/ui/SectionWrapper.tsx`](https://github.com/harsh0519/bday/blob/main/app/components/ui/SectionWrapper.tsx) (Section wrapper), [`app/layout.tsx`](https://github.com/harsh0519/bday/blob/main/app/layout.tsx) (Layout), [`app/components/sections/IntroSection.tsx`](https://github.com/harsh0519/bday/blob/main/app/components/sections/IntroSection.tsx) (Intro)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_layout["Layout<br/>Next shell<br/>[layout.tsx]"]
  node_page["Home page<br/>Composition<br/>[page.tsx]"]
  node_globals["Global CSS<br/>Styling<br/>[globals.css]"]
  node_config["Config<br/>[config.ts]"]
end

subgraph group_experience["Experience flow"]
  node_intro["Intro<br/>Section<br/>[IntroSection.tsx]"]
  node_timeline["Timeline<br/>Section"]
  node_gallery["Gallery<br/>Section<br/>[GallerySection.tsx]"]
  node_loveletter["Love letter<br/>Section"]
  node_wish["Wish<br/>Section<br/>[WishSection.tsx]"]
  node_stars["Stars<br/>Section<br/>[StarsSection.tsx]"]
end

subgraph group_interaction["Interaction layer"]
  node_sectionwrap["Section wrapper<br/>Layout helper<br/>[SectionWrapper.tsx]"]
  node_audioplayer["Audio player<br/>Client control<br/>[AudioPlayer.tsx]"]
  node_cursor(("Custom cursor<br/>Pointer effect<br/>[CustomCursor.tsx]"))
  node_progress["Page progress<br/>Scroll indicator<br/>[PageProgress.tsx]"]
  node_debug["Debug panel<br/>Dev UI<br/>[DebugPanel.tsx]"]
  node_gsap["GSAP setup<br/>Animation helper<br/>[gsap.ts]"]
  node_three["3D scene<br/>Canvas scene<br/>[three-scene.ts]"]
  node_confetti["Confetti<br/>Effect helper<br/>[confetti.ts]"]
end

node_assets[("Public assets<br/>Static media")]

node_layout -->|"wraps"| node_page
node_page -->|"renders"| node_intro
node_page -->|"renders"| node_timeline
node_page -->|"renders"| node_gallery
node_page -->|"renders"| node_loveletter
node_page -->|"renders"| node_wish
node_page -->|"renders"| node_stars
node_page -->|"uses"| node_sectionwrap
node_page -->|"uses"| node_audioplayer
node_page -->|"uses"| node_cursor
node_page -->|"uses"| node_progress
node_page -->|"uses"| node_debug
node_page -->|"reads"| node_config
node_page -.->|"animates"| node_gsap
node_page -.->|"visualizes"| node_three
node_page -.->|"triggers"| node_confetti
node_intro -->|"inherits"| node_sectionwrap
node_timeline -->|"inherits"| node_sectionwrap
node_gallery -->|"inherits"| node_sectionwrap
node_loveletter -->|"inherits"| node_sectionwrap
node_wish -->|"inherits"| node_sectionwrap
node_stars -->|"inherits"| node_sectionwrap
node_layout -->|"loads"| node_globals
node_layout -->|"serves"| node_assets

click node_layout "https://github.com/harsh0519/bday/blob/main/app/layout.tsx"
click node_page "https://github.com/harsh0519/bday/blob/main/app/page.tsx"
click node_globals "https://github.com/harsh0519/bday/blob/main/app/globals.css"
click node_config "https://github.com/harsh0519/bday/blob/main/app/config.ts"
click node_intro "https://github.com/harsh0519/bday/blob/main/app/components/sections/IntroSection.tsx"
click node_timeline "https://github.com/harsh0519/bday/blob/main/app/components/sections/TimelineSection.tsx"
click node_gallery "https://github.com/harsh0519/bday/blob/main/app/components/sections/GallerySection.tsx"
click node_loveletter "https://github.com/harsh0519/bday/blob/main/app/components/sections/LoveLetterSection.tsx"
click node_wish "https://github.com/harsh0519/bday/blob/main/app/components/sections/WishSection.tsx"
click node_stars "https://github.com/harsh0519/bday/blob/main/app/components/sections/StarsSection.tsx"
click node_sectionwrap "https://github.com/harsh0519/bday/blob/main/app/components/ui/SectionWrapper.tsx"
click node_audioplayer "https://github.com/harsh0519/bday/blob/main/app/components/ui/AudioPlayer.tsx"
click node_cursor "https://github.com/harsh0519/bday/blob/main/app/components/ui/CustomCursor.tsx"
click node_progress "https://github.com/harsh0519/bday/blob/main/app/components/ui/PageProgress.tsx"
click node_debug "https://github.com/harsh0519/bday/blob/main/app/components/ui/DebugPanel.tsx"
click node_gsap "https://github.com/harsh0519/bday/blob/main/app/lib/gsap.ts"
click node_three "https://github.com/harsh0519/bday/blob/main/app/lib/three-scene.ts"
click node_confetti "https://github.com/harsh0519/bday/blob/main/app/lib/confetti.ts"
click node_assets "https://github.com/harsh0519/bday/tree/main/public"

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_layout,node_page,node_globals,node_config toneBlue
class node_intro,node_timeline,node_gallery,node_loveletter,node_wish,node_stars toneAmber
class node_sectionwrap,node_audioplayer,node_cursor,node_progress,node_debug,node_gsap,node_three,node_confetti toneMint
class node_assets toneNeutral
```

## Components

### App shell

Next.js App Router entrypoints and global styling/configuration.

- [Layout](https://github.com/harsh0519/bday/blob/main/app/layout.tsx): Next shell · Global document shell and metadata. · `app/layout.tsx`
- [Home page](https://github.com/harsh0519/bday/blob/main/app/page.tsx): Composition · Assembles the single-page experience from sections and shared UI. · `app/page.tsx`
- [Global CSS](https://github.com/harsh0519/bday/blob/main/app/globals.css): Styling · Application-wide styles and theming. · `app/globals.css`
- [Config](https://github.com/harsh0519/bday/blob/main/app/config.ts): App config · Centralized content and presentation settings. · `app/config.ts`

### Experience flow

Scroll-driven narrative sections that make up the main page.

- [Intro](https://github.com/harsh0519/bday/blob/main/app/components/sections/IntroSection.tsx): Section · Opening narrative section. · `app/components/sections/IntroSection.tsx`
- [Timeline](https://github.com/harsh0519/bday/blob/main/app/components/sections/TimelineSection.tsx): Section · Sequential story or memory timeline. · `app/components/sections/TimelineSection.tsx`
- [Gallery](https://github.com/harsh0519/bday/blob/main/app/components/sections/GallerySection.tsx): Section · Visual gallery and media showcase. · `app/components/sections/GallerySection.tsx`
- [Love letter](https://github.com/harsh0519/bday/blob/main/app/components/sections/LoveLetterSection.tsx): Section · Personal message or reflective content block. · `app/components/sections/LoveLetterSection.tsx`
- [Wish](https://github.com/harsh0519/bday/blob/main/app/components/sections/WishSection.tsx): Section · Closing wish or interactive prompt. · `app/components/sections/WishSection.tsx`
- [Stars](https://github.com/harsh0519/bday/blob/main/app/components/sections/StarsSection.tsx): Section · Decorative finale or ambient visual section. · `app/components/sections/StarsSection.tsx`

### Interaction layer

Shared UI chrome and effect helpers that drive the interactive presentation.

- [Section wrapper](https://github.com/harsh0519/bday/blob/main/app/components/ui/SectionWrapper.tsx): Layout helper · Shared boundary for section spacing and presentation. · `app/components/ui/SectionWrapper.tsx`
- [Audio player](https://github.com/harsh0519/bday/blob/main/app/components/ui/AudioPlayer.tsx): Client control · In-page audio playback and controls. · `app/components/ui/AudioPlayer.tsx`
- [Custom cursor](https://github.com/harsh0519/bday/blob/main/app/components/ui/CustomCursor.tsx): Pointer effect · Pointer-following cursor treatment. · `app/components/ui/CustomCursor.tsx`
- [Page progress](https://github.com/harsh0519/bday/blob/main/app/components/ui/PageProgress.tsx): Scroll indicator · Visual indicator of scroll position through the experience. · `app/components/ui/PageProgress.tsx`
- [Debug panel](https://github.com/harsh0519/bday/blob/main/app/components/ui/DebugPanel.tsx): Dev UI · Optional runtime inspection and debugging surface. · `app/components/ui/DebugPanel.tsx`
- [GSAP setup](https://github.com/harsh0519/bday/blob/main/app/lib/gsap.ts): Animation helper · Animation orchestration utilities. · `app/lib/gsap.ts`
- [3D scene](https://github.com/harsh0519/bday/blob/main/app/lib/three-scene.ts): Canvas scene · Three.js-style scene logic for immersive visuals. · `app/lib/three-scene.ts`
- [Confetti](https://github.com/harsh0519/bday/blob/main/app/lib/confetti.ts): Effect helper · Celebratory particle or burst effect utilities. · `app/lib/confetti.ts`

### Other components

- [Public assets](https://github.com/harsh0519/bday/tree/main/public): Static media · Images, audio, and decorative assets used by the experience. · `public`

## Connections

- Layout → Home page: wraps · Global shell contains the page experience.
- Home page → Intro: renders · Page composes the opening section.
- Home page → Timeline: renders · Page composes the timeline section.
- Home page → Gallery: renders · Page composes the gallery section.
- Home page → Love letter: renders · Page composes the love letter section.
- Home page → Wish: renders · Page composes the wish section.
- Home page → Stars: renders · Page composes the finale section.
- Home page → Section wrapper: uses · Shared wrapper normalizes section layout.
- Home page → Audio player: uses · Global audio control is mounted at the page level.
- Home page → Custom cursor: uses · Custom cursor is part of the interactive chrome.
- Home page → Page progress: uses · Scroll progress is shared across the experience.
- Home page → Debug panel: uses · Debug controls are available in the page shell.
- Home page → Config: reads · Central config provides shared content or options.
- Home page → GSAP setup: animates · Page-level interactions rely on animation utilities.
- Home page → 3D scene: visualizes · Immersive visuals may use a 3D scene.
- Home page → Confetti: triggers · Celebratory effects can be fired from the experience.
- Intro → Section wrapper: inherits · Sections share a common presentation boundary.
- Timeline → Section wrapper: inherits · Sections share a common presentation boundary.
- Gallery → Section wrapper: inherits · Sections share a common presentation boundary.
- Love letter → Section wrapper: inherits · Sections share a common presentation boundary.
- Wish → Section wrapper: inherits · Sections share a common presentation boundary.
- Stars → Section wrapper: inherits · Sections share a common presentation boundary.
- Layout → Global CSS: loads · Global styles are applied from the root shell.
- Layout → Public assets: serves · Static media is delivered through the app runtime.
