# watanabe3tipapa/ludique architecture

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

- Interactive diagram: https://gitdiagram.com/watanabe3tipapa/ludique
- Repository: https://github.com/watanabe3tipapa/ludique

## Overview

Ludique is a browser-based, moonlit web experience: visitors enter at a threshold, choose a ten-door kōan journey or the Moonlog, and may continue to the external main site. In the kōan journey, users provide a word, progress is stored in localStorage, and the tenth door offers an exit. Moon age is calculated locally for Tokyo time; Moonlog presents four Yamato-themed scenes. The sampled sources establish the page routing and core interactions; generated gate data and unsampled static entry files are documented, but not traced beyond README statements.

Main entry points: [`client/src/pages/Riddle.tsx`](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/pages/Riddle.tsx) (Kōan journey), [`client/src/App.tsx`](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/App.tsx) (View router), [`client/src/pages/Home.tsx`](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/pages/Home.tsx) (Entry choices), [`client/src/pages/Moonlog.tsx`](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/pages/Moonlog.tsx) (Moonlog scenes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Entry experience"]
  node_app["View router<br/>[App.tsx]"]
  node_home["Entry choices<br/>[Home.tsx]"]
end

subgraph group_journeys["Reading journeys"]
  node_riddle["Kōan journey<br/>[Riddle.tsx]"]
  node_door["Sliding door<br/>[SlidingDoor.tsx]"]
  node_gate_data["Gate prompts<br/>[gates.ts]"]
  node_generated_data["Generated prompts"]
  node_browser_storage[("Browser storage")]
  node_moonlog["Moonlog scenes<br/>[Moonlog.tsx]"]
end

subgraph group_shared["Shared presentation"]
  node_moon["Moon age<br/>[MoonAge.tsx]"]
  node_mark["Brand mark<br/>[Mark.tsx]"]
end

node_visitor(("Visitor"))
node_main_site["Main site"]

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_riddle
node_app -->|"routes to"| node_moonlog
node_home -->|"renders"| node_moon
node_home -->|"renders"| node_mark
node_home -->|"selects journey"| node_app
node_riddle -->|"renders"| node_door
node_riddle -->|"renders"| node_mark
node_riddle -->|"reads prompts"| node_gate_data
node_gate_data -->|"maps data"| node_generated_data
node_riddle -->|"loads and saves"| node_browser_storage
node_moonlog -->|"renders"| node_mark
node_moonlog -->|"returns to entry"| node_app
node_riddle -->|"offers exit"| node_main_site
node_home -->|"offers direct link"| node_main_site

click node_app "https://github.com/watanabe3tipapa/ludique/blob/main/client/src/App.tsx"
click node_home "https://github.com/watanabe3tipapa/ludique/blob/main/client/src/pages/Home.tsx"
click node_moon "https://github.com/watanabe3tipapa/ludique/blob/main/client/src/components/MoonAge.tsx"
click node_mark "https://github.com/watanabe3tipapa/ludique/blob/main/client/src/components/Mark.tsx"
click node_riddle "https://github.com/watanabe3tipapa/ludique/blob/main/client/src/pages/Riddle.tsx"
click node_door "https://github.com/watanabe3tipapa/ludique/blob/main/client/src/components/SlidingDoor.tsx"
click node_gate_data "https://github.com/watanabe3tipapa/ludique/blob/main/client/src/data/gates.ts"
click node_generated_data "https://github.com/watanabe3tipapa/ludique/blob/main/client/src/data/generated-gates.json"
click node_moonlog "https://github.com/watanabe3tipapa/ludique/blob/main/client/src/pages/Moonlog.tsx"

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_app,node_home toneBlue
class node_riddle,node_door,node_gate_data,node_generated_data,node_browser_storage,node_moonlog toneAmber
class node_moon,node_mark toneMint
class node_visitor,node_main_site toneIndigo
```

## Components

### Entry experience

- [View router](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Entry choices](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/pages/Home.tsx): `client/src/pages/Home.tsx`

### Reading journeys

- [Kōan journey](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/pages/Riddle.tsx): `client/src/pages/Riddle.tsx`
- [Sliding door](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/components/SlidingDoor.tsx): `client/src/components/SlidingDoor.tsx`
- [Gate prompts](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/data/gates.ts): `client/src/data/gates.ts`
- [Generated prompts](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/data/generated-gates.json): `client/src/data/generated-gates.json`
- **Browser storage**
- [Moonlog scenes](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/pages/Moonlog.tsx): `client/src/pages/Moonlog.tsx`

### Shared presentation

- [Moon age](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/components/MoonAge.tsx): `client/src/components/MoonAge.tsx`
- [Brand mark](https://github.com/watanabe3tipapa/ludique/blob/main/client/src/components/Mark.tsx): `client/src/components/Mark.tsx`

### Other components

- **Visitor**
- **Main site**

## Connections

- Visitor → View router: opens (evidence: `README.md`)
- View router → Entry choices: routes to (evidence: `client/src/App.tsx`)
- View router → Kōan journey: routes to (evidence: `client/src/App.tsx`)
- View router → Moonlog scenes: routes to (evidence: `client/src/App.tsx`)
- Entry choices → Moon age: renders (evidence: `client/src/pages/Home.tsx`)
- Entry choices → Brand mark: renders (evidence: `client/src/pages/Home.tsx`)
- Entry choices → View router: selects journey (evidence: `client/src/App.tsx`)
- Kōan journey → Sliding door: renders (evidence: `client/src/pages/Riddle.tsx`)
- Kōan journey → Brand mark: renders (evidence: `client/src/pages/Riddle.tsx`)
- Kōan journey → Gate prompts: reads prompts (evidence: `client/src/pages/Riddle.tsx`)
- Gate prompts → Generated prompts: maps data (evidence: `client/src/data/gates.ts`)
- Kōan journey → Browser storage: loads and saves (evidence: `client/src/pages/Riddle.tsx`)
- Moonlog scenes → Brand mark: renders (evidence: `client/src/pages/Moonlog.tsx`)
- Moonlog scenes → View router: returns to entry (evidence: `client/src/App.tsx`)
- Kōan journey → Main site: offers exit (evidence: `README.md`)
- Entry choices → Main site: offers direct link (evidence: `README.md`)
