# amnweb/yasb-gui architecture

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

- Interactive diagram: https://gitdiagram.com/amnweb/yasb-gui
- Repository: https://github.com/amnweb/yasb-gui

## Overview

YASB GUI is a Windows desktop configuration editor for YASB Reborn. Users navigate to bar, widget, global, style, environment, or app settings, edit values visually or in Monaco, then validate and save the YAML/CSS configuration; widget changes can be applied to reload YASB. README also documents ZIP backup, schema updates, preferences, and app updates. The tree and excerpts support the entry point, configuration manager, page responsibilities, and Monaco assets; wiring among unsampled pages and services is not inferred.

Main entry points: [`app/core/application.py`](https://github.com/amnweb/yasb-gui/blob/main/app/core/application.py) (Window and navigation), [`app/core/config_manager.py`](https://github.com/amnweb/yasb-gui/blob/main/app/core/config_manager.py) (Config manager), [`app/ui/controls.py`](https://github.com/amnweb/yasb-gui/blob/main/app/ui/controls.py) (UI control factory), [`app/pages/app_settings.py`](https://github.com/amnweb/yasb-gui/blob/main/app/pages/app_settings.py) (Application settings page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_entry["App entry<br/>[main.py]"]
  node_shell["Window and navigation<br/>[application.py]"]
end

subgraph group_editing["Configuration editing"]
  node_bars["Bars page<br/>[bars.py]"]
  node_widgets["Widgets page<br/>[widgets.py]"]
  node_global["Global settings page<br/>[global_settings.py]"]
  node_styles["Styles page<br/>[styles.py]"]
  node_env["Environment variables page<br/>[env_variables.py]"]
  node_appsettings["Application settings page<br/>[app_settings.py]"]
end

subgraph group_services["Configuration services"]
  node_config["Config manager<br/>[config_manager.py]"]
  node_configfiles["YASB config files"]
  node_preferences[("Preferences<br/>[preferences.py]")]
  node_schema["Widget schema<br/>[schema_fetcher.py]"]
  node_updater["Update service<br/>[updater.py]"]
end

subgraph group_experience["Editor experience"]
  node_codeeditor["Code editor integration<br/>[code_editor.py]"]
  node_monaco["Monaco editor assets<br/>[editor.main.js]"]
  node_contextmenu["Editor context menu"]
  node_controls["UI control factory<br/>[controls.py]"]
  node_localization["Localization<br/>[localization.py]"]
end

node_user(("User"))
node_yasb(("YASB status bar"))

node_user -->|"launches"| node_entry
node_entry -->|"starts"| node_shell
node_user -->|"navigates"| node_shell
node_shell -->|"routes"| node_bars
node_shell -->|"routes"| node_widgets
node_shell -->|"routes"| node_global
node_shell -->|"routes"| node_styles
node_shell -->|"routes"| node_env
node_shell -->|"routes"| node_appsettings
node_bars -->|"edits bars"| node_config
node_widgets -->|"edits widgets"| node_config
node_global -->|"edits settings"| node_config
node_styles -->|"edits styles"| node_config
node_env -->|"edits variables"| node_config
node_config -->|"reads and writes"| node_configfiles
node_shell -->|"saves changes"| node_config
node_shell -->|"applies config"| node_yasb
node_appsettings -->|"updates preferences"| node_preferences
node_shell -->|"reads preferences"| node_preferences
node_appsettings -.->|"requests schema update"| node_schema
node_appsettings -.->|"checks app updates"| node_updater
node_widgets -->|"opens options editor"| node_codeeditor
node_styles -->|"opens CSS editor"| node_codeeditor
node_shell -->|"hosts editor"| node_codeeditor
node_codeeditor -->|"loads editor"| node_monaco
node_contextmenu -->|"executes editor actions"| node_monaco
node_codeeditor -->|"attaches menu"| node_contextmenu
node_bars -->|"creates controls"| node_controls
node_widgets -->|"creates controls"| node_controls
node_global -->|"creates controls"| node_controls
node_styles -->|"creates controls"| node_controls
node_env -->|"creates controls"| node_controls
node_appsettings -->|"creates controls"| node_controls
node_shell -->|"translates labels"| node_localization

click node_entry "https://github.com/amnweb/yasb-gui/blob/main/app/main.py"
click node_shell "https://github.com/amnweb/yasb-gui/blob/main/app/core/application.py"
click node_bars "https://github.com/amnweb/yasb-gui/blob/main/app/pages/bars.py"
click node_widgets "https://github.com/amnweb/yasb-gui/blob/main/app/pages/widgets.py"
click node_global "https://github.com/amnweb/yasb-gui/blob/main/app/pages/global_settings.py"
click node_styles "https://github.com/amnweb/yasb-gui/blob/main/app/pages/styles.py"
click node_env "https://github.com/amnweb/yasb-gui/blob/main/app/pages/env_variables.py"
click node_appsettings "https://github.com/amnweb/yasb-gui/blob/main/app/pages/app_settings.py"
click node_config "https://github.com/amnweb/yasb-gui/blob/main/app/core/config_manager.py"
click node_preferences "https://github.com/amnweb/yasb-gui/blob/main/app/core/preferences.py"
click node_schema "https://github.com/amnweb/yasb-gui/blob/main/app/core/schema_fetcher.py"
click node_updater "https://github.com/amnweb/yasb-gui/blob/main/app/core/updater.py"
click node_codeeditor "https://github.com/amnweb/yasb-gui/blob/main/app/core/code_editor.py"
click node_monaco "https://github.com/amnweb/yasb-gui/blob/main/app/core/editor/monaco/vs/editor/editor.main.js"
click node_contextmenu "https://github.com/amnweb/yasb-gui/blob/main/app/core/editor/editor_context_menu.py"
click node_controls "https://github.com/amnweb/yasb-gui/blob/main/app/ui/controls.py"
click node_localization "https://github.com/amnweb/yasb-gui/blob/main/app/core/localization.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_entry,node_shell,node_user toneBlue
class node_bars,node_widgets,node_global,node_styles,node_env,node_appsettings toneAmber
class node_config,node_configfiles,node_preferences,node_schema,node_updater toneMint
class node_codeeditor,node_monaco,node_contextmenu,node_controls,node_localization toneRose
class node_yasb toneIndigo
```

## Components

### Application shell

- [App entry](https://github.com/amnweb/yasb-gui/blob/main/app/main.py): `app/main.py`
- [Window and navigation](https://github.com/amnweb/yasb-gui/blob/main/app/core/application.py): `app/core/application.py`

### Configuration editing

- [Bars page](https://github.com/amnweb/yasb-gui/blob/main/app/pages/bars.py): `app/pages/bars.py`
- [Widgets page](https://github.com/amnweb/yasb-gui/blob/main/app/pages/widgets.py): `app/pages/widgets.py`
- [Global settings page](https://github.com/amnweb/yasb-gui/blob/main/app/pages/global_settings.py): `app/pages/global_settings.py`
- [Styles page](https://github.com/amnweb/yasb-gui/blob/main/app/pages/styles.py): `app/pages/styles.py`
- [Environment variables page](https://github.com/amnweb/yasb-gui/blob/main/app/pages/env_variables.py): `app/pages/env_variables.py`
- [Application settings page](https://github.com/amnweb/yasb-gui/blob/main/app/pages/app_settings.py): `app/pages/app_settings.py`

### Configuration services

- [Config manager](https://github.com/amnweb/yasb-gui/blob/main/app/core/config_manager.py): `app/core/config_manager.py`
- **YASB config files**
- [Preferences](https://github.com/amnweb/yasb-gui/blob/main/app/core/preferences.py): `app/core/preferences.py`
- [Widget schema](https://github.com/amnweb/yasb-gui/blob/main/app/core/schema_fetcher.py): `app/core/schema_fetcher.py`
- [Update service](https://github.com/amnweb/yasb-gui/blob/main/app/core/updater.py): `app/core/updater.py`

### Editor experience

- [Code editor integration](https://github.com/amnweb/yasb-gui/blob/main/app/core/code_editor.py): `app/core/code_editor.py`
- [Monaco editor assets](https://github.com/amnweb/yasb-gui/blob/main/app/core/editor/monaco/vs/editor/editor.main.js): `app/core/editor/monaco/vs/editor/editor.main.js`
- [Editor context menu](https://github.com/amnweb/yasb-gui/blob/main/app/core/editor/editor_context_menu.py): `app/core/editor/editor_context_menu.py`
- [UI control factory](https://github.com/amnweb/yasb-gui/blob/main/app/ui/controls.py): `app/ui/controls.py`
- [Localization](https://github.com/amnweb/yasb-gui/blob/main/app/core/localization.py): `app/core/localization.py`

### Other components

- **User**
- **YASB status bar**

## Connections

- User → App entry: launches
- App entry → Window and navigation: starts
- User → Window and navigation: navigates
- Window and navigation → Bars page: routes
- Window and navigation → Widgets page: routes
- Window and navigation → Global settings page: routes
- Window and navigation → Styles page: routes
- Window and navigation → Environment variables page: routes
- Window and navigation → Application settings page: routes
- Bars page → Config manager: edits bars
- Widgets page → Config manager: edits widgets
- Global settings page → Config manager: edits settings
- Styles page → Config manager: edits styles
- Environment variables page → Config manager: edits variables
- Config manager → YASB config files: reads and writes
- Window and navigation → Config manager: saves changes
- Window and navigation → YASB status bar: applies config
- Application settings page → Preferences: updates preferences
- Window and navigation → Preferences: reads preferences
- Application settings page → Widget schema: requests schema update
- Application settings page → Update service: checks app updates
- Widgets page → Code editor integration: opens options editor
- Styles page → Code editor integration: opens CSS editor
- Window and navigation → Code editor integration: hosts editor
- Code editor integration → Monaco editor assets: loads editor
- Editor context menu → Monaco editor assets: executes editor actions
- Code editor integration → Editor context menu: attaches menu
- Bars page → UI control factory: creates controls
- Widgets page → UI control factory: creates controls
- Global settings page → UI control factory: creates controls
- Styles page → UI control factory: creates controls
- Environment variables page → UI control factory: creates controls
- Application settings page → UI control factory: creates controls
- Window and navigation → Localization: translates labels
