# anyiee/touhou-mystia-izakaya-assistant architecture

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

- Interactive diagram: https://gitdiagram.com/anyiee/touhou-mystia-izakaya-assistant
- Repository: https://github.com/anyiee/touhou-mystia-izakaya-assistant

## Overview

Touhou Mystia’s Izakaya Assistant is a player-facing game reference and planning site. Players browse guest and item catalogs, look up recipes and related game information, and plan meal sets for normal or special guests. The tree also shows account synchronization, authentication and SSO, announcements, and administrative management as substantial product areas. The README establishes the player-facing capabilities; source excerpts are selective, so links between unsampled subsystems are omitted or marked unverified rather than inferred from names alone.

Main entry points: [`app/features/account/client/sync/clientRuntime.ts`](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/account/client/sync/clientRuntime.ts) (Sync client), [`app/features/admin/client/userDetail/useAdminUserDetailController.ts`](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/admin/client/userDetail/useAdminUserDetailController.ts) (User administration), [`app/features/account/client/components/accountManager/AccountManager.tsx`](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/account/client/components/accountManager/AccountManager.tsx) (Account management), [`app/features/announcements/client/useAnnouncementCarouselController.ts`](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/announcements/client/useAnnouncementCarouselController.ts) (Announcements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Player experience"]
  node_home["Home<br/>[page.tsx]"]
  node_guest_pages["Guest guides<br/>[page.tsx]"]
  node_special_guest_pages["Special guests<br/>[page.tsx]"]
  node_recipes["Recipe pages<br/>[page.tsx]"]
  node_catalog_pages["Item catalogs<br/>[page.tsx]"]
  node_search["Global search"]
end

subgraph group_game_data["Game reference data"]
  node_guest_catalog["Guest catalog"]
  node_special_catalog["Special guest catalog"]
  node_food_catalog["Food catalog<br/>[FoodCatalog.ts]"]
  node_food_records["Food records<br/>[records.ts]"]
  node_item_catalogs["Item catalogs"]
  node_meal_evaluation["Meal evaluation"]
  node_meal_recommendations["Meal suggestions<br/>[suggestMeals.ts]"]
end

subgraph group_accounts["Accounts and sync"]
  node_account_ui["Account management<br/>[AccountManager.tsx]"]
  node_account_api["Account API<br/>[route.ts]"]
  node_sync_client["Sync client<br/>[clientRuntime.ts]"]
  node_sync_api["Sync endpoints<br/>[route.ts]"]
  node_sso["SSO authorization<br/>[route.ts]"]
  node_browser_storage[("Browser storage<br/>[safeStorage.ts]")]
end

subgraph group_operations["Site operations"]
  node_announcement_ui["Announcements"]
  node_announcement_api["Announcement API<br/>[route.ts]"]
  node_admin_pages["Admin console<br/>[page.tsx]"]
  node_admin_users["User administration"]
  node_admin_api["Admin API<br/>[route.ts]"]
end

node_player(("Player"))

node_player -->|"opens site"| node_home
node_player -->|"browses guests"| node_guest_pages
node_player -->|"browses guests"| node_special_guest_pages
node_player -->|"looks up recipes"| node_recipes
node_player -->|"browses items"| node_catalog_pages
node_player -->|"plans meals"| node_meal_recommendations
node_player -->|"checks meal sets"| node_meal_evaluation
node_player -.->|"searches catalog"| node_search
node_account_ui -.->|"requests account"| node_account_api
node_sync_client -.->|"syncs state"| node_sync_api
node_sync_client -.->|"stores sync data"| node_browser_storage
node_announcement_ui -->|"loads announcements"| node_announcement_api
node_admin_pages -.->|"manages users"| node_admin_users
node_admin_users -.->|"requests user data"| node_admin_api

click node_home "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/(home)/page.tsx"
click node_guest_pages "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/(pages)/normal-guests/%5B%5B...paths%5D%5D/page.tsx"
click node_special_guest_pages "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/(pages)/special-guests/%5B%5B...paths%5D%5D/page.tsx"
click node_recipes "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/(pages)/recipes/page.tsx"
click node_catalog_pages "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/(pages)/items/page.tsx"
click node_search "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/globalSearch/client/useGlobalSearchController.ts"
click node_guest_catalog "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/catalog/guests/NormalGuestCatalog.ts"
click node_special_catalog "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/catalog/guests/SpecialGuestCatalog.ts"
click node_food_catalog "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/catalog/food/FoodCatalog.ts"
click node_food_records "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/data/foods/records.ts"
click node_item_catalogs "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/catalog/items/GeneralItemCatalog.ts"
click node_meal_evaluation "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/evaluation/evaluateSavedMeal.ts"
click node_meal_recommendations "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/recommendations/suggestMeals.ts"
click node_account_ui "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/account/client/components/accountManager/AccountManager.tsx"
click node_account_api "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/api/v1/account/me/route.ts"
click node_sync_client "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/account/client/sync/clientRuntime.ts"
click node_sync_api "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/api/v1/sync/state/route.ts"
click node_sso "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/api/v1/sso/authorize/route.ts"
click node_announcement_ui "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/announcements/client/useAnnouncementCarouselController.ts"
click node_announcement_api "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/api/v1/announcements/route.ts"
click node_admin_pages "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/(pages)/admin/page.tsx"
click node_admin_users "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/admin/client/userDetail/useAdminUserDetailController.ts"
click node_admin_api "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/api/v1/admin/users/route.ts"
click node_browser_storage "https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/infrastructure/browser/storage/safeStorage.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_guest_pages,node_special_guest_pages,node_recipes,node_catalog_pages,node_search toneBlue
class node_guest_catalog,node_special_catalog,node_food_catalog,node_food_records,node_item_catalogs,node_meal_evaluation,node_meal_recommendations toneAmber
class node_account_ui,node_account_api,node_sync_client,node_sync_api,node_sso,node_browser_storage toneMint
class node_announcement_ui,node_announcement_api,node_admin_pages,node_admin_users,node_admin_api toneRose
class node_player toneIndigo
```

## Components

### Player experience

- [Home](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/(home)/page.tsx): `app/(home)/page.tsx`
- [Guest guides](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/(pages)/normal-guests/%5B%5B...paths%5D%5D/page.tsx): `app/(pages)/normal-guests/[[...paths]]/page.tsx`
- [Special guests](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/(pages)/special-guests/%5B%5B...paths%5D%5D/page.tsx): `app/(pages)/special-guests/[[...paths]]/page.tsx`
- [Recipe pages](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/(pages)/recipes/page.tsx): `app/(pages)/recipes/page.tsx`
- [Item catalogs](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/(pages)/items/page.tsx): `app/(pages)/items/page.tsx`
- [Global search](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/globalSearch/client/useGlobalSearchController.ts): `app/features/globalSearch/client/useGlobalSearchController.ts`

### Game reference data

- [Guest catalog](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/catalog/guests/NormalGuestCatalog.ts): `app/domain/catalog/guests/NormalGuestCatalog.ts`
- [Special guest catalog](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/catalog/guests/SpecialGuestCatalog.ts): `app/domain/catalog/guests/SpecialGuestCatalog.ts`
- [Food catalog](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/catalog/food/FoodCatalog.ts): `app/domain/catalog/food/FoodCatalog.ts`
- [Food records](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/data/foods/records.ts): `app/domain/data/foods/records.ts`
- [Item catalogs](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/catalog/items/GeneralItemCatalog.ts): `app/domain/catalog/items/GeneralItemCatalog.ts`
- [Meal evaluation](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/evaluation/evaluateSavedMeal.ts): `app/domain/evaluation/evaluateSavedMeal.ts`
- [Meal suggestions](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/domain/recommendations/suggestMeals.ts): `app/domain/recommendations/suggestMeals.ts`

### Accounts and sync

- [Account management](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/account/client/components/accountManager/AccountManager.tsx): `app/features/account/client/components/accountManager/AccountManager.tsx`
- [Account API](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/api/v1/account/me/route.ts): `app/api/v1/account/me/route.ts`
- [Sync client](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/account/client/sync/clientRuntime.ts): `app/features/account/client/sync/clientRuntime.ts`
- [Sync endpoints](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/api/v1/sync/state/route.ts): `app/api/v1/sync/state/route.ts`
- [SSO authorization](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/api/v1/sso/authorize/route.ts): `app/api/v1/sso/authorize/route.ts`
- [Browser storage](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/infrastructure/browser/storage/safeStorage.ts): `app/infrastructure/browser/storage/safeStorage.ts`

### Site operations

- [Announcements](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/announcements/client/useAnnouncementCarouselController.ts): `app/features/announcements/client/useAnnouncementCarouselController.ts`
- [Announcement API](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/api/v1/announcements/route.ts): `app/api/v1/announcements/route.ts`
- [Admin console](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/(pages)/admin/page.tsx): `app/(pages)/admin/page.tsx`
- [User administration](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/features/admin/client/userDetail/useAdminUserDetailController.ts): `app/features/admin/client/userDetail/useAdminUserDetailController.ts`
- [Admin API](https://github.com/anyiee/touhou-mystia-izakaya-assistant/blob/master/app/api/v1/admin/users/route.ts): `app/api/v1/admin/users/route.ts`

### Other components

- **Player**

## Connections

- Player → Home: opens site
- Player → Guest guides: browses guests
- Player → Special guests: browses guests
- Player → Recipe pages: looks up recipes
- Player → Item catalogs: browses items
- Player → Meal suggestions: plans meals
- Player → Meal evaluation: checks meal sets
- Player → Global search: searches catalog
- Account management → Account API: requests account
- Sync client → Sync endpoints: syncs state
- Sync client → Browser storage: stores sync data
- Announcements → Announcement API: loads announcements (evidence: `app/features/announcements/client/useAnnouncementCarouselController.ts`)
- Admin console → User administration: manages users
- User administration → Admin API: requests user data
