# swgoh-utils/swgoh-ae2 architecture

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

- Interactive diagram: https://gitdiagram.com/swgoh-utils/swgoh-ae2
- Repository: https://github.com/swgoh-utils/swgoh-ae2

## Overview

SWGoH Asset Extractor downloads game asset bundles, compares manifests, and extracts assets into user-selected output. Users can run manifest, single-asset, prefix, all-asset, and version-diff workflows through the console, or list and download assets through the API; the GUI is another documented application surface. The shared runtime separates manifest interpretation, bundle unpacking, and format-specific export, with optional sprite-atlas and audio handling. The API controller and core helper excerpts show some call paths; other console and GUI wiring is not fully sampled, so uncertain links are omitted.

Main entry points: [`AssetGUI/MainProgram.cs`](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGUI/MainProgram.cs) (GUI Runtime), [`AssetGetterTools/helpers/Filehelper.cs`](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/helpers/Filehelper.cs) (Bundle Unpacking), [`AssetGetterTools/helpers/Exporter.cs`](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/helpers/Exporter.cs) (Asset Export), [`SwgohAssetGetterConsole/consoleStart.cs`](https://github.com/swgoh-utils/swgoh-ae2/blob/main/SwgohAssetGetterConsole/consoleStart.cs) (Console CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entrypoints["User Applications"]
  node_console["Console CLI<br/>[consoleStart.cs]"]
  node_gui["Desktop GUI<br/>[MainWindow.xaml.cs]"]
  node_api_host["API Host<br/>[Program.cs]"]
  node_api_routes["Asset Endpoints<br/>[AssetController.cs]"]
  node_gui_runtime["GUI Runtime<br/>[MainProgram.cs]"]
  node_console_runtime["Console Runtime<br/>[MainProgram.cs]"]
  node_api_runtime["API Runtime<br/>[MainProgram.cs]"]
end

subgraph group_asset_core["Asset Processing"]
  node_manifest_processing["Manifest Processing<br/>[ManifestHelper.cs]"]
  node_bundle_unpacking["Bundle Unpacking<br/>[Filehelper.cs]"]
end

subgraph group_formats["Format Export"]
  node_asset_export["Asset Export<br/>[Exporter.cs]"]
  node_sprite_atlas["Atlas Parsing"]
  node_sprite_cutting["Sprite Cutting<br/>[SpriteCutter.cs]"]
  node_audio_unpacking["Audio Extraction"]
end

subgraph group_runtime_state["Runtime Data"]
  node_manifest_records["Manifest Records"]
  node_asset_records["Asset Records<br/>[AssetItem.cs]"]
  node_sprite_records["Sprite Records<br/>[SpriteItem.cs]"]
  node_asset_platform["Platform Selection<br/>[AssetOS.cs]"]
  node_gui_metadata["Version Metadata"]
end

node_users(("Users"))
node_game_cdn["Game Asset CDN"]

node_users -.->|"runs commands"| node_console
node_users -->|"calls API"| node_api_host
node_api_host -->|"maps routes"| node_api_routes
node_api_routes -->|"dispatches requests"| node_api_runtime
node_console -.->|"starts runtime"| node_console_runtime
node_users -.->|"uses desktop"| node_gui
node_gui -.->|"invokes workflows"| node_gui_runtime
node_api_runtime -.->|"downloads bundles"| node_game_cdn
node_gui_runtime -->|"downloads manifests"| node_game_cdn
node_gui_runtime -->|"reads manifests"| node_manifest_processing
node_gui_runtime -->|"unpacks bundles"| node_bundle_unpacking
node_gui_runtime -->|"extracts audio"| node_audio_unpacking
node_manifest_processing -->|"deserializes"| node_manifest_records
node_bundle_unpacking -->|"creates records"| node_asset_records
node_bundle_unpacking -->|"exports assets"| node_asset_export
node_asset_export -->|"parses atlases"| node_sprite_atlas
node_asset_export -->|"cuts sprites"| node_sprite_cutting
node_sprite_atlas -->|"creates sprites"| node_sprite_records

click node_console "https://github.com/swgoh-utils/swgoh-ae2/blob/main/SwgohAssetGetterConsole/consoleStart.cs"
click node_gui "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGUI/MainWindow.xaml.cs"
click node_api_host "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetWebApi/Program.cs"
click node_api_routes "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetWebApi/Controllers/AssetController.cs"
click node_gui_runtime "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGUI/MainProgram.cs"
click node_console_runtime "https://github.com/swgoh-utils/swgoh-ae2/blob/main/SwgohAssetGetterConsole/MainProgram.cs"
click node_api_runtime "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetWebApi/MainProgram.cs"
click node_manifest_processing "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/helpers/ManifestHelper.cs"
click node_manifest_records "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/models/RawAssetManifest.cs"
click node_bundle_unpacking "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/helpers/Filehelper.cs"
click node_asset_records "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/models/AssetItem.cs"
click node_asset_export "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/helpers/Exporter.cs"
click node_sprite_atlas "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/helpers/SpriteAtlasParser.cs"
click node_sprite_records "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/models/SpriteItem.cs"
click node_sprite_cutting "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/helpers/SpriteCutter.cs"
click node_audio_unpacking "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/pck/BarbPCKExtractor.cs"
click node_asset_platform "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/models/AssetOS.cs"
click node_gui_metadata "https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGUI/Models/MetadataShortModel.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_console,node_gui,node_api_host,node_api_routes,node_gui_runtime,node_console_runtime,node_api_runtime,node_users toneBlue
class node_manifest_processing,node_bundle_unpacking toneAmber
class node_asset_export,node_sprite_atlas,node_sprite_cutting,node_audio_unpacking toneMint
class node_manifest_records,node_asset_records,node_sprite_records,node_asset_platform,node_gui_metadata toneRose
class node_game_cdn toneIndigo
```

## Components

### User Applications

- [Console CLI](https://github.com/swgoh-utils/swgoh-ae2/blob/main/SwgohAssetGetterConsole/consoleStart.cs): `SwgohAssetGetterConsole/consoleStart.cs`
- [Desktop GUI](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGUI/MainWindow.xaml.cs): `AssetGUI/MainWindow.xaml.cs`
- [API Host](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetWebApi/Program.cs): `AssetWebApi/Program.cs`
- [Asset Endpoints](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetWebApi/Controllers/AssetController.cs): `AssetWebApi/Controllers/AssetController.cs`
- [GUI Runtime](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGUI/MainProgram.cs): `AssetGUI/MainProgram.cs`
- [Console Runtime](https://github.com/swgoh-utils/swgoh-ae2/blob/main/SwgohAssetGetterConsole/MainProgram.cs): `SwgohAssetGetterConsole/MainProgram.cs`
- [API Runtime](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetWebApi/MainProgram.cs): `AssetWebApi/MainProgram.cs`

### Asset Processing

- [Manifest Processing](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/helpers/ManifestHelper.cs): `AssetGetterTools/helpers/ManifestHelper.cs`
- [Bundle Unpacking](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/helpers/Filehelper.cs): `AssetGetterTools/helpers/Filehelper.cs`

### Format Export

- [Asset Export](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/helpers/Exporter.cs): `AssetGetterTools/helpers/Exporter.cs`
- [Atlas Parsing](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/helpers/SpriteAtlasParser.cs): `AssetGetterTools/helpers/SpriteAtlasParser.cs`
- [Sprite Cutting](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/helpers/SpriteCutter.cs): `AssetGetterTools/helpers/SpriteCutter.cs`
- [Audio Extraction](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/pck/BarbPCKExtractor.cs): `AssetGetterTools/pck/BarbPCKExtractor.cs`

### Runtime Data

- [Manifest Records](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/models/RawAssetManifest.cs): `AssetGetterTools/models/RawAssetManifest.cs`
- [Asset Records](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/models/AssetItem.cs): `AssetGetterTools/models/AssetItem.cs`
- [Sprite Records](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/models/SpriteItem.cs): `AssetGetterTools/models/SpriteItem.cs`
- [Platform Selection](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGetterTools/models/AssetOS.cs): `AssetGetterTools/models/AssetOS.cs`
- [Version Metadata](https://github.com/swgoh-utils/swgoh-ae2/blob/main/AssetGUI/Models/MetadataShortModel.cs): `AssetGUI/Models/MetadataShortModel.cs`

### Other components

- **Users**
- **Game Asset CDN**

## Connections

- Users → Console CLI: runs commands (evidence: `README.md`)
- Users → API Host: calls API (evidence: `README.md`)
- API Host → Asset Endpoints: maps routes (evidence: `AssetWebApi/Program.cs`)
- Asset Endpoints → API Runtime: dispatches requests (evidence: `AssetWebApi/Controllers/AssetController.cs`)
- Console CLI → Console Runtime: starts runtime
- Users → Desktop GUI: uses desktop
- Desktop GUI → GUI Runtime: invokes workflows
- API Runtime → Game Asset CDN: downloads bundles
- GUI Runtime → Game Asset CDN: downloads manifests (evidence: `AssetGUI/MainProgram.cs`)
- GUI Runtime → Manifest Processing: reads manifests (evidence: `AssetGUI/MainProgram.cs`)
- GUI Runtime → Bundle Unpacking: unpacks bundles (evidence: `AssetGUI/MainProgram.cs`)
- GUI Runtime → Audio Extraction: extracts audio (evidence: `AssetGUI/MainProgram.cs`)
- Manifest Processing → Manifest Records: deserializes (evidence: `AssetGetterTools/helpers/ManifestHelper.cs`)
- Bundle Unpacking → Asset Records: creates records (evidence: `AssetGetterTools/helpers/Filehelper.cs`)
- Bundle Unpacking → Asset Export: exports assets (evidence: `AssetGetterTools/helpers/Filehelper.cs`)
- Asset Export → Atlas Parsing: parses atlases (evidence: `AssetGetterTools/helpers/Exporter.cs`)
- Asset Export → Sprite Cutting: cuts sprites (evidence: `AssetGetterTools/helpers/Exporter.cs`)
- Atlas Parsing → Sprite Records: creates sprites (evidence: `AssetGetterTools/helpers/SpriteAtlasParser.cs`)
