# blezz0102/deskland architecture

> Architecture diagram of the GitHub repository blezz0102/deskland, 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/blezz0102/deskland
- Repository: https://github.com/blezz0102/deskland

## Overview

Deskland Preview is a Windows adaptive-wallpaper app: the host places a WebView wallpaper behind desktop icons, supplies real icon positions and pause state, while settings customize themes and invoke private sharing. Beach and Meadow are distinct scenery implementations; README documents theme selection, localization, tray/startup controls, persistence, and browser preview. The host excerpt is partial and theme pages/settings source were not sampled, so their internal wiring is shown only where documented; edges without direct evidence are omitted.

Main entry points: [`host/DesktopHost.cs`](https://github.com/blezz0102/deskland/blob/main/host/DesktopHost.cs) (Desktop Host), [`prototype/flat.html`](https://github.com/blezz0102/deskland/blob/main/prototype/flat.html) (Wallpaper Page), [`prototype/settings.html`](https://github.com/blezz0102/deskland/blob/main/prototype/settings.html) (Settings Interface), [`prototype/meadow.html`](https://github.com/blezz0102/deskland/blob/main/prototype/meadow.html) (Meadow Theme)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Windows Host"]
  node_hostapp["Desktop Host<br/>[DesktopHost.cs]"]
  node_iconreader["Icon Reader<br/>[DesktopHost.cs]"]
  node_hostsettings[("Settings State<br/>[DesktopHost.cs]")]
  node_themeaccess["Theme Access<br/>[Themes.cs]"]
end

subgraph group_ui["Themes And Settings"]
  node_wallpaper["Wallpaper Page<br/>[flat.html]"]
  node_settingsui["Settings Interface<br/>[settings.html]"]
  node_themeindex["Theme Catalogue<br/>[themes.json]"]
  node_previewserver["Browser Preview Server<br/>[serve.mjs]"]
end

subgraph group_scenery["Scenery Rendering"]
  node_beach["Beach Theme<br/>[flat.html]"]
  node_palms["Beach Palms<br/>[beach-palms.js]"]
  node_meadow["Meadow Theme<br/>[meadow.html]"]
  node_boy["Kite-Flying Boy<br/>[meadow-boy.js]"]
  node_cat["Meadow Cat<br/>[meadow-cat.js]"]
end

subgraph group_sharing["Private Sharing"]
  node_sharelogic["Share Renderer<br/>[share.js]"]
  node_localfiles[("Exported Media")]
end

node_user(("Desktop User"))
node_browser(("Browser User"))

node_user -->|"launches"| node_hostapp
node_hostapp -->|"hosts in WebView"| node_wallpaper
node_hostapp -->|"polls positions"| node_iconreader
node_iconreader -->|"sends icon state"| node_wallpaper
node_hostapp -->|"opens settings"| node_settingsui
node_settingsui -->|"sends settings"| node_hostapp
node_hostapp -.->|"persists settings"| node_hostsettings
node_hostapp -->|"checks theme"| node_themeaccess
node_themeaccess -->|"reads catalogue"| node_themeindex
node_hostapp -->|"selects theme page"| node_wallpaper
node_settingsui -->|"shows theme choices"| node_themeindex
node_wallpaper -->|"renders beach"| node_beach
node_wallpaper -->|"renders meadow"| node_meadow
node_beach -.->|"draws palms"| node_palms
node_meadow -.->|"draws character"| node_boy
node_meadow -.->|"draws cat"| node_cat
node_settingsui -.->|"starts sharing"| node_sharelogic
node_sharelogic -->|"exports media"| node_localfiles
node_hostapp -->|"saves video"| node_localfiles
node_browser -->|"requests preview"| node_previewserver

click node_hostapp "https://github.com/blezz0102/deskland/blob/main/host/DesktopHost.cs"
click node_iconreader "https://github.com/blezz0102/deskland/blob/main/host/DesktopHost.cs"
click node_hostsettings "https://github.com/blezz0102/deskland/blob/main/host/DesktopHost.cs"
click node_themeaccess "https://github.com/blezz0102/deskland/blob/main/host/Themes.cs"
click node_wallpaper "https://github.com/blezz0102/deskland/blob/main/prototype/flat.html"
click node_settingsui "https://github.com/blezz0102/deskland/blob/main/prototype/settings.html"
click node_themeindex "https://github.com/blezz0102/deskland/blob/main/prototype/themes.json"
click node_beach "https://github.com/blezz0102/deskland/blob/main/prototype/flat.html"
click node_palms "https://github.com/blezz0102/deskland/blob/main/prototype/beach-palms.js"
click node_meadow "https://github.com/blezz0102/deskland/blob/main/prototype/meadow.html"
click node_boy "https://github.com/blezz0102/deskland/blob/main/prototype/meadow-boy.js"
click node_cat "https://github.com/blezz0102/deskland/blob/main/prototype/meadow-cat.js"
click node_sharelogic "https://github.com/blezz0102/deskland/blob/main/prototype/share.js"
click node_previewserver "https://github.com/blezz0102/deskland/blob/main/prototype/serve.mjs"

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_hostapp,node_iconreader,node_hostsettings,node_themeaccess,node_user,node_browser toneBlue
class node_wallpaper,node_settingsui,node_themeindex,node_previewserver toneAmber
class node_beach,node_palms,node_meadow,node_boy,node_cat toneMint
class node_sharelogic,node_localfiles toneRose
```

## Components

### Windows Host

- [Desktop Host](https://github.com/blezz0102/deskland/blob/main/host/DesktopHost.cs): `host/DesktopHost.cs`
- [Icon Reader](https://github.com/blezz0102/deskland/blob/main/host/DesktopHost.cs): `host/DesktopHost.cs`
- [Settings State](https://github.com/blezz0102/deskland/blob/main/host/DesktopHost.cs): `host/DesktopHost.cs`
- [Theme Access](https://github.com/blezz0102/deskland/blob/main/host/Themes.cs): `host/Themes.cs`

### Themes And Settings

- [Wallpaper Page](https://github.com/blezz0102/deskland/blob/main/prototype/flat.html): `prototype/flat.html`
- [Settings Interface](https://github.com/blezz0102/deskland/blob/main/prototype/settings.html): `prototype/settings.html`
- [Theme Catalogue](https://github.com/blezz0102/deskland/blob/main/prototype/themes.json): `prototype/themes.json`
- [Browser Preview Server](https://github.com/blezz0102/deskland/blob/main/prototype/serve.mjs): `prototype/serve.mjs`

### Scenery Rendering

- [Beach Theme](https://github.com/blezz0102/deskland/blob/main/prototype/flat.html): `prototype/flat.html`
- [Beach Palms](https://github.com/blezz0102/deskland/blob/main/prototype/beach-palms.js): `prototype/beach-palms.js`
- [Meadow Theme](https://github.com/blezz0102/deskland/blob/main/prototype/meadow.html): `prototype/meadow.html`
- [Kite-Flying Boy](https://github.com/blezz0102/deskland/blob/main/prototype/meadow-boy.js): `prototype/meadow-boy.js`
- [Meadow Cat](https://github.com/blezz0102/deskland/blob/main/prototype/meadow-cat.js): `prototype/meadow-cat.js`

### Private Sharing

- [Share Renderer](https://github.com/blezz0102/deskland/blob/main/prototype/share.js): `prototype/share.js`
- **Exported Media**

### Other components

- **Desktop User**
- **Browser User**

## Connections

- Desktop User → Desktop Host: launches (evidence: `README.md`)
- Desktop Host → Wallpaper Page: hosts in WebView (evidence: `host/DesktopHost.cs`)
- Desktop Host → Icon Reader: polls positions (evidence: `host/DesktopHost.cs`)
- Icon Reader → Wallpaper Page: sends icon state (evidence: `host/DesktopHost.cs`)
- Desktop Host → Settings Interface: opens settings (evidence: `host/DesktopHost.cs`)
- Settings Interface → Desktop Host: sends settings (evidence: `host/DesktopHost.cs`)
- Desktop Host → Settings State: persists settings (evidence: `host/DesktopHost.cs`)
- Desktop Host → Theme Access: checks theme (evidence: `host/DesktopHost.cs`)
- Theme Access → Theme Catalogue: reads catalogue (evidence: `host/Themes.cs`)
- Desktop Host → Wallpaper Page: selects theme page (evidence: `host/DesktopHost.cs`)
- Settings Interface → Theme Catalogue: shows theme choices (evidence: `README.md`)
- Wallpaper Page → Beach Theme: renders beach (evidence: `README.md`)
- Wallpaper Page → Meadow Theme: renders meadow (evidence: `README.md`)
- Beach Theme → Beach Palms: draws palms
- Meadow Theme → Kite-Flying Boy: draws character
- Meadow Theme → Meadow Cat: draws cat
- Settings Interface → Share Renderer: starts sharing
- Share Renderer → Exported Media: exports media (evidence: `prototype/share.js`)
- Desktop Host → Exported Media: saves video (evidence: `host/DesktopHost.cs`)
- Browser User → Browser Preview Server: requests preview (evidence: `prototype/serve.mjs`)
