# awp22nd/cuy-un4 architecture

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

- Interactive diagram: https://gitdiagram.com/awp22nd/cuy-un4
- Repository: https://github.com/awp22nd/cuy-un4

## Overview

Cuy-AnimeList is a web app for browsing anime and viewing user account pages. Its main browsing flow uses the navbar search to open keyword results, or browses popular and recommended titles; selecting a title opens its detail page with a trailer. The app also exposes sign-in and a user dashboard with a collections view. The README provides no capability detail, and the collections page shown is static. API helper internals and middleware behavior were not excerpted, so their downstream relationships are not asserted.

Main entry points: [`cuyanimelist/src/app/popular/page.jsx`](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/popular/page.jsx) (Popular Page), [`cuyanimelist/src/app/search/[keyword]/page.jsx`](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/search/%5Bkeyword%5D/page.jsx) (Search Results), [`cuyanimelist/src/libs/api-libs.js`](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/libs/api-libs.js) (Anime API Helpers), [`cuyanimelist/src/app/page.jsx`](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/page.jsx) (Home Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App Navigation"]
  node_site_layout["Site Layout<br/>[layout.jsx]"]
  node_navbar["Navbar<br/>[index.jsx]"]
  node_search_input["Search Input<br/>[InputSearch.jsx]"]
  node_user_action["User Action<br/>[UserActButton.jsx]"]
end

subgraph group_anime["Anime Discovery"]
  node_home_page["Home Page<br/>[page.jsx]"]
  node_popular_page["Popular Page<br/>[page.jsx]"]
  node_search_page["Search Results<br/>[page.jsx]"]
  node_anime_detail["Anime Detail<br/>[page.jsx]"]
  node_anime_list["Anime List<br/>[index.jsx]"]
  node_anime_header["Anime Header<br/>[Header.jsx]"]
  node_popular_header["Popular Header<br/>[HeaderMenu.jsx]"]
  node_pagination["Pagination<br/>[Pagination.jsx]"]
  node_video_player["Video Player<br/>[VideoPlayer.jsx]"]
end

subgraph group_account["Accounts"]
  node_dashboard["User Dashboard<br/>[page.jsx]"]
  node_collections["Collections View<br/>[page.jsx]"]
  node_collection_header["Collection Header<br/>[Header.jsx]"]
  node_auth_route["Auth Route<br/>[route.js]"]
end

subgraph group_services["Application Services"]
  node_api_helpers["Anime API Helpers<br/>[api-libs.js]"]
  node_auth_helpers["Auth Helpers<br/>[auth-libs.js]"]
  node_middleware["Request Middleware<br/>[middleware.js]"]
end

node_github{{"GitHub OAuth"}}

node_site_layout -->|"renders"| node_navbar
node_navbar -->|"renders"| node_search_input
node_navbar -->|"renders"| node_user_action
node_search_input -->|"navigates to"| node_search_page
node_home_page -->|"fetches anime"| node_api_helpers
node_home_page -->|"renders"| node_anime_list
node_home_page -->|"renders"| node_anime_header
node_popular_page -->|"fetches anime"| node_api_helpers
node_popular_page -->|"renders"| node_anime_list
node_popular_page -->|"renders"| node_popular_header
node_popular_page -->|"renders"| node_pagination
node_search_page -->|"fetches results"| node_api_helpers
node_search_page -->|"renders"| node_anime_list
node_search_page -->|"renders"| node_anime_header
node_anime_detail -->|"fetches detail"| node_api_helpers
node_anime_detail -->|"renders"| node_video_player
node_dashboard -->|"loads session"| node_auth_helpers
node_dashboard -->|"links to"| node_collections
node_collections -->|"renders"| node_collection_header
node_user_action -->|"loads session"| node_auth_helpers
node_auth_route -->|"configures provider"| node_github

click node_site_layout "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/layout.jsx"
click node_navbar "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/Navbar/index.jsx"
click node_search_input "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/Navbar/InputSearch.jsx"
click node_user_action "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/Navbar/UserActButton.jsx"
click node_home_page "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/page.jsx"
click node_popular_page "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/popular/page.jsx"
click node_search_page "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/search/%5Bkeyword%5D/page.jsx"
click node_anime_detail "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/anime/%5Bid%5D/page.jsx"
click node_anime_list "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/AnimeList/index.jsx"
click node_anime_header "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/AnimeList/Header.jsx"
click node_popular_header "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/Utilities/HeaderMenu.jsx"
click node_pagination "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/Utilities/Pagination.jsx"
click node_video_player "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/Utilities/VideoPlayer.jsx"
click node_dashboard "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/user/dashboard/page.jsx"
click node_collections "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/user/dashboard/collections/page.jsx"
click node_collection_header "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/dashboard/Header.jsx"
click node_auth_route "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/api/auth/%5B...nextauth%5D/route.js"
click node_api_helpers "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/libs/api-libs.js"
click node_auth_helpers "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/libs/auth-libs.js"
click node_middleware "https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/middleware.js"

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_site_layout,node_navbar,node_search_input,node_user_action toneBlue
class node_home_page,node_popular_page,node_search_page,node_anime_detail,node_anime_list,node_anime_header,node_popular_header,node_pagination,node_video_player toneAmber
class node_dashboard,node_collections,node_collection_header,node_auth_route toneMint
class node_api_helpers,node_auth_helpers,node_middleware toneRose
class node_github toneIndigo
```

## Components

### App Navigation

- [Site Layout](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/layout.jsx): `cuyanimelist/src/app/layout.jsx`
- [Navbar](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/Navbar/index.jsx): `cuyanimelist/src/components/Navbar/index.jsx`
- [Search Input](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/Navbar/InputSearch.jsx): `cuyanimelist/src/components/Navbar/InputSearch.jsx`
- [User Action](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/Navbar/UserActButton.jsx): `cuyanimelist/src/components/Navbar/UserActButton.jsx`

### Anime Discovery

- [Home Page](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/page.jsx): `cuyanimelist/src/app/page.jsx`
- [Popular Page](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/popular/page.jsx): `cuyanimelist/src/app/popular/page.jsx`
- [Search Results](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/search/%5Bkeyword%5D/page.jsx): `cuyanimelist/src/app/search/[keyword]/page.jsx`
- [Anime Detail](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/anime/%5Bid%5D/page.jsx): `cuyanimelist/src/app/anime/[id]/page.jsx`
- [Anime List](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/AnimeList/index.jsx): `cuyanimelist/src/components/AnimeList/index.jsx`
- [Anime Header](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/AnimeList/Header.jsx): `cuyanimelist/src/components/AnimeList/Header.jsx`
- [Popular Header](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/Utilities/HeaderMenu.jsx): `cuyanimelist/src/components/Utilities/HeaderMenu.jsx`
- [Pagination](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/Utilities/Pagination.jsx): `cuyanimelist/src/components/Utilities/Pagination.jsx`
- [Video Player](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/Utilities/VideoPlayer.jsx): `cuyanimelist/src/components/Utilities/VideoPlayer.jsx`

### Accounts

- [User Dashboard](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/user/dashboard/page.jsx): `cuyanimelist/src/app/user/dashboard/page.jsx`
- [Collections View](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/user/dashboard/collections/page.jsx): `cuyanimelist/src/app/user/dashboard/collections/page.jsx`
- [Collection Header](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/components/dashboard/Header.jsx): `cuyanimelist/src/components/dashboard/Header.jsx`
- [Auth Route](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/app/api/auth/%5B...nextauth%5D/route.js): `cuyanimelist/src/app/api/auth/[...nextauth]/route.js`

### Application Services

- [Anime API Helpers](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/libs/api-libs.js): `cuyanimelist/src/libs/api-libs.js`
- [Auth Helpers](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/libs/auth-libs.js): `cuyanimelist/src/libs/auth-libs.js`
- [Request Middleware](https://github.com/awp22nd/cuy-un4/blob/main/cuyanimelist/src/middleware.js): `cuyanimelist/src/middleware.js`

### Other components

- **GitHub OAuth**

## Connections

- Site Layout → Navbar: renders (evidence: `cuyanimelist/src/app/layout.jsx`)
- Navbar → Search Input: renders (evidence: `cuyanimelist/src/components/Navbar/index.jsx`)
- Navbar → User Action: renders (evidence: `cuyanimelist/src/components/Navbar/index.jsx`)
- Search Input → Search Results: navigates to (evidence: `cuyanimelist/src/components/Navbar/InputSearch.jsx`)
- Home Page → Anime API Helpers: fetches anime (evidence: `cuyanimelist/src/app/page.jsx`)
- Home Page → Anime List: renders (evidence: `cuyanimelist/src/app/page.jsx`)
- Home Page → Anime Header: renders (evidence: `cuyanimelist/src/app/page.jsx`)
- Popular Page → Anime API Helpers: fetches anime (evidence: `cuyanimelist/src/app/popular/page.jsx`)
- Popular Page → Anime List: renders (evidence: `cuyanimelist/src/app/popular/page.jsx`)
- Popular Page → Popular Header: renders (evidence: `cuyanimelist/src/app/popular/page.jsx`)
- Popular Page → Pagination: renders (evidence: `cuyanimelist/src/app/popular/page.jsx`)
- Search Results → Anime API Helpers: fetches results (evidence: `cuyanimelist/src/app/search/[keyword]/page.jsx`)
- Search Results → Anime List: renders (evidence: `cuyanimelist/src/app/search/[keyword]/page.jsx`)
- Search Results → Anime Header: renders (evidence: `cuyanimelist/src/app/search/[keyword]/page.jsx`)
- Anime Detail → Anime API Helpers: fetches detail (evidence: `cuyanimelist/src/app/anime/[id]/page.jsx`)
- Anime Detail → Video Player: renders (evidence: `cuyanimelist/src/app/anime/[id]/page.jsx`)
- User Dashboard → Auth Helpers: loads session (evidence: `cuyanimelist/src/app/user/dashboard/page.jsx`)
- User Dashboard → Collections View: links to (evidence: `cuyanimelist/src/app/user/dashboard/page.jsx`)
- Collections View → Collection Header: renders (evidence: `cuyanimelist/src/app/user/dashboard/collections/page.jsx`)
- User Action → Auth Helpers: loads session (evidence: `cuyanimelist/src/components/Navbar/UserActButton.jsx`)
- Auth Route → GitHub OAuth: configures provider (evidence: `cuyanimelist/src/app/api/auth/[...nextauth]/route.js`)
