# zakaoai/cold-library-frontend architecture

> Architecture diagram of the GitHub repository zakaoai/cold-library-frontend, 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/zakaoai/cold-library-frontend
- Repository: https://github.com/zakaoai/cold-library-frontend

## Overview

Cold Library Frontend is a React application for exploring and managing an anime library. Users search anime, browse results, and can add titles to their library or change their storage state; routed activities also cover episodes, torrents, requests, profiles, seasons, MyAnimeList, and administration. The shown search flow runs from the routed page through its search hook and anime service to the API request layer. Other product areas are represented from README capabilities and the source tree; unsampled internals and their specific call paths are not inferred.

Main entry points: [`src/routes/AppRouter.tsx`](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/routes/AppRouter.tsx) (Application router), [`src/services/AnimeService.ts`](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/services/AnimeService.ts) (Anime service), [`src/containers/Activite/Search/SearchActivity.tsx`](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/containers/Activite/Search/SearchActivity.tsx) (Anime search page), [`src/hooks/containers/Search/useAnimeSearch.ts`](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/hooks/containers/Search/useAnimeSearch.ts) (Anime search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_router["Application router<br/>[AppRouter.tsx]"]
  node_context["App context providers<br/>[ContextLayout.tsx]"]
end

subgraph group_library["Anime discovery"]
  node_searchpage["Anime search page<br/>[SearchActivity.tsx]"]
  node_searchform["Search form<br/>[SearchForm.tsx]"]
  node_searchhook["Anime search<br/>[useAnimeSearch.ts]"]
  node_display["Result display modes"]
end

subgraph group_management["Library management"]
  node_librarypage["Anime library"]
  node_libraryhook["Library data hook<br/>[useLibrary.ts]"]
  node_storage["Storage state actions"]
end

subgraph group_features["Product features"]
  node_episode["Episode tracking"]
  node_torrent["Torrent management"]
  node_requests["User requests"]
  node_profile["Profile and MAL"]
  node_admin["Admin activity logs"]
  node_season["Season browsing"]
  node_home["Home activity"]
end

subgraph group_services["API access"]
  node_anime["Anime service<br/>[AnimeService.ts]"]
  node_api["API routes<br/>[api.ts]"]
  node_request["HTTP request layer<br/>[request.ts]"]
end

node_user(("User"))
node_backend{{"Cold Library API"}}
node_mal{{"MyAnimeList"}}

node_user -->|"navigates"| node_router
node_router -->|"wraps routes"| node_context
node_router -->|"routes to"| node_searchpage
node_router -->|"routes to"| node_librarypage
node_router -->|"routes to"| node_episode
node_router -->|"routes to"| node_torrent
node_router -->|"routes to"| node_requests
node_router -->|"routes to"| node_profile
node_router -->|"routes to"| node_admin
node_router -->|"routes to"| node_season
node_router -->|"routes to"| node_home
node_searchpage -->|"renders"| node_searchform
node_searchpage -->|"uses"| node_searchhook
node_searchpage -->|"renders results"| node_display
node_searchhook -->|"searches"| node_anime
node_anime -->|"uses endpoints"| node_api
node_anime -->|"sends requests"| node_request
node_api -.->|"targets"| node_backend
node_searchhook -->|"loads library"| node_libraryhook
node_libraryhook -->|"fetches anime"| node_anime
node_storage -->|"updates titles"| node_anime
node_librarypage -.->|"manages state"| node_storage
node_profile -.->|"syncs with"| node_mal
node_episode -.->|"tracks episodes"| node_backend
node_torrent -.->|"manages downloads"| node_backend
node_requests -.->|"submits requests"| node_backend
node_admin -.->|"views logs"| node_backend
node_season -.->|"browses seasons"| node_backend

click node_router "https://github.com/zakaoai/cold-library-frontend/blob/develop/src/routes/AppRouter.tsx"
click node_context "https://github.com/zakaoai/cold-library-frontend/blob/develop/src/containers/Layout/ContextLayout.tsx"
click node_searchpage "https://github.com/zakaoai/cold-library-frontend/blob/develop/src/containers/Activite/Search/SearchActivity.tsx"
click node_searchform "https://github.com/zakaoai/cold-library-frontend/blob/develop/src/containers/Activite/Search/SearchForm.tsx"
click node_searchhook "https://github.com/zakaoai/cold-library-frontend/blob/develop/src/hooks/containers/Search/useAnimeSearch.ts"
click node_display "https://github.com/zakaoai/cold-library-frontend/tree/develop/src/components/DisplayAnime"
click node_anime "https://github.com/zakaoai/cold-library-frontend/blob/develop/src/services/AnimeService.ts"
click node_api "https://github.com/zakaoai/cold-library-frontend/blob/develop/src/services/api.ts"
click node_request "https://github.com/zakaoai/cold-library-frontend/blob/develop/src/services/request/request.ts"
click node_librarypage "https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/AnimeLibrary"
click node_libraryhook "https://github.com/zakaoai/cold-library-frontend/blob/develop/src/hooks/containers/AnimeLibrary/useLibrary.ts"
click node_storage "https://github.com/zakaoai/cold-library-frontend/blob/develop/src/hooks/components/useUpdateAnimeStorageState.ts"
click node_episode "https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/AnimeEpisode"
click node_torrent "https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/TrackedTorrent"
click node_requests "https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/Request"
click node_profile "https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/Profile"
click node_admin "https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/AdminLog"
click node_season "https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/Season"
click node_home "https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/Home"

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_router,node_context,node_user toneBlue
class node_searchpage,node_searchform,node_searchhook,node_display toneAmber
class node_librarypage,node_libraryhook,node_storage,node_backend toneMint
class node_episode,node_torrent,node_requests,node_profile,node_admin,node_season,node_home toneRose
class node_anime,node_api,node_request,node_mal toneIndigo
```

## Components

### Application shell

- [Application router](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/routes/AppRouter.tsx): `src/routes/AppRouter.tsx`
- [App context providers](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/containers/Layout/ContextLayout.tsx): `src/containers/Layout/ContextLayout.tsx`

### Anime discovery

- [Anime search page](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/containers/Activite/Search/SearchActivity.tsx): `src/containers/Activite/Search/SearchActivity.tsx`
- [Search form](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/containers/Activite/Search/SearchForm.tsx): `src/containers/Activite/Search/SearchForm.tsx`
- [Anime search](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/hooks/containers/Search/useAnimeSearch.ts): `src/hooks/containers/Search/useAnimeSearch.ts`
- [Result display modes](https://github.com/zakaoai/cold-library-frontend/tree/develop/src/components/DisplayAnime): `src/components/DisplayAnime`

### Library management

- [Anime library](https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/AnimeLibrary): `src/containers/Activite/AnimeLibrary`
- [Library data hook](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/hooks/containers/AnimeLibrary/useLibrary.ts): `src/hooks/containers/AnimeLibrary/useLibrary.ts`
- [Storage state actions](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/hooks/components/useUpdateAnimeStorageState.ts): `src/hooks/components/useUpdateAnimeStorageState.ts`

### Product features

- [Episode tracking](https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/AnimeEpisode): `src/containers/Activite/AnimeEpisode`
- [Torrent management](https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/TrackedTorrent): `src/containers/Activite/TrackedTorrent`
- [User requests](https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/Request): `src/containers/Activite/Request`
- [Profile and MAL](https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/Profile): `src/containers/Activite/Profile`
- [Admin activity logs](https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/AdminLog): `src/containers/Activite/AdminLog`
- [Season browsing](https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/Season): `src/containers/Activite/Season`
- [Home activity](https://github.com/zakaoai/cold-library-frontend/tree/develop/src/containers/Activite/Home): `src/containers/Activite/Home`

### API access

- [Anime service](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/services/AnimeService.ts): `src/services/AnimeService.ts`
- [API routes](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/services/api.ts): `src/services/api.ts`
- [HTTP request layer](https://github.com/zakaoai/cold-library-frontend/blob/develop/src/services/request/request.ts): `src/services/request/request.ts`

### Other components

- **User**
- **Cold Library API**
- **MyAnimeList**

## Connections

- User → Application router: navigates (evidence: `src/routes/AppRouter.tsx`)
- Application router → App context providers: wraps routes (evidence: `src/routes/AppRouter.tsx`)
- Application router → Anime search page: routes to (evidence: `src/routes/AppRouter.tsx`)
- Application router → Anime library: routes to (evidence: `src/routes/AppRouter.tsx`)
- Application router → Episode tracking: routes to (evidence: `src/routes/AppRouter.tsx`)
- Application router → Torrent management: routes to (evidence: `src/routes/AppRouter.tsx`)
- Application router → User requests: routes to (evidence: `src/routes/AppRouter.tsx`)
- Application router → Profile and MAL: routes to (evidence: `src/routes/AppRouter.tsx`)
- Application router → Admin activity logs: routes to (evidence: `src/routes/AppRouter.tsx`)
- Application router → Season browsing: routes to (evidence: `src/routes/AppRouter.tsx`)
- Application router → Home activity: routes to (evidence: `src/routes/AppRouter.tsx`)
- Anime search page → Search form: renders (evidence: `src/containers/Activite/Search/SearchActivity.tsx`)
- Anime search page → Anime search: uses (evidence: `src/containers/Activite/Search/SearchActivity.tsx`)
- Anime search page → Result display modes: renders results (evidence: `src/containers/Activite/Search/SearchActivity.tsx`)
- Anime search → Anime service: searches (evidence: `src/hooks/containers/Search/useAnimeSearch.ts`)
- Anime service → API routes: uses endpoints (evidence: `src/services/AnimeService.ts`)
- Anime service → HTTP request layer: sends requests (evidence: `src/services/AnimeService.ts`)
- API routes → Cold Library API: targets (evidence: `src/services/api.ts`)
- Anime search → Library data hook: loads library (evidence: `src/hooks/containers/Search/useAnimeSearch.ts`)
- Library data hook → Anime service: fetches anime (evidence: `src/hooks/containers/AnimeLibrary/useLibrary.ts`)
- Storage state actions → Anime service: updates titles (evidence: `src/hooks/components/useUpdateAnimeStorageState.ts`)
- Anime library → Storage state actions: manages state
- Profile and MAL → MyAnimeList: syncs with (evidence: `README.md`)
- Episode tracking → Cold Library API: tracks episodes (evidence: `README.md`)
- Torrent management → Cold Library API: manages downloads (evidence: `README.md`)
- User requests → Cold Library API: submits requests (evidence: `README.md`)
- Admin activity logs → Cold Library API: views logs (evidence: `README.md`)
- Season browsing → Cold Library API: browses seasons
