# junkfood02/seal architecture

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

- Interactive diagram: https://gitdiagram.com/junkfood02/seal
- Repository: https://github.com/junkfood02/seal

## Overview

1. **What this repo is**
   - Seal is an Android downloader app built as a **single-activity, Compose-first** application.
   - Its core job is to turn a URL into a queued download job, run that job in the background through yt-dlp-based tooling, and persist the result/history locally.

2. **App entry and process boundaries**
   - `MainActivity` is the main UI host.
   - `QuickDownloadActivity` provides a shortcut entry point for incoming share/open-with flows.
   - `DownloadService` is the main background execution boundary for downloads.
   - `NotificationActionReceiver` handles notification actions tied to active downloads.
   - `CrashReportActivity` is a separate recovery/reporting path for failures.

3. **UI architecture**
   - The UI lives under `ui/` and is organized as **Composable pages**, not fragments.
   - `ui/page/AppEntry.kt` and `NavigationDrawer.kt` form the shell/navigation layer.
   - Major screens are grouped by function: download flow, download-v2 flow, video list/history, task list/logs, settings, and about/update pages.
   - Reusable UI pieces live in `ui/component/`, while cross-cutting helpers live in `ui/common/`.

4. **Two download UX flows**
   - There is a newer, more structured flow under `ui/page/downloadv2/` with explicit configuration steps like URL input, format selection, and playlist selection.
   - The older flow under `ui/page/download/` still exists, including the home page view model and dialogs for settings/permissions/playlist selection.
   - This suggests the app supports both an established UI path and a newer download configuration flow side by side.

5. **Download engine and task model**
   - The execution layer is split into `Downloader.kt`/`DownloadService.kt` and the newer `download/DownloaderV2.kt`, `Task.kt`, and `TaskFactory.kt`.
   - The task layer is the abstraction that turns user choices into executable work items.
   - The actual download work is delegated to external tooling, primarily **yt-dlp** and optionally **aria2c** as an external downloader.

6. **Data flow for a download**
   - User enters a URL in the UI.
   - The UI/view model resolves options such as format, playlist handling, subtitles, cookies, and destination directory.
   - A task is created and handed to the service/downloader layer.
   - The service runs the job, emits progress/notifications, and records relevant metadata locally.
   - Completion and errors are reflected back into UI pages like queue/history and logs.

7. **Persistence layer**
   - Local storage is handled by **Room** via `database/AppDatabase.kt` and `VideoInfoDao.kt`.
   - Versioned schema snapshots in `app/schemas/...` indicate the database is part of the app’s stable state and is migrated over time.
   - Stored objects include downloaded video info, cookie profiles, command templates, and option shortcuts.
   - Backup/import support exists under `database/backup/`, which means user configuration is treated as first-class local data.

8. **Settings and configuration domains**
   - Settings are split into functional sections: appearance, general, format, directory, network, interaction, command templates, and troubleshooting.
   - Preferences are managed through dedicated pages/dialogs rather than a single monolithic settings screen.
   - Network settings include cookie management and a WebView-based page, indicating the app supports authenticated sites and session-based access.

9. **Command templating and advanced behavior**
   - `database/objects/CommandTemplate.kt` and the settings pages under `ui/page/settings/command/` show that users can define reusable yt-dlp command templates.
   - This is a distinct customization boundary: the UI collects template metadata, the database stores it, and the downloader layer executes the resulting command shape.

10. **Updates and maintenance flows**
   - `AppUpdater`, `YtdlpUpdater`, and their dialogs/pages handle app and embedded yt-dlp update behavior.
   - This means the app is not just a downloader UI; it also manages the lifecycle of the underlying downloader binary/components.
   - The presence of update pages in settings and release metadata in `fastlane/` reinforces that update distribution is part of the product architecture.

11. **Notifications and foreground execution**
   - Download progress and actions are surfaced through Android notifications, with a permission dialog in the UI and action handling in the receiver.
   - This is important because long-running downloads need to survive backgrounding and remain user-controllable.

