# srwi/everythingtoolbar architecture

> Architecture diagram of the GitHub repository srwi/everythingtoolbar, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/srwi/everythingtoolbar
- Repository: https://github.com/srwi/everythingtoolbar

## Overview

##### Project Type and Purpose
- Project type: Native Windows desktop integration + WPF application + Shell extension + installer + build pipeline.

##### Break the System into Main Components
a. EverythingSDK (C library)
b. EverythingToolbar Core (C# WPF UI + MVVM logic)
c. Deskband COM Extension (Shell integration component)
e. Installer (WiX-based MSI/EXE)
f. Build & Release Pipeline (GitHub Actions + Winget/Chocolatey publishing)

##### Component Relationships and Data Flows
1) User interacts with UI (either deskband in Explorer or the Launcher window).
2) UI layer (EverythingToolbar core) invokes Search subsystem.
3) Search subsystem calls EverythingSDK (native library) over IPC to the Everything service.
4) Everything returns file results; returned to Search subsystem → ViewModels → UI.
5) User selects an item → Helper (ShellContextMenu or Process.Start) invokes OS to open file, apply rules (reg-ex based commands), or hand off to QuickLook/Seer.
6) Settings and history saved via Helpers into Windows Registry or local config.
7) Installer at install time registers the deskband COM component in Registry and installs the Launcher shortcut and Win+Alt+S hotkey association.
8) GitHub Actions build all projects (.sln), run tests (if any), package artifacts, push releases to GitHub and publish to winget/choco.

##### Architectural Patterns
- MVVM (Model-View-ViewModel) in all WPF components.
- COM Deskband pattern (IDeskBand, COM registration, Explorer extension).
- Native P/Invoke / IPC wrapper (EverythingSDK → Everything service).
- Plugin-like extensibility for custom filters and rules (data-driven).
- Resource theming (Light/Dark, Win10/Win11 XAML resource dictionaries).

##### Don’t Overthink—Capture All Pieces
- Them according to build output and runtime interactions.
- Even simple helper classes (RegistryWatcher, HistoryManager) can be grouped under “Persistence Services” in the core library.
- At the bottom or side, show DevOps folder (.github + tools) as the “Build & Release pipeline.”

- Clearly separates frontend (Deskband/Launcher) from backend (search engine),
- Shows all integration points (COM, IPC, global hotkey, registry, installer),
- Annotates architectural patterns (MVVM, COM extension, native bridging),

## Diagram (Mermaid)

```mermaid
flowchart TB
  %% Layer 1 - Host Platforms
  subgraph "Host Platforms" 
    style HostPlatforms fill:#f2f2f2,stroke:#cccccc
    Explorer["Windows Shell / Explorer"]:::external
    OS["Windows OS (Hotkey API, Registry)"]:::external
    Service["Everything Search Service"]:::external
    Preview["Optional Preview Tools (QuickLook/Seer)"]:::external
  end

  %% Layer 2 - Integration Components
  subgraph "Integration Components"
    style IntegrationComponents fill:#e6f7ff,stroke:#1f77b4
    Deskband["Deskband COM Extension\n(EverythingToolbar.Deskband)"]:::frontend
    Launcher["Launcher Application\n(EverythingToolbar.Launcher)"]:::frontend
  end

  %% Layer 3 - Core Application Library
  subgraph "Core Application Library"
    style CoreLib fill:#e6ffe6,stroke:#2ca02c
    UI["UI Layer (WPF Views/Themes)"]:::core
    Search["Search Subsystem"]:::core
    DataModels["Data Models"]:::core
    Helpers["Helpers (RegistryWatcher,\nHistoryManager, ShellContextMenu)"]:::persistence
    Converters["Converters/Behaviors/Styles"]:::core
  end

  %% Layer 4 - Native Bridge + IPC
  subgraph "Native Bridge + IPC"
    style NativeBridge fill:#fff0e6,stroke:#ff7f0e
    SDK["EverythingSDK (Native C Library)"]:::native
  end

  %% Layer 5 - Installer & Packaging
  subgraph "Installer & Packaging"
    style InstallerPkg fill:#ffe6f2,stroke:#d62728
    Installer["Installer (WiX MSI/EXE)"]:::installer
  end

  %% Layer 6 - Build & Release Pipeline
  subgraph "Build & Release Pipeline"
    style Pipeline fill:#f9e6ff,stroke:#9467bd
    CI["GitHub Actions & Tools"]:::pipeline
  end

  %% Connections
  Explorer -->|"loads COM Deskband"| Deskband
  OS -->|provides Hotkey API| Launcher
  OS -->|registry access| Helpers
  Service -->|IPC results| SDK
  SDK -->|P/Invoke/IPC calls| Search
  Deskband -->|uses UI & Search| UI
  Launcher -->|shows UI & calls Search| UI
  UI -->|binds MVVM| Search
  Search -->|produces results| UI
  Search -->|uses Data Models| DataModels
  UI -->|uses Converters/Styles| Converters
  UI -->|calls Helpers for actions| Helpers
  Installer -->|registers COM, installs Deskband & Launcher| OS
  Installer -->|copies files| EverythingToolbar
  CI -->|builds & tests| EverythingToolbar
  CI -->|packages & publishes| CI

  %% Click Events
  click SDK "https://github.com/srwi/everythingtoolbar/tree/master/EverythingSDK/"
  click EverythingToolbar "https://github.com/srwi/everythingtoolbar/blob/master/EverythingToolbar/EverythingToolbar.csproj"
  click Deskband "https://github.com/srwi/everythingtoolbar/blob/master/EverythingToolbar.Deskband/EverythingToolbar.Deskband.csproj"
  click Launcher "https://github.com/srwi/everythingtoolbar/blob/master/EverythingToolbar.Launcher/EverythingToolbar.Launcher.csproj"
  click Installer "https://github.com/srwi/everythingtoolbar/blob/master/EverythingToolbar.Installer/EverythingToolbar.Installer.wixproj"
  click CI "https://github.com/srwi/everythingtoolbar/tree/master/.github/workflows/"

  %% Styles
  classDef external fill:#dddddd,stroke:#888888,color:#333333
  classDef frontend fill:#c6e2ff,stroke:#1f77b4,color:#1f77b4
  classDef core fill:#d4f4dd,stroke:#2ca02c,color:#2ca02c
  classDef native fill:#ffe0b3,stroke:#ff7f0e,color:#ff7f0e
  classDef persistence fill:#e8daef,stroke:#9467bd,color:#9467bd
  classDef installer fill:#ffcccc,stroke:#d62728,color:#d62728
  classDef pipeline fill:#f3e6ff,stroke:#9467bd,color:#9467bd
```
