# aidv/super_ytdl architecture

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

- Interactive diagram: https://gitdiagram.com/aidv/super_ytdl
- Repository: https://github.com/aidv/super_ytdl

## Overview

Super YTDL is a browser-based YouTube audio downloader. Users add video URLs, optionally validate them, monitor queue progress, and choose an output directory; the backend downloads audio, converts it to MP3, and saves queue state. The graph includes the documented UI/backend framework and the README’s multi-URL capability. Several action implementations are unsampled, so their links to the queue manager are marked unverified rather than asserted as observed calls.

Main entry points: [`modules/queue_manager.js`](https://github.com/aidv/super_ytdl/blob/main/modules/queue_manager.js) (Queue manager), [`sk_project/views/index/frontend/sk_ui/sk_ui_navbar/sk_ui_navbar.js`](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/frontend/sk_ui/sk_ui_navbar/sk_ui_navbar.js) (Action navbar), [`sk_project/views/index/frontend/sk_ui/sk_ui_queue_list/sk_ui_queue_list.js`](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/frontend/sk_ui/sk_ui_queue_list/sk_ui_queue_list.js) (Queue display), [`app.js`](https://github.com/aidv/super_ytdl/blob/main/app.js) (App bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_app["App bootstrap<br/>[app.js]"]
  node_framework["Superkraft engine"]
  node_localization["Localization<br/>[l10n.js]"]
end

subgraph group_interface["Browser interface"]
  node_index_view["Index view<br/>[main.js]"]
  node_frontend_view["View assembly<br/>[view.js]"]
  node_navbar["Action navbar<br/>[sk_ui_navbar.js]"]
  node_queue_list["Queue display"]
  node_add_action["Add URLs<br/>[addLinksToQueue.js]"]
  node_validate_action["Validate URL<br/>[validateURL.js]"]
  node_status_action["Queue statuses"]
  node_output_action["Output path<br/>[outputPath.js]"]
  node_retry_action["Retry failed"]
  node_clear_action["Clear completed<br/>[clearCompleted.js]"]
  node_start_action["Start ripping<br/>[startRipping.js]"]
end

subgraph group_queue["Queue and downloads"]
  node_queue_manager["Queue manager<br/>[queue_manager.js]"]
  node_queue_item["Download and convert<br/>[queue_manager.js]"]
end

subgraph group_integrations["Storage and tools"]
  node_queue_state[("Queue state file")]
  node_filesystem["Output filesystem"]
  node_ytdlp["yt-dlp"]
  node_ffmpeg["FFmpeg"]
end

node_user(("Browser user"))

node_user -->|"opens"| node_index_view
node_app -->|"initializes"| node_framework
node_app -->|"creates"| node_queue_manager
node_app -->|"creates"| node_localization
node_app -->|"configures project"| node_index_view
node_framework -.->|"serves"| node_index_view
node_index_view -.->|"displays"| node_frontend_view
node_frontend_view -->|"renders"| node_navbar
node_frontend_view -->|"renders"| node_queue_list
node_navbar -->|"validates URLs"| node_validate_action
node_navbar -->|"adds URLs"| node_queue_list
node_navbar -->|"dispatches"| node_retry_action
node_navbar -->|"dispatches"| node_clear_action
node_navbar -->|"dispatches"| node_start_action
node_queue_list -->|"submits URLs"| node_add_action
node_queue_list -->|"polls statuses"| node_status_action
node_queue_list -->|"reads and sets path"| node_output_action
node_validate_action -->|"checks URL"| node_queue_manager
node_add_action -.->|"adds links"| node_queue_manager
node_status_action -.->|"reads statuses"| node_queue_manager
node_output_action -.->|"configures paths"| node_queue_manager
node_retry_action -.->|"resets failures"| node_queue_manager
node_clear_action -.->|"clears completed"| node_queue_manager
node_start_action -.->|"starts queue"| node_queue_manager
node_queue_manager -->|"starts download"| node_queue_item
node_queue_manager -->|"loads and saves"| node_queue_state
node_queue_manager -->|"creates directories"| node_filesystem
node_queue_item -->|"downloads audio"| node_ytdlp
node_queue_item -->|"converts to MP3"| node_ffmpeg
node_queue_item -->|"writes output"| node_filesystem

click node_app "https://github.com/aidv/super_ytdl/blob/main/app.js"
click node_index_view "https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/main.js"
click node_frontend_view "https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/frontend/view.js"
click node_navbar "https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/frontend/sk_ui/sk_ui_navbar/sk_ui_navbar.js"
click node_queue_list "https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/frontend/sk_ui/sk_ui_queue_list/sk_ui_queue_list.js"
click node_add_action "https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/addLinksToQueue.js"
click node_validate_action "https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/validateURL.js"
click node_status_action "https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/getQueueItemsStatuses.js"
click node_output_action "https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/outputPath.js"
click node_retry_action "https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/retryFailedLinks.js"
click node_clear_action "https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/clearCompleted.js"
click node_start_action "https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/startRipping.js"
click node_queue_manager "https://github.com/aidv/super_ytdl/blob/main/modules/queue_manager.js"
click node_queue_item "https://github.com/aidv/super_ytdl/blob/main/modules/queue_manager.js"
click node_localization "https://github.com/aidv/super_ytdl/blob/main/modules/l10n/l10n.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_app,node_framework,node_localization,node_user toneBlue
class node_index_view,node_frontend_view,node_navbar,node_queue_list,node_add_action,node_validate_action,node_status_action,node_output_action,node_retry_action,node_clear_action,node_start_action toneAmber
class node_queue_manager,node_queue_item toneMint
class node_queue_state,node_filesystem,node_ytdlp,node_ffmpeg toneRose
```

## Components

### Application runtime

- [App bootstrap](https://github.com/aidv/super_ytdl/blob/main/app.js): `app.js`
- **Superkraft engine**
- [Localization](https://github.com/aidv/super_ytdl/blob/main/modules/l10n/l10n.js): `modules/l10n/l10n.js`

### Browser interface

- [Index view](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/main.js): `sk_project/views/index/main.js`
- [View assembly](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/frontend/view.js): `sk_project/views/index/frontend/view.js`
- [Action navbar](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/frontend/sk_ui/sk_ui_navbar/sk_ui_navbar.js): `sk_project/views/index/frontend/sk_ui/sk_ui_navbar/sk_ui_navbar.js`
- [Queue display](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/frontend/sk_ui/sk_ui_queue_list/sk_ui_queue_list.js): `sk_project/views/index/frontend/sk_ui/sk_ui_queue_list/sk_ui_queue_list.js`
- [Add URLs](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/addLinksToQueue.js): `sk_project/views/index/actions/addLinksToQueue.js`
- [Validate URL](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/validateURL.js): `sk_project/views/index/actions/validateURL.js`
- [Queue statuses](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/getQueueItemsStatuses.js): `sk_project/views/index/actions/getQueueItemsStatuses.js`
- [Output path](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/outputPath.js): `sk_project/views/index/actions/outputPath.js`
- [Retry failed](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/retryFailedLinks.js): `sk_project/views/index/actions/retryFailedLinks.js`
- [Clear completed](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/clearCompleted.js): `sk_project/views/index/actions/clearCompleted.js`
- [Start ripping](https://github.com/aidv/super_ytdl/blob/main/sk_project/views/index/actions/startRipping.js): `sk_project/views/index/actions/startRipping.js`

### Queue and downloads

- [Queue manager](https://github.com/aidv/super_ytdl/blob/main/modules/queue_manager.js): `modules/queue_manager.js`
- [Download and convert](https://github.com/aidv/super_ytdl/blob/main/modules/queue_manager.js): `modules/queue_manager.js`

### Storage and tools

- **Queue state file**
- **Output filesystem**
- **yt-dlp**
- **FFmpeg**

### Other components

- **Browser user**

## Connections

- Browser user → Index view: opens (evidence: `README.md`)
- App bootstrap → Superkraft engine: initializes (evidence: `app.js`)
- App bootstrap → Queue manager: creates (evidence: `app.js`)
- App bootstrap → Localization: creates (evidence: `app.js`)
- App bootstrap → Index view: configures project (evidence: `app.js`)
- Superkraft engine → Index view: serves
- Index view → View assembly: displays
- View assembly → Action navbar: renders (evidence: `sk_project/views/index/frontend/view.js`)
- View assembly → Queue display: renders (evidence: `sk_project/views/index/frontend/view.js`)
- Action navbar → Validate URL: validates URLs (evidence: `sk_project/views/index/frontend/sk_ui/sk_ui_navbar/sk_ui_navbar.js`)
- Action navbar → Queue display: adds URLs (evidence: `sk_project/views/index/frontend/sk_ui/sk_ui_navbar/sk_ui_navbar.js`)
- Action navbar → Retry failed: dispatches (evidence: `sk_project/views/index/frontend/sk_ui/sk_ui_navbar/sk_ui_navbar.js`)
- Action navbar → Clear completed: dispatches (evidence: `sk_project/views/index/frontend/sk_ui/sk_ui_navbar/sk_ui_navbar.js`)
- Action navbar → Start ripping: dispatches (evidence: `sk_project/views/index/frontend/sk_ui/sk_ui_navbar/sk_ui_navbar.js`)
- Queue display → Add URLs: submits URLs (evidence: `sk_project/views/index/frontend/sk_ui/sk_ui_queue_list/sk_ui_queue_list.js`)
- Queue display → Queue statuses: polls statuses (evidence: `sk_project/views/index/frontend/sk_ui/sk_ui_queue_list/sk_ui_queue_list.js`)
- Queue display → Output path: reads and sets path (evidence: `sk_project/views/index/frontend/sk_ui/sk_ui_queue_list/sk_ui_queue_list.js`)
- Validate URL → Queue manager: checks URL (evidence: `sk_project/views/index/actions/validateURL.js`)
- Add URLs → Queue manager: adds links
- Queue statuses → Queue manager: reads statuses
- Output path → Queue manager: configures paths
- Retry failed → Queue manager: resets failures
- Clear completed → Queue manager: clears completed
- Start ripping → Queue manager: starts queue
- Queue manager → Download and convert: starts download (evidence: `modules/queue_manager.js`)
- Queue manager → Queue state file: loads and saves (evidence: `modules/queue_manager.js`)
- Queue manager → Output filesystem: creates directories (evidence: `modules/queue_manager.js`)
- Download and convert → yt-dlp: downloads audio (evidence: `modules/queue_manager.js`)
- Download and convert → FFmpeg: converts to MP3 (evidence: `modules/queue_manager.js`)
- Download and convert → Output filesystem: writes output (evidence: `modules/queue_manager.js`)
