# imluckyluke/animeverse architecture

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

- Interactive diagram: https://gitdiagram.com/imluckyluke/animeverse
- Repository: https://github.com/imluckyluke/animeverse

## Overview

AniPlus is an anime discovery and download web app backed by a Telegram-based catalog and archive worker, with a private administration console. Viewers browse/search titles and episodes, manage favorites or accounts, and request downloads; administrators review catalog/archive records and control sync. The graph also preserves ingestion, identity review, catalog publication, notifications, and download-cache capabilities. Relationships are limited to imports or calls visible in the supplied excerpts and SOURCE INDEX; several UI and operational links are not shown, so they are left unconnected.

Main entry points: [`tools/tg/archive_identity.py`](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/archive_identity.py) (Archive identity review), [`tools/tg/parse.py`](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/parse.py) (Post parser), [`src/app/api/download-cache/route.ts`](https://github.com/imluckyluke/animeverse/blob/master/src/app/api/download-cache/route.ts) (Download endpoints), [`tools/tg/catalog.py`](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/catalog.py) (Catalog builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_viewer["Viewer experience"]
  node_browse["Browse and detail<br/>[page.tsx]"]
  node_search["Catalog search<br/>[page.tsx]"]
  node_favorites["Favorites<br/>[favorites-view.tsx]"]
  node_account_ui["Account and auth<br/>[auth-view.tsx]"]
  node_download_ui["Download center"]
end

subgraph group_web["Web services"]
  node_catalog_data[("Catalog data<br/>[data.ts]")]
  node_catalog_api["Catalog endpoints<br/>[route.ts]"]
  node_download_api["Download endpoints<br/>[route.ts]"]
  node_cache_service["Download cache service"]
  node_account_api["Account API proxy<br/>[route.ts]"]
end

subgraph group_admin["Administration"]
  node_admin_ui["Admin console<br/>[console-review.tsx]"]
  node_admin_client["Admin API client<br/>[admin-client.ts]"]
  node_admin_proxy["Admin API proxy<br/>[route.ts]"]
  node_admin_server["Admin control API<br/>[admin-server.ts]"]
  node_admin_store[("Admin state store<br/>[admin_store.py]")]
  node_admin_worker["Admin service<br/>[admin_service.py]"]
end

subgraph group_catalog_worker["Catalog pipeline"]
  node_parse["Post parser<br/>[parse.py]"]
  node_ingest["Post ingestion<br/>[ingest.py]"]
  node_backfill["Catalog backfill<br/>[backfill.py]"]
  node_catalog_builder["Catalog builder<br/>[catalog.py]"]
end

subgraph group_archive_worker["Archive processing"]
  node_archive_pipeline["Archive pipeline"]
  node_identity["Archive identity review"]
  node_archive_review["Archive review<br/>[archive_review.py]"]
  node_common["Worker state helpers<br/>[common.py]"]
end

node_viewer(("Viewer"))
node_telegram(("Telegram channel"))

node_viewer -->|"browses"| node_browse
node_viewer -->|"searches"| node_search
node_viewer -->|"manages"| node_favorites
node_viewer -->|"signs in"| node_account_ui
node_viewer -->|"requests"| node_download_ui
node_catalog_api -->|"reads"| node_catalog_data
node_download_api -->|"checks title"| node_catalog_data
node_download_api -.->|"dispatches"| node_cache_service
node_account_ui -.->|"uses"| node_account_api
node_admin_ui -->|"requests data"| node_admin_client
node_admin_client -->|"fetches"| node_admin_proxy
node_admin_proxy -->|"forwards"| node_admin_server
node_admin_worker -->|"uses"| node_admin_store
node_telegram -.->|"supplies posts"| node_ingest
node_ingest -->|"parses posts"| node_parse
node_backfill -->|"parses posts"| node_parse
node_catalog_builder -.->|"normalizes records"| node_parse
node_archive_pipeline -->|"reconciles identities"| node_identity
node_archive_pipeline -.->|"uses state helpers"| node_common
node_identity -->|"uses parsing"| node_backfill
node_archive_review -->|"reviews proposals"| node_identity
node_catalog_builder -.->|"uses helpers"| node_common

click node_browse "https://github.com/imluckyluke/animeverse/blob/master/src/app/browse/page.tsx"
click node_search "https://github.com/imluckyluke/animeverse/blob/master/src/app/search/page.tsx"
click node_favorites "https://github.com/imluckyluke/animeverse/blob/master/src/components/favorites-view.tsx"
click node_account_ui "https://github.com/imluckyluke/animeverse/blob/master/src/components/auth-view.tsx"
click node_download_ui "https://github.com/imluckyluke/animeverse/blob/master/src/components/downloads/download-center.tsx"
click node_catalog_data "https://github.com/imluckyluke/animeverse/blob/master/src/lib/data.ts"
click node_catalog_api "https://github.com/imluckyluke/animeverse/blob/master/src/app/api/app/catalog/route.ts"
click node_download_api "https://github.com/imluckyluke/animeverse/blob/master/src/app/api/download-cache/route.ts"
click node_cache_service "https://github.com/imluckyluke/animeverse/blob/master/tools/tg/download_cache_service.py"
click node_account_api "https://github.com/imluckyluke/animeverse/blob/master/src/app/api/account/%5B...path%5D/route.ts"
click node_admin_ui "https://github.com/imluckyluke/animeverse/blob/master/src/components/admin/console-review.tsx"
click node_admin_client "https://github.com/imluckyluke/animeverse/blob/master/src/lib/admin-client.ts"
click node_admin_proxy "https://github.com/imluckyluke/animeverse/blob/master/src/app/api/admin/%5B...path%5D/route.ts"
click node_admin_server "https://github.com/imluckyluke/animeverse/blob/master/src/lib/admin-server.ts"
click node_admin_store "https://github.com/imluckyluke/animeverse/blob/master/tools/tg/admin_store.py"
click node_admin_worker "https://github.com/imluckyluke/animeverse/blob/master/tools/tg/admin_service.py"
click node_parse "https://github.com/imluckyluke/animeverse/blob/master/tools/tg/parse.py"
click node_ingest "https://github.com/imluckyluke/animeverse/blob/master/tools/tg/ingest.py"
click node_backfill "https://github.com/imluckyluke/animeverse/blob/master/tools/tg/backfill.py"
click node_catalog_builder "https://github.com/imluckyluke/animeverse/blob/master/tools/tg/catalog.py"
click node_archive_pipeline "https://github.com/imluckyluke/animeverse/blob/master/tools/tg/archive_pipeline.py"
click node_identity "https://github.com/imluckyluke/animeverse/blob/master/tools/tg/archive_identity.py"
click node_archive_review "https://github.com/imluckyluke/animeverse/blob/master/tools/tg/archive_review.py"
click node_common "https://github.com/imluckyluke/animeverse/blob/master/tools/tg/common.py"

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_browse,node_search,node_favorites,node_account_ui,node_download_ui,node_viewer toneBlue
class node_catalog_data,node_catalog_api,node_download_api,node_cache_service,node_account_api toneAmber
class node_admin_ui,node_admin_client,node_admin_proxy,node_admin_server,node_admin_store,node_admin_worker toneMint
class node_parse,node_ingest,node_backfill,node_catalog_builder toneRose
class node_archive_pipeline,node_identity,node_archive_review,node_common,node_telegram toneIndigo
```

## Components

### Viewer experience

- [Browse and detail](https://github.com/imluckyluke/animeverse/blob/master/src/app/browse/page.tsx): `src/app/browse/page.tsx`
- [Catalog search](https://github.com/imluckyluke/animeverse/blob/master/src/app/search/page.tsx): `src/app/search/page.tsx`
- [Favorites](https://github.com/imluckyluke/animeverse/blob/master/src/components/favorites-view.tsx): `src/components/favorites-view.tsx`
- [Account and auth](https://github.com/imluckyluke/animeverse/blob/master/src/components/auth-view.tsx): `src/components/auth-view.tsx`
- [Download center](https://github.com/imluckyluke/animeverse/blob/master/src/components/downloads/download-center.tsx): `src/components/downloads/download-center.tsx`

### Web services

- [Catalog data](https://github.com/imluckyluke/animeverse/blob/master/src/lib/data.ts): `src/lib/data.ts`
- [Catalog endpoints](https://github.com/imluckyluke/animeverse/blob/master/src/app/api/app/catalog/route.ts): `src/app/api/app/catalog/route.ts`
- [Download endpoints](https://github.com/imluckyluke/animeverse/blob/master/src/app/api/download-cache/route.ts): `src/app/api/download-cache/route.ts`
- [Download cache service](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/download_cache_service.py): `tools/tg/download_cache_service.py`
- [Account API proxy](https://github.com/imluckyluke/animeverse/blob/master/src/app/api/account/%5B...path%5D/route.ts): `src/app/api/account/[...path]/route.ts`

### Administration

- [Admin console](https://github.com/imluckyluke/animeverse/blob/master/src/components/admin/console-review.tsx): `src/components/admin/console-review.tsx`
- [Admin API client](https://github.com/imluckyluke/animeverse/blob/master/src/lib/admin-client.ts): `src/lib/admin-client.ts`
- [Admin API proxy](https://github.com/imluckyluke/animeverse/blob/master/src/app/api/admin/%5B...path%5D/route.ts): `src/app/api/admin/[...path]/route.ts`
- [Admin control API](https://github.com/imluckyluke/animeverse/blob/master/src/lib/admin-server.ts): `src/lib/admin-server.ts`
- [Admin state store](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/admin_store.py): `tools/tg/admin_store.py`
- [Admin service](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/admin_service.py): `tools/tg/admin_service.py`

### Catalog pipeline

- [Post parser](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/parse.py): `tools/tg/parse.py`
- [Post ingestion](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/ingest.py): `tools/tg/ingest.py`
- [Catalog backfill](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/backfill.py): `tools/tg/backfill.py`
- [Catalog builder](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/catalog.py): `tools/tg/catalog.py`

### Archive processing

- [Archive pipeline](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/archive_pipeline.py): `tools/tg/archive_pipeline.py`
- [Archive identity review](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/archive_identity.py): `tools/tg/archive_identity.py`
- [Archive review](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/archive_review.py): `tools/tg/archive_review.py`
- [Worker state helpers](https://github.com/imluckyluke/animeverse/blob/master/tools/tg/common.py): `tools/tg/common.py`

### Other components

- **Viewer**
- **Telegram channel**

## Connections

- Viewer → Browse and detail: browses
- Viewer → Catalog search: searches
- Viewer → Favorites: manages
- Viewer → Account and auth: signs in
- Viewer → Download center: requests
- Catalog endpoints → Catalog data: reads (evidence: `src/app/api/app/catalog/route.ts`)
- Download endpoints → Catalog data: checks title (evidence: `src/app/api/download-cache/route.ts`)
- Download endpoints → Download cache service: dispatches
- Account and auth → Account API proxy: uses
- Admin console → Admin API client: requests data (evidence: `src/components/admin/console-review.tsx`)
- Admin API client → Admin API proxy: fetches (evidence: `src/lib/admin-client.ts`)
- Admin API proxy → Admin control API: forwards (evidence: `src/app/api/admin/[...path]/route.ts`)
- Admin service → Admin state store: uses (evidence: `tools/tg/admin_service.py`)
- Telegram channel → Post ingestion: supplies posts
- Post ingestion → Post parser: parses posts (evidence: `tools/tg/ingest.py`)
- Catalog backfill → Post parser: parses posts (evidence: `tools/tg/backfill.py`)
- Catalog builder → Post parser: normalizes records
- Archive pipeline → Archive identity review: reconciles identities (evidence: `tools/tg/archive_pipeline.py`)
- Archive pipeline → Worker state helpers: uses state helpers (evidence: `tools/tg/archive_pipeline.py`)
- Archive identity review → Catalog backfill: uses parsing (evidence: `tools/tg/archive_identity.py`)
- Archive review → Archive identity review: reviews proposals (evidence: `tools/tg/archive_review.py`)
- Catalog builder → Worker state helpers: uses helpers (evidence: `tools/tg/catalog.py`)
