# giantpinkrobots/varia architecture

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

- Interactive diagram: https://gitdiagram.com/giantpinkrobots/varia
- Repository: https://github.com/giantpinkrobots/varia

## Overview

Varia is a desktop download manager whose main workflow accepts downloads, hands them to aria2 or yt-dlp, and tracks their progress in the GTK interface. Torrent selection, scheduling, preferences, notifications, tray controls, update handling, and browser integration are additional product capabilities. The graph uses README statements and the shown excerpts/SOURCE INDEX for relationships; where extension wiring or unsampled subsystem details are not evidenced, it avoids claiming specific connections.

Main entry points: [`src/variamain.py`](https://github.com/giantpinkrobots/varia/blob/next/src/variamain.py) (Application runtime), [`src/download/thread.py`](https://github.com/giantpinkrobots/varia/blob/next/src/download/thread.py) (Download execution), [`src/download/listen.py`](https://github.com/giantpinkrobots/varia/blob/next/src/download/listen.py) (Download listener), [`src/window/preferences.py`](https://github.com/giantpinkrobots/varia/blob/next/src/window/preferences.py) (Preferences UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_main["Application runtime<br/>[variamain.py]"]
  node_sidebar["Download entry<br/>[sidebar.py]"]
  node_preferences["Preferences UI<br/>[preferences.py]"]
  node_content["Main content<br/>[content.py]"]
end

subgraph group_downloads["Download workflow"]
  node_intake["Download listener<br/>[listen.py]"]
  node_rows["Download rows<br/>[actionrow.py]"]
  node_engine["Download execution<br/>[thread.py]"]
  node_torrent["Torrent selection"]
  node_video["Video and audio<br/>[videos.py]"]
  node_details["Download details<br/>[details.py]"]
  node_scheduler["Download scheduler<br/>[scheduler.py]"]
  node_manager["Download management"]
end

subgraph group_support["App services"]
  node_server["Local instance server<br/>[server.py]"]
  node_tray["System tray"]
  node_notify["Notifications"]
  node_updater["Update handling<br/>[updater.py]"]
  node_strings["Localization<br/>[stringstorage.py]"]
end

subgraph group_integration["External integrations"]
  node_aria2["aria2 integration<br/>[aria2_instance.py]"]
  node_extension["Browser extension<br/>[background.js]"]
  node_yt["yt-dlp"]
end

node_user(("User"))

node_user -->|"starts downloads"| node_sidebar
node_sidebar -->|"starts download"| node_engine
node_main -->|"initializes"| node_sidebar
node_main -->|"starts listener"| node_intake
node_main -->|"initializes"| node_aria2
node_intake -->|"creates rows"| node_rows
node_intake -->|"starts thread"| node_engine
node_intake -->|"routes video"| node_video
node_rows -->|"retries with"| node_engine
node_rows -->|"opens details"| node_details
node_engine -->|"uses selection"| node_torrent
node_video -->|"creates download"| node_engine
node_engine -.->|"submits URIs"| node_aria2
node_engine -->|"downloads media"| node_yt
node_user -->|"configures"| node_preferences
node_preferences -->|"edits schedule"| node_scheduler
node_main -->|"initializes"| node_scheduler
node_main -->|"initializes"| node_manager
node_main -->|"initializes"| node_server
node_server -->|"adds downloads"| node_main
node_main -->|"starts tray"| node_tray
node_main -->|"shows notifications"| node_notify
node_main -->|"uses updater"| node_updater
node_preferences -->|"configures updates"| node_updater
node_extension -.->|"submits downloads"| node_main
node_user -.->|"sends media link"| node_extension

click node_main "https://github.com/giantpinkrobots/varia/blob/next/src/variamain.py"
click node_sidebar "https://github.com/giantpinkrobots/varia/blob/next/src/window/sidebar.py"
click node_preferences "https://github.com/giantpinkrobots/varia/blob/next/src/window/preferences.py"
click node_content "https://github.com/giantpinkrobots/varia/blob/next/src/window/content.py"
click node_intake "https://github.com/giantpinkrobots/varia/blob/next/src/download/listen.py"
click node_rows "https://github.com/giantpinkrobots/varia/blob/next/src/download/actionrow.py"
click node_engine "https://github.com/giantpinkrobots/varia/blob/next/src/download/thread.py"
click node_aria2 "https://github.com/giantpinkrobots/varia/blob/next/src/download/aria2_instance.py"
click node_torrent "https://github.com/giantpinkrobots/varia/blob/next/src/download/torrent_select_files.py"
click node_video "https://github.com/giantpinkrobots/varia/blob/next/src/download/videos.py"
click node_details "https://github.com/giantpinkrobots/varia/blob/next/src/download/details.py"
click node_scheduler "https://github.com/giantpinkrobots/varia/blob/next/src/download/scheduler.py"
click node_manager "https://github.com/giantpinkrobots/varia/blob/next/src/download/manage_downloads.py"
click node_extension "https://github.com/giantpinkrobots/varia/blob/next/browser_extension/background.js"
click node_server "https://github.com/giantpinkrobots/varia/blob/next/src/server.py"
click node_tray "https://github.com/giantpinkrobots/varia/blob/next/src/tray/start_tray_process.py"
click node_notify "https://github.com/giantpinkrobots/varia/blob/next/src/notification_handler.py"
click node_updater "https://github.com/giantpinkrobots/varia/blob/next/src/window/updater.py"
click node_strings "https://github.com/giantpinkrobots/varia/blob/next/src/stringstorage.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_main,node_sidebar,node_preferences,node_content,node_user toneBlue
class node_intake,node_rows,node_engine,node_torrent,node_video,node_details,node_scheduler,node_manager toneAmber
class node_server,node_tray,node_notify,node_updater,node_strings toneMint
class node_aria2,node_extension,node_yt toneRose
```

## Components

### Desktop app

- [Application runtime](https://github.com/giantpinkrobots/varia/blob/next/src/variamain.py): `src/variamain.py`
- [Download entry](https://github.com/giantpinkrobots/varia/blob/next/src/window/sidebar.py): `src/window/sidebar.py`
- [Preferences UI](https://github.com/giantpinkrobots/varia/blob/next/src/window/preferences.py): `src/window/preferences.py`
- [Main content](https://github.com/giantpinkrobots/varia/blob/next/src/window/content.py): `src/window/content.py`

### Download workflow

- [Download listener](https://github.com/giantpinkrobots/varia/blob/next/src/download/listen.py): `src/download/listen.py`
- [Download rows](https://github.com/giantpinkrobots/varia/blob/next/src/download/actionrow.py): `src/download/actionrow.py`
- [Download execution](https://github.com/giantpinkrobots/varia/blob/next/src/download/thread.py): `src/download/thread.py`
- [Torrent selection](https://github.com/giantpinkrobots/varia/blob/next/src/download/torrent_select_files.py): `src/download/torrent_select_files.py`
- [Video and audio](https://github.com/giantpinkrobots/varia/blob/next/src/download/videos.py): `src/download/videos.py`
- [Download details](https://github.com/giantpinkrobots/varia/blob/next/src/download/details.py): `src/download/details.py`
- [Download scheduler](https://github.com/giantpinkrobots/varia/blob/next/src/download/scheduler.py): `src/download/scheduler.py`
- [Download management](https://github.com/giantpinkrobots/varia/blob/next/src/download/manage_downloads.py): `src/download/manage_downloads.py`

### App services

- [Local instance server](https://github.com/giantpinkrobots/varia/blob/next/src/server.py): `src/server.py`
- [System tray](https://github.com/giantpinkrobots/varia/blob/next/src/tray/start_tray_process.py): `src/tray/start_tray_process.py`
- [Notifications](https://github.com/giantpinkrobots/varia/blob/next/src/notification_handler.py): `src/notification_handler.py`
- [Update handling](https://github.com/giantpinkrobots/varia/blob/next/src/window/updater.py): `src/window/updater.py`
- [Localization](https://github.com/giantpinkrobots/varia/blob/next/src/stringstorage.py): `src/stringstorage.py`

### External integrations

- [aria2 integration](https://github.com/giantpinkrobots/varia/blob/next/src/download/aria2_instance.py): `src/download/aria2_instance.py`
- [Browser extension](https://github.com/giantpinkrobots/varia/blob/next/browser_extension/background.js): `browser_extension/background.js`
- **yt-dlp**

### Other components

- **User**

## Connections

- User → Download entry: starts downloads (evidence: `src/window/sidebar.py`)
- Download entry → Download execution: starts download
- Application runtime → Download entry: initializes (evidence: `src/variamain.py`)
- Application runtime → Download listener: starts listener (evidence: `src/variamain.py`)
- Application runtime → aria2 integration: initializes (evidence: `src/variamain.py`)
- Download listener → Download rows: creates rows (evidence: `src/download/listen.py`)
- Download listener → Download execution: starts thread (evidence: `src/download/listen.py`)
- Download listener → Video and audio: routes video (evidence: `src/download/listen.py`)
- Download rows → Download execution: retries with (evidence: `src/download/actionrow.py`)
- Download rows → Download details: opens details (evidence: `src/download/actionrow.py`)
- Download execution → Torrent selection: uses selection (evidence: `src/download/thread.py`)
- Video and audio → Download execution: creates download (evidence: `src/download/videos.py`)
- Download execution → aria2 integration: submits URIs
- Download execution → yt-dlp: downloads media (evidence: `README.md`)
- User → Preferences UI: configures
- Preferences UI → Download scheduler: edits schedule (evidence: `src/window/preferences.py`)
- Application runtime → Download scheduler: initializes (evidence: `src/variamain.py`)
- Application runtime → Download management: initializes (evidence: `src/variamain.py`)
- Application runtime → Local instance server: initializes (evidence: `src/variamain.py`)
- Local instance server → Application runtime: adds downloads (evidence: `src/server.py`)
- Application runtime → System tray: starts tray (evidence: `src/variamain.py`)
- Application runtime → Notifications: shows notifications (evidence: `src/variamain.py`)
- Application runtime → Update handling: uses updater (evidence: `src/variamain.py`)
- Preferences UI → Update handling: configures updates (evidence: `src/window/preferences.py`)
- Browser extension → Application runtime: submits downloads
- User → Browser extension: sends media link
