# winhub-emu/winhub architecture

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

- Interactive diagram: https://gitdiagram.com/winhub-emu/winhub
- Repository: https://github.com/winhub-emu/winhub

## Overview

WinHub is an Android launcher and compatibility environment for Windows games and apps. Users add games from storage or connect store accounts, install titles, configure containers and controls, then launch into a protected game session rendered through native graphics components. The README also documents retro-emulator launching, social/community features, save management, mods, and frame generation. Arrows reflect README-documented flows and the sampled Steam, download, session, and frame-generation code; several major UI and compatibility subsystems were not sampled, so their internal wiring is not asserted.

Main entry points: [`app/src/main/java/com/winhub/hernandez/store/DownloadManagerActivity.kt`](https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/store/DownloadManagerActivity.kt) (Store Downloads), [`app/src/main/java/com/winhub/hernandez`](https://github.com/winhub-emu/winhub/tree/master/app/src/main/java/com/winhub/hernandez) (PC Library), [`app/src/main/java/com/winhub/hernandez/container/ContainerManager.java`](https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/container/ContainerManager.java) (Container Config), [`app/src/main/java/com/winhub/hernandez/core/GameSessionForegroundService.java`](https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/core/GameSessionForegroundService.java) (Game Session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_library["Home and Library"]
  node_home["Console Home"]
  node_pc_library["PC Library"]
  node_retro["Retro Library"]
  node_unpack["Archive Installer<br/>[UnpackService.kt]"]
end

subgraph group_stores["Stores and Saves"]
  node_store_ui["Store Downloads"]
  node_steam["Steam Client<br/>[BlSteamEngine.kt]"]
  node_steam_repo["Steam Repository"]
  node_save_manager["Save Manager"]
  node_external_stores(("Store Services"))
end

subgraph group_runtime["Game Runtime"]
  node_container["Container Config"]
  node_game_session["Game Session"]
  node_compat["Wine and Emulation"]
  node_mods["Game Mods"]
end

subgraph group_native["Native Graphics"]
  node_framegen_bridge["Wayland Frame Gen"]
  node_lsfg["LSFG Engine<br/>[lsfg_engine.cpp]"]
  node_renderer["Graphics Runtime"]
end

subgraph group_community["Community and Controls"]
  node_controls["Controller Bindings"]
  node_social["Social Hub"]
end

node_user(("Player"))
node_emulator(("External Emulator"))

node_user -->|"navigates"| node_home
node_home -->|"opens"| node_pc_library
node_user -->|"adds games"| node_pc_library
node_user -->|"opens"| node_retro
node_retro -->|"launches through"| node_emulator
node_user -->|"downloads titles"| node_store_ui
node_store_ui -->|"loads Steam data"| node_steam_repo
node_steam_repo -->|"uses engine"| node_steam
node_steam -.->|"connects to Steam"| node_external_stores
node_external_stores -->|"provides catalog"| node_store_ui
node_store_ui -->|"installs titles"| node_pc_library
node_pc_library -->|"configures launch"| node_container
node_container -.->|"starts game"| node_game_session
node_game_session -->|"runs Windows app"| node_compat
node_user -.->|"installs archives"| node_unpack
node_user -->|"manages saves"| node_save_manager
node_save_manager -->|"initializes repository"| node_steam_repo
node_user -->|"edits bindings"| node_controls
node_user -->|"uses community hub"| node_social
node_container -.->|"configures per game"| node_mods
node_renderer -->|"provides Vulkan dispatch"| node_framegen_bridge
node_framegen_bridge -->|"drives engine"| node_lsfg
node_game_session -.->|"renders session"| node_renderer

click node_home "https://github.com/winhub-emu/winhub/tree/master/app/src/main/java/com/winhub/hernandez"
click node_pc_library "https://github.com/winhub-emu/winhub/tree/master/app/src/main/java/com/winhub/hernandez"
click node_retro "https://github.com/winhub-emu/winhub/tree/master/app/src/main/java/com/winhub/hernandez"
click node_container "https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/container/ContainerManager.java"
click node_game_session "https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/core/GameSessionForegroundService.java"
click node_compat "https://github.com/winhub-emu/winhub/tree/master/app/src/main/cpp"
click node_unpack "https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/core/unpack/UnpackService.kt"
click node_store_ui "https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/store/DownloadManagerActivity.kt"
click node_steam "https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/store/blsteam/BlSteamEngine.kt"
click node_steam_repo "https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/store/SteamRepository.java"
click node_save_manager "https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/store/SteamSaveManagerActivity.kt"
click node_controls "https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/ExternalControllerBindingsActivity.kt"
click node_social "https://github.com/winhub-emu/winhub/tree/master/app/src/main/java/com/winhub/hernandez"
click node_mods "https://github.com/winhub-emu/winhub/tree/master/app/src/main/java/com/winhub/hernandez"
click node_framegen_bridge "https://github.com/winhub-emu/winhub/blob/master/app/src/main/cpp/waylandcomp/src/framegen_engine.cpp"
click node_lsfg "https://github.com/winhub-emu/winhub/blob/master/app/src/main/cpp/winlator/lsfg/lsfg_engine.cpp"
click node_renderer "https://github.com/winhub-emu/winhub/tree/master/app/src/main/cpp"

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_home,node_pc_library,node_retro,node_unpack toneBlue
class node_store_ui,node_steam,node_steam_repo,node_save_manager,node_external_stores toneAmber
class node_container,node_game_session,node_compat,node_mods toneMint
class node_framegen_bridge,node_lsfg,node_renderer toneRose
class node_controls,node_social,node_user,node_emulator toneIndigo
```

## Components

### Home and Library

- [Console Home](https://github.com/winhub-emu/winhub/tree/master/app/src/main/java/com/winhub/hernandez): `app/src/main/java/com/winhub/hernandez`
- [PC Library](https://github.com/winhub-emu/winhub/tree/master/app/src/main/java/com/winhub/hernandez): `app/src/main/java/com/winhub/hernandez`
- [Retro Library](https://github.com/winhub-emu/winhub/tree/master/app/src/main/java/com/winhub/hernandez): `app/src/main/java/com/winhub/hernandez`
- [Archive Installer](https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/core/unpack/UnpackService.kt): `app/src/main/java/com/winhub/hernandez/core/unpack/UnpackService.kt`

### Stores and Saves

- [Store Downloads](https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/store/DownloadManagerActivity.kt): `app/src/main/java/com/winhub/hernandez/store/DownloadManagerActivity.kt`
- [Steam Client](https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/store/blsteam/BlSteamEngine.kt): `app/src/main/java/com/winhub/hernandez/store/blsteam/BlSteamEngine.kt`
- [Steam Repository](https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/store/SteamRepository.java): `app/src/main/java/com/winhub/hernandez/store/SteamRepository.java`
- [Save Manager](https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/store/SteamSaveManagerActivity.kt): `app/src/main/java/com/winhub/hernandez/store/SteamSaveManagerActivity.kt`
- **Store Services**

### Game Runtime

- [Container Config](https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/container/ContainerManager.java): `app/src/main/java/com/winhub/hernandez/container/ContainerManager.java`
- [Game Session](https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/core/GameSessionForegroundService.java): `app/src/main/java/com/winhub/hernandez/core/GameSessionForegroundService.java`
- [Wine and Emulation](https://github.com/winhub-emu/winhub/tree/master/app/src/main/cpp): `app/src/main/cpp`
- [Game Mods](https://github.com/winhub-emu/winhub/tree/master/app/src/main/java/com/winhub/hernandez): `app/src/main/java/com/winhub/hernandez`

### Native Graphics

- [Wayland Frame Gen](https://github.com/winhub-emu/winhub/blob/master/app/src/main/cpp/waylandcomp/src/framegen_engine.cpp): `app/src/main/cpp/waylandcomp/src/framegen_engine.cpp`
- [LSFG Engine](https://github.com/winhub-emu/winhub/blob/master/app/src/main/cpp/winlator/lsfg/lsfg_engine.cpp): `app/src/main/cpp/winlator/lsfg/lsfg_engine.cpp`
- [Graphics Runtime](https://github.com/winhub-emu/winhub/tree/master/app/src/main/cpp): `app/src/main/cpp`

### Community and Controls

- [Controller Bindings](https://github.com/winhub-emu/winhub/blob/master/app/src/main/java/com/winhub/hernandez/ExternalControllerBindingsActivity.kt): `app/src/main/java/com/winhub/hernandez/ExternalControllerBindingsActivity.kt`
- [Social Hub](https://github.com/winhub-emu/winhub/tree/master/app/src/main/java/com/winhub/hernandez): `app/src/main/java/com/winhub/hernandez`

### Other components

- **Player**
- **External Emulator**

## Connections

- Player → Console Home: navigates
- Console Home → PC Library: opens
- Player → PC Library: adds games
- Player → Retro Library: opens
- Retro Library → External Emulator: launches through
- Player → Store Downloads: downloads titles
- Store Downloads → Steam Repository: loads Steam data (evidence: `app/src/main/java/com/winhub/hernandez/store/DownloadManagerActivity.kt`)
- Steam Repository → Steam Client: uses engine (evidence: `app/src/main/java/com/winhub/hernandez/store/SteamRepository.java`)
- Steam Client → Store Services: connects to Steam
- Store Services → Store Downloads: provides catalog
- Store Downloads → PC Library: installs titles (evidence: `app/src/main/java/com/winhub/hernandez/store/DownloadManagerActivity.kt`)
- PC Library → Container Config: configures launch (evidence: `app/src/main/java/com/winhub/hernandez/store/SteamSaveManagerActivity.kt`)
- Container Config → Game Session: starts game
- Game Session → Wine and Emulation: runs Windows app
- Player → Archive Installer: installs archives
- Player → Save Manager: manages saves
- Save Manager → Steam Repository: initializes repository (evidence: `app/src/main/java/com/winhub/hernandez/store/SteamSaveManagerActivity.kt`)
- Player → Controller Bindings: edits bindings (evidence: `app/src/main/java/com/winhub/hernandez/ExternalControllerBindingsActivity.kt`)
- Player → Social Hub: uses community hub
- Container Config → Game Mods: configures per game (evidence: `app/src/main/java/com/winhub/hernandez/store/SteamSaveManagerActivity.kt`)
- Graphics Runtime → Wayland Frame Gen: provides Vulkan dispatch (evidence: `app/src/main/cpp/waylandcomp/src/framegen_engine.cpp`)
- Wayland Frame Gen → LSFG Engine: drives engine (evidence: `app/src/main/cpp/waylandcomp/src/framegen_engine.cpp`)
- Game Session → Graphics Runtime: renders session
