# vahe-vhuk/vhuk-s-we architecture

> Architecture diagram of the GitHub repository vahe-vhuk/vhuk-s-we, 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/vahe-vhuk/vhuk-s-we
- Repository: https://github.com/vahe-vhuk/vhuk-s-we

## Overview

Vhuk’s WE is a Windows live-wallpaper engine. Users choose wallpapers and assign them to individual monitors or display groups in the control panel; the engine discovers display targets, creates WebEngine wallpaper windows behind desktop icons, and applies runtime settings and interaction. The graph also shows tray and single-instance behavior, wallpaper discovery, persistent settings, and Windows desktop integration. Source excerpts are incomplete, so uncertain subsystem links are omitted rather than inferred.

Main entry points: [`src/WallpaperManager.cpp`](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/WallpaperManager.cpp) (Wallpaper manager), [`src/main.cpp`](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/main.cpp) (App startup), [`src/ControlPanel.cpp`](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/ControlPanel.cpp) (Control panel), [`src/TrayController.cpp`](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/TrayController.cpp) (System tray)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application controls"]
  node_main["App startup<br/>[main.cpp]"]
  node_instance["Single instance<br/>[SingleInstance.cpp]"]
  node_panel["Control panel<br/>[ControlPanel.cpp]"]
  node_tray["System tray<br/>[TrayController.cpp]"]
end

subgraph group_catalog["Wallpaper library"]
  node_library["Wallpaper discovery"]
  node_projects["Wallpaper projects"]
  node_models["Wallpaper and monitor models<br/>[WallpaperInfo.h]"]
end

subgraph group_engine["Wallpaper engine"]
  node_manager["Wallpaper manager"]
  node_window["Wallpaper window"]
  node_desktop["Windows desktop integration<br/>[WindowsDesktop.cpp]"]
end

subgraph group_platform["Settings and platform"]
  node_settings["Settings manager"]
  node_constants["App constants<br/>[AppConstants.h]"]
end

node_user(("User"))
node_windows["Windows desktop"]

node_user -->|"launches"| node_main
node_main -->|"checks instance"| node_instance
node_main -->|"creates"| node_settings
node_main -->|"creates"| node_library
node_main -->|"creates"| node_manager
node_main -->|"creates"| node_panel
node_main -->|"creates"| node_tray
node_main -->|"initializes"| node_manager
node_user -->|"chooses wallpaper"| node_panel
node_panel -->|"assigns wallpaper"| node_manager
node_panel -->|"browses wallpapers"| node_library
node_panel -.->|"edits settings"| node_settings
node_user -->|"uses tray actions"| node_tray
node_tray -->|"opens panel"| node_panel
node_tray -->|"pauses or reloads"| node_manager
node_tray -->|"opens wallpaper folder"| node_settings
node_library -->|"scans projects"| node_projects
node_library -.->|"provides metadata"| node_models
node_manager -->|"resolves wallpapers"| node_library
node_manager -->|"reads and updates"| node_settings
node_manager -->|"creates and configures"| node_window
node_manager -->|"uses display integration"| node_desktop
node_manager -->|"tracks display changes"| node_windows
node_window -->|"renders behind icons"| node_windows
node_settings -->|"sets startup entry"| node_windows
node_user -->|"creates projects"| node_projects

