# dooyulkim/youtube-channel-analyser architecture

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

- Interactive diagram: https://gitdiagram.com/dooyulkim/youtube-channel-analyser
- Repository: https://github.com/dooyulkim/youtube-channel-analyser

## Overview

YouTube Channel Analyzer benchmarks configured or discovered channels: it retrieves channel and recent-upload data, derives performance and cadence insights, and emits terminal/JSON/CSV reports consumed by a dashboard. The dashboard loads summaries, filters and ranks channels, and presents KPIs, a leaderboard, and latest uploads. Edges are limited to calls shown in excerpts or references recorded by the SOURCE INDEX; dashboard static-data serving is documented, but its server wiring is not sampled.

Main entry points: [`frontend/src/App.tsx`](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/App.tsx) (Dashboard App), [`backend/index.ts`](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/index.ts) (Analyzer CLI), [`backend/analysis.ts`](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/analysis.ts) (Channel Analysis), [`backend/youtube.ts`](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/youtube.ts) (YouTube API Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_benchmarking["Benchmarking"]
  node_cli["Analyzer CLI<br/>[index.ts]"]
  node_config["Channel Config<br/>[config.ts]"]
  node_discovery["Channel Discovery<br/>[discovery.ts]"]
  node_analysis["Channel Analysis<br/>[analysis.ts]"]
  node_metrics["Cadence Metrics<br/>[metrics.ts]"]
  node_models["Benchmark Models<br/>[models.ts]"]
end

subgraph group_data["YouTube Data"]
  node_youtube["YouTube API Client<br/>[youtube.ts]"]
  node_youtube_api{{"YouTube Data API"}}
  node_utilities["Data Utilities<br/>[utils.ts]"]
end

subgraph group_outputs["Reports"]
  node_reporting["Report Generation<br/>[reporting.ts]"]
  node_report_formats["Report Formatting<br/>[formatters.ts]"]
  node_report_files["JSON / CSV Reports"]
end

subgraph group_dashboard["Dashboard"]
  node_dashboard_app["Dashboard App<br/>[App.tsx]"]
  node_api_service["Summary Data Fetch<br/>[api.ts]"]
  node_dashboard_types["Summary Types<br/>[types.ts]"]
end

subgraph group_ui["Dashboard UI"]
  node_filters["Search and Filters"]
  node_leaderboard["Channel Leaderboard<br/>[ChannelTable.tsx]"]
  node_metrics_view["KPI Cards<br/>[MetricCards.tsx]"]
  node_latest_view["Latest Uploads<br/>[LatestVideos.tsx]"]
  node_ui_primitives["UI Primitives"]
  node_formatters["Display Formatters<br/>[formatters.ts]"]
end

node_operator(("Analyst"))

node_operator -->|"runs"| node_cli
node_cli -->|"loads config"| node_config
node_cli -->|"discovers channels"| node_discovery
node_cli -->|"creates client"| node_youtube
node_cli -->|"analyzes channels"| node_analysis
node_analysis -->|"fetches channel data"| node_youtube
node_analysis -->|"computes cadence"| node_metrics
node_analysis -->|"uses records"| node_models
node_youtube -->|"requests data"| node_youtube_api
node_youtube -->|"parses responses"| node_utilities
node_cli -->|"prints and writes"| node_reporting
node_reporting -->|"formats values"| node_report_formats
node_reporting -->|"writes JSON/CSV"| node_report_files
node_cli -->|"uses summary types"| node_models
node_dashboard_app -->|"fetches summaries"| node_api_service
node_dashboard_app -->|"renders and updates"| node_filters
node_dashboard_app -->|"renders sorted results"| node_leaderboard
node_dashboard_app -->|"renders KPIs"| node_metrics_view
node_dashboard_app -->|"renders uploads"| node_latest_view
node_dashboard_app -->|"renders cards"| node_ui_primitives
node_leaderboard -->|"renders table"| node_ui_primitives
node_leaderboard -->|"formats values"| node_formatters
node_metrics_view -->|"formats metrics"| node_formatters
node_filters -->|"uses input"| node_ui_primitives
node_api_service -->|"returns summaries"| node_dashboard_types
node_dashboard_app -->|"stores summaries"| node_dashboard_types
node_report_files -.->|"serves dashboard data"| node_api_service

click node_cli "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/index.ts"
click node_config "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/config.ts"
click node_discovery "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/discovery.ts"
click node_analysis "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/analysis.ts"
click node_metrics "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/metrics.ts"
click node_models "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/models.ts"
click node_youtube "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/youtube.ts"
click node_utilities "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/utils.ts"
click node_reporting "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/reporting.ts"
click node_report_formats "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/formatters.ts"
click node_report_files "https://github.com/dooyulkim/youtube-channel-analyser/tree/main/backend/reports"
click node_dashboard_app "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/App.tsx"
click node_api_service "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/services/api.ts"
click node_dashboard_types "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/types.ts"
click node_filters "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/components/SearchAndFilters.tsx"
click node_leaderboard "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/components/ChannelTable.tsx"
click node_metrics_view "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/components/MetricCards.tsx"
click node_latest_view "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/components/LatestVideos.tsx"
click node_ui_primitives "https://github.com/dooyulkim/youtube-channel-analyser/tree/main/frontend/src/components/ui"
click node_formatters "https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/utils/formatters.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_cli,node_config,node_discovery,node_analysis,node_metrics,node_models toneBlue
class node_youtube,node_youtube_api,node_utilities toneAmber
class node_reporting,node_report_formats,node_report_files toneMint
class node_dashboard_app,node_api_service,node_dashboard_types toneRose
class node_filters,node_leaderboard,node_metrics_view,node_latest_view,node_ui_primitives,node_formatters,node_operator toneIndigo
```

## Components

### Benchmarking

- [Analyzer CLI](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/index.ts): `backend/index.ts`
- [Channel Config](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/config.ts): `backend/config.ts`
- [Channel Discovery](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/discovery.ts): `backend/discovery.ts`
- [Channel Analysis](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/analysis.ts): `backend/analysis.ts`
- [Cadence Metrics](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/metrics.ts): `backend/metrics.ts`
- [Benchmark Models](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/models.ts): `backend/models.ts`

### YouTube Data

- [YouTube API Client](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/youtube.ts): `backend/youtube.ts`
- **YouTube Data API**
- [Data Utilities](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/utils.ts): `backend/utils.ts`

### Reports

- [Report Generation](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/reporting.ts): `backend/reporting.ts`
- [Report Formatting](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/backend/formatters.ts): `backend/formatters.ts`
- [JSON / CSV Reports](https://github.com/dooyulkim/youtube-channel-analyser/tree/main/backend/reports): `backend/reports`

### Dashboard

- [Dashboard App](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Summary Data Fetch](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`
- [Summary Types](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/types.ts): `frontend/src/types.ts`

### Dashboard UI

- [Search and Filters](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/components/SearchAndFilters.tsx): `frontend/src/components/SearchAndFilters.tsx`
- [Channel Leaderboard](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/components/ChannelTable.tsx): `frontend/src/components/ChannelTable.tsx`
- [KPI Cards](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/components/MetricCards.tsx): `frontend/src/components/MetricCards.tsx`
- [Latest Uploads](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/components/LatestVideos.tsx): `frontend/src/components/LatestVideos.tsx`
- [UI Primitives](https://github.com/dooyulkim/youtube-channel-analyser/tree/main/frontend/src/components/ui): `frontend/src/components/ui`
- [Display Formatters](https://github.com/dooyulkim/youtube-channel-analyser/blob/main/frontend/src/utils/formatters.ts): `frontend/src/utils/formatters.ts`

### Other components

- **Analyst**

## Connections

- Analyst → Analyzer CLI: runs (evidence: `backend/index.ts`)
- Analyzer CLI → Channel Config: loads config (evidence: `backend/index.ts`)
- Analyzer CLI → Channel Discovery: discovers channels (evidence: `backend/index.ts`)
- Analyzer CLI → YouTube API Client: creates client (evidence: `backend/index.ts`)
- Analyzer CLI → Channel Analysis: analyzes channels (evidence: `backend/index.ts`)
- Channel Analysis → YouTube API Client: fetches channel data (evidence: `backend/analysis.ts`)
- Channel Analysis → Cadence Metrics: computes cadence (evidence: `backend/analysis.ts`)
- Channel Analysis → Benchmark Models: uses records (evidence: `backend/analysis.ts`)
- YouTube API Client → YouTube Data API: requests data (evidence: `backend/youtube.ts`)
- YouTube API Client → Data Utilities: parses responses (evidence: `backend/youtube.ts`)
- Analyzer CLI → Report Generation: prints and writes (evidence: `backend/index.ts`)
- Report Generation → Report Formatting: formats values (evidence: `backend/reporting.ts`)
- Report Generation → JSON / CSV Reports: writes JSON/CSV (evidence: `backend/reporting.ts`)
- Analyzer CLI → Benchmark Models: uses summary types (evidence: `backend/index.ts`)
- Dashboard App → Summary Data Fetch: fetches summaries (evidence: `frontend/src/App.tsx`)
- Dashboard App → Search and Filters: renders and updates (evidence: `frontend/src/App.tsx`)
- Dashboard App → Channel Leaderboard: renders sorted results (evidence: `frontend/src/App.tsx`)
- Dashboard App → KPI Cards: renders KPIs (evidence: `frontend/src/App.tsx`)
- Dashboard App → Latest Uploads: renders uploads (evidence: `frontend/src/App.tsx`)
- Dashboard App → UI Primitives: renders cards (evidence: `frontend/src/App.tsx`)
- Channel Leaderboard → UI Primitives: renders table (evidence: `frontend/src/components/ChannelTable.tsx`)
- Channel Leaderboard → Display Formatters: formats values (evidence: `frontend/src/components/ChannelTable.tsx`)
- KPI Cards → Display Formatters: formats metrics (evidence: `frontend/src/components/MetricCards.tsx`)
- Search and Filters → UI Primitives: uses input (evidence: `frontend/src/components/SearchAndFilters.tsx`)
- Summary Data Fetch → Summary Types: returns summaries (evidence: `frontend/src/services/api.ts`)
- Dashboard App → Summary Types: stores summaries (evidence: `frontend/src/App.tsx`)
- JSON / CSV Reports → Summary Data Fetch: serves dashboard data (evidence: `README.md`)
