# jgc777/html2exe-2.0 architecture

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

- Interactive diagram: https://gitdiagram.com/jgc777/html2exe-2.0
- Repository: https://github.com/jgc777/html2exe-2.0

## Overview

HTML2EXE 2.0 is a Windows GUI/CLI tool that packages HTML files or folders into standalone executables. Users supply content and optional window settings, then the compiler stages the files and builds an IExpress package containing the WebView app. The packaged app extracts its web files, reads its configuration, and opens local content or a configured URL. The README documents both input modes, customization, and optional runtime/WebView choices; source excerpts show the GUI handoff, packaging, and runtime startup. Some internal compiler steps are unsampled, so those links are documented rather than inferred from module names.

Main entry points: [`HTML2EXE 2.0/HTML2EXE.cs`](https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/HTML2EXE.cs) (Executable packaging), [`HTML2EXE_Webview/WebviewForm.cs`](https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE_Webview/WebviewForm.cs) (WebView window), [`HTML2EXE 2.0/BrowseDialog.cs`](https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/BrowseDialog.cs) (File and folder picker), [`HTML2EXE_Webview/Webview.cs`](https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE_Webview/Webview.cs) (Runtime entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Input and configuration"]
  node_cli["CLI entry<br/>[HTML2EXE.cs]"]
  node_browse["File and folder picker<br/>[BrowseDialog.cs]"]
  node_config["Build configuration<br/>[ConfigDialog.cs]"]
  node_buildui["Build progress UI<br/>[BuildDialog.cs]"]
end

subgraph group_compiler["Executable compiler"]
  node_staging["Content staging<br/>[HTML2EXE.cs]"]
  node_packaging["Executable packaging<br/>[HTML2EXE.cs]"]
  node_output["Generated EXE"]
end

subgraph group_runtime["Packaged runtime"]
  node_runtimeentry["Runtime entry<br/>[Webview.cs]"]
  node_webfiles["Packaged web files"]
  node_window["WebView window<br/>[WebviewForm.cs]"]
end

subgraph group_integrations["External integrations"]
  node_webview2["Microsoft WebView2"]
  node_iexpress["Windows IExpress"]
  node_update_service["Update service"]
end

node_user(("User"))
node_webpage(("Configured web URL"))

node_user -->|"passes input"| node_cli
node_user -->|"selects content"| node_browse
node_browse -->|"copies files"| node_staging
node_browse -->|"opens options"| node_config
node_user -->|"sets options"| node_config
node_config -->|"opens build"| node_buildui
node_buildui -->|"starts build"| node_packaging
node_cli -->|"stages input"| node_staging
node_cli -.->|"builds output"| node_packaging
node_staging -->|"supplies web files"| node_packaging
node_packaging -->|"invokes compiler"| node_iexpress
node_packaging -->|"creates package"| node_output
node_output -->|"launches app"| node_runtimeentry
node_runtimeentry -->|"extracts archive"| node_webfiles
node_runtimeentry -->|"opens window"| node_window
node_window -->|"loads local content"| node_webfiles
node_window -->|"renders content"| node_webview2
node_webpage -->|"provides URL"| node_window
node_cli -->|"checks updates"| node_update_service

click node_cli "https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/HTML2EXE.cs"
click node_browse "https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/BrowseDialog.cs"
click node_config "https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/ConfigDialog.cs"
click node_buildui "https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/BuildDialog.cs"
click node_staging "https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/HTML2EXE.cs"
click node_packaging "https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/HTML2EXE.cs"
click node_runtimeentry "https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE_Webview/Webview.cs"
click node_window "https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE_Webview/WebviewForm.cs"

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_cli,node_browse,node_config,node_buildui,node_user toneBlue
class node_staging,node_packaging,node_output toneAmber
class node_runtimeentry,node_webfiles,node_window toneMint
class node_webview2,node_iexpress,node_update_service toneRose
class node_webpage toneIndigo
```

## Components

### Input and configuration

- [CLI entry](https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/HTML2EXE.cs): `HTML2EXE 2.0/HTML2EXE.cs`
- [File and folder picker](https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/BrowseDialog.cs): `HTML2EXE 2.0/BrowseDialog.cs`
- [Build configuration](https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/ConfigDialog.cs): `HTML2EXE 2.0/ConfigDialog.cs`
- [Build progress UI](https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/BuildDialog.cs): `HTML2EXE 2.0/BuildDialog.cs`

### Executable compiler

- [Content staging](https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/HTML2EXE.cs): `HTML2EXE 2.0/HTML2EXE.cs`
- [Executable packaging](https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE%202.0/HTML2EXE.cs): `HTML2EXE 2.0/HTML2EXE.cs`
- **Generated EXE**

### Packaged runtime

- [Runtime entry](https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE_Webview/Webview.cs): `HTML2EXE_Webview/Webview.cs`
- **Packaged web files**
- [WebView window](https://github.com/jgc777/html2exe-2.0/blob/master/HTML2EXE_Webview/WebviewForm.cs): `HTML2EXE_Webview/WebviewForm.cs`

### External integrations

- **Microsoft WebView2**
- **Windows IExpress**
- **Update service**

### Other components

- **User**
- **Configured web URL**

## Connections

- User → CLI entry: passes input (evidence: `README.md`)
- User → File and folder picker: selects content (evidence: `README.md`)
- File and folder picker → Content staging: copies files (evidence: `HTML2EXE 2.0/BrowseDialog.cs`)
- File and folder picker → Build configuration: opens options (evidence: `HTML2EXE 2.0/BrowseDialog.cs`)
- User → Build configuration: sets options (evidence: `README.md`)
- Build configuration → Build progress UI: opens build (evidence: `HTML2EXE 2.0/ConfigDialog.cs`)
- Build progress UI → Executable packaging: starts build (evidence: `HTML2EXE 2.0/BuildDialog.cs`)
- CLI entry → Content staging: stages input (evidence: `HTML2EXE 2.0/HTML2EXE.cs`)
- CLI entry → Executable packaging: builds output (evidence: `HTML2EXE 2.0/HTML2EXE.cs`)
- Content staging → Executable packaging: supplies web files (evidence: `HTML2EXE 2.0/HTML2EXE.cs`)
- Executable packaging → Windows IExpress: invokes compiler (evidence: `HTML2EXE 2.0/HTML2EXE.cs`)
- Executable packaging → Generated EXE: creates package (evidence: `HTML2EXE 2.0/HTML2EXE.cs`)
- Generated EXE → Runtime entry: launches app (evidence: `README.md`)
- Runtime entry → Packaged web files: extracts archive (evidence: `HTML2EXE_Webview/Webview.cs`)
- Runtime entry → WebView window: opens window (evidence: `HTML2EXE_Webview/Webview.cs`)
- WebView window → Packaged web files: loads local content (evidence: `HTML2EXE_Webview/WebviewForm.cs`)
- WebView window → Microsoft WebView2: renders content (evidence: `README.md`)
- Configured web URL → WebView window: provides URL (evidence: `HTML2EXE_Webview/WebviewForm.cs`)
- CLI entry → Update service: checks updates (evidence: `HTML2EXE 2.0/HTML2EXE.cs`)
