# mochinek0/dsh-web-search-free architecture

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

- Interactive diagram: https://gitdiagram.com/mochinek0/dsh-web-search-free
- Repository: https://github.com/mochinek0/dsh-web-search-free

## Overview

This is a DeepSeek Harness plugin that replaces the default web-search and fetch backends with configurable search engines and automatic fallback. A user configures engine keys and order in the web UI; the host plugin reads that configuration, registers search and fetch providers, and tries configured engines until one succeeds. Provider adapters normalize results, snippets, dates, and fetched text. The README documents the routing and client configuration; provider call-loop details are only partially excerpted, so the graph omits finer-grained control-flow claims.

Main entry points: [`src/providers/index.ts`](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/index.ts) (Provider registry), [`src/types.ts`](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/types.ts) (Provider contracts), [`src/providers/fields.ts`](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/fields.ts) (Result helpers), [`src/index.ts`](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/index.ts) (Host plugin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_integration["Harness integration"]
  node_harness["Dsh web tools"]
  node_plugin["Host plugin<br/>[index.ts]"]
end

subgraph group_configuration["Configuration"]
  node_settings["Live settings<br/>[index.ts]"]
  node_card["Settings card<br/>[client.tsx]"]
end

subgraph group_orchestration["Search and fetch"]
  node_search["Search fallback<br/>[index.ts]"]
  node_fetch["Fetch fallback<br/>[index.ts]"]
end

subgraph group_adapters["Provider adapters"]
  node_registry["Provider registry<br/>[index.ts]"]
  node_types["Provider contracts<br/>[types.ts]"]
  node_fields["Result helpers<br/>[fields.ts]"]
  node_anysearch["AnySearch<br/>[anysearch.ts]"]
  node_brave["Brave Search<br/>[brave.ts]"]
  node_exa["Exa<br/>[exa.ts]"]
  node_firecrawl["Firecrawl<br/>[firecrawl.ts]"]
  node_jina["Jina AI<br/>[jina.ts]"]
  node_serpapi["SerpApi<br/>[serpapi.ts]"]
  node_serpingapi["Serping API<br/>[serpingapi.ts]"]
  node_tavily["Tavily<br/>[tavily.ts]"]
  node_tinyfish["TinyFish<br/>[tinyfish.ts]"]
end

node_user(("User"))
node_engine_apis{{"Search engine APIs"}}

node_user -->|"requests search or fetch"| node_harness
node_harness -->|"routes web providers"| node_plugin
node_card -->|"reads and writes"| node_settings
node_plugin -->|"resolves config"| node_settings
node_plugin -->|"registers search"| node_search
node_plugin -->|"registers fetch"| node_fetch
node_search -->|"selects providers"| node_registry
node_fetch -->|"selects providers"| node_registry
node_registry -->|"exports adapter"| node_anysearch
node_registry -->|"exports adapter"| node_brave
node_registry -->|"exports adapter"| node_exa
node_registry -->|"exports adapter"| node_firecrawl
node_registry -->|"exports adapter"| node_jina
node_registry -->|"exports adapter"| node_serpapi
node_registry -->|"exports adapter"| node_serpingapi
node_registry -->|"exports adapter"| node_tavily
node_registry -->|"exports adapter"| node_tinyfish
node_anysearch -->|"uses contracts"| node_types
node_brave -->|"uses contracts"| node_types
node_exa -->|"uses contracts"| node_types
node_firecrawl -->|"uses contracts"| node_types
node_jina -->|"uses contracts"| node_types
node_serpapi -->|"uses contracts"| node_types
node_serpingapi -->|"uses contracts"| node_types
node_tavily -->|"uses contracts"| node_types
node_tinyfish -->|"uses contracts"| node_types
node_anysearch -->|"formats snippets"| node_fields
node_brave -->|"formats results"| node_fields
node_exa -->|"formats results"| node_fields
node_firecrawl -->|"formats snippets"| node_fields
node_jina -->|"formats results"| node_fields
node_serpapi -->|"formats dates"| node_fields
node_serpingapi -->|"formats dates"| node_fields
node_tavily -->|"formats dates"| node_fields
node_tinyfish -->|"formats dates"| node_fields
node_anysearch -->|"requests search and fetch"| node_engine_apis
node_brave -->|"requests search"| node_engine_apis
node_exa -->|"requests search and fetch"| node_engine_apis
node_firecrawl -->|"requests search and fetch"| node_engine_apis
node_jina -->|"requests search and fetch"| node_engine_apis
node_serpapi -->|"requests search"| node_engine_apis
node_serpingapi -->|"requests search"| node_engine_apis
node_tavily -->|"requests search and fetch"| node_engine_apis
node_tinyfish -->|"requests search and fetch"| node_engine_apis

click node_plugin "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/index.ts"
click node_settings "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/index.ts"
click node_card "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/client.tsx"
click node_search "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/index.ts"
click node_fetch "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/index.ts"
click node_registry "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/index.ts"
click node_types "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/types.ts"
click node_fields "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/fields.ts"
click node_anysearch "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/anysearch.ts"
click node_brave "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/brave.ts"
click node_exa "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/exa.ts"
click node_firecrawl "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/firecrawl.ts"
click node_jina "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/jina.ts"
click node_serpapi "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/serpapi.ts"
click node_serpingapi "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/serpingapi.ts"
click node_tavily "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/tavily.ts"
click node_tinyfish "https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/tinyfish.ts"

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_harness,node_plugin,node_user toneBlue
class node_settings,node_card toneAmber
class node_search,node_fetch,node_engine_apis toneMint
class node_registry,node_types,node_fields,node_anysearch,node_brave,node_exa,node_firecrawl,node_jina,node_serpapi,node_serpingapi,node_tavily,node_tinyfish toneRose
```

## Components

### Harness integration

- **Dsh web tools**
- [Host plugin](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/index.ts): `src/index.ts`

### Configuration

- [Live settings](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/index.ts): `src/index.ts`
- [Settings card](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/client.tsx): `src/client.tsx`

### Search and fetch

- [Search fallback](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/index.ts): `src/index.ts`
- [Fetch fallback](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/index.ts): `src/index.ts`

### Provider adapters

- [Provider registry](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/index.ts): `src/providers/index.ts`
- [Provider contracts](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/types.ts): `src/types.ts`
- [Result helpers](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/fields.ts): `src/providers/fields.ts`
- [AnySearch](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/anysearch.ts): `src/providers/anysearch.ts`
- [Brave Search](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/brave.ts): `src/providers/brave.ts`
- [Exa](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/exa.ts): `src/providers/exa.ts`
- [Firecrawl](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/firecrawl.ts): `src/providers/firecrawl.ts`
- [Jina AI](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/jina.ts): `src/providers/jina.ts`
- [SerpApi](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/serpapi.ts): `src/providers/serpapi.ts`
- [Serping API](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/serpingapi.ts): `src/providers/serpingapi.ts`
- [Tavily](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/tavily.ts): `src/providers/tavily.ts`
- [TinyFish](https://github.com/mochinek0/dsh-web-search-free/blob/main/src/providers/tinyfish.ts): `src/providers/tinyfish.ts`

### Other components

- **User**
- **Search engine APIs**

## Connections

- User → Dsh web tools: requests search or fetch (evidence: `README.md`)
- Dsh web tools → Host plugin: routes web providers (evidence: `README.md`)
- Settings card → Live settings: reads and writes (evidence: `README.md`)
- Host plugin → Live settings: resolves config (evidence: `src/index.ts`)
- Host plugin → Search fallback: registers search (evidence: `src/index.ts`)
- Host plugin → Fetch fallback: registers fetch (evidence: `src/index.ts`)
- Search fallback → Provider registry: selects providers (evidence: `src/index.ts`)
- Fetch fallback → Provider registry: selects providers (evidence: `src/index.ts`)
- Provider registry → AnySearch: exports adapter (evidence: `src/providers/index.ts`)
- Provider registry → Brave Search: exports adapter (evidence: `src/providers/index.ts`)
- Provider registry → Exa: exports adapter (evidence: `src/providers/index.ts`)
- Provider registry → Firecrawl: exports adapter (evidence: `src/providers/index.ts`)
- Provider registry → Jina AI: exports adapter (evidence: `src/providers/index.ts`)
- Provider registry → SerpApi: exports adapter (evidence: `src/providers/index.ts`)
- Provider registry → Serping API: exports adapter (evidence: `src/providers/index.ts`)
- Provider registry → Tavily: exports adapter (evidence: `src/providers/index.ts`)
- Provider registry → TinyFish: exports adapter (evidence: `src/providers/index.ts`)
- AnySearch → Provider contracts: uses contracts (evidence: `src/providers/anysearch.ts`)
- Brave Search → Provider contracts: uses contracts (evidence: `src/providers/brave.ts`)
- Exa → Provider contracts: uses contracts (evidence: `src/providers/exa.ts`)
- Firecrawl → Provider contracts: uses contracts (evidence: `src/providers/firecrawl.ts`)
- Jina AI → Provider contracts: uses contracts (evidence: `src/providers/jina.ts`)
- SerpApi → Provider contracts: uses contracts (evidence: `src/providers/serpapi.ts`)
- Serping API → Provider contracts: uses contracts (evidence: `src/providers/serpingapi.ts`)
- Tavily → Provider contracts: uses contracts (evidence: `src/providers/tavily.ts`)
- TinyFish → Provider contracts: uses contracts (evidence: `src/providers/tinyfish.ts`)
- AnySearch → Result helpers: formats snippets (evidence: `src/providers/anysearch.ts`)
- Brave Search → Result helpers: formats results (evidence: `src/providers/brave.ts`)
- Exa → Result helpers: formats results (evidence: `src/providers/exa.ts`)
- Firecrawl → Result helpers: formats snippets (evidence: `src/providers/firecrawl.ts`)
- Jina AI → Result helpers: formats results (evidence: `src/providers/jina.ts`)
- SerpApi → Result helpers: formats dates (evidence: `src/providers/serpapi.ts`)
- Serping API → Result helpers: formats dates (evidence: `src/providers/serpingapi.ts`)
- Tavily → Result helpers: formats dates (evidence: `src/providers/tavily.ts`)
- TinyFish → Result helpers: formats dates (evidence: `src/providers/tinyfish.ts`)
- AnySearch → Search engine APIs: requests search and fetch (evidence: `README.md`)
- Brave Search → Search engine APIs: requests search (evidence: `README.md`)
- Exa → Search engine APIs: requests search and fetch (evidence: `README.md`)
- Firecrawl → Search engine APIs: requests search and fetch (evidence: `README.md`)
- Jina AI → Search engine APIs: requests search and fetch (evidence: `README.md`)
- SerpApi → Search engine APIs: requests search (evidence: `README.md`)
- Serping API → Search engine APIs: requests search (evidence: `README.md`)
- Tavily → Search engine APIs: requests search and fetch (evidence: `README.md`)
- TinyFish → Search engine APIs: requests search and fetch (evidence: `README.md`)
