# altansar69/hubcap-add architecture

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

- Interactive diagram: https://gitdiagram.com/altansar69/hubcap-add
- Repository: https://github.com/altansar69/hubcap-add

## Overview

Hubcap adds and removes games or DLC through a Steam store-page button or an AppID setting, then installs Hubcap files for Steam to recognize. The plugin also exposes HubcapTool settings and quota, plus library colors and context-menu actions. The README documents these responsibilities and several integrations, but no source excerpts were provided, so internal call details beyond those documented are omitted.

Main entry points: [`backend/scripts/download_lua.ps1`](https://github.com/altansar69/hubcap-add/blob/main/backend/scripts/download_lua.ps1) (Download and install), [`backend/main.lua`](https://github.com/altansar69/hubcap-add/blob/main/backend/main.lua) (Settings and status), [`.millennium/Dist/index.js`](https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/index.js) (Settings panel), [`.millennium/Dist/webkit.js`](https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/webkit.js) (Store page button)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_store["Store workflow"]
  node_store_button["Store page button<br/>[webkit.js]"]
  node_game_backend["Game actions<br/>[main.lua]"]
  node_protection_check["Protection warning<br/>[webkit.js]"]
end

subgraph group_install["Download and install"]
  node_download_install["Download and install<br/>[download_lua.ps1]"]
end

subgraph group_settings["Settings"]
  node_settings_panel["Settings panel<br/>[index.js]"]
  node_settings_backend["Settings and status<br/>[main.lua]"]
  node_quota["Quota display<br/>[index.js]"]
  node_appid_action["AppID actions<br/>[index.js]"]
end

subgraph group_library["Library features"]
  node_library_colours["Library colors<br/>[index.js]"]
  node_library_menu["Library context menu<br/>[index.js]"]
end

node_steam_user(("Steam user"))
node_store_page["Steam store page"]
node_hubcap_api["Hubcap API"]
node_hubcap_files[("HubcapTool Lua files")]
node_depotcache[("Steam depotcache")]
node_steam_library["Steam library"]
node_hubcap_config[("HubcapTool config")]
node_steam_store_api["Steam store API"]

node_steam_user -->|"opens"| node_store_page
node_store_page -->|"displays"| node_store_button
node_steam_user -->|"selects"| node_store_button
node_store_button -->|"requests action"| node_game_backend
node_store_button -->|"checks protection"| node_protection_check
node_protection_check -->|"reads game page"| node_steam_store_api
node_game_backend -->|"starts download"| node_download_install
node_download_install -->|"downloads files"| node_hubcap_api
node_download_install -->|"installs scripts"| node_hubcap_files
node_download_install -->|"installs manifests"| node_depotcache
node_hubcap_files -->|"makes games available"| node_steam_library
node_depotcache -->|"supports game loading"| node_steam_library
node_steam_user -->|"edits settings"| node_settings_panel
node_settings_panel -->|"requests config"| node_settings_backend
node_settings_backend -->|"reads and writes"| node_hubcap_config
node_settings_panel -->|"shows quota"| node_quota
node_quota -->|"reads account quota"| node_hubcap_api
node_settings_panel -->|"accepts AppID"| node_appid_action
node_appid_action -->|"requests game action"| node_settings_backend
node_settings_backend -->|"starts downloads"| node_download_install
node_settings_backend -->|"checks install status"| node_hubcap_config
node_steam_user -->|"opens menu"| node_library_menu
node_library_menu -->|"requests add or remove"| node_game_backend
node_steam_user -->|"views library"| node_library_colours
node_library_colours -->|"reads DLC data"| node_steam_store_api

click node_store_button "https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/webkit.js"
click node_game_backend "https://github.com/altansar69/hubcap-add/blob/main/backend/main.lua"
click node_protection_check "https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/webkit.js"
click node_download_install "https://github.com/altansar69/hubcap-add/blob/main/backend/scripts/download_lua.ps1"
click node_settings_panel "https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/index.js"
click node_settings_backend "https://github.com/altansar69/hubcap-add/blob/main/backend/main.lua"
click node_quota "https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/index.js"
click node_appid_action "https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/index.js"
click node_library_colours "https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/index.js"
click node_library_menu "https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/index.js"

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_store_button,node_game_backend,node_protection_check,node_steam_user toneBlue
class node_download_install,node_hubcap_files,node_depotcache,node_hubcap_config toneAmber
class node_settings_panel,node_settings_backend,node_quota,node_appid_action,node_hubcap_api,node_steam_store_api toneMint
class node_library_colours,node_library_menu toneRose
class node_store_page,node_steam_library toneIndigo
```

## Components

### Store workflow

- [Store page button](https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/webkit.js): `.millennium/Dist/webkit.js`
- [Game actions](https://github.com/altansar69/hubcap-add/blob/main/backend/main.lua): `backend/main.lua`
- [Protection warning](https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/webkit.js): `.millennium/Dist/webkit.js`

### Download and install

- [Download and install](https://github.com/altansar69/hubcap-add/blob/main/backend/scripts/download_lua.ps1): `backend/scripts/download_lua.ps1`

### Settings

- [Settings panel](https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/index.js): `.millennium/Dist/index.js`
- [Settings and status](https://github.com/altansar69/hubcap-add/blob/main/backend/main.lua): `backend/main.lua`
- [Quota display](https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/index.js): `.millennium/Dist/index.js`
- [AppID actions](https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/index.js): `.millennium/Dist/index.js`

### Library features

- [Library colors](https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/index.js): `.millennium/Dist/index.js`
- [Library context menu](https://github.com/altansar69/hubcap-add/blob/main/.millennium/Dist/index.js): `.millennium/Dist/index.js`

### Other components

- **Steam user**
- **Steam store page**
- **Hubcap API**
- **HubcapTool Lua files**
- **Steam depotcache**
- **Steam library**
- **HubcapTool config**
- **Steam store API**

## Connections

- Steam user → Steam store page: opens (evidence: `README.md`)
- Steam store page → Store page button: displays (evidence: `README.md`)
- Steam user → Store page button: selects (evidence: `README.md`)
- Store page button → Game actions: requests action (evidence: `README.md`)
- Store page button → Protection warning: checks protection (evidence: `README.md`)
- Protection warning → Steam store API: reads game page (evidence: `README.md`)
- Game actions → Download and install: starts download (evidence: `README.md`)
- Download and install → Hubcap API: downloads files (evidence: `README.md`)
- Download and install → HubcapTool Lua files: installs scripts (evidence: `README.md`)
- Download and install → Steam depotcache: installs manifests (evidence: `README.md`)
- HubcapTool Lua files → Steam library: makes games available (evidence: `README.md`)
- Steam depotcache → Steam library: supports game loading (evidence: `README.md`)
- Steam user → Settings panel: edits settings (evidence: `README.md`)
- Settings panel → Settings and status: requests config (evidence: `README.md`)
- Settings and status → HubcapTool config: reads and writes (evidence: `README.md`)
- Settings panel → Quota display: shows quota (evidence: `README.md`)
- Quota display → Hubcap API: reads account quota (evidence: `README.md`)
- Settings panel → AppID actions: accepts AppID (evidence: `README.md`)
- AppID actions → Settings and status: requests game action (evidence: `README.md`)
- Settings and status → Download and install: starts downloads (evidence: `README.md`)
- Settings and status → HubcapTool config: checks install status (evidence: `README.md`)
- Steam user → Library context menu: opens menu (evidence: `README.md`)
- Library context menu → Game actions: requests add or remove (evidence: `README.md`)
- Steam user → Library colors: views library (evidence: `README.md`)
- Library colors → Steam store API: reads DLC data (evidence: `README.md`)
