# yxxbc/downvid architecture

> Architecture diagram of the GitHub repository yxxbc/downvid, 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/yxxbc/downvid
- Repository: https://github.com/yxxbc/downvid

## Overview

DownVid is an Electron desktop video downloader. The main workflow is to submit a URL, resolve it with a platform-specific parser or yt-dlp, choose a format, then download while reporting progress; users can also manage dependencies, cookies, history, settings, and updates. The README documents these capabilities, while sampled source and the SOURCE INDEX substantiate only some wiring. Dashed, uncited edges mark relationships that are documented at a product level but whose precise call path was not shown.

Main entry points: [`electron/ipc/download.ts`](https://github.com/yxxbc/downvid/blob/main/electron/ipc/download.ts) (Download IPC), [`electron/main.ts`](https://github.com/yxxbc/downvid/blob/main/electron/main.ts) (Main Process), [`src/App.vue`](https://github.com/yxxbc/downvid/blob/main/src/App.vue) (App Shell), [`src/components/DownloadView.vue`](https://github.com/yxxbc/downvid/blob/main/src/components/DownloadView.vue) (Download Interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_renderer["Renderer UI"]
  node_appview["App Shell<br/>[App.vue]"]
  node_downloadview["Download Interface<br/>[DownloadView.vue]"]
  node_queue["Download Queue<br/>[DownloadQueue.vue]"]
  node_historyview["History View<br/>[HistoryView.vue]"]
  node_settings["Settings and Cookies<br/>[SettingsView.vue]"]
  node_depstate["Dependency State<br/>[deps.ts]"]
  node_downloadstate["Download State<br/>[download.ts]"]
end

subgraph group_main["Electron Main"]
  node_mainproc["Main Process<br/>[main.ts]"]
  node_downloadipc["Download IPC<br/>[download.ts]"]
  node_depsipc["Dependency IPC<br/>[deps.ts]"]
  node_historyipc["History IPC<br/>[history.ts]"]
  node_systemipc["System IPC<br/>[system.ts]"]
end

subgraph group_media["Parsing and Downloads"]
  node_douyin["Douyin Parser<br/>[douyin.ts]"]
  node_kuaishou["Kuaishou Parser<br/>[kuaishou.ts]"]
  node_ytdlp_parser["yt-dlp Parser<br/>[ytdlp.ts]"]
  node_ytdlp_download["yt-dlp Download<br/>[ytdlp.ts]"]
  node_direct_download["Direct Download<br/>[direct.ts]"]
  node_progress["Progress Reporting<br/>[progress.ts]"]
end

subgraph group_deps["Runtime Dependencies"]
  node_dep_runtime["Dependency Discovery<br/>[find.go]"]
  node_dep_probe["Installed Tool Probe<br/>[probe.go]"]
  node_dep_fetch["Dependency Fetch<br/>[download.go]"]
  node_dep_entry["Sidecar Entry<br/>[main.go]"]
end

subgraph group_support["Persistence and Updates"]
  node_store[("Main Store<br/>[store.ts]")]
  node_updater["Update Service<br/>[updater.ts]"]
  node_appipc["App IPC<br/>[app.ts]"]
end

node_user(("User"))

node_user -->|"uses"| node_appview
node_appview -->|"shows"| node_downloadview
node_appview -->|"shows"| node_historyview
node_appview -->|"opens"| node_settings
node_downloadview -.->|"manages"| node_downloadstate
node_downloadview -.->|"presents"| node_queue
node_user -.->|"submits URL"| node_downloadipc
node_mainproc -->|"registers"| node_downloadipc
node_mainproc -->|"registers"| node_depsipc
node_mainproc -->|"registers"| node_historyipc
node_mainproc -->|"registers"| node_systemipc
node_mainproc -->|"registers"| node_appipc
node_downloadipc -->|"dispatches"| node_douyin
node_downloadipc -->|"dispatches"| node_kuaishou
node_downloadipc -->|"dispatches"| node_ytdlp_parser
node_downloadipc -->|"invokes"| node_direct_download
node_downloadipc -->|"invokes"| node_ytdlp_download
node_ytdlp_download -->|"reports progress"| node_progress
node_ytdlp_download -->|"tracks active tasks"| node_store
node_downloadipc -.->|"records results"| node_historyipc
node_settings -.->|"manages dependencies"| node_depstate
node_depsipc -.->|"communicates"| node_dep_entry
node_dep_entry -->|"resolves tools"| node_dep_runtime
node_dep_entry -->|"fetches missing tools"| node_dep_fetch
node_dep_runtime -->|"probes installed tools"| node_dep_probe
node_systemipc -->|"configures proxy"| node_updater
node_appipc -->|"checks and installs"| node_updater
node_appipc -.->|"serves renderer messages"| node_store
node_historyview -.->|"loads records"| node_historyipc
node_systemipc -.->|"exchanges system settings"| node_settings

click node_appview "https://github.com/yxxbc/downvid/blob/main/src/App.vue"
click node_downloadview "https://github.com/yxxbc/downvid/blob/main/src/components/DownloadView.vue"
click node_queue "https://github.com/yxxbc/downvid/blob/main/src/components/DownloadQueue.vue"
click node_historyview "https://github.com/yxxbc/downvid/blob/main/src/components/HistoryView.vue"
click node_settings "https://github.com/yxxbc/downvid/blob/main/src/components/SettingsView.vue"
click node_depstate "https://github.com/yxxbc/downvid/blob/main/src/stores/deps.ts"
click node_downloadstate "https://github.com/yxxbc/downvid/blob/main/src/stores/download.ts"
click node_mainproc "https://github.com/yxxbc/downvid/blob/main/electron/main.ts"
click node_downloadipc "https://github.com/yxxbc/downvid/blob/main/electron/ipc/download.ts"
click node_depsipc "https://github.com/yxxbc/downvid/blob/main/electron/ipc/deps.ts"
click node_historyipc "https://github.com/yxxbc/downvid/blob/main/electron/ipc/history.ts"
click node_systemipc "https://github.com/yxxbc/downvid/blob/main/electron/ipc/system.ts"
click node_douyin "https://github.com/yxxbc/downvid/blob/main/electron/parsers/douyin.ts"
click node_kuaishou "https://github.com/yxxbc/downvid/blob/main/electron/parsers/kuaishou.ts"
click node_ytdlp_parser "https://github.com/yxxbc/downvid/blob/main/electron/parsers/ytdlp.ts"
click node_ytdlp_download "https://github.com/yxxbc/downvid/blob/main/electron/download/ytdlp.ts"
click node_direct_download "https://github.com/yxxbc/downvid/blob/main/electron/download/direct.ts"
click node_progress "https://github.com/yxxbc/downvid/blob/main/electron/download/progress.ts"
click node_dep_runtime "https://github.com/yxxbc/downvid/blob/main/backend/internal/runtime/find.go"
click node_dep_probe "https://github.com/yxxbc/downvid/blob/main/backend/internal/probe/probe.go"
click node_dep_fetch "https://github.com/yxxbc/downvid/blob/main/backend/internal/fetch/download.go"
click node_dep_entry "https://github.com/yxxbc/downvid/blob/main/backend/cmd/downvid-deps/main.go"
click node_store "https://github.com/yxxbc/downvid/blob/main/electron/store.ts"
click node_updater "https://github.com/yxxbc/downvid/blob/main/electron/updater.ts"
click node_appipc "https://github.com/yxxbc/downvid/blob/main/electron/ipc/app.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_appview,node_downloadview,node_queue,node_historyview,node_settings,node_depstate,node_downloadstate,node_user toneBlue
class node_mainproc,node_downloadipc,node_depsipc,node_historyipc,node_systemipc toneAmber
class node_douyin,node_kuaishou,node_ytdlp_parser,node_ytdlp_download,node_direct_download,node_progress toneMint
class node_dep_runtime,node_dep_probe,node_dep_fetch,node_dep_entry toneRose
class node_store,node_updater,node_appipc toneIndigo
```

## Components

### Renderer UI

- [App Shell](https://github.com/yxxbc/downvid/blob/main/src/App.vue): `src/App.vue`
- [Download Interface](https://github.com/yxxbc/downvid/blob/main/src/components/DownloadView.vue): `src/components/DownloadView.vue`
- [Download Queue](https://github.com/yxxbc/downvid/blob/main/src/components/DownloadQueue.vue): `src/components/DownloadQueue.vue`
- [History View](https://github.com/yxxbc/downvid/blob/main/src/components/HistoryView.vue): `src/components/HistoryView.vue`
- [Settings and Cookies](https://github.com/yxxbc/downvid/blob/main/src/components/SettingsView.vue): `src/components/SettingsView.vue`
- [Dependency State](https://github.com/yxxbc/downvid/blob/main/src/stores/deps.ts): `src/stores/deps.ts`
- [Download State](https://github.com/yxxbc/downvid/blob/main/src/stores/download.ts): `src/stores/download.ts`

### Electron Main

- [Main Process](https://github.com/yxxbc/downvid/blob/main/electron/main.ts): `electron/main.ts`
- [Download IPC](https://github.com/yxxbc/downvid/blob/main/electron/ipc/download.ts): `electron/ipc/download.ts`
- [Dependency IPC](https://github.com/yxxbc/downvid/blob/main/electron/ipc/deps.ts): `electron/ipc/deps.ts`
- [History IPC](https://github.com/yxxbc/downvid/blob/main/electron/ipc/history.ts): `electron/ipc/history.ts`
- [System IPC](https://github.com/yxxbc/downvid/blob/main/electron/ipc/system.ts): `electron/ipc/system.ts`

### Parsing and Downloads

- [Douyin Parser](https://github.com/yxxbc/downvid/blob/main/electron/parsers/douyin.ts): `electron/parsers/douyin.ts`
- [Kuaishou Parser](https://github.com/yxxbc/downvid/blob/main/electron/parsers/kuaishou.ts): `electron/parsers/kuaishou.ts`
- [yt-dlp Parser](https://github.com/yxxbc/downvid/blob/main/electron/parsers/ytdlp.ts): `electron/parsers/ytdlp.ts`
- [yt-dlp Download](https://github.com/yxxbc/downvid/blob/main/electron/download/ytdlp.ts): `electron/download/ytdlp.ts`
- [Direct Download](https://github.com/yxxbc/downvid/blob/main/electron/download/direct.ts): `electron/download/direct.ts`
- [Progress Reporting](https://github.com/yxxbc/downvid/blob/main/electron/download/progress.ts): `electron/download/progress.ts`

### Runtime Dependencies

- [Dependency Discovery](https://github.com/yxxbc/downvid/blob/main/backend/internal/runtime/find.go): `backend/internal/runtime/find.go`
- [Installed Tool Probe](https://github.com/yxxbc/downvid/blob/main/backend/internal/probe/probe.go): `backend/internal/probe/probe.go`
- [Dependency Fetch](https://github.com/yxxbc/downvid/blob/main/backend/internal/fetch/download.go): `backend/internal/fetch/download.go`
- [Sidecar Entry](https://github.com/yxxbc/downvid/blob/main/backend/cmd/downvid-deps/main.go): `backend/cmd/downvid-deps/main.go`

### Persistence and Updates

- [Main Store](https://github.com/yxxbc/downvid/blob/main/electron/store.ts): `electron/store.ts`
- [Update Service](https://github.com/yxxbc/downvid/blob/main/electron/updater.ts): `electron/updater.ts`
- [App IPC](https://github.com/yxxbc/downvid/blob/main/electron/ipc/app.ts): `electron/ipc/app.ts`

### Other components

- **User**

## Connections

- User → App Shell: uses (evidence: `README.md`)
- App Shell → Download Interface: shows (evidence: `src/App.vue`)
- App Shell → History View: shows (evidence: `src/App.vue`)
- App Shell → Settings and Cookies: opens (evidence: `src/App.vue`)
- Download Interface → Download State: manages
- Download Interface → Download Queue: presents
- User → Download IPC: submits URL
- Main Process → Download IPC: registers (evidence: `electron/main.ts`)
- Main Process → Dependency IPC: registers (evidence: `electron/main.ts`)
- Main Process → History IPC: registers (evidence: `electron/main.ts`)
- Main Process → System IPC: registers (evidence: `electron/main.ts`)
- Main Process → App IPC: registers (evidence: `electron/main.ts`)
- Download IPC → Douyin Parser: dispatches (evidence: `electron/ipc/download.ts`)
- Download IPC → Kuaishou Parser: dispatches (evidence: `electron/ipc/download.ts`)
- Download IPC → yt-dlp Parser: dispatches (evidence: `electron/ipc/download.ts`)
- Download IPC → Direct Download: invokes (evidence: `electron/ipc/download.ts`)
- Download IPC → yt-dlp Download: invokes (evidence: `electron/ipc/download.ts`)
- yt-dlp Download → Progress Reporting: reports progress (evidence: `electron/download/ytdlp.ts`)
- yt-dlp Download → Main Store: tracks active tasks (evidence: `electron/download/ytdlp.ts`)
- Download IPC → History IPC: records results
- Settings and Cookies → Dependency State: manages dependencies
- Dependency IPC → Sidecar Entry: communicates
- Sidecar Entry → Dependency Discovery: resolves tools (evidence: `backend/cmd/downvid-deps/main.go`)
- Sidecar Entry → Dependency Fetch: fetches missing tools (evidence: `backend/cmd/downvid-deps/main.go`)
- Dependency Discovery → Installed Tool Probe: probes installed tools (evidence: `backend/internal/runtime/find.go`)
- System IPC → Update Service: configures proxy (evidence: `electron/ipc/system.ts`)
- App IPC → Update Service: checks and installs (evidence: `electron/ipc/app.ts`)
- App IPC → Main Store: serves renderer messages
- History View → History IPC: loads records
- System IPC → Settings and Cookies: exchanges system settings
