# wyzdmulc265/suprise-me-bday architecture

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

- Interactive diagram: https://gitdiagram.com/wyzdmulc265/suprise-me-bday
- Repository: https://github.com/wyzdmulc265/suprise-me-bday

## Overview

Happy Birthday Wishing Site is a single-page personalized birthday experience. A visitor enters a name, starts the countdown, watches the name and matching quotes reveal, then sees a birthday wish and confetti. The server exposes quote and random-wish endpoints; the sampled storage implementation serves seeded in-memory data, despite the README describing PostgreSQL tables. The graph preserves the documented reveal and celebration stages. Some frontend data-fetching details are unsampled, so those links are omitted rather than inferred.

Main entry points: [`client/src/pages/Home.tsx`](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/pages/Home.tsx) (Birthday flow), [`client/src/App.tsx`](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/App.tsx) (App router), [`server/routes.ts`](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/server/routes.ts) (API handlers), [`server/storage.ts`](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/server/storage.ts) (Seeded birthday data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Birthday experience"]
  node_home["Birthday flow<br/>[Home.tsx]"]
  node_runaway["Runaway button<br/>[RunawayButton.tsx]"]
  node_birthday_hooks["Birthday data hooks<br/>[use-birthday.ts]"]
  node_window_hook["Window sizing<br/>[use-window-size.ts]"]
end

subgraph group_client["Client foundation"]
  node_app["App router<br/>[App.tsx]"]
  node_query_client["Query client<br/>[queryClient.ts]"]
  node_bootstrap["React bootstrap<br/>[main.tsx]"]
end

subgraph group_api["Birthday API"]
  node_server["HTTP server<br/>[index.ts]"]
  node_routes["API handlers<br/>[routes.ts]"]
end

subgraph group_data["Data contracts"]
  node_storage["Seeded birthday data<br/>[storage.ts]"]
  node_api_contract["API contract<br/>[routes.ts]"]
  node_schema["Wish and quote schema<br/>[schema.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"enters name"| node_home
node_bootstrap -->|"renders"| node_app
node_app -->|"routes to"| node_home
node_app -->|"provides"| node_query_client
node_home -->|"renders"| node_runaway
node_home -->|"uses quotes and wishes"| node_birthday_hooks
node_home -->|"reads dimensions"| node_window_hook
node_server -->|"registers"| node_routes
node_routes -->|"uses paths"| node_api_contract
node_routes -->|"gets wishes and quotes"| node_storage
node_storage -->|"uses data types"| node_schema
node_api_contract -->|"defines response shapes"| node_schema

click node_app "https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/App.tsx"
click node_home "https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/pages/Home.tsx"
click node_runaway "https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/components/RunawayButton.tsx"
click node_birthday_hooks "https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/hooks/use-birthday.ts"
click node_window_hook "https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/hooks/use-window-size.ts"
click node_query_client "https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/lib/queryClient.ts"
click node_bootstrap "https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/main.tsx"
click node_server "https://github.com/wyzdmulc265/suprise-me-bday/blob/main/server/index.ts"
click node_routes "https://github.com/wyzdmulc265/suprise-me-bday/blob/main/server/routes.ts"
click node_storage "https://github.com/wyzdmulc265/suprise-me-bday/blob/main/server/storage.ts"
click node_api_contract "https://github.com/wyzdmulc265/suprise-me-bday/blob/main/shared/routes.ts"
click node_schema "https://github.com/wyzdmulc265/suprise-me-bday/blob/main/shared/schema.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_home,node_runaway,node_birthday_hooks,node_window_hook toneBlue
class node_app,node_query_client,node_bootstrap toneAmber
class node_server,node_routes toneMint
class node_storage,node_api_contract,node_schema toneRose
class node_visitor toneIndigo
```

## Components

### Birthday experience

- [Birthday flow](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/pages/Home.tsx): `client/src/pages/Home.tsx`
- [Runaway button](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/components/RunawayButton.tsx): `client/src/components/RunawayButton.tsx`
- [Birthday data hooks](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/hooks/use-birthday.ts): `client/src/hooks/use-birthday.ts`
- [Window sizing](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/hooks/use-window-size.ts): `client/src/hooks/use-window-size.ts`

### Client foundation

- [App router](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Query client](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/lib/queryClient.ts): `client/src/lib/queryClient.ts`
- [React bootstrap](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/client/src/main.tsx): `client/src/main.tsx`

### Birthday API

- [HTTP server](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/server/index.ts): `server/index.ts`
- [API handlers](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/server/routes.ts): `server/routes.ts`

### Data contracts

- [Seeded birthday data](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/server/storage.ts): `server/storage.ts`
- [API contract](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/shared/routes.ts): `shared/routes.ts`
- [Wish and quote schema](https://github.com/wyzdmulc265/suprise-me-bday/blob/main/shared/schema.ts): `shared/schema.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Birthday flow: enters name (evidence: `client/src/pages/Home.tsx`)
- React bootstrap → App router: renders (evidence: `client/src/main.tsx`)
- App router → Birthday flow: routes to (evidence: `client/src/App.tsx`)
- App router → Query client: provides (evidence: `client/src/App.tsx`)
- Birthday flow → Runaway button: renders (evidence: `client/src/pages/Home.tsx`)
- Birthday flow → Birthday data hooks: uses quotes and wishes (evidence: `client/src/pages/Home.tsx`)
- Birthday flow → Window sizing: reads dimensions (evidence: `client/src/pages/Home.tsx`)
- HTTP server → API handlers: registers (evidence: `server/index.ts`)
- API handlers → API contract: uses paths (evidence: `server/routes.ts`)
- API handlers → Seeded birthday data: gets wishes and quotes (evidence: `server/routes.ts`)
- Seeded birthday data → Wish and quote schema: uses data types (evidence: `server/storage.ts`)
- API contract → Wish and quote schema: defines response shapes (evidence: `shared/routes.ts`)
