# starry-light/bday_site architecture

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

- Interactive diagram: https://gitdiagram.com/starry-light/bday_site
- Repository: https://github.com/starry-light/bday_site

## Overview

This is a client-side birthday word puzzle: the player enters shared guesses, which are scored across word boards, unlocking memories and eventually a finale. The page also manages hints, guess extensions, and saved progress. Configuration supplies the personalized words and messages; scoring and guess-budget rules live in a separate game module. The README documents browser-local saves and an optional progress tool. UI components outside the game entry and interface are scaffolded, so they are not mapped here.

Main entry points: [`app/page.tsx`](https://github.com/starry-light/bday_site/blob/main/app/page.tsx) (Game interface), [`app/main.tsx`](https://github.com/starry-light/bday_site/blob/main/app/main.tsx) (App entry), [`app/useProgressTool.ts`](https://github.com/starry-light/bday_site/blob/main/app/useProgressTool.ts) (Progress tool hook), [`app/config.ts`](https://github.com/starry-light/bday_site/blob/main/app/config.ts) (Personalized content)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Game experience"]
  node_entry["App entry<br/>[main.tsx]"]
  node_game["Game interface<br/>[page.tsx]"]
  node_memories["Memories and finale<br/>[page.tsx]"]
end

subgraph group_rules["Puzzle rules"]
  node_config["Personalized content<br/>[config.ts]"]
  node_scoring["Guess scoring<br/>[game.mjs]"]
  node_guessbudget["Guess budget<br/>[game.mjs]"]
end

subgraph group_integration["Browser integration"]
  node_savedprogress[("Browser save")]
  node_progresshook["Progress tool hook<br/>[useProgressTool.ts]"]
end

node_player(("Player"))
node_browsertool["Browser tool API"]

node_player -->|"opens game"| node_entry
node_entry -->|"renders"| node_game
node_game -->|"loads content"| node_config
node_game -->|"scores guesses"| node_scoring
node_game -->|"sets guess limit"| node_guessbudget
node_game -->|"unlocks notes"| node_memories
node_player -->|"enters guesses"| node_game
node_game -->|"saves progress"| node_savedprogress
node_game -.->|"uses hook"| node_progresshook
node_progresshook -->|"registers tool"| node_browsertool

click node_entry "https://github.com/starry-light/bday_site/blob/main/app/main.tsx"
click node_game "https://github.com/starry-light/bday_site/blob/main/app/page.tsx"
click node_memories "https://github.com/starry-light/bday_site/blob/main/app/page.tsx"
click node_config "https://github.com/starry-light/bday_site/blob/main/app/config.ts"
click node_scoring "https://github.com/starry-light/bday_site/blob/main/app/game.mjs"
click node_guessbudget "https://github.com/starry-light/bday_site/blob/main/app/game.mjs"
click node_progresshook "https://github.com/starry-light/bday_site/blob/main/app/useProgressTool.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_entry,node_game,node_memories,node_browsertool toneBlue
class node_config,node_scoring,node_guessbudget toneAmber
class node_savedprogress,node_progresshook toneMint
class node_player toneIndigo
```

## Components

### Game experience

- [App entry](https://github.com/starry-light/bday_site/blob/main/app/main.tsx): `app/main.tsx`
- [Game interface](https://github.com/starry-light/bday_site/blob/main/app/page.tsx): `app/page.tsx`
- [Memories and finale](https://github.com/starry-light/bday_site/blob/main/app/page.tsx): `app/page.tsx`

### Puzzle rules

- [Personalized content](https://github.com/starry-light/bday_site/blob/main/app/config.ts): `app/config.ts`
- [Guess scoring](https://github.com/starry-light/bday_site/blob/main/app/game.mjs): `app/game.mjs`
- [Guess budget](https://github.com/starry-light/bday_site/blob/main/app/game.mjs): `app/game.mjs`

### Browser integration

- **Browser save**
- [Progress tool hook](https://github.com/starry-light/bday_site/blob/main/app/useProgressTool.ts): `app/useProgressTool.ts`

### Other components

- **Player**
- **Browser tool API**

## Connections

- Player → App entry: opens game
- App entry → Game interface: renders (evidence: `app/main.tsx`)
- Game interface → Personalized content: loads content (evidence: `app/page.tsx`)
- Game interface → Guess scoring: scores guesses (evidence: `app/page.tsx`)
- Game interface → Guess budget: sets guess limit (evidence: `app/page.tsx`)
- Game interface → Memories and finale: unlocks notes (evidence: `app/page.tsx`)
- Player → Game interface: enters guesses
- Game interface → Browser save: saves progress
- Game interface → Progress tool hook: uses hook (evidence: `app/page.tsx`)
- Progress tool hook → Browser tool API: registers tool (evidence: `app/useProgressTool.ts`)
