# quirky1869/seekr architecture

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

- Interactive diagram: https://gitdiagram.com/quirky1869/seekr
- Repository: https://github.com/quirky1869/seekr

## Overview

SEEKR is a bilingual terminal interface for configuring and running file searches. Users enter basic paths and file types, add filters and advanced options, then run `find` and browse results; optional grep mode adds matching-file and occurrence results. The TUI also previews a command and supports clipboard copying. The sampled code shows the main search dispatch and finder behavior; some UI actions and integrations are documented in the README but their implementation details are not fully excerpted.

Main entry points: [`internal/tui/model.go`](https://github.com/quirky1869/seekr/blob/main/internal/tui/model.go) (App state and input), [`internal/finder/finder.go`](https://github.com/quirky1869/seekr/blob/main/internal/finder/finder.go) (Search runner), [`internal/tui/views.go`](https://github.com/quirky1869/seekr/blob/main/internal/tui/views.go) (Tabbed views), [`main.go`](https://github.com/quirky1869/seekr/blob/main/main.go) (TUI startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Terminal interaction"]
  node_app["TUI startup<br/>[main.go]"]
  node_state["App state and input<br/>[model.go]"]
  node_searchform["Search options<br/>[model.go]"]
  node_commandpreview["Command preview<br/>[model.go]"]
  node_results["Result navigation<br/>[model.go]"]
end

subgraph group_search["Search execution"]
  node_options["Finder options<br/>[finder.go]"]
  node_builder["Find argument builder<br/>[finder.go]"]
  node_runner["Search runner<br/>[finder.go]"]
  node_grepresults["Grep matching and occurrences<br/>[finder.go]"]
end

subgraph group_presentation["Presentation and language"]
  node_views["Tabbed views<br/>[views.go]"]
  node_styles["Visual styling<br/>[styles.go]"]
  node_translations["EN/FR translations<br/>[translations.go]"]
end

subgraph group_external["System commands"]
  node_findcmd["find command"]
  node_grepcmd["grep command"]
  node_clipboard["System clipboard"]
end

node_user(("Terminal user"))

node_user -->|"starts application"| node_app
node_app -->|"initializes model"| node_state
node_user -->|"enters options"| node_state
node_state -->|"tracks inputs"| node_searchform
node_state -->|"runs search"| node_runner
node_searchform -->|"builds options"| node_options
node_options -->|"supplies parameters"| node_builder
node_runner -->|"builds arguments"| node_builder
node_runner -->|"executes search"| node_findcmd
node_runner -->|"collects matches"| node_grepresults
node_grepresults -->|"executes matching"| node_grepcmd
node_runner -->|"returns results"| node_state
node_state -->|"updates viewports"| node_results
node_user -->|"browses results"| node_results
node_state -->|"builds preview"| node_commandpreview
node_views -->|"renders command"| node_commandpreview
node_state -->|"loads language"| node_translations
node_views -->|"uses labels"| node_translations
node_views -.->|"uses styling"| node_styles
node_user -.->|"copies command"| node_clipboard

click node_app "https://github.com/quirky1869/seekr/blob/main/main.go"
click node_state "https://github.com/quirky1869/seekr/blob/main/internal/tui/model.go"
click node_searchform "https://github.com/quirky1869/seekr/blob/main/internal/tui/model.go"
click node_commandpreview "https://github.com/quirky1869/seekr/blob/main/internal/tui/model.go"
click node_results "https://github.com/quirky1869/seekr/blob/main/internal/tui/model.go"
click node_views "https://github.com/quirky1869/seekr/blob/main/internal/tui/views.go"
click node_styles "https://github.com/quirky1869/seekr/blob/main/internal/tui/styles.go"
click node_translations "https://github.com/quirky1869/seekr/blob/main/internal/i18n/translations.go"
click node_options "https://github.com/quirky1869/seekr/blob/main/internal/finder/finder.go"
click node_builder "https://github.com/quirky1869/seekr/blob/main/internal/finder/finder.go"
click node_runner "https://github.com/quirky1869/seekr/blob/main/internal/finder/finder.go"
click node_grepresults "https://github.com/quirky1869/seekr/blob/main/internal/finder/finder.go"

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_state,node_searchform,node_commandpreview,node_results,node_user toneBlue
class node_options,node_builder,node_runner,node_grepresults toneAmber
class node_views,node_styles,node_translations toneMint
class node_findcmd,node_grepcmd,node_clipboard toneRose
```

## Components

### Terminal interaction

- [TUI startup](https://github.com/quirky1869/seekr/blob/main/main.go): `main.go`
- [App state and input](https://github.com/quirky1869/seekr/blob/main/internal/tui/model.go): `internal/tui/model.go`
- [Search options](https://github.com/quirky1869/seekr/blob/main/internal/tui/model.go): `internal/tui/model.go`
- [Command preview](https://github.com/quirky1869/seekr/blob/main/internal/tui/model.go): `internal/tui/model.go`
- [Result navigation](https://github.com/quirky1869/seekr/blob/main/internal/tui/model.go): `internal/tui/model.go`

### Search execution

- [Finder options](https://github.com/quirky1869/seekr/blob/main/internal/finder/finder.go): `internal/finder/finder.go`
- [Find argument builder](https://github.com/quirky1869/seekr/blob/main/internal/finder/finder.go): `internal/finder/finder.go`
- [Search runner](https://github.com/quirky1869/seekr/blob/main/internal/finder/finder.go): `internal/finder/finder.go`
- [Grep matching and occurrences](https://github.com/quirky1869/seekr/blob/main/internal/finder/finder.go): `internal/finder/finder.go`

### Presentation and language

- [Tabbed views](https://github.com/quirky1869/seekr/blob/main/internal/tui/views.go): `internal/tui/views.go`
- [Visual styling](https://github.com/quirky1869/seekr/blob/main/internal/tui/styles.go): `internal/tui/styles.go`
- [EN/FR translations](https://github.com/quirky1869/seekr/blob/main/internal/i18n/translations.go): `internal/i18n/translations.go`

### System commands

- **find command**
- **grep command**
- **System clipboard**

### Other components

- **Terminal user**

## Connections

- Terminal user → TUI startup: starts application (evidence: `README.md`)
- TUI startup → App state and input: initializes model (evidence: `main.go`)
- Terminal user → App state and input: enters options (evidence: `README.md`)
- App state and input → Search options: tracks inputs (evidence: `internal/tui/model.go`)
- App state and input → Search runner: runs search (evidence: `internal/tui/model.go`)
- Search options → Finder options: builds options (evidence: `internal/tui/model.go`)
- Finder options → Find argument builder: supplies parameters (evidence: `internal/finder/finder.go`)
- Search runner → Find argument builder: builds arguments (evidence: `internal/finder/finder.go`)
- Search runner → find command: executes search (evidence: `internal/finder/finder.go`)
- Search runner → Grep matching and occurrences: collects matches (evidence: `internal/finder/finder.go`)
- Grep matching and occurrences → grep command: executes matching (evidence: `internal/finder/finder.go`)
- Search runner → App state and input: returns results (evidence: `internal/tui/model.go`)
- App state and input → Result navigation: updates viewports (evidence: `internal/tui/model.go`)
- Terminal user → Result navigation: browses results (evidence: `README.md`)
- App state and input → Command preview: builds preview (evidence: `internal/tui/model.go`)
- Tabbed views → Command preview: renders command (evidence: `internal/tui/views.go`)
- App state and input → EN/FR translations: loads language (evidence: `internal/tui/model.go`)
- Tabbed views → EN/FR translations: uses labels (evidence: `internal/tui/views.go`)
- Tabbed views → Visual styling: uses styling
- Terminal user → System clipboard: copies command (evidence: `README.md`)
