# zuri09/dorkinator architecture

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

## Overview

Dorkinator supports two workflows: a local browser workspace for generating and exploring search links, and a CLI that accepts one or more domains, generates categorized queries, and exports TXT/CSV/JSON. Its optional AI workflow searches those queries, filters results to approved scope, fetches page text without following redirects, and asks local Ollama to produce a review report. The README documents the browser and SearXNG capabilities; their implementation details were not sampled, so those links are shown only where documented.

Main entry points: [`dorkinator.py`](https://github.com/zuri09/dorkinator/blob/main/dorkinator.py) (AI Workflow), [`search.py`](https://github.com/zuri09/dorkinator/blob/main/search.py) (Result Collection), [`triage.py`](https://github.com/zuri09/dorkinator/blob/main/triage.py) (Page Fetch), [`index.html`](https://github.com/zuri09/dorkinator/blob/main/index.html) (Browser Workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Query Discovery"]
  node_query_builder["Query Builder<br/>[dorkinator.py]"]
  node_query_categories["Query Categories<br/>[dorkinator.py]"]
  node_search_links["Search Links<br/>[dorkinator.py]"]
  node_browser_workspace["Browser Workspace<br/>[index.html]"]
end

subgraph group_cli["CLI Workflow"]
  node_cli_entry["CLI Entry<br/>[dorkinator.py]"]
  node_domain_input["Domain Input<br/>[dorkinator.py]"]
  node_exporter["TXT CSV JSON<br/>[dorkinator.py]"]
end

subgraph group_search["AI Search"]
  node_ai_dispatch["AI Workflow<br/>[dorkinator.py]"]
  node_search_collection["Result Collection<br/>[search.py]"]
  node_brave["Brave Search"]
  node_searxng["SearXNG"]
  node_scope_filter["Scope Filter<br/>[search.py]"]
end

subgraph group_triage["Local Triage"]
  node_page_fetch["Page Fetch<br/>[triage.py]"]
  node_text_extract["Text Extraction<br/>[triage.py]"]
  node_ollama_triage["Ollama Triage<br/>[triage.py]"]
  node_triage_report["Triage Report<br/>[triage.py]"]
end

node_operator(("Authorized User"))
node_ollama["Local Ollama"]
node_search_engines["Google or Bing"]
node_target_sites["In-scope Websites"]

node_operator -->|"runs"| node_cli_entry
node_cli_entry -->|"loads"| node_domain_input
node_cli_entry -->|"generates"| node_query_builder
node_query_builder -->|"uses"| node_query_categories
node_query_builder -->|"creates"| node_search_links
node_cli_entry -->|"writes"| node_exporter
node_operator -->|"opens"| node_browser_workspace
node_browser_workspace -->|"opens links"| node_search_engines
node_operator -->|"enables"| node_ai_dispatch
node_ai_dispatch -->|"calls"| node_search_collection
node_search_collection -.->|"queries"| node_brave
node_search_collection -.->|"queries"| node_searxng
node_ai_dispatch -->|"filters results"| node_scope_filter
node_ai_dispatch -->|"triages URLs"| node_page_fetch
node_page_fetch -->|"requests pages"| node_target_sites
node_page_fetch -->|"extracts text"| node_text_extract
node_ai_dispatch -->|"calls"| node_ollama_triage
node_ollama_triage -->|"sends text"| node_ollama
node_ollama_triage -->|"writes"| node_triage_report

click node_cli_entry "https://github.com/zuri09/dorkinator/blob/main/dorkinator.py"
click node_domain_input "https://github.com/zuri09/dorkinator/blob/main/dorkinator.py"
click node_query_builder "https://github.com/zuri09/dorkinator/blob/main/dorkinator.py"
click node_query_categories "https://github.com/zuri09/dorkinator/blob/main/dorkinator.py"
click node_search_links "https://github.com/zuri09/dorkinator/blob/main/dorkinator.py"
click node_exporter "https://github.com/zuri09/dorkinator/blob/main/dorkinator.py"
click node_browser_workspace "https://github.com/zuri09/dorkinator/blob/main/index.html"
click node_ai_dispatch "https://github.com/zuri09/dorkinator/blob/main/dorkinator.py"
click node_search_collection "https://github.com/zuri09/dorkinator/blob/main/search.py"
click node_searxng "https://github.com/zuri09/dorkinator/tree/main/searxng"
click node_scope_filter "https://github.com/zuri09/dorkinator/blob/main/search.py"
click node_page_fetch "https://github.com/zuri09/dorkinator/blob/main/triage.py"
click node_text_extract "https://github.com/zuri09/dorkinator/blob/main/triage.py"
click node_ollama_triage "https://github.com/zuri09/dorkinator/blob/main/triage.py"
click node_triage_report "https://github.com/zuri09/dorkinator/blob/main/triage.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_query_builder,node_query_categories,node_search_links,node_browser_workspace,node_operator toneBlue
class node_cli_entry,node_domain_input,node_exporter toneAmber
class node_ai_dispatch,node_search_collection,node_brave,node_searxng,node_scope_filter toneMint
class node_page_fetch,node_text_extract,node_ollama_triage,node_triage_report toneRose
class node_ollama,node_search_engines,node_target_sites toneIndigo
```

## Components

### Query Discovery

- [Query Builder](https://github.com/zuri09/dorkinator/blob/main/dorkinator.py): `dorkinator.py`
- [Query Categories](https://github.com/zuri09/dorkinator/blob/main/dorkinator.py): `dorkinator.py`
- [Search Links](https://github.com/zuri09/dorkinator/blob/main/dorkinator.py): `dorkinator.py`
- [Browser Workspace](https://github.com/zuri09/dorkinator/blob/main/index.html): `index.html`

### CLI Workflow

- [CLI Entry](https://github.com/zuri09/dorkinator/blob/main/dorkinator.py): `dorkinator.py`
- [Domain Input](https://github.com/zuri09/dorkinator/blob/main/dorkinator.py): `dorkinator.py`
- [TXT CSV JSON](https://github.com/zuri09/dorkinator/blob/main/dorkinator.py): `dorkinator.py`

### AI Search

- [AI Workflow](https://github.com/zuri09/dorkinator/blob/main/dorkinator.py): `dorkinator.py`
- [Result Collection](https://github.com/zuri09/dorkinator/blob/main/search.py): `search.py`
- **Brave Search**
- [SearXNG](https://github.com/zuri09/dorkinator/tree/main/searxng): `searxng`
- [Scope Filter](https://github.com/zuri09/dorkinator/blob/main/search.py): `search.py`

### Local Triage

- [Page Fetch](https://github.com/zuri09/dorkinator/blob/main/triage.py): `triage.py`
- [Text Extraction](https://github.com/zuri09/dorkinator/blob/main/triage.py): `triage.py`
- [Ollama Triage](https://github.com/zuri09/dorkinator/blob/main/triage.py): `triage.py`
- [Triage Report](https://github.com/zuri09/dorkinator/blob/main/triage.py): `triage.py`

### Other components

- **Authorized User**
- **Local Ollama**
- **Google or Bing**
- **In-scope Websites**

## Connections

- Authorized User → CLI Entry: runs (evidence: `README.md`)
- CLI Entry → Domain Input: loads (evidence: `dorkinator.py`)
- CLI Entry → Query Builder: generates (evidence: `dorkinator.py`)
- Query Builder → Query Categories: uses (evidence: `dorkinator.py`)
- Query Builder → Search Links: creates (evidence: `dorkinator.py`)
- CLI Entry → TXT CSV JSON: writes (evidence: `dorkinator.py`)
- Authorized User → Browser Workspace: opens (evidence: `README.md`)
- Browser Workspace → Google or Bing: opens links (evidence: `README.md`)
- Authorized User → AI Workflow: enables (evidence: `README.md`)
- AI Workflow → Result Collection: calls (evidence: `dorkinator.py`)
- Result Collection → Brave Search: queries (evidence: `search.py`)
- Result Collection → SearXNG: queries (evidence: `search.py`)
- AI Workflow → Scope Filter: filters results (evidence: `dorkinator.py`)
- AI Workflow → Page Fetch: triages URLs (evidence: `dorkinator.py`)
- Page Fetch → In-scope Websites: requests pages (evidence: `triage.py`)
- Page Fetch → Text Extraction: extracts text (evidence: `triage.py`)
- AI Workflow → Ollama Triage: calls (evidence: `dorkinator.py`)
- Ollama Triage → Local Ollama: sends text (evidence: `triage.py`)
- Ollama Triage → Triage Report: writes (evidence: `triage.py`)