click node_main "https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/main.cpp"
click node_instance "https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/SingleInstance.cpp"
click node_panel "https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/ControlPanel.cpp"
click node_tray "https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/TrayController.cpp"
click node_library "https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/WallpaperLibrary.cpp"
click node_projects "https://github.com/vahe-vhuk/vhuk-s-we/tree/main/wallpapers"
click node_models "https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/WallpaperInfo.h"
click node_settings "https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/SettingsManager.cpp"
click node_constants "https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/AppConstants.h"
click node_manager "https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/WallpaperManager.cpp"
click node_window "https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/WallpaperWindow.cpp"
click node_desktop "https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/WindowsDesktop.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_main,node_instance,node_panel,node_tray,node_user toneBlue
class node_library,node_projects,node_models toneAmber
class node_manager,node_window,node_desktop toneMint
class node_settings,node_constants toneRose
class node_windows toneIndigo
```

## Components

### Application controls

- [App startup](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/main.cpp): `src/main.cpp`
- [Single instance](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/SingleInstance.cpp): `src/SingleInstance.cpp`
- [Control panel](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/ControlPanel.cpp): `src/ControlPanel.cpp`
- [System tray](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/TrayController.cpp): `src/TrayController.cpp`

### Wallpaper library

- [Wallpaper discovery](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/WallpaperLibrary.cpp): `src/WallpaperLibrary.cpp`
- [Wallpaper projects](https://github.com/vahe-vhuk/vhuk-s-we/tree/main/wallpapers): `wallpapers`
- [Wallpaper and monitor models](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/WallpaperInfo.h): `src/WallpaperInfo.h`

### Wallpaper engine

- [Wallpaper manager](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/WallpaperManager.cpp): `src/WallpaperManager.cpp`
- [Wallpaper window](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/WallpaperWindow.cpp): `src/WallpaperWindow.cpp`
- [Windows desktop integration](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/WindowsDesktop.cpp): `src/WindowsDesktop.cpp`

### Settings and platform

- [Settings manager](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/SettingsManager.cpp): `src/SettingsManager.cpp`
- [App constants](https://github.com/vahe-vhuk/vhuk-s-we/blob/main/src/AppConstants.h): `src/AppConstants.h`

### Other components

- **User**
- **Windows desktop**

## Connections

- User → App startup: launches (evidence: `README.md`)
- App startup → Single instance: checks instance (evidence: `src/main.cpp`)
- App startup → Settings manager: creates (evidence: `src/main.cpp`)
- App startup → Wallpaper discovery: creates (evidence: `src/main.cpp`)
- App startup → Wallpaper manager: creates (evidence: `src/main.cpp`)
- App startup → Control panel: creates (evidence: `src/main.cpp`)
- App startup → System tray: creates (evidence: `src/main.cpp`)
- App startup → Wallpaper manager: initializes (evidence: `src/main.cpp`)
- User → Control panel: chooses wallpaper (evidence: `README.md`)
- Control panel → Wallpaper manager: assigns wallpaper (evidence: `src/ControlPanel.cpp`)
- Control panel → Wallpaper discovery: browses wallpapers (evidence: `src/ControlPanel.cpp`)
- Control panel → Settings manager: edits settings
- User → System tray: uses tray actions (evidence: `src/TrayController.cpp`)
- System tray → Control panel: opens panel (evidence: `src/TrayController.cpp`)
- System tray → Wallpaper manager: pauses or reloads (evidence: `src/TrayController.cpp`)
- System tray → Settings manager: opens wallpaper folder (evidence: `src/TrayController.cpp`)
- Wallpaper discovery → Wallpaper projects: scans projects (evidence: `README.md`)
- Wallpaper discovery → Wallpaper and monitor models: provides metadata
- Wallpaper manager → Wallpaper discovery: resolves wallpapers (evidence: `src/WallpaperManager.cpp`)
- Wallpaper manager → Settings manager: reads and updates (evidence: `src/WallpaperManager.cpp`)
- Wallpaper manager → Wallpaper window: creates and configures (evidence: `src/WallpaperManager.cpp`)
- Wallpaper manager → Windows desktop integration: uses display integration (evidence: `src/WallpaperManager.cpp`)
- Wallpaper manager → Windows desktop: tracks display changes (evidence: `README.md`)
- Wallpaper window → Windows desktop: renders behind icons (evidence: `README.md`)
- Settings manager → Windows desktop: sets startup entry (evidence: `README.md`)
- User → Wallpaper projects: creates projects (evidence: `README.md`)
