# cristminix/llfetcher architecture

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

- Interactive diagram: https://gitdiagram.com/cristminix/llfetcher
- Repository: https://github.com/cristminix/llfetcher

## Overview

LLFetcher is a Chrome extension for downloading LinkedIn Learning course resources for offline use. A user opens the course view, selects a course, configures media and transcript options, then manages download work through the queue. The extension also injects course-aware UI into learning pages and offers settings, local database tools, developer utilities, and a native-client interface. Persistent course and download state is centralized in Store. The excerpts substantiate UI routing, queue-manager responsibilities, storage access, and native messaging dispatch; several feature modules are named in the index but were not inspected, so their internal links are omitted.

Main entry points: [`src/option/Router.jsx`](https://github.com/cristminix/llfetcher/blob/main/src/option/Router.jsx) (Options router), [`src/option/components/DownloadManager.jsx`](https://github.com/cristminix/llfetcher/blob/main/src/option/components/DownloadManager.jsx) (Download manager), [`native-messaging/node/src/main.mjs`](https://github.com/cristminix/llfetcher/blob/main/native-messaging/node/src/main.mjs) (Native host API), [`src/global/class/models/Store.js`](https://github.com/cristminix/llfetcher/blob/main/src/global/class/models/Store.js) (Model store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g_user["Extension UI"]
  node_option_ui["Options router<br/>[Router.jsx]"]
  node_course_page["Course browser<br/>[CoursePage.jsx]"]
  node_download_manager["Download manager"]
  node_queue_setup["Queue setup<br/>[QueueSetup.jsx]"]
  node_queue_view["Queue controls<br/>[QueueMan.jsx]"]
  node_db_tools["Database tools<br/>[DBTableManager.jsx]"]
  node_settings["Settings view<br/>[SettingPage.jsx]"]
  node_developer_tools["Developer tools<br/>[DeveloperPage.jsx]"]
  node_menu_manager["Menu manager<br/>[MenuManager.jsx]"]
  node_popup["Extension popup<br/>[Router.jsx]"]
  node_native_ui["Native client UI<br/>[NativeClient.jsx]"]
end

subgraph group_g_course["Course capture"]
  node_course_capture["Page course detector"]
  node_injected_app["Injected course UI"]
  node_course_api["Course API<br/>[CourseApi.js]"]
  node_media_options["Format selection<br/>[CourseInfo.jsx]"]
  node_downloads["Resource download state<br/>[DMSetup.js]"]
end

subgraph group_g_data["State and messaging"]
  node_store["Model store<br/>[Store.js]"]
  node_browser_db[("Extension databases<br/>[DB.js]")]
end

subgraph group_g_native["Native service"]
  node_background["Background messaging"]
  node_native_host["Native host API<br/>[main.mjs]"]
  node_host_routes["Host API routes<br/>[routers.js]"]
  node_host_data[("Host data source<br/>[index.js]")]
  node_uploads["Upload features<br/>[YTUpload.jsx]"]
end

node_learner(("Learner"))

node_learner -->|"opens"| node_option_ui
node_option_ui -->|"routes to"| node_course_page
node_option_ui -->|"routes to"| node_download_manager
node_download_manager -->|"renders"| node_queue_setup
node_download_manager -->|"renders"| node_queue_view
node_download_manager -->|"renders"| node_media_options
node_download_manager -->|"reads course data"| node_store
node_download_manager -->|"updates setup"| node_downloads
node_course_page -.->|"uses"| node_course_api
node_injected_app -->|"renders"| node_course_capture
node_store -->|"initializes models"| node_browser_db
node_db_tools -->|"reads and truncates"| node_store
node_option_ui -->|"routes via database page"| node_db_tools
node_option_ui -->|"routes to"| node_settings
node_option_ui -->|"routes to"| node_developer_tools
node_developer_tools -.->|"includes"| node_menu_manager
node_learner -->|"opens"| node_popup
node_native_ui -->|"sends commands"| node_background
node_background -.->|"dispatches messages"| node_native_host
node_native_host -->|"configures routes"| node_host_routes
node_native_host -->|"initializes data source"| node_host_data
node_option_ui -->|"routes to"| node_native_ui
node_option_ui -->|"routes through app"| node_uploads

click node_option_ui "https://github.com/cristminix/llfetcher/blob/main/src/option/Router.jsx"
click node_course_page "https://github.com/cristminix/llfetcher/blob/main/src/option/components/CoursePage.jsx"
click node_download_manager "https://github.com/cristminix/llfetcher/blob/main/src/option/components/DownloadManager.jsx"
click node_queue_setup "https://github.com/cristminix/llfetcher/blob/main/src/option/components/downloadManager/QueueSetup.jsx"
click node_queue_view "https://github.com/cristminix/llfetcher/blob/main/src/option/components/developers/QueueMan.jsx"
click node_course_capture "https://github.com/cristminix/llfetcher/blob/main/src/content-scripts/inject/components/CoursePageChecker.jsx"
click node_injected_app "https://github.com/cristminix/llfetcher/blob/main/src/content-scripts/inject/components/ContentScriptApp.jsx"
click node_course_api "https://github.com/cristminix/llfetcher/blob/main/src/global/class/course-api/CourseApi.js"
click node_media_options "https://github.com/cristminix/llfetcher/blob/main/src/option/components/downloadManager/CourseInfo.jsx"
click node_downloads "https://github.com/cristminix/llfetcher/blob/main/src/global/class/models/DMSetup.js"
click node_store "https://github.com/cristminix/llfetcher/blob/main/src/global/class/models/Store.js"
click node_browser_db "https://github.com/cristminix/llfetcher/blob/main/src/global/class/models/DB.js"
click node_db_tools "https://github.com/cristminix/llfetcher/blob/main/src/option/components/dbExplorer/DBTableManager.jsx"
click node_settings "https://github.com/cristminix/llfetcher/blob/main/src/option/components/SettingPage.jsx"
click node_developer_tools "https://github.com/cristminix/llfetcher/blob/main/src/option/components/DeveloperPage.jsx"
click node_menu_manager "https://github.com/cristminix/llfetcher/blob/main/src/option/components/developers/MenuManager.jsx"
click node_popup "https://github.com/cristminix/llfetcher/blob/main/src/popup/Router.jsx"
click node_background "https://github.com/cristminix/llfetcher/blob/main/src/background-scripts/native-messaging.js"
click node_native_ui "https://github.com/cristminix/llfetcher/blob/main/src/option/components/native-client-app/NativeClient.jsx"
click node_native_host "https://github.com/cristminix/llfetcher/blob/main/native-messaging/node/src/main.mjs"
click node_host_routes "https://github.com/cristminix/llfetcher/blob/main/native-messaging/node/src/api/routes/routers.js"
click node_host_data "https://github.com/cristminix/llfetcher/blob/main/native-messaging/node/src/api/data-source/index.js"
click node_uploads "https://github.com/cristminix/llfetcher/blob/main/src/option/components/native-client-app/YTUpload.jsx"

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_option_ui,node_course_page,node_download_manager,node_queue_setup,node_queue_view,node_db_tools,node_settings,node_developer_tools,node_menu_manager,node_popup,node_native_ui toneBlue
class node_course_capture,node_injected_app,node_course_api,node_media_options,node_downloads toneAmber
class node_store,node_browser_db toneMint
class node_background,node_native_host,node_host_routes,node_host_data,node_uploads toneRose
class node_learner toneIndigo
```

## Components

### Extension UI

- [Options router](https://github.com/cristminix/llfetcher/blob/main/src/option/Router.jsx): `src/option/Router.jsx`
- [Course browser](https://github.com/cristminix/llfetcher/blob/main/src/option/components/CoursePage.jsx): `src/option/components/CoursePage.jsx`
- [Download manager](https://github.com/cristminix/llfetcher/blob/main/src/option/components/DownloadManager.jsx): `src/option/components/DownloadManager.jsx`
- [Queue setup](https://github.com/cristminix/llfetcher/blob/main/src/option/components/downloadManager/QueueSetup.jsx): `src/option/components/downloadManager/QueueSetup.jsx`
- [Queue controls](https://github.com/cristminix/llfetcher/blob/main/src/option/components/developers/QueueMan.jsx): `src/option/components/developers/QueueMan.jsx`
- [Database tools](https://github.com/cristminix/llfetcher/blob/main/src/option/components/dbExplorer/DBTableManager.jsx): `src/option/components/dbExplorer/DBTableManager.jsx`
- [Settings view](https://github.com/cristminix/llfetcher/blob/main/src/option/components/SettingPage.jsx): `src/option/components/SettingPage.jsx`
- [Developer tools](https://github.com/cristminix/llfetcher/blob/main/src/option/components/DeveloperPage.jsx): `src/option/components/DeveloperPage.jsx`
- [Menu manager](https://github.com/cristminix/llfetcher/blob/main/src/option/components/developers/MenuManager.jsx): `src/option/components/developers/MenuManager.jsx`
- [Extension popup](https://github.com/cristminix/llfetcher/blob/main/src/popup/Router.jsx): `src/popup/Router.jsx`
- [Native client UI](https://github.com/cristminix/llfetcher/blob/main/src/option/components/native-client-app/NativeClient.jsx): `src/option/components/native-client-app/NativeClient.jsx`

### Course capture

- [Page course detector](https://github.com/cristminix/llfetcher/blob/main/src/content-scripts/inject/components/CoursePageChecker.jsx): `src/content-scripts/inject/components/CoursePageChecker.jsx`
- [Injected course UI](https://github.com/cristminix/llfetcher/blob/main/src/content-scripts/inject/components/ContentScriptApp.jsx): `src/content-scripts/inject/components/ContentScriptApp.jsx`
- [Course API](https://github.com/cristminix/llfetcher/blob/main/src/global/class/course-api/CourseApi.js): `src/global/class/course-api/CourseApi.js`
- [Format selection](https://github.com/cristminix/llfetcher/blob/main/src/option/components/downloadManager/CourseInfo.jsx): `src/option/components/downloadManager/CourseInfo.jsx`
- [Resource download state](https://github.com/cristminix/llfetcher/blob/main/src/global/class/models/DMSetup.js): `src/global/class/models/DMSetup.js`

### State and messaging

- [Model store](https://github.com/cristminix/llfetcher/blob/main/src/global/class/models/Store.js): `src/global/class/models/Store.js`
- [Extension databases](https://github.com/cristminix/llfetcher/blob/main/src/global/class/models/DB.js): `src/global/class/models/DB.js`

### Native service

- [Background messaging](https://github.com/cristminix/llfetcher/blob/main/src/background-scripts/native-messaging.js): `src/background-scripts/native-messaging.js`
- [Native host API](https://github.com/cristminix/llfetcher/blob/main/native-messaging/node/src/main.mjs): `native-messaging/node/src/main.mjs`
- [Host API routes](https://github.com/cristminix/llfetcher/blob/main/native-messaging/node/src/api/routes/routers.js): `native-messaging/node/src/api/routes/routers.js`
- [Host data source](https://github.com/cristminix/llfetcher/blob/main/native-messaging/node/src/api/data-source/index.js): `native-messaging/node/src/api/data-source/index.js`
- [Upload features](https://github.com/cristminix/llfetcher/blob/main/src/option/components/native-client-app/YTUpload.jsx): `src/option/components/native-client-app/YTUpload.jsx`

### Other components

- **Learner**

## Connections

- Learner → Options router: opens (evidence: `src/option/Router.jsx`)
- Options router → Course browser: routes to (evidence: `src/option/Router.jsx`)
- Options router → Download manager: routes to (evidence: `src/option/Router.jsx`)
- Download manager → Queue setup: renders (evidence: `src/option/components/DownloadManager.jsx`)
- Download manager → Queue controls: renders (evidence: `src/option/components/DownloadManager.jsx`)
- Download manager → Format selection: renders (evidence: `src/option/components/DownloadManager.jsx`)
- Download manager → Model store: reads course data (evidence: `src/option/components/DownloadManager.jsx`)
- Download manager → Resource download state: updates setup (evidence: `src/option/components/DownloadManager.jsx`)
- Course browser → Course API: uses
- Injected course UI → Page course detector: renders (evidence: `src/content-scripts/inject/components/ContentScriptApp.jsx`)
- Model store → Extension databases: initializes models (evidence: `src/global/class/models/Store.js`)
- Database tools → Model store: reads and truncates (evidence: `src/option/components/dbExplorer/DBTableManager.jsx`)
- Options router → Database tools: routes via database page (evidence: `src/option/Router.jsx`)
- Options router → Settings view: routes to (evidence: `src/option/Router.jsx`)
- Options router → Developer tools: routes to (evidence: `src/option/Router.jsx`)
- Developer tools → Menu manager: includes
- Learner → Extension popup: opens (evidence: `src/popup/Router.jsx`)
- Native client UI → Background messaging: sends commands (evidence: `src/option/components/native-client-app/NativeClient.jsx`)
- Background messaging → Native host API: dispatches messages
- Native host API → Host API routes: configures routes (evidence: `native-messaging/node/src/main.mjs`)
- Native host API → Host data source: initializes data source (evidence: `native-messaging/node/src/main.mjs`)
- Options router → Native client UI: routes to (evidence: `src/option/Router.jsx`)
- Options router → Upload features: routes through app (evidence: `src/option/Router.jsx`)
