# editorrylix/pouchy architecture

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

- Interactive diagram: https://gitdiagram.com/editorrylix/pouchy
- Repository: https://github.com/editorrylix/pouchy

## Overview

Pouchy is a native Windows drag-and-drop holding shelf. A user summons it by shaking the mouse, hitting a screen edge, or using a hotkey; they drop files, text, links, or images onto the pouch, organize items across shelves, then drag them into another app or use item actions. The pouch view model coordinates item creation, search and shelf state with persistence. The README documents additional menu actions, previews, themes, settings, and Windows shell integrations. Some subsystem links rely on README claims or the SOURCE INDEX because their implementations were not excerpted.

Main entry points: [`Views/PouchWindow.xaml.cs`](https://github.com/editorrylix/pouchy/blob/main/Views/PouchWindow.xaml.cs) (Pouch window), [`ViewModels/PouchViewModel.cs`](https://github.com/editorrylix/pouchy/blob/main/ViewModels/PouchViewModel.cs) (Pouch state), [`Views/PouchWindow.Menus.cs`](https://github.com/editorrylix/pouchy/blob/main/Views/PouchWindow.Menus.cs) (Item actions), [`App.xaml.cs`](https://github.com/editorrylix/pouchy/blob/main/App.xaml.cs) (App lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_activation["Activation and shell"]
  node_app["App lifecycle<br/>[App.xaml.cs]"]
  node_trigger["Summon triggers<br/>[TriggerService.cs]"]
  node_gesture["Gesture detection<br/>[GestureDetector.cs]"]
  node_hotkey["Global hotkey<br/>[HotkeyService.cs]"]
  node_native["Windows interop<br/>[NativeMethods.cs]"]
end

subgraph group_pouch["Pouch experience"]
  node_window["Pouch window"]
  node_shelfview["Shelf navigation"]
  node_pouchvm["Pouch state<br/>[PouchViewModel.cs]"]
  node_mascot["Mascot<br/>[Mascot.xaml.cs]"]
end

subgraph group_items["Items and actions"]
  node_itemfactory["Item creation<br/>[ItemFactory.cs]"]
  node_itemmodel["Item model<br/>[PouchItem.cs]"]
  node_menus["Context menus<br/>[MenuFactory.cs]"]
  node_menuactions["Item actions"]
  node_fileactions["File operations<br/>[FileActions.cs]"]
  node_quicklook["Quick Look"]
  node_linkpreview["Link previews"]
  node_thumbnails["Shell thumbnails"]
  node_ocr["Image OCR<br/>[OcrService.cs]"]
  node_shellmenu["Explorer menu"]
  node_share["Windows sharing<br/>[ShareSheet.cs]"]
end

subgraph group_configuration["Settings and themes"]
  node_settingsvm["Settings state"]
  node_settingswindow["Settings window"]
  node_settings["App settings<br/>[SettingsService.cs]"]
  node_themes["Theme service<br/>[ThemeService.cs]"]
  node_updater["Update checks<br/>[UpdateService.cs]"]
end

subgraph group_state["Local state"]
  node_shelves["Shelf model<br/>[Shelf.cs]"]
  node_persistence["Shelf persistence"]
  node_localstore[("Local shelf data<br/>[AppPaths.cs]")]
end

node_user(("User"))
node_externalapp(("Other app"))
node_internet(("Web pages"))

node_user -->|"shakes or bumps"| node_trigger
node_user -->|"presses shortcut"| node_hotkey
node_trigger -->|"detects motion"| node_gesture
node_trigger -->|"reads input"| node_native
node_hotkey -->|"registers shortcut"| node_native
node_app -->|"starts"| node_trigger
node_app -->|"starts"| node_hotkey
node_trigger -->|"summons pouch"| node_window
node_user -->|"drops items"| node_window
node_window -->|"updates pouch"| node_pouchvm
node_window -->|"supports shelf tabs"| node_shelfview
node_shelfview -.->|"switches shelves"| node_pouchvm
node_pouchvm -->|"creates items"| node_itemfactory
node_pouchvm -->|"loads and saves"| node_persistence
node_pouchvm -->|"reads preferences"| node_settings
node_pouchvm -->|"fetches previews"| node_linkpreview
node_itemfactory -->|"builds items"| node_itemmodel
node_window -.->|"requests previews"| node_thumbnails
node_window -->|"drags items out"| node_externalapp
node_user -->|"chooses action"| node_menuactions
node_window -->|"routes menu events"| node_menuactions
node_menuactions -->|"builds menus"| node_menus
node_menuactions -->|"runs file actions"| node_fileactions
node_menuactions -->|"requests OCR"| node_ocr
node_menuactions -->|"opens Explorer menu"| node_shellmenu
node_menuactions -->|"opens share sheet"| node_share
node_user -->|"previews item"| node_quicklook
node_linkpreview -->|"fetches page and icon"| node_internet
node_user -->|"configures app"| node_settingswindow
node_app -->|"opens settings"| node_settingsvm
node_settingswindow -.->|"displays controls"| node_settingsvm
node_settingsvm -->|"updates preferences"| node_settings
node_settingsvm -->|"manages themes"| node_themes
node_app -->|"applies theme"| node_themes
node_settingsvm -->|"checks updates"| node_updater
node_pouchvm -->|"maintains shelf state"| node_shelves
node_persistence -->|"serializes shelves"| node_shelves
node_persistence -->|"stores shelf data"| node_localstore
node_app -->|"initializes state"| node_persistence
node_app -.->|"shows mascot"| node_mascot

click node_app "https://github.com/editorrylix/pouchy/blob/main/App.xaml.cs"
click node_trigger "https://github.com/editorrylix/pouchy/blob/main/Services/TriggerService.cs"
click node_gesture "https://github.com/editorrylix/pouchy/blob/main/Services/GestureDetector.cs"
click node_hotkey "https://github.com/editorrylix/pouchy/blob/main/Services/HotkeyService.cs"
click node_native "https://github.com/editorrylix/pouchy/blob/main/Interop/NativeMethods.cs"
click node_window "https://github.com/editorrylix/pouchy/blob/main/Views/PouchWindow.xaml.cs"
click node_shelfview "https://github.com/editorrylix/pouchy/blob/main/Views/PouchWindow.Shelves.cs"
click node_pouchvm "https://github.com/editorrylix/pouchy/blob/main/ViewModels/PouchViewModel.cs"
click node_mascot "https://github.com/editorrylix/pouchy/blob/main/Views/Mascot.xaml.cs"
click node_itemfactory "https://github.com/editorrylix/pouchy/blob/main/Services/ItemFactory.cs"
click node_itemmodel "https://github.com/editorrylix/pouchy/blob/main/Models/PouchItem.cs"
click node_menus "https://github.com/editorrylix/pouchy/blob/main/Views/MenuFactory.cs"
click node_menuactions "https://github.com/editorrylix/pouchy/blob/main/Views/PouchWindow.Menus.cs"
click node_fileactions "https://github.com/editorrylix/pouchy/blob/main/Services/FileActions.cs"
click node_quicklook "https://github.com/editorrylix/pouchy/blob/main/Views/QuickLookWindow.xaml.cs"
click node_linkpreview "https://github.com/editorrylix/pouchy/blob/main/Services/LinkPreviewService.cs"
click node_thumbnails "https://github.com/editorrylix/pouchy/blob/main/Services/ThumbnailProvider.cs"
click node_ocr "https://github.com/editorrylix/pouchy/blob/main/Services/OcrService.cs"
click node_shellmenu "https://github.com/editorrylix/pouchy/blob/main/Interop/ShellContextMenu.cs"
click node_share "https://github.com/editorrylix/pouchy/blob/main/Interop/ShareSheet.cs"
click node_settingsvm "https://github.com/editorrylix/pouchy/blob/main/ViewModels/SettingsViewModel.cs"
click node_settingswindow "https://github.com/editorrylix/pouchy/blob/main/Views/SettingsWindow.xaml.cs"
click node_settings "https://github.com/editorrylix/pouchy/blob/main/Services/SettingsService.cs"
click node_themes "https://github.com/editorrylix/pouchy/blob/main/Services/Theming/ThemeService.cs"
click node_updater "https://github.com/editorrylix/pouchy/blob/main/Services/UpdateService.cs"
click node_shelves "https://github.com/editorrylix/pouchy/blob/main/Models/Shelf.cs"
click node_persistence "https://github.com/editorrylix/pouchy/blob/main/Services/PersistenceService.cs"
click node_localstore "https://github.com/editorrylix/pouchy/blob/main/Services/AppPaths.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_app,node_trigger,node_gesture,node_hotkey,node_native,node_user toneBlue
class node_window,node_shelfview,node_pouchvm,node_mascot toneAmber
class node_itemfactory,node_itemmodel,node_menus,node_menuactions,node_fileactions,node_quicklook,node_linkpreview,node_thumbnails,node_ocr,node_shellmenu,node_share toneMint
class node_settingsvm,node_settingswindow,node_settings,node_themes,node_updater toneRose
class node_shelves,node_persistence,node_localstore,node_externalapp,node_internet toneIndigo
```

## Components

### Activation and shell

- [App lifecycle](https://github.com/editorrylix/pouchy/blob/main/App.xaml.cs): `App.xaml.cs`
- [Summon triggers](https://github.com/editorrylix/pouchy/blob/main/Services/TriggerService.cs): `Services/TriggerService.cs`
- [Gesture detection](https://github.com/editorrylix/pouchy/blob/main/Services/GestureDetector.cs): `Services/GestureDetector.cs`
- [Global hotkey](https://github.com/editorrylix/pouchy/blob/main/Services/HotkeyService.cs): `Services/HotkeyService.cs`
- [Windows interop](https://github.com/editorrylix/pouchy/blob/main/Interop/NativeMethods.cs): `Interop/NativeMethods.cs`

### Pouch experience

- [Pouch window](https://github.com/editorrylix/pouchy/blob/main/Views/PouchWindow.xaml.cs): `Views/PouchWindow.xaml.cs`
- [Shelf navigation](https://github.com/editorrylix/pouchy/blob/main/Views/PouchWindow.Shelves.cs): `Views/PouchWindow.Shelves.cs`
- [Pouch state](https://github.com/editorrylix/pouchy/blob/main/ViewModels/PouchViewModel.cs): `ViewModels/PouchViewModel.cs`
- [Mascot](https://github.com/editorrylix/pouchy/blob/main/Views/Mascot.xaml.cs): `Views/Mascot.xaml.cs`

### Items and actions

- [Item creation](https://github.com/editorrylix/pouchy/blob/main/Services/ItemFactory.cs): `Services/ItemFactory.cs`
- [Item model](https://github.com/editorrylix/pouchy/blob/main/Models/PouchItem.cs): `Models/PouchItem.cs`
- [Context menus](https://github.com/editorrylix/pouchy/blob/main/Views/MenuFactory.cs): `Views/MenuFactory.cs`
- [Item actions](https://github.com/editorrylix/pouchy/blob/main/Views/PouchWindow.Menus.cs): `Views/PouchWindow.Menus.cs`
- [File operations](https://github.com/editorrylix/pouchy/blob/main/Services/FileActions.cs): `Services/FileActions.cs`
- [Quick Look](https://github.com/editorrylix/pouchy/blob/main/Views/QuickLookWindow.xaml.cs): `Views/QuickLookWindow.xaml.cs`
- [Link previews](https://github.com/editorrylix/pouchy/blob/main/Services/LinkPreviewService.cs): `Services/LinkPreviewService.cs`
- [Shell thumbnails](https://github.com/editorrylix/pouchy/blob/main/Services/ThumbnailProvider.cs): `Services/ThumbnailProvider.cs`
- [Image OCR](https://github.com/editorrylix/pouchy/blob/main/Services/OcrService.cs): `Services/OcrService.cs`
- [Explorer menu](https://github.com/editorrylix/pouchy/blob/main/Interop/ShellContextMenu.cs): `Interop/ShellContextMenu.cs`
- [Windows sharing](https://github.com/editorrylix/pouchy/blob/main/Interop/ShareSheet.cs): `Interop/ShareSheet.cs`

### Settings and themes

- [Settings state](https://github.com/editorrylix/pouchy/blob/main/ViewModels/SettingsViewModel.cs): `ViewModels/SettingsViewModel.cs`
- [Settings window](https://github.com/editorrylix/pouchy/blob/main/Views/SettingsWindow.xaml.cs): `Views/SettingsWindow.xaml.cs`
- [App settings](https://github.com/editorrylix/pouchy/blob/main/Services/SettingsService.cs): `Services/SettingsService.cs`
- [Theme service](https://github.com/editorrylix/pouchy/blob/main/Services/Theming/ThemeService.cs): `Services/Theming/ThemeService.cs`
- [Update checks](https://github.com/editorrylix/pouchy/blob/main/Services/UpdateService.cs): `Services/UpdateService.cs`

### Local state

- [Shelf model](https://github.com/editorrylix/pouchy/blob/main/Models/Shelf.cs): `Models/Shelf.cs`
- [Shelf persistence](https://github.com/editorrylix/pouchy/blob/main/Services/PersistenceService.cs): `Services/PersistenceService.cs`
- [Local shelf data](https://github.com/editorrylix/pouchy/blob/main/Services/AppPaths.cs): `Services/AppPaths.cs`

### Other components

- **User**
- **Other app**
- **Web pages**

## Connections

- User → Summon triggers: shakes or bumps (evidence: `README.md`)
- User → Global hotkey: presses shortcut (evidence: `README.md`)
- Summon triggers → Gesture detection: detects motion (evidence: `Services/TriggerService.cs`)
- Summon triggers → Windows interop: reads input (evidence: `Services/TriggerService.cs`)
- Global hotkey → Windows interop: registers shortcut (evidence: `Services/HotkeyService.cs`)
- App lifecycle → Summon triggers: starts (evidence: `App.xaml.cs`)
- App lifecycle → Global hotkey: starts (evidence: `App.xaml.cs`)
- Summon triggers → Pouch window: summons pouch (evidence: `README.md`)
- User → Pouch window: drops items (evidence: `README.md`)
- Pouch window → Pouch state: updates pouch (evidence: `Views/PouchWindow.xaml.cs`)
- Pouch window → Shelf navigation: supports shelf tabs (evidence: `README.md`)
- Shelf navigation → Pouch state: switches shelves
- Pouch state → Item creation: creates items (evidence: `ViewModels/PouchViewModel.cs`)
- Pouch state → Shelf persistence: loads and saves (evidence: `ViewModels/PouchViewModel.cs`)
- Pouch state → App settings: reads preferences (evidence: `ViewModels/PouchViewModel.cs`)
- Pouch state → Link previews: fetches previews (evidence: `ViewModels/PouchViewModel.cs`)
- Item creation → Item model: builds items (evidence: `Services/ItemFactory.cs`)
- Pouch window → Shell thumbnails: requests previews
- Pouch window → Other app: drags items out (evidence: `README.md`)
- User → Item actions: chooses action (evidence: `README.md`)
- Pouch window → Item actions: routes menu events (evidence: `Views/PouchWindow.Menus.cs`)
- Item actions → Context menus: builds menus (evidence: `Views/PouchWindow.Menus.cs`)
- Item actions → File operations: runs file actions (evidence: `Views/PouchWindow.Menus.cs`)
- Item actions → Image OCR: requests OCR (evidence: `Views/PouchWindow.Menus.cs`)
- Item actions → Explorer menu: opens Explorer menu (evidence: `Views/PouchWindow.Menus.cs`)
- Item actions → Windows sharing: opens share sheet (evidence: `Views/PouchWindow.Menus.cs`)
- User → Quick Look: previews item (evidence: `README.md`)
- Link previews → Web pages: fetches page and icon (evidence: `Services/LinkPreviewService.cs`)
- User → Settings window: configures app (evidence: `README.md`)
- App lifecycle → Settings state: opens settings (evidence: `App.xaml.cs`)
- Settings window → Settings state: displays controls
- Settings state → App settings: updates preferences (evidence: `ViewModels/SettingsViewModel.cs`)
- Settings state → Theme service: manages themes (evidence: `ViewModels/SettingsViewModel.cs`)
- App lifecycle → Theme service: applies theme (evidence: `App.xaml.cs`)
- Settings state → Update checks: checks updates (evidence: `ViewModels/SettingsViewModel.cs`)
- Pouch state → Shelf model: maintains shelf state (evidence: `ViewModels/PouchViewModel.cs`)
- Shelf persistence → Shelf model: serializes shelves (evidence: `Services/PersistenceService.cs`)
- Shelf persistence → Local shelf data: stores shelf data (evidence: `Services/PersistenceService.cs`)
- App lifecycle → Shelf persistence: initializes state (evidence: `App.xaml.cs`)
- App lifecycle → Mascot: shows mascot
