# lively-community/lively architecture

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

- Interactive diagram: https://gitdiagram.com/lively-community/lively
- Repository: https://github.com/lively-community/lively

## Overview

Lively Wallpaper is a Windows desktop wallpaper manager. A user chooses or imports wallpaper content in the UI; the core manages display placement and playback, while settings and automation support configuration and control. The repository also documents screensavers, a wallpaper gallery, interactive wallpaper APIs, and machine-learning-based wallpapers. Edges below are limited to relationships visible in excerpts, the source index, or the README; several documented capabilities lack sampled implementation wiring.

Main entry points: [`src/Lively/Lively/Commandline/CommandHandler.cs`](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Commandline/CommandHandler.cs) (Command handler), [`src/Lively/Lively/Services/ScreensaverService.cs`](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Services/ScreensaverService.cs) (Screensaver service), [`src/Lively/Lively.UI.WinUI/App.xaml.cs`](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.UI.WinUI/App.xaml.cs) (WinUI application), [`src/Lively/Lively/Core/Display/DisplayManager.cs`](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Core/Display/DisplayManager.cs) (Display manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_uiapp["WinUI application<br/>[App.xaml.cs]"]
  node_library["Wallpaper library"]
  node_customize["Wallpaper customization"]
  node_addwallpaper["Add wallpaper"]
end

subgraph group_core["Wallpaper runtime"]
  node_coreapp["Core application<br/>[App.xaml.cs]"]
  node_desktopcore["Desktop core<br/>[WinDesktopCore.cs]"]
  node_playback["Wallpaper playback"]
  node_suspend["Playback policies<br/>[Playback.cs]"]
  node_player["Wallpaper players<br/>[Program.cs]"]
end

subgraph group_control["Control and settings"]
  node_commands["Command handler<br/>[CommandHandler.cs]"]
  node_cli["Command-line client<br/>[Program.cs]"]
  node_grpc["Named-pipe RPC"]
  node_settings["User settings"]
end

subgraph group_content["Content and extensions"]
  node_gallery["Wallpaper gallery<br/>[GalleryClient.cs]"]
  node_depth["Depth estimation<br/>[MiDaS.cs]"]
  node_wallpaperapi["Wallpaper API<br/>[IpcMessage.cs]"]
end

subgraph group_platform["Platform capabilities"]
  node_display["Display manager<br/>[DisplayManager.cs]"]
  node_screensaver["Screensaver service"]
end

node_user(("Desktop user"))

node_user -->|"opens"| node_uiapp
node_uiapp -->|"initializes"| node_library
node_uiapp -->|"resolves"| node_customize
node_uiapp -->|"connects clients"| node_grpc
node_user -->|"controls"| node_cli
node_cli -->|"sends commands"| node_commands
node_commands -->|"controls"| node_desktopcore
node_commands -->|"queries"| node_display
node_commands -->|"controls"| node_screensaver
node_coreapp -->|"handles arguments"| node_commands
node_coreapp -->|"starts service"| node_screensaver
node_grpc -->|"dispatches requests"| node_display
node_screensaver -->|"reads monitors"| node_display
node_screensaver -->|"reads settings"| node_settings
node_screensaver -->|"loads wallpaper"| node_library
node_display -->|"supports multiple monitors"| node_user
node_playback -.->|"uses player processes"| node_player
node_user -.->|"browses content"| node_gallery
node_user -.->|"creates depth wallpaper"| node_depth
node_user -.->|"uses interactive API"| node_wallpaperapi
node_playback -.->|"pauses by policy"| node_suspend
node_addwallpaper -.->|"adds content"| node_library

click node_uiapp "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.UI.WinUI/App.xaml.cs"
click node_library "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.UI.Shared/ViewModels/LibraryViewModel.cs"
click node_customize "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.UI.Shared/ViewModels/CustomiseWallpaperViewModel.cs"
click node_addwallpaper "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.UI.Shared/ViewModels/AddWallpaperViewModel.cs"
click node_coreapp "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/App.xaml.cs"
click node_desktopcore "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Core/WinDesktopCore.cs"
click node_playback "https://github.com/lively-community/lively/tree/core-separation/src/Lively/Lively/Core/Wallpapers"
click node_suspend "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Core/Suspend/Playback.cs"
click node_display "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Core/Display/DisplayManager.cs"
click node_screensaver "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Services/ScreensaverService.cs"
click node_commands "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Commandline/CommandHandler.cs"
click node_cli "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.Utility.Commandline/Program.cs"
click node_grpc "https://github.com/lively-community/lively/tree/core-separation/src/Lively/Lively/RPC"
click node_settings "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Services/UserSettingsService.cs"
click node_gallery "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.Gallery.Client/GalleryClient.cs"
click node_depth "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.ML/DepthEstimate/MiDaS.cs"
click node_wallpaperapi "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.Models/Message/IpcMessage.cs"
click node_player "https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.Player.WebView2/Program.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_uiapp,node_library,node_customize,node_addwallpaper,node_user toneBlue
class node_coreapp,node_desktopcore,node_playback,node_suspend,node_player toneAmber
class node_commands,node_cli,node_grpc,node_settings toneMint
class node_gallery,node_depth,node_wallpaperapi toneRose
class node_display,node_screensaver toneIndigo
```

## Components

### User interface

- [WinUI application](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.UI.WinUI/App.xaml.cs): `src/Lively/Lively.UI.WinUI/App.xaml.cs`
- [Wallpaper library](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.UI.Shared/ViewModels/LibraryViewModel.cs): `src/Lively/Lively.UI.Shared/ViewModels/LibraryViewModel.cs`
- [Wallpaper customization](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.UI.Shared/ViewModels/CustomiseWallpaperViewModel.cs): `src/Lively/Lively.UI.Shared/ViewModels/CustomiseWallpaperViewModel.cs`
- [Add wallpaper](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.UI.Shared/ViewModels/AddWallpaperViewModel.cs): `src/Lively/Lively.UI.Shared/ViewModels/AddWallpaperViewModel.cs`

### Wallpaper runtime

- [Core application](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/App.xaml.cs): `src/Lively/Lively/App.xaml.cs`
- [Desktop core](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Core/WinDesktopCore.cs): `src/Lively/Lively/Core/WinDesktopCore.cs`
- [Wallpaper playback](https://github.com/lively-community/lively/tree/core-separation/src/Lively/Lively/Core/Wallpapers): `src/Lively/Lively/Core/Wallpapers`
- [Playback policies](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Core/Suspend/Playback.cs): `src/Lively/Lively/Core/Suspend/Playback.cs`
- [Wallpaper players](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.Player.WebView2/Program.cs): `src/Lively/Lively.Player.WebView2/Program.cs`

### Control and settings

- [Command handler](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Commandline/CommandHandler.cs): `src/Lively/Lively/Commandline/CommandHandler.cs`
- [Command-line client](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.Utility.Commandline/Program.cs): `src/Lively/Lively.Utility.Commandline/Program.cs`
- [Named-pipe RPC](https://github.com/lively-community/lively/tree/core-separation/src/Lively/Lively/RPC): `src/Lively/Lively/RPC`
- [User settings](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Services/UserSettingsService.cs): `src/Lively/Lively/Services/UserSettingsService.cs`

### Content and extensions

- [Wallpaper gallery](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.Gallery.Client/GalleryClient.cs): `src/Lively/Lively.Gallery.Client/GalleryClient.cs`
- [Depth estimation](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.ML/DepthEstimate/MiDaS.cs): `src/Lively/Lively.ML/DepthEstimate/MiDaS.cs`
- [Wallpaper API](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively.Models/Message/IpcMessage.cs): `src/Lively/Lively.Models/Message/IpcMessage.cs`

### Platform capabilities

- [Display manager](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Core/Display/DisplayManager.cs): `src/Lively/Lively/Core/Display/DisplayManager.cs`
- [Screensaver service](https://github.com/lively-community/lively/blob/core-separation/src/Lively/Lively/Services/ScreensaverService.cs): `src/Lively/Lively/Services/ScreensaverService.cs`

### Other components

- **Desktop user**

## Connections

- Desktop user → WinUI application: opens (evidence: `README.md`)
- WinUI application → Wallpaper library: initializes (evidence: `src/Lively/Lively.UI.WinUI/App.xaml.cs`)
- WinUI application → Wallpaper customization: resolves (evidence: `src/Lively/Lively.UI.WinUI/App.xaml.cs`)
- WinUI application → Named-pipe RPC: connects clients (evidence: `src/Lively/Lively.UI.WinUI/App.xaml.cs`)
- Desktop user → Command-line client: controls (evidence: `README.md`)
- Command-line client → Command handler: sends commands (evidence: `src/Lively/Lively.Utility.Commandline/Program.cs`)
- Command handler → Desktop core: controls (evidence: `src/Lively/Lively/Commandline/CommandHandler.cs`)
- Command handler → Display manager: queries (evidence: `src/Lively/Lively/Commandline/CommandHandler.cs`)
- Command handler → Screensaver service: controls (evidence: `src/Lively/Lively/Commandline/CommandHandler.cs`)
- Core application → Command handler: handles arguments (evidence: `src/Lively/Lively/App.xaml.cs`)
- Core application → Screensaver service: starts service (evidence: `src/Lively/Lively/App.xaml.cs`)
- Named-pipe RPC → Display manager: dispatches requests (evidence: `src/Lively/Lively/RPC/DisplayManagerServer.cs`)
- Screensaver service → Display manager: reads monitors (evidence: `src/Lively/Lively/Services/ScreensaverService.cs`)
- Screensaver service → User settings: reads settings (evidence: `src/Lively/Lively/Services/ScreensaverService.cs`)
- Screensaver service → Wallpaper library: loads wallpaper (evidence: `src/Lively/Lively/Services/ScreensaverService.cs`)
- Display manager → Desktop user: supports multiple monitors (evidence: `README.md`)
- Wallpaper playback → Wallpaper players: uses player processes (evidence: `README.md`)
- Desktop user → Wallpaper gallery: browses content (evidence: `README.md`)
- Desktop user → Depth estimation: creates depth wallpaper (evidence: `README.md`)
- Desktop user → Wallpaper API: uses interactive API (evidence: `README.md`)
- Wallpaper playback → Playback policies: pauses by policy (evidence: `README.md`)
- Add wallpaper → Wallpaper library: adds content
