# ishare2-org/ishare2-web-gui architecture

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

- Interactive diagram: https://gitdiagram.com/ishare2-org/ishare2-web-gui
- Repository: https://github.com/ishare2-org/ishare2-web-gui

## Overview

ishare2 GUI is a FastAPI web interface for managing and downloading network-emulator images through the ishare2 CLI. A browser request enters at the application or a registered router; download and installed-image views gather image data and render pages, while download and delete requests invoke image operations. Catalog data is refreshed from Google Sheets, and supporting utilities expose platform, license, changelog, and CLI information. The main routes and several helpers were excerpted; unsampled capabilities and their links are included only where documented or indexed.

Main entry points: [`main.py`](https://github.com/ishare2-org/ishare2-web-gui/blob/master/main.py) (FastAPI app), [`routers/installed.py`](https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/installed.py) (Installed routes), [`routers/changelogs.py`](https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/changelogs.py) (Changelog routes), [`routers/downloads.py`](https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/downloads.py) (Catalog routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_app["FastAPI app<br/>[main.py]"]
  node_home["Homepage<br/>[index.html]"]
  node_page_views["Image and changelog pages"]
  node_installed_routes["Installed routes<br/>[installed.py]"]
  node_changelog_routes["Changelog routes<br/>[changelogs.py]"]
end

subgraph group_catalog["Image catalog"]
  node_download_routes["Catalog routes<br/>[downloads.py]"]
  node_installed_images["Installed image lookup"]
  node_image_catalog["Image catalog lookup<br/>[get_images.py]"]
  node_csv_refresh["CSV refresh<br/>[download_csv.py]"]
end

subgraph group_operations["Image operations"]
  node_delete_routes["Delete routes<br/>[request_delete.py]"]
  node_download_request_routes["Download request routes"]
  node_image_download["Image download<br/>[download_images.py]"]
  node_image_delete["Image deletion<br/>[delete_images.py]"]
end

subgraph group_platform["Platform utilities"]
  node_command_runner["Shell command runner<br/>[command_utils.py]"]
  node_page_context["Page context<br/>[add_context.py]"]
  node_system_utilities["System and CLI utilities<br/>[misc_utils.py]"]
  node_changelogs["Changelog content<br/>[misc_utils.py]"]
end

node_browser(("Administrator"))
node_sheets[("Google Sheets")]

node_browser -->|"requests pages"| node_app
node_app -->|"renders"| node_home
node_app -->|"registers routes"| node_installed_routes
node_app -->|"registers routes"| node_download_routes
node_app -->|"registers routes"| node_delete_routes
node_app -->|"registers routes"| node_download_request_routes
node_app -->|"registers routes"| node_changelog_routes
node_installed_routes -->|"gets installed images"| node_installed_images
node_installed_routes -->|"builds context"| node_page_context
node_installed_routes -->|"renders installed page"| node_page_views
node_download_routes -->|"gets image list"| node_image_catalog
node_download_routes -->|"builds context"| node_page_context
node_download_routes -->|"renders download page"| node_page_views
node_delete_routes -->|"deletes image"| node_image_delete
node_download_request_routes -->|"downloads image"| node_image_download
node_changelog_routes -->|"gets content"| node_changelogs
node_changelog_routes -->|"builds context"| node_page_context
node_changelog_routes -->|"renders changelog"| node_page_views
node_app -->|"refreshes catalog"| node_csv_refresh
node_image_catalog -->|"refreshes missing data"| node_csv_refresh
node_csv_refresh -->|"downloads CSV data"| node_sheets
node_image_delete -->|"runs shell commands"| node_command_runner
node_image_download -->|"runs CLI commands"| node_command_runner
node_installed_images -->|"runs CLI commands"| node_command_runner
node_page_context -->|"gets system details"| node_system_utilities
node_system_utilities -->|"runs system commands"| node_command_runner
node_app -->|"serves CLI extras"| node_system_utilities

click node_app "https://github.com/ishare2-org/ishare2-web-gui/blob/master/main.py"
click node_home "https://github.com/ishare2-org/ishare2-web-gui/blob/master/web_app/src/pages/index.html"
click node_page_views "https://github.com/ishare2-org/ishare2-web-gui/tree/master/web_app/src/pages"
click node_installed_routes "https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/installed.py"
click node_download_routes "https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/downloads.py"
click node_delete_routes "https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/request_delete.py"
click node_download_request_routes "https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/request_download.py"
click node_changelog_routes "https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/changelogs.py"
click node_installed_images "https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/installed_images.py"
click node_image_catalog "https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/get_images.py"
click node_csv_refresh "https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/download_csv.py"
click node_image_download "https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/download_images.py"
click node_image_delete "https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/delete_images.py"
click node_command_runner "https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/command_utils.py"
click node_page_context "https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/add_context.py"
click node_system_utilities "https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/misc_utils.py"
click node_changelogs "https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/misc_utils.py"

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,node_home,node_page_views,node_installed_routes,node_changelog_routes toneBlue
class node_download_routes,node_installed_images,node_image_catalog,node_csv_refresh,node_sheets toneAmber
class node_delete_routes,node_download_request_routes,node_image_download,node_image_delete toneMint
class node_command_runner,node_page_context,node_system_utilities,node_changelogs toneRose
class node_browser toneIndigo
```

## Components

### Web interface

- [FastAPI app](https://github.com/ishare2-org/ishare2-web-gui/blob/master/main.py): `main.py`
- [Homepage](https://github.com/ishare2-org/ishare2-web-gui/blob/master/web_app/src/pages/index.html): `web_app/src/pages/index.html`
- [Image and changelog pages](https://github.com/ishare2-org/ishare2-web-gui/tree/master/web_app/src/pages): `web_app/src/pages`
- [Installed routes](https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/installed.py): `routers/installed.py`
- [Changelog routes](https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/changelogs.py): `routers/changelogs.py`

### Image catalog

- [Catalog routes](https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/downloads.py): `routers/downloads.py`
- [Installed image lookup](https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/installed_images.py): `python_scripts/installed_images.py`
- [Image catalog lookup](https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/get_images.py): `python_scripts/get_images.py`
- [CSV refresh](https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/download_csv.py): `python_scripts/download_csv.py`

### Image operations

- [Delete routes](https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/request_delete.py): `routers/request_delete.py`
- [Download request routes](https://github.com/ishare2-org/ishare2-web-gui/blob/master/routers/request_download.py): `routers/request_download.py`
- [Image download](https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/download_images.py): `python_scripts/download_images.py`
- [Image deletion](https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/delete_images.py): `python_scripts/delete_images.py`

### Platform utilities

- [Shell command runner](https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/command_utils.py): `python_scripts/command_utils.py`
- [Page context](https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/add_context.py): `python_scripts/add_context.py`
- [System and CLI utilities](https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/misc_utils.py): `python_scripts/misc_utils.py`
- [Changelog content](https://github.com/ishare2-org/ishare2-web-gui/blob/master/python_scripts/misc_utils.py): `python_scripts/misc_utils.py`

### Other components

- **Administrator**
- **Google Sheets**

## Connections

- Administrator → FastAPI app: requests pages (evidence: `README.md`)
- FastAPI app → Homepage: renders (evidence: `main.py`)
- FastAPI app → Installed routes: registers routes (evidence: `main.py`)
- FastAPI app → Catalog routes: registers routes (evidence: `main.py`)
- FastAPI app → Delete routes: registers routes (evidence: `main.py`)
- FastAPI app → Download request routes: registers routes (evidence: `main.py`)
- FastAPI app → Changelog routes: registers routes (evidence: `main.py`)
- Installed routes → Installed image lookup: gets installed images (evidence: `routers/installed.py`)
- Installed routes → Page context: builds context (evidence: `routers/installed.py`)
- Installed routes → Image and changelog pages: renders installed page (evidence: `routers/installed.py`)
- Catalog routes → Image catalog lookup: gets image list (evidence: `routers/downloads.py`)
- Catalog routes → Page context: builds context (evidence: `routers/downloads.py`)
- Catalog routes → Image and changelog pages: renders download page (evidence: `routers/downloads.py`)
- Delete routes → Image deletion: deletes image (evidence: `routers/request_delete.py`)
- Download request routes → Image download: downloads image (evidence: `routers/request_download.py`)
- Changelog routes → Changelog content: gets content (evidence: `routers/changelogs.py`)
- Changelog routes → Page context: builds context (evidence: `routers/changelogs.py`)
- Changelog routes → Image and changelog pages: renders changelog (evidence: `routers/changelogs.py`)
- FastAPI app → CSV refresh: refreshes catalog (evidence: `main.py`)
- Image catalog lookup → CSV refresh: refreshes missing data (evidence: `python_scripts/get_images.py`)
- CSV refresh → Google Sheets: downloads CSV data (evidence: `python_scripts/download_csv.py`)
- Image deletion → Shell command runner: runs shell commands (evidence: `python_scripts/delete_images.py`)
- Image download → Shell command runner: runs CLI commands (evidence: `python_scripts/download_images.py`)
- Installed image lookup → Shell command runner: runs CLI commands (evidence: `python_scripts/installed_images.py`)
- Page context → System and CLI utilities: gets system details (evidence: `python_scripts/add_context.py`)
- System and CLI utilities → Shell command runner: runs system commands (evidence: `python_scripts/misc_utils.py`)
- FastAPI app → System and CLI utilities: serves CLI extras (evidence: `main.py`)
