# lertaro/lertaro architecture

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

- Interactive diagram: https://gitdiagram.com/lertaro/lertaro
- Repository: https://github.com/lertaro/lertaro

## Overview

Lertaro is a Windows search and productivity launcher. Its main workflow takes a user query through dispatch and search execution to the background search service, which streams results back for display. The repository also supports live drive indexing, multiple search surfaces, shell actions and previews, disk-space analysis, plugins, and local file transfer. Several links below are documented capabilities rather than inspected call paths; unsampled implementation details are not inferred.

Main entry points: [`Core/Services/Search/SearchService.cs`](https://github.com/lertaro/lertaro/blob/main/Core/Services/Search/SearchService.cs) (Search service), [`App/ViewModels/Search/Dispatch/SearchQueryDispatchController.cs`](https://github.com/lertaro/lertaro/blob/main/App/ViewModels/Search/Dispatch/SearchQueryDispatchController.cs) (Query dispatch), [`App/Views/SearchWindow/SearchWindowInputHandler.cs`](https://github.com/lertaro/lertaro/blob/main/App/Views/SearchWindow/SearchWindowInputHandler.cs) (Search windows), [`Core/Indexer/Usn/UsnIndexer.cs`](https://github.com/lertaro/lertaro/blob/main/Core/Indexer/Usn/UsnIndexer.cs) (USN drive index)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_search["Search experience"]
  node_dispatch["Query dispatch"]
  node_execution["Search execution"]
  node_results["Result rows<br/>[AppSearchResult.cs]"]
  node_searchui["Search windows"]
  node_quickpanel["Quick panel"]
  node_inline["Inline search"]
end

subgraph group_index["Index and search service"]
  node_searchservice["Search service<br/>[SearchService.cs]"]
  node_searchengine["Search engine<br/>[SearchEngine.cs]"]
  node_initializer["Index startup"]
  node_driveindex[("USN drive index<br/>[UsnIndexer.cs]")]
  node_indexcache[("Index cache")]
  node_drivewatch["Drive maintenance"]
end

subgraph group_windows["Windows productivity"]
  node_actions["Shell actions"]
  node_quicklook["QuickLook preview"]
  node_space["Disk treemap<br/>[TreemapLayout.cs]"]
end

subgraph group_extensions["Plugins and transfer"]
  node_pluginmanager["Plugin manager<br/>[PluginManager.cs]"]
  node_sdksearch["Plugin search SDK"]
  node_localsend["LocalSend"]
end

subgraph group_operations["App and service"]
  node_app["WPF application<br/>[App.xaml.cs]"]
  node_service["Background service<br/>[Program.cs]"]
  node_cli["CLI client"]
end

node_user(("User"))

node_user -->|"enters query"| node_searchui
node_searchui -.->|"submits query"| node_dispatch
node_dispatch -->|"dispatches search"| node_execution
node_execution -->|"requests search"| node_searchservice
node_searchservice -.->|"searches index"| node_searchengine
node_searchservice -.->|"streams results"| node_results
node_searchengine -->|"uses indexer"| node_driveindex
node_initializer -->|"initializes index"| node_driveindex
node_initializer -.->|"loads cache"| node_indexcache
node_drivewatch -->|"maintains drives"| node_driveindex
node_drivewatch -->|"deletes cache"| node_indexcache
node_user -.->|"opens panel"| node_quickpanel
node_user -->|"invokes inline"| node_inline
node_user -->|"opens actions"| node_actions
node_user -->|"previews files"| node_quicklook
node_user -->|"explores disk"| node_space
node_dispatch -->|"dispatches plugins"| node_pluginmanager
node_pluginmanager -.->|"exposes search SDK"| node_sdksearch
node_user -.->|"shares files"| node_localsend
node_app -.->|"hosts windows"| node_searchui
node_service -.->|"hosts search"| node_searchservice
node_cli -.->|"requests search"| node_searchservice

click node_dispatch "https://github.com/lertaro/lertaro/blob/main/App/ViewModels/Search/Dispatch/SearchQueryDispatchController.cs"
click node_execution "https://github.com/lertaro/lertaro/blob/main/App/ViewModels/Search/SearchExecutionEngine.cs"
click node_results "https://github.com/lertaro/lertaro/blob/main/App/Models/AppSearchResult.cs"
click node_searchui "https://github.com/lertaro/lertaro/blob/main/App/Views/SearchWindow/SearchWindowInputHandler.cs"
click node_searchservice "https://github.com/lertaro/lertaro/blob/main/Core/Services/Search/SearchService.cs"
click node_searchengine "https://github.com/lertaro/lertaro/blob/main/Core/SearchEngine.cs"
click node_initializer "https://github.com/lertaro/lertaro/blob/main/Core/SearchEngineInitializer.cs"
click node_driveindex "https://github.com/lertaro/lertaro/blob/main/Core/Indexer/Usn/UsnIndexer.cs"
click node_indexcache "https://github.com/lertaro/lertaro/blob/main/Core/Indexer/Usn/LocalDriveCacheLocator.cs"
click node_drivewatch "https://github.com/lertaro/lertaro/blob/main/Core/DriveMonitoring/SearchEngineDriveMaintenance.cs"
click node_quickpanel "https://github.com/lertaro/lertaro/blob/main/App/Services/QuickPanel/QuickPanelManager.cs"
click node_inline "https://github.com/lertaro/lertaro/blob/main/App/Services/InlineSearch/InlineSearchManager.cs"
click node_actions "https://github.com/lertaro/lertaro/blob/main/App/Services/ShellMenu/Presenter/ShellMenuPresenter.cs"
click node_quicklook "https://github.com/lertaro/lertaro/blob/main/App/Services/QuickLookManager.cs"
click node_space "https://github.com/lertaro/lertaro/blob/main/App/ViewModels/SpaceAnalyzer/TreemapLayout.cs"
click node_pluginmanager "https://github.com/lertaro/lertaro/blob/main/App/Services/Plugin/PluginManager.cs"
click node_sdksearch "https://github.com/lertaro/lertaro/blob/main/PluginSdk/Services/SearchQueryService.cs"
click node_localsend "https://github.com/lertaro/lertaro/blob/main/Core/Services/LocalSend/LocalSendServiceManager.cs"
click node_app "https://github.com/lertaro/lertaro/blob/main/App/App.xaml.cs"
click node_service "https://github.com/lertaro/lertaro/blob/main/Service/Program.cs"
click node_cli "https://github.com/lertaro/lertaro/blob/main/Cli/Search/AppSearchPipeClient.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_dispatch,node_execution,node_results,node_searchui,node_quickpanel,node_inline,node_user toneBlue
class node_searchservice,node_searchengine,node_initializer,node_driveindex,node_indexcache,node_drivewatch toneAmber
class node_actions,node_quicklook,node_space toneMint
class node_pluginmanager,node_sdksearch,node_localsend toneRose
class node_app,node_service,node_cli toneIndigo
```

## Components

### Search experience

- [Query dispatch](https://github.com/lertaro/lertaro/blob/main/App/ViewModels/Search/Dispatch/SearchQueryDispatchController.cs): `App/ViewModels/Search/Dispatch/SearchQueryDispatchController.cs`
- [Search execution](https://github.com/lertaro/lertaro/blob/main/App/ViewModels/Search/SearchExecutionEngine.cs): `App/ViewModels/Search/SearchExecutionEngine.cs`
- [Result rows](https://github.com/lertaro/lertaro/blob/main/App/Models/AppSearchResult.cs): `App/Models/AppSearchResult.cs`
- [Search windows](https://github.com/lertaro/lertaro/blob/main/App/Views/SearchWindow/SearchWindowInputHandler.cs): `App/Views/SearchWindow/SearchWindowInputHandler.cs`
- [Quick panel](https://github.com/lertaro/lertaro/blob/main/App/Services/QuickPanel/QuickPanelManager.cs): `App/Services/QuickPanel/QuickPanelManager.cs`
- [Inline search](https://github.com/lertaro/lertaro/blob/main/App/Services/InlineSearch/InlineSearchManager.cs): `App/Services/InlineSearch/InlineSearchManager.cs`

### Index and search service

- [Search service](https://github.com/lertaro/lertaro/blob/main/Core/Services/Search/SearchService.cs): `Core/Services/Search/SearchService.cs`
- [Search engine](https://github.com/lertaro/lertaro/blob/main/Core/SearchEngine.cs): `Core/SearchEngine.cs`
- [Index startup](https://github.com/lertaro/lertaro/blob/main/Core/SearchEngineInitializer.cs): `Core/SearchEngineInitializer.cs`
- [USN drive index](https://github.com/lertaro/lertaro/blob/main/Core/Indexer/Usn/UsnIndexer.cs): `Core/Indexer/Usn/UsnIndexer.cs`
- [Index cache](https://github.com/lertaro/lertaro/blob/main/Core/Indexer/Usn/LocalDriveCacheLocator.cs): `Core/Indexer/Usn/LocalDriveCacheLocator.cs`
- [Drive maintenance](https://github.com/lertaro/lertaro/blob/main/Core/DriveMonitoring/SearchEngineDriveMaintenance.cs): `Core/DriveMonitoring/SearchEngineDriveMaintenance.cs`

### Windows productivity

- [Shell actions](https://github.com/lertaro/lertaro/blob/main/App/Services/ShellMenu/Presenter/ShellMenuPresenter.cs): `App/Services/ShellMenu/Presenter/ShellMenuPresenter.cs`
- [QuickLook preview](https://github.com/lertaro/lertaro/blob/main/App/Services/QuickLookManager.cs): `App/Services/QuickLookManager.cs`
- [Disk treemap](https://github.com/lertaro/lertaro/blob/main/App/ViewModels/SpaceAnalyzer/TreemapLayout.cs): `App/ViewModels/SpaceAnalyzer/TreemapLayout.cs`

### Plugins and transfer

- [Plugin manager](https://github.com/lertaro/lertaro/blob/main/App/Services/Plugin/PluginManager.cs): `App/Services/Plugin/PluginManager.cs`
- [Plugin search SDK](https://github.com/lertaro/lertaro/blob/main/PluginSdk/Services/SearchQueryService.cs): `PluginSdk/Services/SearchQueryService.cs`
- [LocalSend](https://github.com/lertaro/lertaro/blob/main/Core/Services/LocalSend/LocalSendServiceManager.cs): `Core/Services/LocalSend/LocalSendServiceManager.cs`

### App and service

- [WPF application](https://github.com/lertaro/lertaro/blob/main/App/App.xaml.cs): `App/App.xaml.cs`
- [Background service](https://github.com/lertaro/lertaro/blob/main/Service/Program.cs): `Service/Program.cs`
- [CLI client](https://github.com/lertaro/lertaro/blob/main/Cli/Search/AppSearchPipeClient.cs): `Cli/Search/AppSearchPipeClient.cs`

### Other components

- **User**

## Connections

- User → Search windows: enters query
- Search windows → Query dispatch: submits query
- Query dispatch → Search execution: dispatches search (evidence: `App/ViewModels/Search/Dispatch/SearchQueryDispatchController.cs`)
- Search execution → Search service: requests search (evidence: `App/ViewModels/Search/SearchExecutionEngine.cs`)
- Search service → Search engine: searches index
- Search service → Result rows: streams results
- Search engine → USN drive index: uses indexer (evidence: `Core/SearchEngine.cs`)
- Index startup → USN drive index: initializes index (evidence: `Core/SearchEngineInitializer.cs`)
- Index startup → Index cache: loads cache (evidence: `Core/SearchEngineInitializer.cs`)
- Drive maintenance → USN drive index: maintains drives (evidence: `Core/DriveMonitoring/SearchEngineDriveMaintenance.cs`)
- Drive maintenance → Index cache: deletes cache (evidence: `Core/DriveMonitoring/SearchEngineDriveMaintenance.cs`)
- User → Quick panel: opens panel
- User → Inline search: invokes inline
- User → Shell actions: opens actions
- User → QuickLook preview: previews files
- User → Disk treemap: explores disk
- Query dispatch → Plugin manager: dispatches plugins (evidence: `App/ViewModels/Search/Dispatch/SearchQueryDispatchController.cs`)
- Plugin manager → Plugin search SDK: exposes search SDK
- User → LocalSend: shares files
- WPF application → Search windows: hosts windows
- Background service → Search service: hosts search
- CLI client → Search service: requests search
