# endlesssjourney2/anime-app architecture

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

- Interactive diagram: https://gitdiagram.com/endlesssjourney2/anime-app
- Repository: https://github.com/endlesssjourney2/anime-app

## Overview

This is an anime search and detail-browsing web app backed by AniList’s GraphQL API. Users search a paginated anime catalog, choose a result, then view title information, characters, and related works. The graph follows the documented routes and sampled hook/API calls; some component wiring is supported by the source index, while unsampled implementation details are not inferred.

Main entry points: [`src/pages/Title/AnimeDetails.tsx`](https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/AnimeDetails.tsx) (Details page), [`src/pages/Main/Main.tsx`](https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Main/Main.tsx) (Search page), [`src/router.tsx`](https://github.com/endlesssjourney2/anime-app/blob/main/src/router.tsx) (Route dispatch), [`src/hooks/useAnimeSearch.tsx`](https://github.com/endlesssjourney2/anime-app/blob/main/src/hooks/useAnimeSearch.tsx) (Search state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_entry["React entry<br/>[main.tsx]"]
  node_app_component["App<br/>[App.tsx]"]
  node_router["Route dispatch<br/>[router.tsx]"]
  node_layout["Page layout<br/>[Layout.tsx]"]
  node_header["Site header<br/>[Header.tsx]"]
end

subgraph group_search["Anime search"]
  node_main_page["Search page<br/>[Main.tsx]"]
  node_search_hook["Search state<br/>[useAnimeSearch.tsx]"]
  node_debounce["Input debounce<br/>[useDebounce.ts]"]
  node_anime_item["Anime result<br/>[AnimeItem.tsx]"]
end

subgraph group_details["Title details"]
  node_detail_page["Details page<br/>[AnimeDetails.tsx]"]
  node_detail_hook["Detail state"]
  node_anime_header["Title overview<br/>[AnimeHeader.tsx]"]
  node_characters["Character section"]
  node_character_card["Character card<br/>[CharacterCard.tsx]"]
  node_relations["Relations section"]
  node_relation_helper["Relation filter"]
  node_relation_card["Relation card<br/>[RelationCard.tsx]"]
end

subgraph group_shared["Shared data and UI"]
  node_ani_api["AniList API<br/>[aniListApi.ts]"]
  node_loading["Loading indicator"]
  node_status["Status badge<br/>[StatusBadge.tsx]"]
  node_media_types["Media types<br/>[AniList.ts]"]
  node_character_types["Character types<br/>[Character.ts]"]
  node_relation_types["Relation types<br/>[Relation.ts]"]
end

node_user(("Browser user"))
node_anilist["AniList GraphQL"]

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_app_component
node_app_component -->|"uses routes"| node_router
node_router -->|"wraps routes"| node_layout
node_layout -->|"renders"| node_header
node_router -->|"routes search"| node_main_page
node_router -->|"routes title"| node_detail_page
node_user -->|"searches catalog"| node_main_page
node_main_page -->|"uses search state"| node_search_hook
node_search_hook -->|"debounces input"| node_debounce
node_search_hook -->|"requests results"| node_ani_api
node_ani_api -->|"posts GraphQL"| node_anilist
node_main_page -->|"renders results"| node_anime_item
node_main_page -->|"shows loading"| node_loading
node_anime_item -->|"renders badge"| node_status
node_detail_page -->|"loads title"| node_detail_hook
node_detail_hook -->|"requests title"| node_ani_api
node_detail_page -->|"shows loading"| node_loading
node_detail_page -->|"renders overview"| node_anime_header
node_detail_page -->|"renders characters"| node_characters
node_characters -->|"renders cards"| node_character_card
node_detail_page -->|"renders relations"| node_relations
node_relations -->|"filters relations"| node_relation_helper
node_relations -->|"renders cards"| node_relation_card
node_anime_header -->|"renders badge"| node_status

click node_entry "https://github.com/endlesssjourney2/anime-app/blob/main/src/main.tsx"
click node_app_component "https://github.com/endlesssjourney2/anime-app/blob/main/src/App.tsx"
click node_router "https://github.com/endlesssjourney2/anime-app/blob/main/src/router.tsx"
click node_layout "https://github.com/endlesssjourney2/anime-app/blob/main/src/Layout/Layout.tsx"
click node_header "https://github.com/endlesssjourney2/anime-app/blob/main/src/features/Header/Header.tsx"
click node_main_page "https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Main/Main.tsx"
click node_search_hook "https://github.com/endlesssjourney2/anime-app/blob/main/src/hooks/useAnimeSearch.tsx"
click node_debounce "https://github.com/endlesssjourney2/anime-app/blob/main/src/hooks/useDebounce.ts"
click node_anime_item "https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Main/components/AnimeItem/AnimeItem.tsx"
click node_ani_api "https://github.com/endlesssjourney2/anime-app/blob/main/src/api/aniListApi.ts"
click node_detail_page "https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/AnimeDetails.tsx"
click node_detail_hook "https://github.com/endlesssjourney2/anime-app/blob/main/src/hooks/useAnimeDetails.tsx"
click node_anime_header "https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/components/AnimeHeader/AnimeHeader.tsx"
click node_characters "https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/components/CharactersSection/CharactersSection.tsx"
click node_character_card "https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/components/CharactersSection/components/CharacterCard/CharacterCard.tsx"
click node_relations "https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/components/RelationsSection/RelationsSection.tsx"
click node_relation_helper "https://github.com/endlesssjourney2/anime-app/blob/main/src/helpers/displayableRelations.ts"
click node_relation_card "https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/components/RelationsSection/components/RelationCard/RelationCard.tsx"
click node_loading "https://github.com/endlesssjourney2/anime-app/blob/main/src/features/components/LoadingComponent/LoadingComponent.tsx"
click node_status "https://github.com/endlesssjourney2/anime-app/blob/main/src/features/components/StatusBadge/StatusBadge.tsx"
click node_media_types "https://github.com/endlesssjourney2/anime-app/blob/main/src/types/AniList.ts"
click node_character_types "https://github.com/endlesssjourney2/anime-app/blob/main/src/types/Character.ts"
click node_relation_types "https://github.com/endlesssjourney2/anime-app/blob/main/src/types/Relation.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_app_component,node_router,node_layout,node_header,node_user toneBlue
class node_main_page,node_search_hook,node_debounce,node_anime_item toneAmber
class node_detail_page,node_detail_hook,node_anime_header,node_characters,node_character_card,node_relations,node_relation_helper,node_relation_card toneMint
class node_ani_api,node_loading,node_status,node_media_types,node_character_types,node_relation_types toneRose
class node_anilist toneIndigo
```

## Components

### App and navigation

- [React entry](https://github.com/endlesssjourney2/anime-app/blob/main/src/main.tsx): `src/main.tsx`
- [App](https://github.com/endlesssjourney2/anime-app/blob/main/src/App.tsx): `src/App.tsx`
- [Route dispatch](https://github.com/endlesssjourney2/anime-app/blob/main/src/router.tsx): `src/router.tsx`
- [Page layout](https://github.com/endlesssjourney2/anime-app/blob/main/src/Layout/Layout.tsx): `src/Layout/Layout.tsx`
- [Site header](https://github.com/endlesssjourney2/anime-app/blob/main/src/features/Header/Header.tsx): `src/features/Header/Header.tsx`

### Anime search

- [Search page](https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Main/Main.tsx): `src/pages/Main/Main.tsx`
- [Search state](https://github.com/endlesssjourney2/anime-app/blob/main/src/hooks/useAnimeSearch.tsx): `src/hooks/useAnimeSearch.tsx`
- [Input debounce](https://github.com/endlesssjourney2/anime-app/blob/main/src/hooks/useDebounce.ts): `src/hooks/useDebounce.ts`
- [Anime result](https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Main/components/AnimeItem/AnimeItem.tsx): `src/pages/Main/components/AnimeItem/AnimeItem.tsx`

### Title details

- [Details page](https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/AnimeDetails.tsx): `src/pages/Title/AnimeDetails.tsx`
- [Detail state](https://github.com/endlesssjourney2/anime-app/blob/main/src/hooks/useAnimeDetails.tsx): `src/hooks/useAnimeDetails.tsx`
- [Title overview](https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/components/AnimeHeader/AnimeHeader.tsx): `src/pages/Title/components/AnimeHeader/AnimeHeader.tsx`
- [Character section](https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/components/CharactersSection/CharactersSection.tsx): `src/pages/Title/components/CharactersSection/CharactersSection.tsx`
- [Character card](https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/components/CharactersSection/components/CharacterCard/CharacterCard.tsx): `src/pages/Title/components/CharactersSection/components/CharacterCard/CharacterCard.tsx`
- [Relations section](https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/components/RelationsSection/RelationsSection.tsx): `src/pages/Title/components/RelationsSection/RelationsSection.tsx`
- [Relation filter](https://github.com/endlesssjourney2/anime-app/blob/main/src/helpers/displayableRelations.ts): `src/helpers/displayableRelations.ts`
- [Relation card](https://github.com/endlesssjourney2/anime-app/blob/main/src/pages/Title/components/RelationsSection/components/RelationCard/RelationCard.tsx): `src/pages/Title/components/RelationsSection/components/RelationCard/RelationCard.tsx`

### Shared data and UI

- [AniList API](https://github.com/endlesssjourney2/anime-app/blob/main/src/api/aniListApi.ts): `src/api/aniListApi.ts`
- [Loading indicator](https://github.com/endlesssjourney2/anime-app/blob/main/src/features/components/LoadingComponent/LoadingComponent.tsx): `src/features/components/LoadingComponent/LoadingComponent.tsx`
- [Status badge](https://github.com/endlesssjourney2/anime-app/blob/main/src/features/components/StatusBadge/StatusBadge.tsx): `src/features/components/StatusBadge/StatusBadge.tsx`
- [Media types](https://github.com/endlesssjourney2/anime-app/blob/main/src/types/AniList.ts): `src/types/AniList.ts`
- [Character types](https://github.com/endlesssjourney2/anime-app/blob/main/src/types/Character.ts): `src/types/Character.ts`
- [Relation types](https://github.com/endlesssjourney2/anime-app/blob/main/src/types/Relation.ts): `src/types/Relation.ts`

### Other components

- **Browser user**
- **AniList GraphQL**

## Connections

- Browser user → React entry: opens app
- React entry → App: renders (evidence: `src/main.tsx`)
- App → Route dispatch: uses routes (evidence: `src/App.tsx`)
- Route dispatch → Page layout: wraps routes (evidence: `src/router.tsx`)
- Page layout → Site header: renders (evidence: `src/Layout/Layout.tsx`)
- Route dispatch → Search page: routes search (evidence: `src/router.tsx`)
- Route dispatch → Details page: routes title (evidence: `src/router.tsx`)
- Browser user → Search page: searches catalog
- Search page → Search state: uses search state (evidence: `src/pages/Main/Main.tsx`)
- Search state → Input debounce: debounces input (evidence: `src/hooks/useAnimeSearch.tsx`)
- Search state → AniList API: requests results (evidence: `src/hooks/useAnimeSearch.tsx`)
- AniList API → AniList GraphQL: posts GraphQL (evidence: `src/api/aniListApi.ts`)
- Search page → Anime result: renders results (evidence: `src/pages/Main/Main.tsx`)
- Search page → Loading indicator: shows loading (evidence: `src/pages/Main/Main.tsx`)
- Anime result → Status badge: renders badge (evidence: `src/pages/Main/components/AnimeItem/AnimeItem.tsx`)
- Details page → Detail state: loads title (evidence: `src/pages/Title/AnimeDetails.tsx`)
- Detail state → AniList API: requests title (evidence: `src/hooks/useAnimeDetails.tsx`)
- Details page → Loading indicator: shows loading (evidence: `src/pages/Title/AnimeDetails.tsx`)
- Details page → Title overview: renders overview (evidence: `src/pages/Title/AnimeDetails.tsx`)
- Details page → Character section: renders characters (evidence: `src/pages/Title/AnimeDetails.tsx`)
- Character section → Character card: renders cards (evidence: `src/pages/Title/components/CharactersSection/CharactersSection.tsx`)
- Details page → Relations section: renders relations (evidence: `src/pages/Title/AnimeDetails.tsx`)
- Relations section → Relation filter: filters relations (evidence: `src/pages/Title/components/RelationsSection/RelationsSection.tsx`)
- Relations section → Relation card: renders cards (evidence: `src/pages/Title/components/RelationsSection/RelationsSection.tsx`)
- Title overview → Status badge: renders badge (evidence: `src/pages/Title/components/AnimeHeader/AnimeHeader.tsx`)
