# teonilopereira/anime architecture

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

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

## Overview

Mirudoku is a static web app for tracking anime, manga, and light novels. The main user workflow is browsing and searching a catalog, opening a title’s detail page, then tracking it in personal lists; users can also compare titles, view rankings, take on challenges, and receive new-episode notifications. README documents AniList and MangaDex as content sources and Supabase for accounts and progress. The map includes those product areas; links are limited to README statements and shown source references or calls, so some unsampled page wiring is not shown.

Main entry points: [`api/supabase-client.js`](https://github.com/teonilopereira/anime/blob/main/api/supabase-client.js) (Supabase client), [`js/catalog/search.js`](https://github.com/teonilopereira/anime/blob/main/js/catalog/search.js) (Catalog search), [`js/detalle/render.js`](https://github.com/teonilopereira/anime/blob/main/js/detalle/render.js) (Title details), [`js/pages/mis-listas.js`](https://github.com/teonilopereira/anime/blob/main/js/pages/mis-listas.js) (Personal lists)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Catalog and discovery"]
  node_catalog["Catalog search<br/>[search.js]"]
  node_catalog_cards["Catalog cards<br/>[cards.js]"]
  node_catalog_paging["Catalog pagination<br/>[pagination.js]"]
  node_anilist{{"AniList API"}}
  node_mangadex["MangaDex API<br/>[mangadex-api.js]"]
end

subgraph group_tracking["Title tracking"]
  node_detail["Title details<br/>[render.js]"]
  node_detail_data["Detail data<br/>[data.js]"]
  node_detail_comments["Title comments<br/>[comments.js]"]
  node_lists["Personal lists<br/>[mis-listas.js]"]
  node_progress["Viewing progress<br/>[progress.js]"]
end

subgraph group_community["Community and challenges"]
  node_comparison["Title comparison<br/>[comparar.js]"]
  node_ranking["User rankings<br/>[ranking.js]"]
  node_challenges["Challenges<br/>[retos.js]"]
end

subgraph group_platform["Account and data"]
  node_login["Login page<br/>[login.js]"]
  node_auth["Auth and session<br/>[auth.js]"]
  node_supabase_loader["Supabase loader<br/>[supabase-config.js]"]
  node_supabase["Supabase client<br/>[supabase-client.js]"]
end

subgraph group_updates["Updates and presentation"]
  node_episode_updates["New-episode notifications<br/>[novedades.js]"]
  node_notify_function["Episode notification function<br/>[index.ts]"]
  node_i18n["Translations<br/>[i18n.js]"]
  node_ui["Shared UI<br/>[common-ui.js]"]
end

node_visitor(("App user"))

node_visitor -->|"searches"| node_catalog
node_visitor -->|"opens titles"| node_detail
node_visitor -->|"tracks titles"| node_lists
node_visitor -->|"compares titles"| node_comparison
node_visitor -->|"views rankings"| node_ranking
node_visitor -->|"takes challenges"| node_challenges
node_visitor -->|"signs in"| node_login
node_auth -->|"loads client"| node_supabase_loader
node_supabase_loader -->|"imports client"| node_supabase
node_lists -->|"uses account progress"| node_supabase
node_progress -->|"persists progress"| node_supabase
node_catalog -->|"gets catalog data"| node_anilist
node_detail -->|"uses manga data"| node_mangadex
node_visitor -->|"receives updates"| node_episode_updates

click node_catalog "https://github.com/teonilopereira/anime/blob/main/js/catalog/search.js"
click node_catalog_cards "https://github.com/teonilopereira/anime/blob/main/js/catalog/cards.js"
click node_catalog_paging "https://github.com/teonilopereira/anime/blob/main/js/catalog/pagination.js"
click node_mangadex "https://github.com/teonilopereira/anime/blob/main/js/core/mangadex-api.js"
click node_detail "https://github.com/teonilopereira/anime/blob/main/js/detalle/render.js"
click node_detail_data "https://github.com/teonilopereira/anime/blob/main/js/detalle/data.js"
click node_detail_comments "https://github.com/teonilopereira/anime/blob/main/js/detalle/comments.js"
click node_lists "https://github.com/teonilopereira/anime/blob/main/js/pages/mis-listas.js"
click node_progress "https://github.com/teonilopereira/anime/blob/main/js/detalle/progress.js"
click node_login "https://github.com/teonilopereira/anime/blob/main/js/pages/login.js"
click node_auth "https://github.com/teonilopereira/anime/blob/main/js/core/auth.js"
click node_supabase_loader "https://github.com/teonilopereira/anime/blob/main/api/supabase-config.js"
click node_supabase "https://github.com/teonilopereira/anime/blob/main/api/supabase-client.js"
click node_comparison "https://github.com/teonilopereira/anime/blob/main/js/pages/comparar.js"
click node_ranking "https://github.com/teonilopereira/anime/blob/main/js/pages/ranking.js"
click node_challenges "https://github.com/teonilopereira/anime/blob/main/js/pages/retos.js"
click node_episode_updates "https://github.com/teonilopereira/anime/blob/main/js/core/novedades.js"
click node_notify_function "https://github.com/teonilopereira/anime/blob/main/server/functions/notify-new-episodes/index.ts"
click node_i18n "https://github.com/teonilopereira/anime/blob/main/js/core/i18n.js"
click node_ui "https://github.com/teonilopereira/anime/blob/main/js/core/common-ui.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_catalog,node_catalog_cards,node_catalog_paging,node_anilist,node_mangadex,node_visitor toneBlue
class node_detail,node_detail_data,node_detail_comments,node_lists,node_progress toneAmber
class node_comparison,node_ranking,node_challenges toneMint
class node_login,node_auth,node_supabase_loader,node_supabase toneRose
class node_episode_updates,node_notify_function,node_i18n,node_ui toneIndigo
```

## Components

### Catalog and discovery

- [Catalog search](https://github.com/teonilopereira/anime/blob/main/js/catalog/search.js): `js/catalog/search.js`
- [Catalog cards](https://github.com/teonilopereira/anime/blob/main/js/catalog/cards.js): `js/catalog/cards.js`
- [Catalog pagination](https://github.com/teonilopereira/anime/blob/main/js/catalog/pagination.js): `js/catalog/pagination.js`
- **AniList API**
- [MangaDex API](https://github.com/teonilopereira/anime/blob/main/js/core/mangadex-api.js): `js/core/mangadex-api.js`

### Title tracking

- [Title details](https://github.com/teonilopereira/anime/blob/main/js/detalle/render.js): `js/detalle/render.js`
- [Detail data](https://github.com/teonilopereira/anime/blob/main/js/detalle/data.js): `js/detalle/data.js`
- [Title comments](https://github.com/teonilopereira/anime/blob/main/js/detalle/comments.js): `js/detalle/comments.js`
- [Personal lists](https://github.com/teonilopereira/anime/blob/main/js/pages/mis-listas.js): `js/pages/mis-listas.js`
- [Viewing progress](https://github.com/teonilopereira/anime/blob/main/js/detalle/progress.js): `js/detalle/progress.js`

### Community and challenges

- [Title comparison](https://github.com/teonilopereira/anime/blob/main/js/pages/comparar.js): `js/pages/comparar.js`
- [User rankings](https://github.com/teonilopereira/anime/blob/main/js/pages/ranking.js): `js/pages/ranking.js`
- [Challenges](https://github.com/teonilopereira/anime/blob/main/js/pages/retos.js): `js/pages/retos.js`

### Account and data

- [Login page](https://github.com/teonilopereira/anime/blob/main/js/pages/login.js): `js/pages/login.js`
- [Auth and session](https://github.com/teonilopereira/anime/blob/main/js/core/auth.js): `js/core/auth.js`
- [Supabase loader](https://github.com/teonilopereira/anime/blob/main/api/supabase-config.js): `api/supabase-config.js`
- [Supabase client](https://github.com/teonilopereira/anime/blob/main/api/supabase-client.js): `api/supabase-client.js`

### Updates and presentation

- [New-episode notifications](https://github.com/teonilopereira/anime/blob/main/js/core/novedades.js): `js/core/novedades.js`
- [Episode notification function](https://github.com/teonilopereira/anime/blob/main/server/functions/notify-new-episodes/index.ts): `server/functions/notify-new-episodes/index.ts`
- [Translations](https://github.com/teonilopereira/anime/blob/main/js/core/i18n.js): `js/core/i18n.js`
- [Shared UI](https://github.com/teonilopereira/anime/blob/main/js/core/common-ui.js): `js/core/common-ui.js`

### Other components

- **App user**

## Connections

- App user → Catalog search: searches
- App user → Title details: opens titles
- App user → Personal lists: tracks titles
- App user → Title comparison: compares titles
- App user → User rankings: views rankings
- App user → Challenges: takes challenges
- App user → Login page: signs in
- Auth and session → Supabase loader: loads client (evidence: `js/core/auth.js`)
- Supabase loader → Supabase client: imports client (evidence: `api/supabase-config.js`)
- Personal lists → Supabase client: uses account progress
- Viewing progress → Supabase client: persists progress
- Catalog search → AniList API: gets catalog data
- Title details → MangaDex API: uses manga data
- App user → New-episode notifications: receives updates
