# paperhammer/virtualpaper architecture

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

- Interactive diagram: https://gitdiagram.com/paperhammer/virtualpaper
- Repository: https://github.com/paperhammer/virtualpaper

## Overview

VirtualPaper is a Windows wallpaper manager and creator. Its user-facing workflow is to browse or import wallpaper assets, preview and customize them, then apply them to the desktop; the README documents still, animated, video, and interactive formats, real-time effects, and parallax. The product also includes an independent screen saver, lock-screen background setting, and AI style-transfer and upscaling features. The source index and tree support the named implementation areas, but many feature-specific call paths were not excerpted, so uncertain connections are omitted or dashed.

Main entry points: [`src/VirtualPaper.UI/App.xaml.cs`](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.UI/App.xaml.cs) (Desktop UI), [`src/VirtualPaper.WpSettingsPanel/ViewModels/LibraryContentsViewModel.cs`](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.WpSettingsPanel/ViewModels/LibraryContentsViewModel.cs) (Library browsing), [`src/VirtualPaper.PlayerWeb.Core/WebView/Windows/PreviewWithWeb.xaml.cs`](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.PlayerWeb.Core/WebView/Windows/PreviewWithWeb.xaml.cs) (Wallpaper preview), [`src/VirtualPaper.IntelligentPanel/ViewModels/IntelligentViewModel.cs`](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.IntelligentPanel/ViewModels/IntelligentViewModel.cs) (AI tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and control"]
  node_ui["Desktop UI<br/>[App.xaml.cs]"]
  node_core["Wallpaper core<br/>[App.xaml.cs]"]
  node_settings["User settings<br/>[Settings.cs]"]
  node_monitor["Monitor management<br/>[MonitorManager.cs]"]
  node_grpc["Named-pipe API"]
end

subgraph group_library["Wallpaper library"]
  node_wallpaperdata["Wallpaper metadata<br/>[WpBasicData.cs]"]
  node_index[("Library index")]
  node_libraryui["Library browsing"]
  node_storage["File selection"]
end

subgraph group_render["Playback and rendering"]
  node_preview["Wallpaper preview"]
  node_webplayer["Web wallpaper player<br/>[Program.cs]"]
  node_shader["Effect rendering<br/>[EffectApplier.cs]"]
  node_parallax["3D parallax<br/>[run.js]"]
end

subgraph group_creator["Image creation"]
  node_staticimg["Still-image editor<br/>[InkCanvas.xaml.cs]"]
  node_effects["Image effects<br/>[EffectMap.cs]"]
  node_export["Image export"]
  node_ai["AI tools"]
  node_style["Style transfer<br/>[AdaIn.cs]"]
  node_upscale["Super resolution<br/>[Realesrgan.cs]"]
end

subgraph group_extensions["Product extensions"]
  node_saver["Screen saver<br/>[App.xaml.cs]"]
  node_lockscreen["Lock-screen background"]
end

node_user(("User"))

node_user -.->|"manages wallpapers"| node_ui
node_ui -.->|"opens library"| node_libraryui
node_libraryui -->|"queries index"| node_index
node_libraryui -.->|"selects files"| node_storage
node_libraryui -.->|"uses metadata"| node_wallpaperdata
node_ui -.->|"previews wallpaper"| node_preview
node_preview -->|"launches player"| node_webplayer
node_webplayer -.->|"runs parallax"| node_parallax
node_preview -.->|"customizes effects"| node_shader
node_ui -.->|"controls runtime"| node_core
node_core -->|"manages displays"| node_monitor
node_grpc -->|"requests monitor data"| node_monitor
node_core -.->|"loads settings"| node_settings
node_user -.->|"creates artwork"| node_staticimg
node_staticimg -.->|"applies effects"| node_effects
node_staticimg -.->|"exports image"| node_export
node_user -.->|"requests enhancement"| node_ai
node_ai -.->|"transfers style"| node_style
node_ai -.->|"upscales image"| node_upscale
node_user -->|"runs screen saver"| node_saver
node_user -->|"sets background"| node_lockscreen
node_user -->|"previews live effects"| node_preview
node_user -->|"uses mouse parallax"| node_parallax
node_user -->|"enhances wallpaper"| node_ai

click node_ui "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.UI/App.xaml.cs"
click node_core "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper/App.xaml.cs"
click node_settings "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.Models/Cores/Settings.cs"
click node_monitor "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper/Cores/Monitor/MonitorManager.cs"
click node_grpc "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.Grpc.Client/MonitorManagerClient.cs"
click node_wallpaperdata "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.Models/Cores/WpBasicData.cs"
click node_index "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.WpSettingsPanel/Utils/WallpaperIndexService.cs"
click node_libraryui "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.WpSettingsPanel/ViewModels/LibraryContentsViewModel.cs"
click node_storage "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.Common/Utils/Storage/WindowsStoragePickers.cs"
click node_preview "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.PlayerWeb.Core/WebView/Windows/PreviewWithWeb.xaml.cs"
click node_webplayer "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.PlayerWeb/Program.cs"
click node_shader "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.Shader/Core/EffectApplier.cs"
click node_parallax "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.PlayerWeb.Core/PLAYER_Web/js/3d_depth/run.js"
click node_staticimg "https://github.com/paperhammer/virtualpaper/blob/main/src/StaticImg/Views/Components/InkCanvas.xaml.cs"
click node_effects "https://github.com/paperhammer/virtualpaper/blob/main/src/StaticImg/Utils/EffectMap.cs"
click node_export "https://github.com/paperhammer/virtualpaper/blob/main/src/StaticImg/Models/SerializableData/StaticImgDesignFileUtil.IO.cs"
click node_ai "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.IntelligentPanel/ViewModels/IntelligentViewModel.cs"
click node_style "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.ML/StyleTransfer/AdaIn.cs"
click node_upscale "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.ML/SuperResolution/Realesrgan.cs"
click node_saver "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.ScreenSaver/App.xaml.cs"
click node_lockscreen "https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.WpSettingsPanel/ViewModels/ScreenSaverViewModel.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_ui,node_core,node_settings,node_monitor,node_grpc,node_user toneBlue
class node_wallpaperdata,node_index,node_libraryui,node_storage toneAmber
class node_preview,node_webplayer,node_shader,node_parallax toneMint
class node_staticimg,node_effects,node_export,node_ai,node_style,node_upscale toneRose
class node_saver,node_lockscreen toneIndigo
```

## Components

### App and control

- [Desktop UI](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.UI/App.xaml.cs): `src/VirtualPaper.UI/App.xaml.cs`
- [Wallpaper core](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper/App.xaml.cs): `src/VirtualPaper/App.xaml.cs`
- [User settings](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.Models/Cores/Settings.cs): `src/VirtualPaper.Models/Cores/Settings.cs`
- [Monitor management](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper/Cores/Monitor/MonitorManager.cs): `src/VirtualPaper/Cores/Monitor/MonitorManager.cs`
- [Named-pipe API](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.Grpc.Client/MonitorManagerClient.cs): `src/VirtualPaper.Grpc.Client/MonitorManagerClient.cs`

### Wallpaper library

- [Wallpaper metadata](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.Models/Cores/WpBasicData.cs): `src/VirtualPaper.Models/Cores/WpBasicData.cs`
- [Library index](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.WpSettingsPanel/Utils/WallpaperIndexService.cs): `src/VirtualPaper.WpSettingsPanel/Utils/WallpaperIndexService.cs`
- [Library browsing](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.WpSettingsPanel/ViewModels/LibraryContentsViewModel.cs): `src/VirtualPaper.WpSettingsPanel/ViewModels/LibraryContentsViewModel.cs`
- [File selection](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.Common/Utils/Storage/WindowsStoragePickers.cs): `src/VirtualPaper.Common/Utils/Storage/WindowsStoragePickers.cs`

### Playback and rendering

- [Wallpaper preview](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.PlayerWeb.Core/WebView/Windows/PreviewWithWeb.xaml.cs): `src/VirtualPaper.PlayerWeb.Core/WebView/Windows/PreviewWithWeb.xaml.cs`
- [Web wallpaper player](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.PlayerWeb/Program.cs): `src/VirtualPaper.PlayerWeb/Program.cs`
- [Effect rendering](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.Shader/Core/EffectApplier.cs): `src/VirtualPaper.Shader/Core/EffectApplier.cs`
- [3D parallax](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.PlayerWeb.Core/PLAYER_Web/js/3d_depth/run.js): `src/VirtualPaper.PlayerWeb.Core/PLAYER_Web/js/3d_depth/run.js`

### Image creation

- [Still-image editor](https://github.com/paperhammer/virtualpaper/blob/main/src/StaticImg/Views/Components/InkCanvas.xaml.cs): `src/StaticImg/Views/Components/InkCanvas.xaml.cs`
- [Image effects](https://github.com/paperhammer/virtualpaper/blob/main/src/StaticImg/Utils/EffectMap.cs): `src/StaticImg/Utils/EffectMap.cs`
- [Image export](https://github.com/paperhammer/virtualpaper/blob/main/src/StaticImg/Models/SerializableData/StaticImgDesignFileUtil.IO.cs): `src/StaticImg/Models/SerializableData/StaticImgDesignFileUtil.IO.cs`
- [AI tools](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.IntelligentPanel/ViewModels/IntelligentViewModel.cs): `src/VirtualPaper.IntelligentPanel/ViewModels/IntelligentViewModel.cs`
- [Style transfer](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.ML/StyleTransfer/AdaIn.cs): `src/VirtualPaper.ML/StyleTransfer/AdaIn.cs`
- [Super resolution](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.ML/SuperResolution/Realesrgan.cs): `src/VirtualPaper.ML/SuperResolution/Realesrgan.cs`

### Product extensions

- [Screen saver](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.ScreenSaver/App.xaml.cs): `src/VirtualPaper.ScreenSaver/App.xaml.cs`
- [Lock-screen background](https://github.com/paperhammer/virtualpaper/blob/main/src/VirtualPaper.WpSettingsPanel/ViewModels/ScreenSaverViewModel.cs): `src/VirtualPaper.WpSettingsPanel/ViewModels/ScreenSaverViewModel.cs`

### Other components

- **User**

## Connections

- User → Desktop UI: manages wallpapers
- Desktop UI → Library browsing: opens library (evidence: `src/VirtualPaper.UI/App.xaml.cs`)
- Library browsing → Library index: queries index (evidence: `src/VirtualPaper.WpSettingsPanel/Utils/WallpaperIndexService.cs`)
- Library browsing → File selection: selects files
- Library browsing → Wallpaper metadata: uses metadata
- Desktop UI → Wallpaper preview: previews wallpaper
- Wallpaper preview → Web wallpaper player: launches player (evidence: `src/VirtualPaper.PlayerWeb.Core/WebView/Windows/PreviewWithWeb.xaml.cs`)
- Web wallpaper player → 3D parallax: runs parallax
- Wallpaper preview → Effect rendering: customizes effects
- Desktop UI → Wallpaper core: controls runtime
- Wallpaper core → Monitor management: manages displays (evidence: `src/VirtualPaper/App.xaml.cs`)
- Named-pipe API → Monitor management: requests monitor data (evidence: `src/VirtualPaper.Grpc.Client/MonitorManagerClient.cs`)
- Wallpaper core → User settings: loads settings (evidence: `src/VirtualPaper/App.xaml.cs`)
- User → Still-image editor: creates artwork
- Still-image editor → Image effects: applies effects
- Still-image editor → Image export: exports image
- User → AI tools: requests enhancement
- AI tools → Style transfer: transfers style
- AI tools → Super resolution: upscales image
- User → Screen saver: runs screen saver
- User → Lock-screen background: sets background
- User → Wallpaper preview: previews live effects
- User → 3D parallax: uses mouse parallax
- User → AI tools: enhances wallpaper
