# jkotwica/mediaheaven architecture

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

- Interactive diagram: https://gitdiagram.com/jkotwica/mediaheaven
- Repository: https://github.com/jkotwica/mediaheaven

## Overview

MediaHeaven is a Windows desktop media downloader and converter. Users analyze a media URL, choose formats and download options, then download directly or enqueue the operation; separately, they configure conversion options for local media and run an FFmpeg conversion. The queue schedules download and conversion tasks and exposes progress and logs. Settings include application preferences and FFmpeg configuration. The README is empty, so capabilities beyond those evidenced by the sampled source and file tree are not inferred; unsampled views and startup wiring are omitted.

Main entry points: [`Views/DownloadView.xaml.cs`](https://github.com/jkotwica/mediaheaven/blob/main/Views/DownloadView.xaml.cs) (Download setup), [`Views/ConverterView.xaml.cs`](https://github.com/jkotwica/mediaheaven/blob/main/Views/ConverterView.xaml.cs) (Conversion setup), [`Models/Downloader.cs`](https://github.com/jkotwica/mediaheaven/blob/main/Models/Downloader.cs) (Download engine), [`Views/SettingsView.xaml.cs`](https://github.com/jkotwica/mediaheaven/blob/main/Views/SettingsView.xaml.cs) (Settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_main["Main window<br/>[MainWindow.xaml.cs]"]
  node_download_view["Download setup"]
  node_settings_view["Settings"]
  node_settings_model["Settings state"]
end

subgraph group_download["Media download"]
  node_video_data["Media metadata"]
  node_format_data["Format metadata"]
  node_download_options["Download options<br/>[DownloadOptions.cs]"]
  node_downloader["Download engine<br/>[Downloader.cs]"]
  node_ytdlp["yt-dlp process"]
end

subgraph group_conversion["Media conversion"]
  node_conversion_view["Conversion setup"]
  node_conversion_options["Conversion options"]
  node_converter["Conversion engine<br/>[Converter.cs]"]
  node_ffmpeg["FFmpeg process"]
end

subgraph group_operations["Task operations"]
  node_queue_view["Task queue<br/>[QueueView.xaml.cs]"]
  node_queue_element["Queued task<br/>[QueueElement.cs]"]
  node_app_state["Application settings<br/>[App.xaml.cs]"]
end

node_user(("User"))

node_user -->|"uses"| node_main
node_user -->|"configures download"| node_download_view
node_user -->|"configures conversion"| node_conversion_view
node_user -->|"changes settings"| node_settings_view
node_download_view -->|"analyzes and downloads"| node_downloader
node_downloader -->|"runs process"| node_ytdlp
node_downloader -->|"parses metadata"| node_video_data
node_download_view -->|"reads metadata"| node_video_data
node_download_view -->|"uses formats"| node_format_data
node_download_view -->|"uses options"| node_download_options
node_download_view -->|"adds task"| node_queue_view
node_conversion_view -->|"reads options"| node_conversion_options
node_conversion_view -->|"builds command"| node_converter
node_converter -->|"runs process"| node_ffmpeg
node_conversion_view -.->|"adds task"| node_queue_view
node_queue_view -->|"creates and schedules"| node_queue_element
node_queue_element -->|"runs download"| node_downloader
node_queue_element -->|"runs conversion"| node_converter
node_settings_view -->|"persists preferences"| node_app_state
node_settings_model -->|"persists accent"| node_app_state
node_settings_view -->|"checks and installs"| node_ffmpeg

click node_main "https://github.com/jkotwica/mediaheaven/blob/main/Views/MainWindow.xaml.cs"
click node_download_view "https://github.com/jkotwica/mediaheaven/blob/main/Views/DownloadView.xaml.cs"
click node_settings_view "https://github.com/jkotwica/mediaheaven/blob/main/Views/SettingsView.xaml.cs"
click node_settings_model "https://github.com/jkotwica/mediaheaven/blob/main/Models/SettingsViewModel.cs"
click node_video_data "https://github.com/jkotwica/mediaheaven/blob/main/Models/VideoInformations.cs"
click node_format_data "https://github.com/jkotwica/mediaheaven/blob/main/Models/FormatInformations.cs"
click node_download_options "https://github.com/jkotwica/mediaheaven/blob/main/Models/DownloadOptions.cs"
click node_downloader "https://github.com/jkotwica/mediaheaven/blob/main/Models/Downloader.cs"
click node_conversion_view "https://github.com/jkotwica/mediaheaven/blob/main/Views/ConverterView.xaml.cs"
click node_conversion_options "https://github.com/jkotwica/mediaheaven/blob/main/Models/ConversionOptions.cs"
click node_converter "https://github.com/jkotwica/mediaheaven/blob/main/Models/Converter.cs"
click node_queue_view "https://github.com/jkotwica/mediaheaven/blob/main/Views/QueueView.xaml.cs"
click node_queue_element "https://github.com/jkotwica/mediaheaven/blob/main/Models/QueueElement.cs"
click node_app_state "https://github.com/jkotwica/mediaheaven/blob/main/App.xaml.cs"

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_download_view,node_settings_view,node_settings_model,node_user toneBlue
class node_video_data,node_format_data,node_download_options,node_downloader,node_ytdlp toneAmber
class node_conversion_view,node_conversion_options,node_converter,node_ffmpeg toneMint
class node_queue_view,node_queue_element,node_app_state toneRose
```

## Components

### Desktop interface

- [Main window](https://github.com/jkotwica/mediaheaven/blob/main/Views/MainWindow.xaml.cs): `Views/MainWindow.xaml.cs`
- [Download setup](https://github.com/jkotwica/mediaheaven/blob/main/Views/DownloadView.xaml.cs): `Views/DownloadView.xaml.cs`
- [Settings](https://github.com/jkotwica/mediaheaven/blob/main/Views/SettingsView.xaml.cs): `Views/SettingsView.xaml.cs`
- [Settings state](https://github.com/jkotwica/mediaheaven/blob/main/Models/SettingsViewModel.cs): `Models/SettingsViewModel.cs`

### Media download

- [Media metadata](https://github.com/jkotwica/mediaheaven/blob/main/Models/VideoInformations.cs): `Models/VideoInformations.cs`
- [Format metadata](https://github.com/jkotwica/mediaheaven/blob/main/Models/FormatInformations.cs): `Models/FormatInformations.cs`
- [Download options](https://github.com/jkotwica/mediaheaven/blob/main/Models/DownloadOptions.cs): `Models/DownloadOptions.cs`
- [Download engine](https://github.com/jkotwica/mediaheaven/blob/main/Models/Downloader.cs): `Models/Downloader.cs`
- **yt-dlp process**

### Media conversion

- [Conversion setup](https://github.com/jkotwica/mediaheaven/blob/main/Views/ConverterView.xaml.cs): `Views/ConverterView.xaml.cs`
- [Conversion options](https://github.com/jkotwica/mediaheaven/blob/main/Models/ConversionOptions.cs): `Models/ConversionOptions.cs`
- [Conversion engine](https://github.com/jkotwica/mediaheaven/blob/main/Models/Converter.cs): `Models/Converter.cs`
- **FFmpeg process**

### Task operations

- [Task queue](https://github.com/jkotwica/mediaheaven/blob/main/Views/QueueView.xaml.cs): `Views/QueueView.xaml.cs`
- [Queued task](https://github.com/jkotwica/mediaheaven/blob/main/Models/QueueElement.cs): `Models/QueueElement.cs`
- [Application settings](https://github.com/jkotwica/mediaheaven/blob/main/App.xaml.cs): `App.xaml.cs`

### Other components

- **User**

## Connections

- User → Main window: uses
- User → Download setup: configures download
- User → Conversion setup: configures conversion
- User → Settings: changes settings
- Download setup → Download engine: analyzes and downloads (evidence: `Views/DownloadView.xaml.cs`)
- Download engine → yt-dlp process: runs process (evidence: `Models/Downloader.cs`)
- Download engine → Media metadata: parses metadata (evidence: `Models/Downloader.cs`)
- Download setup → Media metadata: reads metadata (evidence: `Views/DownloadView.xaml.cs`)
- Download setup → Format metadata: uses formats (evidence: `Views/DownloadView.xaml.cs`)
- Download setup → Download options: uses options (evidence: `Views/DownloadView.xaml.cs`)
- Download setup → Task queue: adds task (evidence: `Views/DownloadView.xaml.cs`)
- Conversion setup → Conversion options: reads options (evidence: `Views/ConverterView.xaml.cs`)
- Conversion setup → Conversion engine: builds command (evidence: `Views/ConverterView.xaml.cs`)
- Conversion engine → FFmpeg process: runs process (evidence: `Models/Converter.cs`)
- Conversion setup → Task queue: adds task
- Task queue → Queued task: creates and schedules (evidence: `Views/QueueView.xaml.cs`)
- Queued task → Download engine: runs download (evidence: `Models/QueueElement.cs`)
- Queued task → Conversion engine: runs conversion (evidence: `Models/QueueElement.cs`)
- Settings → Application settings: persists preferences (evidence: `Views/SettingsView.xaml.cs`)
- Settings state → Application settings: persists accent (evidence: `Models/SettingsViewModel.cs`)
- Settings → FFmpeg process: checks and installs (evidence: `Views/SettingsView.xaml.cs`)