12. **Theming, localization, and presentation**
   - The UI uses **Material Design 3** with dynamic color support.
   - The `color/` module contains Monet/material color utilities, which acts as a shared theming subsystem.
   - The app is heavily localized: `res/values-*` contains many language packs, and `translations/` stores translation contributor docs.

13. **Supporting infrastructure**
   - `buildSrc/` and the Gradle Kotlin DSL structure centralize versioning/build logic.
   - GitHub Actions workflows handle Android CI, issue automation, stale issue cleanup, and sponsorship automation.
   - `fastlane/metadata/` provides store listing assets, descriptions, changelogs, and screenshots, which are part of the release/distribution pipeline.

14. **Architecture boundaries to draw**
   - One boundary is **UI vs. execution**: Compose screens and view models prepare requests, while service/downloader code performs work.
   - Another is **execution vs. persistence**: task results, history, templates, and profiles are stored in Room, backed up, and reused by later sessions.
   - A third is **app vs. external tools**: the app orchestrates yt-dlp/aria2c, but the actual media extraction/download mechanics live outside the Android process.

Main entry points: [`app/src/main/java/com/junkfood/seal/ui/page/settings/SettingsPage.kt`](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/SettingsPage.kt) (Settings page), [`app/src/main/java/com/junkfood/seal/ui/page/AppEntry.kt`](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/AppEntry.kt) (App shell), [`app/src/main/java/com/junkfood/seal/DownloadService.kt`](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/DownloadService.kt) (Download service), [`app/src/main/java/com/junkfood/seal/database/AppDatabase.kt`](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/database/AppDatabase.kt) (App database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_entry["Entry & host"]
  node_app_main["Main activity<br/>activity host<br/>[MainActivity.kt]"]
  node_app_quick["Quick entry<br/>activity shortcut"]
  node_app_service["Download service<br/>foreground service<br/>[DownloadService.kt]"]
  node_app_receiver["Action receiver<br/>broadcast receiver"]
  node_app_crash["Crash report<br/>recovery activity"]
end

subgraph group_grp_ui["Compose UI"]
  node_ui_entry["App shell<br/>compose shell<br/>[AppEntry.kt]"]
  node_ui_drawer["Drawer nav<br/>navigation chrome"]
  node_ui_download["Download page<br/>compose screen<br/>[DownloadPage.kt]"]
  node_ui_downloadv2["Download v2<br/>compose screen<br/>[DownloadPageV2.kt]"]
  node_ui_videolist["Video list<br/>compose screen<br/>[VideoListPage.kt]"]
  node_ui_tasks["Task pages<br/>compose screen<br/>[TaskListPage.kt]"]
  node_ui_settings["Settings page<br/>compose screen<br/>[SettingsPage.kt]"]
  node_ui_component["UI components<br/>shared composables"]
end

subgraph group_grp_download["Download pipeline"]
  node_dl_task["Task model<br/>download abstraction<br/>[Task.kt]"]
  node_dl_factory["Task factory<br/>task builder<br/>[TaskFactory.kt]"]
  node_dl_v2["Downloader v2<br/>download engine<br/>[DownloaderV2.kt]"]
  node_dl_legacy["Downloader<br/>download engine<br/>[Downloader.kt]"]
end

subgraph group_grp_data["Local data"]
  node_db_main[("App database<br/>room db<br/>[AppDatabase.kt]")]
  node_db_dao["Video DAO<br/>room dao<br/>[VideoInfoDao.kt]"]
  node_db_backup["Backup<br/>import/export<br/>[Backup.kt]"]
  node_db_objects["Stored objects<br/>room entities<br/>[CommandTemplate.kt]"]
end

subgraph group_grp_settings["Settings & config"]
  node_set_network["Network prefs<br/>settings section"]
  node_set_format["Format prefs<br/>settings section"]
  node_set_dir["Directory prefs<br/>settings section"]
  node_set_general["General prefs<br/>settings section"]
  node_set_command["Command templates<br/>settings section"]
  node_set_appearance["Appearance<br/>settings section"]
  node_set_interaction["Interaction prefs<br/>settings section"]
  node_set_trouble["Troubleshooting<br/>settings section"]
end

subgraph group_grp_updates["Updates & maintenance"]
  node_up_app["App updater<br/>update flow<br/>[AppUpdater.kt]"]
  node_up_ytdlp["yt-dlp updater<br/>update flow<br/>[YtdlpUpdater.kt]"]
  node_up_crashdialog["Update dialogs<br/>maintenance ui<br/>[UpdateDialog.kt]"]
end

subgraph group_grp_shared["Shared UI system"]
  node_theme_core["Theme<br/>[Theme.kt]"]
  node_theme_color["Color system<br/>monet utilities<br/>[Monet.kt]"]
end

node_app_main -->|"hosts"| node_ui_entry
node_app_quick -->|"launches"| node_ui_downloadv2
node_ui_entry -->|"navigates"| node_ui_drawer
node_ui_entry -->|"shows"| node_ui_download
node_ui_entry -->|"shows"| node_ui_downloadv2
node_ui_entry -->|"shows"| node_ui_videolist
node_ui_entry -->|"shows"| node_ui_tasks
node_ui_entry -->|"shows"| node_ui_settings
node_ui_download -->|"builds"| node_dl_factory
node_ui_downloadv2 -->|"builds"| node_dl_factory
node_dl_factory -->|"creates"| node_dl_task
node_dl_task -->|"runs via"| node_dl_v2
node_dl_task -->|"runs via"| node_dl_legacy
node_dl_v2 -->|"delegates to"| node_app_service
node_dl_legacy -->|"delegates to"| node_app_service
node_app_service -->|"notifies"| node_app_receiver
node_app_service -->|"persists"| node_db_main
node_db_main -->|"accesses"| node_db_dao
node_db_main -->|"stores"| node_db_objects
node_db_backup -->|"backs up"| node_db_main
node_ui_videolist -->|"reads"| node_db_dao
node_ui_tasks -->|"observes"| node_app_service
node_ui_settings -->|"contains"| node_set_network
node_ui_settings -->|"contains"| node_set_format
node_ui_settings -->|"contains"| node_set_dir
node_ui_settings -->|"contains"| node_set_general
node_ui_settings -->|"contains"| node_set_command
node_ui_settings -->|"contains"| node_set_appearance
node_ui_settings -->|"contains"| node_set_interaction
node_ui_settings -->|"contains"| node_set_trouble
node_set_command -->|"edits"| node_db_objects
node_set_network -->|"edits"| node_db_objects
node_set_appearance -->|"configures"| node_theme_core
node_theme_core -->|"uses"| node_theme_color
node_up_app -->|"presents"| node_up_crashdialog
node_up_ytdlp -->|"presents"| node_up_crashdialog
node_up_app -->|"affects"| node_app_main
node_up_ytdlp -->|"updates"| node_dl_v2
node_app_crash -->|"recovers to"| node_ui_entry

click node_app_main "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/MainActivity.kt"
click node_app_quick "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/QuickDownloadActivity.kt"
click node_app_service "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/DownloadService.kt"
click node_app_receiver "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/NotificationActionReceiver.kt"
click node_app_crash "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/CrashReportActivity.kt"
click node_ui_entry "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/AppEntry.kt"
click node_ui_drawer "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/NavigationDrawer.kt"
click node_ui_download "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/download/DownloadPage.kt"
click node_ui_downloadv2 "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/downloadv2/DownloadPageV2.kt"
click node_ui_videolist "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/videolist/VideoListPage.kt"
click node_ui_tasks "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/command/TaskListPage.kt"
click node_ui_settings "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/SettingsPage.kt"
click node_ui_component "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/component/CommonComponents.kt"
click node_dl_task "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/download/Task.kt"
click node_dl_factory "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/download/TaskFactory.kt"
click node_dl_v2 "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/download/DownloaderV2.kt"
click node_dl_legacy "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/Downloader.kt"
click node_db_main "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/database/AppDatabase.kt"
click node_db_dao "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/database/VideoInfoDao.kt"
click node_db_backup "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/database/backup/Backup.kt"
click node_db_objects "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/database/objects/CommandTemplate.kt"
click node_set_network "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/network/NetworkPreferences.kt"
click node_set_format "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/format/DownloadFormatPreferences.kt"
click node_set_dir "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/directory/DownloadDirectoryPreferences.kt"
click node_set_general "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/general/GeneralDownloadPreferences.kt"
click node_set_command "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/command/TemplateListPage.kt"
click node_set_appearance "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/appearance/AppearancePreferences.kt"
click node_set_interaction "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/interaction/InteractionPreferencePage.kt"
click node_set_trouble "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/troubleshooting/TroubleshootingPage.kt"
click node_up_app "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/AppUpdater.kt"
click node_up_ytdlp "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/YtdlpUpdater.kt"
click node_up_crashdialog "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/UpdateDialog.kt"
click node_theme_core "https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/theme/Theme.kt"
click node_theme_color "https://github.com/junkfood02/seal/blob/main/color/src/main/java/com/kyant/monet/Monet.kt"

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_main,node_app_quick,node_app_service,node_app_receiver,node_app_crash,node_theme_core,node_theme_color toneBlue
class node_ui_entry,node_ui_drawer,node_ui_download,node_ui_downloadv2,node_ui_videolist,node_ui_tasks,node_ui_settings,node_ui_component toneAmber
class node_dl_task,node_dl_factory,node_dl_v2,node_dl_legacy toneMint
class node_db_main,node_db_dao,node_db_backup,node_db_objects toneRose
class node_set_network,node_set_format,node_set_dir,node_set_general,node_set_command,node_set_appearance,node_set_interaction,node_set_trouble toneIndigo
class node_up_app,node_up_ytdlp,node_up_crashdialog toneTeal
```

## Components

### Entry & host

Android entry points, activity boundaries, and background execution.

- [Main activity](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/MainActivity.kt): activity host · Primary single-activity UI entry point. · `app/src/main/java/com/junkfood/seal/MainActivity.kt`
- [Quick entry](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/QuickDownloadActivity.kt): activity shortcut · Shortcut activity for share/open-with download entry. · `app/src/main/java/com/junkfood/seal/QuickDownloadActivity.kt`
- [Download service](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/DownloadService.kt): foreground service · Background execution boundary for long-running downloads. · `app/src/main/java/com/junkfood/seal/DownloadService.kt`
- [Action receiver](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/NotificationActionReceiver.kt): broadcast receiver · Handles notification actions for active downloads. · `app/src/main/java/com/junkfood/seal/NotificationActionReceiver.kt`
- [Crash report](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/CrashReportActivity.kt): recovery activity · Separate path for crash reporting and recovery. · `app/src/main/java/com/junkfood/seal/CrashReportActivity.kt`

### Compose UI

Screen navigation, reusable components, and feature pages.

- [App shell](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/AppEntry.kt): compose shell · Top-level app entry, routing, and navigation structure. · `app/src/main/java/com/junkfood/seal/ui/page/AppEntry.kt`
- [Drawer nav](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/NavigationDrawer.kt): navigation chrome · Navigation drawer and app-wide screen switching. · `app/src/main/java/com/junkfood/seal/ui/page/NavigationDrawer.kt`
- [Download page](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/download/DownloadPage.kt): compose screen · Older download flow and related dialogs/view model. · `app/src/main/java/com/junkfood/seal/ui/page/download/DownloadPage.kt`
- [Download v2](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/downloadv2/DownloadPageV2.kt): compose screen · Structured newer download flow with configuration steps. · `app/src/main/java/com/junkfood/seal/ui/page/downloadv2/DownloadPageV2.kt`
- [Video list](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/videolist/VideoListPage.kt): compose screen · History and downloaded video browsing. · `app/src/main/java/com/junkfood/seal/ui/page/videolist/VideoListPage.kt`
- [Task pages](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/command/TaskListPage.kt): compose screen · Task list and task log views for queued work. · `app/src/main/java/com/junkfood/seal/ui/page/command/TaskListPage.kt`
- [Settings page](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/SettingsPage.kt): compose screen · Settings hub for all preference sections. · `app/src/main/java/com/junkfood/seal/ui/page/settings/SettingsPage.kt`
- [UI components](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/component/CommonComponents.kt): shared composables · Reusable controls, dialogs, cards, and list items. · `app/src/main/java/com/junkfood/seal/ui/component/CommonComponents.kt`

### Download pipeline

Task creation, downloader orchestration, and external download tooling.

- [Task model](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/download/Task.kt): download abstraction · Represents executable download work and task composition. · `app/src/main/java/com/junkfood/seal/download/Task.kt`
- [Task factory](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/download/TaskFactory.kt): task builder · Builds tasks from UI choices and stored options. · `app/src/main/java/com/junkfood/seal/download/TaskFactory.kt`
- [Downloader v2](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/download/DownloaderV2.kt): download engine · Newer download orchestration layer. · `app/src/main/java/com/junkfood/seal/download/DownloaderV2.kt`
- [Downloader](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/Downloader.kt): download engine · Legacy download execution path used by the service. · `app/src/main/java/com/junkfood/seal/Downloader.kt`

### Local data

Room persistence, backup/import, and stored app state.

- [App database](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/database/AppDatabase.kt): room db · Room database holding app state and download history. · `app/src/main/java/com/junkfood/seal/database/AppDatabase.kt`
- [Video DAO](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/database/VideoInfoDao.kt): room dao · Primary data access interface for stored video info. · `app/src/main/java/com/junkfood/seal/database/VideoInfoDao.kt`
- [Backup](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/database/backup/Backup.kt): import/export · Backup and restore support for local app data. · `app/src/main/java/com/junkfood/seal/database/backup/Backup.kt`
- [Stored objects](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/database/objects/CommandTemplate.kt): room entities · Persisted command templates, cookie profiles, shortcuts, and video info. · `app/src/main/java/com/junkfood/seal/database/objects/CommandTemplate.kt`

### Settings & config

Preferences and configuration pages for downloader behavior.

- [Network prefs](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/network/NetworkPreferences.kt): settings section · Cookie and network-related preferences, including WebView access. · `app/src/main/java/com/junkfood/seal/ui/page/settings/network/NetworkPreferences.kt`
- [Format prefs](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/format/DownloadFormatPreferences.kt): settings section · Download format and subtitle configuration. · `app/src/main/java/com/junkfood/seal/ui/page/settings/format/DownloadFormatPreferences.kt`
- [Directory prefs](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/directory/DownloadDirectoryPreferences.kt): settings section · Destination path and download directory controls. · `app/src/main/java/com/junkfood/seal/ui/page/settings/directory/DownloadDirectoryPreferences.kt`
- [General prefs](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/general/GeneralDownloadPreferences.kt): settings section · Core downloader behavior and advanced toggles. · `app/src/main/java/com/junkfood/seal/ui/page/settings/general/GeneralDownloadPreferences.kt`
- [Command templates](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/command/TemplateListPage.kt): settings section · Reusable yt-dlp command template management. · `app/src/main/java/com/junkfood/seal/ui/page/settings/command/TemplateListPage.kt`
- [Appearance](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/appearance/AppearancePreferences.kt): settings section · Theme and language preferences. · `app/src/main/java/com/junkfood/seal/ui/page/settings/appearance/AppearancePreferences.kt`
- [Interaction prefs](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/interaction/InteractionPreferencePage.kt): settings section · Interface and interaction customization. · `app/src/main/java/com/junkfood/seal/ui/page/settings/interaction/InteractionPreferencePage.kt`
- [Troubleshooting](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/settings/troubleshooting/TroubleshootingPage.kt): settings section · Diagnostics and support-oriented settings. · `app/src/main/java/com/junkfood/seal/ui/page/settings/troubleshooting/TroubleshootingPage.kt`

### Updates & maintenance

App and yt-dlp update flows plus recovery/reporting.

- [App updater](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/AppUpdater.kt): update flow · Application update checks and release handling. · `app/src/main/java/com/junkfood/seal/ui/page/AppUpdater.kt`
- [yt-dlp updater](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/YtdlpUpdater.kt): update flow · Embedded yt-dlp update management. · `app/src/main/java/com/junkfood/seal/ui/page/YtdlpUpdater.kt`
- [Update dialogs](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/page/UpdateDialog.kt): maintenance ui · Update and welcome dialogs shown around setup and maintenance. · `app/src/main/java/com/junkfood/seal/ui/page/UpdateDialog.kt`

### Shared UI system

Theme, color, and shared cross-cutting UI utilities.

- [Theme](https://github.com/junkfood02/seal/blob/main/app/src/main/java/com/junkfood/seal/ui/theme/Theme.kt): material theme · Material 3 theme and color configuration. · `app/src/main/java/com/junkfood/seal/ui/theme/Theme.kt`
- [Color system](https://github.com/junkfood02/seal/blob/main/color/src/main/java/com/kyant/monet/Monet.kt): monet utilities · Dynamic color and Monet-related color utilities. · `color/src/main/java/com/kyant/monet/Monet.kt`

## Connections

- Main activity → App shell: hosts · Main activity mounts the Compose app shell.
- Quick entry → Download v2: launches · Shortcut entry routes into download setup.
- App shell → Drawer nav: navigates · Shell owns app-wide navigation chrome.
- App shell → Download page: shows · Routes to the legacy download flow.
- App shell → Download v2: shows · Routes to the structured download flow.
- App shell → Video list: shows · Shell navigates to history and library pages.
- App shell → Task pages: shows · Shell navigates to task and log pages.
- App shell → Settings page: shows · Shell navigates to settings sections.
- Download page → Task factory: builds · Legacy UI prepares work items from user choices.
- Download v2 → Task factory: builds · New flow turns configuration into tasks.
- Task factory → Task model: creates · Factory produces executable task objects.
- Task model → Downloader v2: runs via · Structured tasks are executed by the newer downloader layer.
- Task model → Downloader: runs via · Older tasks can still flow through the legacy engine.
- Downloader v2 → Download service: delegates to · Downloader execution is handed to the background service boundary.
- Downloader → Download service: delegates to · Legacy engine is also serviced by the background executor.
- Download service → Action receiver: notifies · Service exposes notification actions for active jobs.
- Download service → App database: persists · Service writes job and history state locally.
- App database → Video DAO: accesses · Database is queried through the DAO layer.
- App database → Stored objects: stores · Database contains templates, profiles, and download metadata.
- Backup → App database: backs up · Backup layer exports and restores database-backed state.
- Video list → Video DAO: reads · History and video list pages read stored downloads.
- Task pages → Download service: observes · Task pages reflect service-managed background work.
- Settings page → Network prefs: contains · Settings hub exposes network preferences.
- Settings page → Format prefs: contains · Settings hub exposes format preferences.
- Settings page → Directory prefs: contains · Settings hub exposes directory preferences.
- Settings page → General prefs: contains · Settings hub exposes general preferences.
- Settings page → Command templates: contains · Settings hub exposes command template management.
- Settings page → Appearance: contains · Settings hub exposes appearance controls.
- Settings page → Interaction prefs: contains · Settings hub exposes interaction controls.
- Settings page → Troubleshooting: contains · Settings hub exposes troubleshooting controls.
- Command templates → Stored objects: edits · Template settings mutate stored command templates.
- Network prefs → Stored objects: edits · Network settings manage cookie profiles.
- Appearance → Theme: configures · Appearance settings affect shared app theming.
- Theme → Color system: uses · Theme composition relies on Monet color utilities.
- App updater → Update dialogs: presents · Update flow is surfaced through dialogs and pages.
- yt-dlp updater → Update dialogs: presents · yt-dlp maintenance also uses the update dialog layer.
- App updater → Main activity: affects · App updates coordinate with the main application lifecycle.
- yt-dlp updater → Downloader v2: updates · Embedded downloader binary supports the download engine.
- Crash report → App shell: recovers to · Crash reporting is a separate recovery route into the app shell.
