# joekym/yuriorbit architecture

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

- Interactive diagram: https://gitdiagram.com/joekym/yuriorbit
- Repository: https://github.com/joekym/yuriorbit

## Overview

YuriOrbit is a community catalog for discovering and tracking GL media. Users browse or search a unified catalog, open title details or MangaDex chapters, and optionally save progress to a personal library; sign-in enables cloud sync and profiles. Provider aggregation, canonical title identity, GL classification, and maturity filtering support that experience. Separate branches cover profiles, moderation, feedback, and the server-enforced admin console. The graph uses sampled calls and README-described capabilities; unsampled implementations are represented only at paths confirmed by the tree, so some internal links are intentionally omitted.

Main entry points: [`src/lib/providers/index.ts`](https://github.com/joekym/yuriorbit/blob/main/src/lib/providers/index.ts) (Provider aggregation), [`src/App.tsx`](https://github.com/joekym/yuriorbit/blob/main/src/App.tsx) (App routing), [`src/pages/ReaderPage.tsx`](https://github.com/joekym/yuriorbit/blob/main/src/pages/ReaderPage.tsx) (Manga reader), [`src/pages/AuthPage.tsx`](https://github.com/joekym/yuriorbit/blob/main/src/pages/AuthPage.tsx) (Authentication page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Discovery experience"]
  node_app["App routing<br/>[App.tsx]"]
  node_browse["Browse catalog<br/>[DiscoverPage.tsx]"]
  node_searchpage["Search page<br/>[SearchPage.tsx]"]
  node_reader["Manga reader<br/>[ReaderPage.tsx]"]
end

subgraph group_catalog["Catalog and providers"]
  node_search["Catalog search<br/>[search.ts]"]
  node_providers["Provider aggregation<br/>[index.ts]"]
  node_anilist["AniList adapter<br/>[anilist.ts]"]
  node_mangadex["MangaDex adapter<br/>[mangadex.ts]"]
  node_tmdb["TMDB adapter<br/>[tmdb.ts]"]
  node_jikan["Jikan API route<br/>[jikan.ts]"]
  node_canonical["Title identity<br/>[canonical.ts]"]
  node_classification["GL classification<br/>[classify.ts]"]
  node_mangadexapi["MangaDex API proxy<br/>[&#91;&#91;path&#93;&#93;.ts]"]
end

subgraph group_accounts["Accounts and library"]
  node_authpage["Authentication page<br/>[AuthPage.tsx]"]
  node_auth["Auth context<br/>[AuthContext.tsx]"]
  node_supabase["Supabase client<br/>[supabase.ts]"]
  node_library["Personal library<br/>[useLibrary.ts]"]
  node_profiles["Profiles<br/>[profiles.ts]"]
  node_profilepage["Profile pages<br/>[ProfilePage.tsx]"]
end

subgraph group_community["Community and safety"]
  node_maturity["Maturity preferences<br/>[maturity.ts]"]
  node_moderation["Content moderation"]
  node_feedback["Feedback intake<br/>[feedback.ts]"]
end

subgraph group_operations["Admin operations"]
  node_adminpage["Admin console<br/>[AdminPage.tsx]"]
  node_adminapi["Admin API<br/>[&#91;&#91;path&#93;&#93;.ts]"]
end

node_visitor(("Visitor"))
node_supabaseauth["Supabase Auth"]
node_supabasestore[("Supabase data store")]
node_mangadexservice["MangaDex service"]
node_mediaapis["Media provider APIs"]

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_browse
node_app -->|"routes to"| node_searchpage
node_visitor -->|"searches"| node_searchpage
node_searchpage -->|"calls"| node_search
node_search -->|"queries"| node_providers
node_providers -->|"searches"| node_anilist
node_providers -->|"searches"| node_mangadex
node_providers -->|"queries"| node_tmdb
node_providers -->|"canonicalizes"| node_canonical
node_providers -->|"classifies"| node_classification
node_providers -.->|"aggregates"| node_jikan
node_app -->|"routes to"| node_reader
node_reader -->|"loads titles"| node_providers
node_reader -.->|"loads chapters"| node_mangadexapi
node_mangadexapi -->|"proxies requests"| node_mangadexservice
node_visitor -->|"signs in"| node_authpage
node_authpage -->|"uses"| node_auth
node_auth -->|"uses"| node_supabase
node_supabase -->|"authenticates"| node_supabaseauth
node_authpage -->|"migrates entries"| node_library
node_library -->|"reads and writes"| node_supabase
node_library -.->|"syncs entries"| node_supabasestore
node_visitor -->|"views profile"| node_profilepage
node_profilepage -.->|"loads profile"| node_profiles
node_visitor -.->|"sets preference"| node_maturity
node_providers -->|"filters titles"| node_moderation
node_visitor -.->|"submits feedback"| node_feedback
node_visitor -->|"administers"| node_adminpage
node_adminpage -.->|"calls"| node_adminapi
node_adminapi -->|"verifies token"| node_supabaseauth
node_adminapi -->|"runs privileged queries"| node_supabasestore
node_providers -->|"aggregates live data"| node_mediaapis

click node_app "https://github.com/joekym/yuriorbit/blob/main/src/App.tsx"
click node_browse "https://github.com/joekym/yuriorbit/blob/main/src/pages/DiscoverPage.tsx"
click node_searchpage "https://github.com/joekym/yuriorbit/blob/main/src/pages/SearchPage.tsx"
click node_search "https://github.com/joekym/yuriorbit/blob/main/src/lib/search.ts"
click node_providers "https://github.com/joekym/yuriorbit/blob/main/src/lib/providers/index.ts"
click node_anilist "https://github.com/joekym/yuriorbit/blob/main/src/lib/providers/anilist.ts"
click node_mangadex "https://github.com/joekym/yuriorbit/blob/main/src/lib/providers/mangadex.ts"
click node_tmdb "https://github.com/joekym/yuriorbit/blob/main/src/lib/providers/tmdb.ts"
click node_jikan "https://github.com/joekym/yuriorbit/blob/main/server/api/jikan.ts"
click node_canonical "https://github.com/joekym/yuriorbit/blob/main/src/lib/catalog/canonical.ts"
click node_classification "https://github.com/joekym/yuriorbit/blob/main/src/lib/providers/classify.ts"
click node_reader "https://github.com/joekym/yuriorbit/blob/main/src/pages/ReaderPage.tsx"
click node_authpage "https://github.com/joekym/yuriorbit/blob/main/src/pages/AuthPage.tsx"
click node_auth "https://github.com/joekym/yuriorbit/blob/main/src/lib/auth/AuthContext.tsx"
click node_supabase "https://github.com/joekym/yuriorbit/blob/main/src/lib/supabase.ts"
click node_library "https://github.com/joekym/yuriorbit/blob/main/src/hooks/useLibrary.ts"
click node_profiles "https://github.com/joekym/yuriorbit/blob/main/src/lib/profiles.ts"
click node_profilepage "https://github.com/joekym/yuriorbit/blob/main/src/pages/ProfilePage.tsx"
click node_maturity "https://github.com/joekym/yuriorbit/blob/main/src/lib/content/maturity.ts"
click node_moderation "https://github.com/joekym/yuriorbit/blob/main/src/lib/moderation/contentModeration.ts"
click node_feedback "https://github.com/joekym/yuriorbit/blob/main/functions/api/feedback.ts"
click node_adminpage "https://github.com/joekym/yuriorbit/blob/main/src/pages/AdminPage.tsx"
click node_adminapi "https://github.com/joekym/yuriorbit/blob/main/functions/api/admin/%5B%5Bpath%5D%5D.ts"
click node_mangadexapi "https://github.com/joekym/yuriorbit/blob/main/functions/api/mangadex/%5B%5Bpath%5D%5D.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_app,node_browse,node_searchpage,node_reader toneBlue
class node_search,node_providers,node_anilist,node_mangadex,node_tmdb,node_jikan,node_canonical,node_classification,node_mangadexapi,node_supabasestore toneAmber
class node_authpage,node_auth,node_supabase,node_library,node_profiles,node_profilepage,node_mediaapis toneMint
class node_maturity,node_moderation,node_feedback toneRose
class node_adminpage,node_adminapi,node_visitor,node_supabaseauth,node_mangadexservice toneIndigo
```

## Components

### Discovery experience

- [App routing](https://github.com/joekym/yuriorbit/blob/main/src/App.tsx): `src/App.tsx`
- [Browse catalog](https://github.com/joekym/yuriorbit/blob/main/src/pages/DiscoverPage.tsx): `src/pages/DiscoverPage.tsx`
- [Search page](https://github.com/joekym/yuriorbit/blob/main/src/pages/SearchPage.tsx): `src/pages/SearchPage.tsx`
- [Manga reader](https://github.com/joekym/yuriorbit/blob/main/src/pages/ReaderPage.tsx): `src/pages/ReaderPage.tsx`

### Catalog and providers

- [Catalog search](https://github.com/joekym/yuriorbit/blob/main/src/lib/search.ts): `src/lib/search.ts`
- [Provider aggregation](https://github.com/joekym/yuriorbit/blob/main/src/lib/providers/index.ts): `src/lib/providers/index.ts`
- [AniList adapter](https://github.com/joekym/yuriorbit/blob/main/src/lib/providers/anilist.ts): `src/lib/providers/anilist.ts`
- [MangaDex adapter](https://github.com/joekym/yuriorbit/blob/main/src/lib/providers/mangadex.ts): `src/lib/providers/mangadex.ts`
- [TMDB adapter](https://github.com/joekym/yuriorbit/blob/main/src/lib/providers/tmdb.ts): `src/lib/providers/tmdb.ts`
- [Jikan API route](https://github.com/joekym/yuriorbit/blob/main/server/api/jikan.ts): `server/api/jikan.ts`
- [Title identity](https://github.com/joekym/yuriorbit/blob/main/src/lib/catalog/canonical.ts): `src/lib/catalog/canonical.ts`
- [GL classification](https://github.com/joekym/yuriorbit/blob/main/src/lib/providers/classify.ts): `src/lib/providers/classify.ts`
- [MangaDex API proxy](https://github.com/joekym/yuriorbit/blob/main/functions/api/mangadex/%5B%5Bpath%5D%5D.ts): `functions/api/mangadex/[[path]].ts`

### Accounts and library

- [Authentication page](https://github.com/joekym/yuriorbit/blob/main/src/pages/AuthPage.tsx): `src/pages/AuthPage.tsx`
- [Auth context](https://github.com/joekym/yuriorbit/blob/main/src/lib/auth/AuthContext.tsx): `src/lib/auth/AuthContext.tsx`
- [Supabase client](https://github.com/joekym/yuriorbit/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Personal library](https://github.com/joekym/yuriorbit/blob/main/src/hooks/useLibrary.ts): `src/hooks/useLibrary.ts`
- [Profiles](https://github.com/joekym/yuriorbit/blob/main/src/lib/profiles.ts): `src/lib/profiles.ts`
- [Profile pages](https://github.com/joekym/yuriorbit/blob/main/src/pages/ProfilePage.tsx): `src/pages/ProfilePage.tsx`

### Community and safety

- [Maturity preferences](https://github.com/joekym/yuriorbit/blob/main/src/lib/content/maturity.ts): `src/lib/content/maturity.ts`
- [Content moderation](https://github.com/joekym/yuriorbit/blob/main/src/lib/moderation/contentModeration.ts): `src/lib/moderation/contentModeration.ts`
- [Feedback intake](https://github.com/joekym/yuriorbit/blob/main/functions/api/feedback.ts): `functions/api/feedback.ts`

### Admin operations

- [Admin console](https://github.com/joekym/yuriorbit/blob/main/src/pages/AdminPage.tsx): `src/pages/AdminPage.tsx`
- [Admin API](https://github.com/joekym/yuriorbit/blob/main/functions/api/admin/%5B%5Bpath%5D%5D.ts): `functions/api/admin/[[path]].ts`

### Other components

- **Visitor**
- **Supabase Auth**
- **Supabase data store**
- **MangaDex service**
- **Media provider APIs**

## Connections

- Visitor → App routing: uses (evidence: `src/App.tsx`)
- App routing → Browse catalog: routes to (evidence: `src/App.tsx`)
- App routing → Search page: routes to (evidence: `src/App.tsx`)
- Visitor → Search page: searches (evidence: `src/pages/SearchPage.tsx`)
- Search page → Catalog search: calls (evidence: `src/pages/SearchPage.tsx`)
- Catalog search → Provider aggregation: queries (evidence: `src/lib/search.ts`)
- Provider aggregation → AniList adapter: searches (evidence: `src/lib/providers/index.ts`)
- Provider aggregation → MangaDex adapter: searches (evidence: `src/lib/providers/index.ts`)
- Provider aggregation → TMDB adapter: queries (evidence: `src/lib/providers/index.ts`)
- Provider aggregation → Title identity: canonicalizes (evidence: `src/lib/providers/index.ts`)
- Provider aggregation → GL classification: classifies (evidence: `src/lib/providers/index.ts`)
- Provider aggregation → Jikan API route: aggregates
- App routing → Manga reader: routes to (evidence: `README.md`)
- Manga reader → Provider aggregation: loads titles (evidence: `src/pages/ReaderPage.tsx`)
- Manga reader → MangaDex API proxy: loads chapters (evidence: `README.md`)
- MangaDex API proxy → MangaDex service: proxies requests (evidence: `README.md`)
- Visitor → Authentication page: signs in (evidence: `README.md`)
- Authentication page → Auth context: uses (evidence: `src/pages/AuthPage.tsx`)
- Auth context → Supabase client: uses (evidence: `src/lib/auth/AuthContext.tsx`)
- Supabase client → Supabase Auth: authenticates
- Authentication page → Personal library: migrates entries (evidence: `src/pages/AuthPage.tsx`)
- Personal library → Supabase client: reads and writes (evidence: `src/hooks/useLibrary.ts`)
- Personal library → Supabase data store: syncs entries (evidence: `README.md`)
- Visitor → Profile pages: views profile (evidence: `README.md`)
- Profile pages → Profiles: loads profile (evidence: `README.md`)
- Visitor → Maturity preferences: sets preference (evidence: `README.md`)
- Provider aggregation → Content moderation: filters titles (evidence: `src/lib/providers/index.ts`)
- Visitor → Feedback intake: submits feedback (evidence: `README.md`)
- Visitor → Admin console: administers (evidence: `README.md`)
- Admin console → Admin API: calls (evidence: `README.md`)
- Admin API → Supabase Auth: verifies token (evidence: `README.md`)
- Admin API → Supabase data store: runs privileged queries (evidence: `README.md`)
- Provider aggregation → Media provider APIs: aggregates live data (evidence: `README.md`)
