# radimsem/omafind architecture

> Architecture diagram of the GitHub repository radimsem/omafind, 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/radimsem/omafind
- Repository: https://github.com/radimsem/omafind

## Overview

omafind is a local Omarchy desktop file-search plugin. The user configures the engine and folders, files are indexed into per-volume stores, and searches combine exact-word retrieval with optional semantic ranking before results can be previewed or opened at their match. The graph includes the documented multimodal indexing and setup capabilities. Some subsystem links rely on README statements or SOURCE INDEX references; unsampled implementation details are not treated as inspected evidence.

Main entry points: [`helper/omafindd/ipc.py`](https://github.com/radimsem/omafind/blob/main/helper/omafindd/ipc.py) (Socket API), [`helper/omafindd/search.py`](https://github.com/radimsem/omafind/blob/main/helper/omafindd/search.py) (Hybrid search), [`helper/omafindd/setup.py`](https://github.com/radimsem/omafind/blob/main/helper/omafindd/setup.py) (Setup coordinator), [`helper/omafindd/main.py`](https://github.com/radimsem/omafind/blob/main/helper/omafindd/main.py) (Daemon entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop overlay"]
  node_overlay["Search overlay<br/>[searchState.js]"]
  node_result_ui["Result display<br/>[results.js]"]
  node_setup_ui["Setup flow<br/>[setup.js]"]
end

subgraph group_daemon["Daemon and setup"]
  node_daemon_main["Daemon entry<br/>[main.py]"]
  node_ipc["Socket API<br/>[ipc.py]"]
  node_setup["Setup coordinator<br/>[setup.py]"]
  node_discovery["Folder discovery<br/>[discovery.py]"]
  node_install["Engine and model install<br/>[install.py]"]
  node_service["Embedding service<br/>[service.py]"]
end

subgraph group_index["Indexing pipeline"]
  node_crawler["Filesystem crawler<br/>[crawler.py]"]
  node_watcher["Change watcher<br/>[watcher.py]"]
  node_jobs["Indexing jobs<br/>[jobs.py]"]
  node_extractors["Multimodal extraction<br/>[extractors.py]"]
  node_rules["File rules<br/>[rules.py]"]
end

subgraph group_search["Search and results"]
  node_searcher["Hybrid search<br/>[search.py]"]
  node_text_search["Word matching<br/>[search_text.py]"]
  node_embedding["Embedding adapter<br/>[embedding.py]"]
  node_preview["Match preview<br/>[preview.py]"]
  node_opener["Result opener<br/>[opener.py]"]
end

subgraph group_data["Local data and runtime"]
  node_embedder["Embedding runtime<br/>[embedder.py]"]
  node_store[("Volume index store<br/>[store.py]")]
  node_state["Persistent state<br/>[state.py]"]
end

node_user(("Desktop user"))

node_user -->|"searches"| node_overlay
node_user -->|"configures"| node_setup_ui
node_overlay -->|"sends queries"| node_ipc
node_ipc -->|"dispatches search"| node_service
node_service -->|"queries"| node_searcher
node_searcher -->|"matches words"| node_text_search
node_searcher -->|"requests vectors"| node_embedding
node_embedding -->|"adapts requests"| node_embedder
node_searcher -->|"reads index"| node_store
node_searcher -->|"returns results"| node_result_ui
node_result_ui -.->|"requests preview"| node_preview
node_ipc -->|"dispatches preview"| node_preview
node_ipc -->|"dispatches open"| node_opener
node_ipc -->|"uses state"| node_state
node_daemon_main -->|"starts socket API"| node_ipc
node_daemon_main -->|"starts service"| node_service
node_daemon_main -->|"starts setup"| node_setup
node_daemon_main -->|"starts watcher"| node_watcher
node_setup_ui -->|"sends setup requests"| node_ipc
node_ipc -->|"dispatches setup"| node_setup
node_setup -->|"discovers folders"| node_discovery
node_setup -->|"installs engine"| node_install
node_setup -->|"uses index"| node_store
node_crawler -->|"updates index"| node_store
node_watcher -->|"checks changes"| node_rules
node_jobs -->|"extracts content"| node_extractors
node_jobs -->|"embeds content"| node_embedding
node_jobs -->|"writes index"| node_store
node_extractors -->|"uses file rules"| node_rules
node_preview -->|"extracts text"| node_extractors
node_preview -->|"prepares target"| node_opener

click node_overlay "https://github.com/radimsem/omafind/blob/main/lib/searchState.js"
click node_result_ui "https://github.com/radimsem/omafind/blob/main/lib/results.js"
click node_setup_ui "https://github.com/radimsem/omafind/blob/main/lib/setup.js"
click node_daemon_main "https://github.com/radimsem/omafind/blob/main/helper/omafindd/main.py"
click node_ipc "https://github.com/radimsem/omafind/blob/main/helper/omafindd/ipc.py"
click node_setup "https://github.com/radimsem/omafind/blob/main/helper/omafindd/setup.py"
click node_discovery "https://github.com/radimsem/omafind/blob/main/helper/omafindd/discovery.py"
click node_install "https://github.com/radimsem/omafind/blob/main/helper/omafindd/install.py"
click node_service "https://github.com/radimsem/omafind/blob/main/helper/omafindd/service.py"
click node_crawler "https://github.com/radimsem/omafind/blob/main/helper/omafindd/crawler.py"
click node_watcher "https://github.com/radimsem/omafind/blob/main/helper/omafindd/watcher.py"
click node_jobs "https://github.com/radimsem/omafind/blob/main/helper/omafindd/jobs.py"
click node_extractors "https://github.com/radimsem/omafind/blob/main/helper/omafindd/extractors.py"
click node_rules "https://github.com/radimsem/omafind/blob/main/helper/omafindd/rules.py"
click node_searcher "https://github.com/radimsem/omafind/blob/main/helper/omafindd/search.py"
click node_text_search "https://github.com/radimsem/omafind/blob/main/helper/omafindd/search_text.py"
click node_embedding "https://github.com/radimsem/omafind/blob/main/helper/omafindd/embedding.py"
click node_embedder "https://github.com/radimsem/omafind/blob/main/helper/omafindd/embedder.py"
click node_store "https://github.com/radimsem/omafind/blob/main/helper/omafindd/store.py"
click node_preview "https://github.com/radimsem/omafind/blob/main/helper/omafindd/preview.py"
click node_opener "https://github.com/radimsem/omafind/blob/main/helper/omafindd/opener.py"
click node_state "https://github.com/radimsem/omafind/blob/main/helper/omafindd/state.py"

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_overlay,node_result_ui,node_setup_ui,node_user toneBlue
class node_daemon_main,node_ipc,node_setup,node_discovery,node_install,node_service toneAmber
class node_crawler,node_watcher,node_jobs,node_extractors,node_rules toneMint
class node_searcher,node_text_search,node_embedding,node_preview,node_opener toneRose
class node_embedder,node_store,node_state toneIndigo
```

## Components

### Desktop overlay

- [Search overlay](https://github.com/radimsem/omafind/blob/main/lib/searchState.js): `lib/searchState.js`
- [Result display](https://github.com/radimsem/omafind/blob/main/lib/results.js): `lib/results.js`
- [Setup flow](https://github.com/radimsem/omafind/blob/main/lib/setup.js): `lib/setup.js`

### Daemon and setup

- [Daemon entry](https://github.com/radimsem/omafind/blob/main/helper/omafindd/main.py): `helper/omafindd/main.py`
- [Socket API](https://github.com/radimsem/omafind/blob/main/helper/omafindd/ipc.py): `helper/omafindd/ipc.py`
- [Setup coordinator](https://github.com/radimsem/omafind/blob/main/helper/omafindd/setup.py): `helper/omafindd/setup.py`
- [Folder discovery](https://github.com/radimsem/omafind/blob/main/helper/omafindd/discovery.py): `helper/omafindd/discovery.py`
- [Engine and model install](https://github.com/radimsem/omafind/blob/main/helper/omafindd/install.py): `helper/omafindd/install.py`
- [Embedding service](https://github.com/radimsem/omafind/blob/main/helper/omafindd/service.py): `helper/omafindd/service.py`

### Indexing pipeline

- [Filesystem crawler](https://github.com/radimsem/omafind/blob/main/helper/omafindd/crawler.py): `helper/omafindd/crawler.py`
- [Change watcher](https://github.com/radimsem/omafind/blob/main/helper/omafindd/watcher.py): `helper/omafindd/watcher.py`
- [Indexing jobs](https://github.com/radimsem/omafind/blob/main/helper/omafindd/jobs.py): `helper/omafindd/jobs.py`
- [Multimodal extraction](https://github.com/radimsem/omafind/blob/main/helper/omafindd/extractors.py): `helper/omafindd/extractors.py`
- [File rules](https://github.com/radimsem/omafind/blob/main/helper/omafindd/rules.py): `helper/omafindd/rules.py`

### Search and results

- [Hybrid search](https://github.com/radimsem/omafind/blob/main/helper/omafindd/search.py): `helper/omafindd/search.py`
- [Word matching](https://github.com/radimsem/omafind/blob/main/helper/omafindd/search_text.py): `helper/omafindd/search_text.py`
- [Embedding adapter](https://github.com/radimsem/omafind/blob/main/helper/omafindd/embedding.py): `helper/omafindd/embedding.py`
- [Match preview](https://github.com/radimsem/omafind/blob/main/helper/omafindd/preview.py): `helper/omafindd/preview.py`
- [Result opener](https://github.com/radimsem/omafind/blob/main/helper/omafindd/opener.py): `helper/omafindd/opener.py`

### Local data and runtime

- [Embedding runtime](https://github.com/radimsem/omafind/blob/main/helper/omafindd/embedder.py): `helper/omafindd/embedder.py`
- [Volume index store](https://github.com/radimsem/omafind/blob/main/helper/omafindd/store.py): `helper/omafindd/store.py`
- [Persistent state](https://github.com/radimsem/omafind/blob/main/helper/omafindd/state.py): `helper/omafindd/state.py`

### Other components

- **Desktop user**

## Connections

- Desktop user → Search overlay: searches
- Desktop user → Setup flow: configures
- Search overlay → Socket API: sends queries
- Socket API → Embedding service: dispatches search (evidence: `helper/omafindd/ipc.py`)
- Embedding service → Hybrid search: queries (evidence: `helper/omafindd/service.py`)
- Hybrid search → Word matching: matches words (evidence: `helper/omafindd/search.py`)
- Hybrid search → Embedding adapter: requests vectors (evidence: `helper/omafindd/search.py`)
- Embedding adapter → Embedding runtime: adapts requests (evidence: `helper/omafindd/embedding.py`)
- Hybrid search → Volume index store: reads index (evidence: `helper/omafindd/search.py`)
- Hybrid search → Result display: returns results
- Result display → Match preview: requests preview
- Socket API → Match preview: dispatches preview (evidence: `helper/omafindd/ipc.py`)
- Socket API → Result opener: dispatches open (evidence: `helper/omafindd/ipc.py`)
- Socket API → Persistent state: uses state (evidence: `helper/omafindd/ipc.py`)
- Daemon entry → Socket API: starts socket API (evidence: `helper/omafindd/main.py`)
- Daemon entry → Embedding service: starts service (evidence: `helper/omafindd/main.py`)
- Daemon entry → Setup coordinator: starts setup (evidence: `helper/omafindd/main.py`)
- Daemon entry → Change watcher: starts watcher (evidence: `helper/omafindd/main.py`)
- Setup flow → Socket API: sends setup requests
- Socket API → Setup coordinator: dispatches setup (evidence: `helper/omafindd/ipc.py`)
- Setup coordinator → Folder discovery: discovers folders (evidence: `helper/omafindd/setup.py`)
- Setup coordinator → Engine and model install: installs engine (evidence: `helper/omafindd/setup.py`)
- Setup coordinator → Volume index store: uses index (evidence: `helper/omafindd/setup.py`)
- Filesystem crawler → Volume index store: updates index (evidence: `helper/omafindd/crawler.py`)
- Change watcher → File rules: checks changes (evidence: `helper/omafindd/watcher.py`)
- Indexing jobs → Multimodal extraction: extracts content (evidence: `helper/omafindd/jobs.py`)
- Indexing jobs → Embedding adapter: embeds content (evidence: `helper/omafindd/jobs.py`)
- Indexing jobs → Volume index store: writes index (evidence: `helper/omafindd/jobs.py`)
- Multimodal extraction → File rules: uses file rules (evidence: `helper/omafindd/extractors.py`)
- Match preview → Multimodal extraction: extracts text (evidence: `helper/omafindd/preview.py`)
- Match preview → Result opener: prepares target (evidence: `helper/omafindd/preview.py`)
