# simeonnv/oxalate architecture

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

- Interactive diagram: https://gitdiagram.com/simeonnv/oxalate
- Repository: https://github.com/simeonnv/oxalate

## Overview

Oxalate is a web search engine with a distributed collection and indexing pipeline. Users submit searches through the frontend; the indexer combines external-engine results with Oxalate results and sends external results to the parser for metadata ingestion. Separately, the outlet provides harvesting capabilities backed by the harvester service. The README identifies the product broadly, while the source excerpts substantiate only parts of the runtime wiring; UI-to-service and outlet-to-harvester links are therefore not asserted.

Main entry points: [`src/bins/harvester/src/main.rs`](https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/main.rs) (Harvester API), [`src/bins/indexer/src/main.rs`](https://github.com/simeonnv/oxalate/blob/main/src/bins/indexer/src/main.rs) (Indexer API), [`src/bins/parser/src/main.rs`](https://github.com/simeonnv/oxalate/blob/main/src/bins/parser/src/main.rs) (Parser API), [`src/bins/parser/src/endpoints/post_insert_webpage.rs`](https://github.com/simeonnv/oxalate/blob/main/src/bins/parser/src/endpoints/post_insert_webpage.rs) (Page ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interfaces"]
  node_frontend["Search UI<br/>[search.vue]"]
  node_graph_ui["Keyword graph UI<br/>[graph.vue]"]
  node_admin_ui["Admin UI<br/>[control.vue]"]
  node_metrics_ui["Metrics UI<br/>[metrics.vue]"]
end

subgraph group_search["Search and indexing"]
  node_indexer["Indexer API<br/>[main.rs]"]
  node_search_endpoint["Search endpoint<br/>[post_search.rs]"]
  node_graph_endpoint["Keyword graph endpoint"]
  node_search_engines["Text search engines<br/>[search_text.rs]"]
  node_engine_adapters["Engine adapters"]
end

subgraph group_harvesting["Harvesting"]
  node_harvester["Harvester API<br/>[main.rs]"]
  node_public_routes["Public routes<br/>[mod.rs]"]
  node_private_routes["Control and metrics<br/>[mod.rs]"]
  node_proxy_middleware["Proxy identity middleware"]
  node_proxy_store["Proxy connection store"]
  node_settings_store["Proxy settings store"]
  node_outlet["Outlet agent<br/>[main.rs]"]
  node_outlet_proxy["Proxy activity<br/>[proxy.rs]"]
  node_uptime["Uptime reporting<br/>[uptime_pinger.rs]"]
end

subgraph group_ingestion["Parsing and storage"]
  node_parser["Parser API<br/>[main.rs]"]
  node_insert_page["Page ingestion"]
  node_insert_meta["Metadata ingestion"]
  node_html_parse["HTML extraction<br/>[parse_html.rs]"]
  node_keyword_split["Keyword splitting"]
  node_postgres_saves["Page persistence"]
  node_meta_saves["Metadata persistence"]
  node_graph_saves["Graph persistence<br/>[save_into_neo4j.rs]"]
end

subgraph group_shared["Shared runtime"]
  node_postgres[("PostgreSQL")]
  node_neo4j[("Neo4j")]
end

node_search_user(("Search user"))
node_external_engines(("External search engines"))

node_search_user -->|"searches"| node_frontend
node_frontend -.->|"submits query"| node_search_endpoint
node_graph_ui -.->|"requests graph"| node_graph_endpoint
node_admin_ui -.->|"controls service"| node_harvester
node_metrics_ui -.->|"requests metrics"| node_harvester
node_indexer -->|"routes to"| node_search_endpoint
node_indexer -->|"routes to"| node_graph_endpoint
node_search_endpoint -->|"calls search"| node_search_engines
node_search_engines -->|"dispatches searches"| node_engine_adapters
node_search_engines -.->|"queries engines"| node_external_engines
node_search_endpoint -->|"posts result metadata"| node_insert_meta
node_parser -->|"routes to"| node_insert_page
node_parser -->|"routes to"| node_insert_meta
node_parser -->|"initializes pool"| node_postgres
node_parser -->|"initializes pool"| node_neo4j
node_indexer -->|"initializes pool"| node_postgres
node_indexer -->|"initializes pool"| node_neo4j
node_insert_page -.->|"parses content"| node_html_parse
node_html_parse -->|"splits text"| node_keyword_split
node_insert_page -.->|"persists page"| node_postgres_saves
node_insert_meta -.->|"persists metadata"| node_meta_saves
node_insert_page -.->|"stores keywords"| node_graph_saves
node_postgres_saves -.->|"writes page data"| node_postgres
node_meta_saves -.->|"writes metadata"| node_postgres
node_graph_saves -.->|"writes graph data"| node_neo4j
node_harvester -->|"mounts routes"| node_public_routes
node_harvester -.->|"mounts routes"| node_private_routes
node_harvester -->|"configures middleware"| node_proxy_middleware
node_harvester -->|"uses store"| node_proxy_store
node_harvester -->|"uses store"| node_settings_store
node_outlet -->|"starts proxy"| node_outlet_proxy
node_outlet -->|"starts reporter"| node_uptime
node_outlet_proxy -.->|"sends proxy activity"| node_harvester
node_uptime -.->|"reports uptime"| node_harvester

click node_frontend "https://github.com/simeonnv/oxalate/blob/main/src/bins/frontend/app/pages/search.vue"
click node_graph_ui "https://github.com/simeonnv/oxalate/blob/main/src/bins/frontend/app/pages/graph.vue"
click node_admin_ui "https://github.com/simeonnv/oxalate/blob/main/src/bins/admin_ui/app/pages/control.vue"
click node_metrics_ui "https://github.com/simeonnv/oxalate/blob/main/src/bins/admin_ui/app/pages/metrics.vue"
click node_indexer "https://github.com/simeonnv/oxalate/blob/main/src/bins/indexer/src/main.rs"
click node_search_endpoint "https://github.com/simeonnv/oxalate/blob/main/src/bins/indexer/src/endpoints/post_search.rs"
click node_graph_endpoint "https://github.com/simeonnv/oxalate/blob/main/src/bins/indexer/src/endpoints/post_keyword_graph.rs"
click node_search_engines "https://github.com/simeonnv/oxalate/blob/main/src/bins/indexer/src/scraping/search_text.rs"
click node_engine_adapters "https://github.com/simeonnv/oxalate/tree/main/src/bins/indexer/src/scraping/text_search_engines"
click node_harvester "https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/main.rs"
click node_public_routes "https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/public_endpoints/mod.rs"
click node_private_routes "https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/private_endpoints/mod.rs"
click node_proxy_middleware "https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/middleware/proxy_id_middleware.rs"
click node_proxy_store "https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/proxy_connection_store.rs"
click node_settings_store "https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/proxy_settings_store.rs"
click node_outlet "https://github.com/simeonnv/oxalate/blob/main/src/bins/outlet/src/main.rs"
click node_outlet_proxy "https://github.com/simeonnv/oxalate/blob/main/src/bins/outlet/src/proxy.rs"
click node_uptime "https://github.com/simeonnv/oxalate/blob/main/src/bins/outlet/src/uptime_pinger.rs"
click node_parser "https://github.com/simeonnv/oxalate/blob/main/src/bins/parser/src/main.rs"
click node_insert_page "https://github.com/simeonnv/oxalate/blob/main/src/bins/parser/src/endpoints/post_insert_webpage.rs"
click node_insert_meta "https://github.com/simeonnv/oxalate/blob/main/src/bins/parser/src/endpoints/post_insert_meta_webpage.rs"
click node_html_parse "https://github.com/simeonnv/oxalate/blob/main/src/libs/parsing/src/parse_html.rs"
click node_keyword_split "https://github.com/simeonnv/oxalate/blob/main/src/libs/parsing/src/split_into_words.rs"
click node_postgres_saves "https://github.com/simeonnv/oxalate/blob/main/src/libs/parsing/src/save_parsed_webpage_into_postgres.rs"
click node_meta_saves "https://github.com/simeonnv/oxalate/blob/main/src/libs/parsing/src/save_meta_webpage_into_postgres.rs"
click node_graph_saves "https://github.com/simeonnv/oxalate/blob/main/src/libs/parsing/src/save_into_neo4j.rs"

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_frontend,node_graph_ui,node_admin_ui,node_metrics_ui,node_search_user toneBlue
class node_indexer,node_search_endpoint,node_graph_endpoint,node_search_engines,node_engine_adapters toneAmber
class node_harvester,node_public_routes,node_private_routes,node_proxy_middleware,node_proxy_store,node_settings_store,node_outlet,node_outlet_proxy,node_uptime toneMint
class node_parser,node_insert_page,node_insert_meta,node_html_parse,node_keyword_split,node_postgres_saves,node_meta_saves,node_graph_saves toneRose
class node_postgres,node_neo4j,node_external_engines toneIndigo
```

## Components

### Web interfaces

- [Search UI](https://github.com/simeonnv/oxalate/blob/main/src/bins/frontend/app/pages/search.vue): `src/bins/frontend/app/pages/search.vue`
- [Keyword graph UI](https://github.com/simeonnv/oxalate/blob/main/src/bins/frontend/app/pages/graph.vue): `src/bins/frontend/app/pages/graph.vue`
- [Admin UI](https://github.com/simeonnv/oxalate/blob/main/src/bins/admin_ui/app/pages/control.vue): `src/bins/admin_ui/app/pages/control.vue`
- [Metrics UI](https://github.com/simeonnv/oxalate/blob/main/src/bins/admin_ui/app/pages/metrics.vue): `src/bins/admin_ui/app/pages/metrics.vue`

### Search and indexing

- [Indexer API](https://github.com/simeonnv/oxalate/blob/main/src/bins/indexer/src/main.rs): `src/bins/indexer/src/main.rs`
- [Search endpoint](https://github.com/simeonnv/oxalate/blob/main/src/bins/indexer/src/endpoints/post_search.rs): `src/bins/indexer/src/endpoints/post_search.rs`
- [Keyword graph endpoint](https://github.com/simeonnv/oxalate/blob/main/src/bins/indexer/src/endpoints/post_keyword_graph.rs): `src/bins/indexer/src/endpoints/post_keyword_graph.rs`
- [Text search engines](https://github.com/simeonnv/oxalate/blob/main/src/bins/indexer/src/scraping/search_text.rs): `src/bins/indexer/src/scraping/search_text.rs`
- [Engine adapters](https://github.com/simeonnv/oxalate/tree/main/src/bins/indexer/src/scraping/text_search_engines): `src/bins/indexer/src/scraping/text_search_engines`

### Harvesting

- [Harvester API](https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/main.rs): `src/bins/harvester/src/main.rs`
- [Public routes](https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/public_endpoints/mod.rs): `src/bins/harvester/src/public_endpoints/mod.rs`
- [Control and metrics](https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/private_endpoints/mod.rs): `src/bins/harvester/src/private_endpoints/mod.rs`
- [Proxy identity middleware](https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/middleware/proxy_id_middleware.rs): `src/bins/harvester/src/middleware/proxy_id_middleware.rs`
- [Proxy connection store](https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/proxy_connection_store.rs): `src/bins/harvester/src/proxy_connection_store.rs`
- [Proxy settings store](https://github.com/simeonnv/oxalate/blob/main/src/bins/harvester/src/proxy_settings_store.rs): `src/bins/harvester/src/proxy_settings_store.rs`
- [Outlet agent](https://github.com/simeonnv/oxalate/blob/main/src/bins/outlet/src/main.rs): `src/bins/outlet/src/main.rs`
- [Proxy activity](https://github.com/simeonnv/oxalate/blob/main/src/bins/outlet/src/proxy.rs): `src/bins/outlet/src/proxy.rs`
- [Uptime reporting](https://github.com/simeonnv/oxalate/blob/main/src/bins/outlet/src/uptime_pinger.rs): `src/bins/outlet/src/uptime_pinger.rs`

### Parsing and storage

- [Parser API](https://github.com/simeonnv/oxalate/blob/main/src/bins/parser/src/main.rs): `src/bins/parser/src/main.rs`
- [Page ingestion](https://github.com/simeonnv/oxalate/blob/main/src/bins/parser/src/endpoints/post_insert_webpage.rs): `src/bins/parser/src/endpoints/post_insert_webpage.rs`
- [Metadata ingestion](https://github.com/simeonnv/oxalate/blob/main/src/bins/parser/src/endpoints/post_insert_meta_webpage.rs): `src/bins/parser/src/endpoints/post_insert_meta_webpage.rs`
- [HTML extraction](https://github.com/simeonnv/oxalate/blob/main/src/libs/parsing/src/parse_html.rs): `src/libs/parsing/src/parse_html.rs`
- [Keyword splitting](https://github.com/simeonnv/oxalate/blob/main/src/libs/parsing/src/split_into_words.rs): `src/libs/parsing/src/split_into_words.rs`
- [Page persistence](https://github.com/simeonnv/oxalate/blob/main/src/libs/parsing/src/save_parsed_webpage_into_postgres.rs): `src/libs/parsing/src/save_parsed_webpage_into_postgres.rs`
- [Metadata persistence](https://github.com/simeonnv/oxalate/blob/main/src/libs/parsing/src/save_meta_webpage_into_postgres.rs): `src/libs/parsing/src/save_meta_webpage_into_postgres.rs`
- [Graph persistence](https://github.com/simeonnv/oxalate/blob/main/src/libs/parsing/src/save_into_neo4j.rs): `src/libs/parsing/src/save_into_neo4j.rs`

### Shared runtime

- **PostgreSQL**
- **Neo4j**

### Other components

- **Search user**
- **External search engines**

## Connections

- Search user → Search UI: searches
- Search UI → Search endpoint: submits query
- Keyword graph UI → Keyword graph endpoint: requests graph
- Admin UI → Harvester API: controls service
- Metrics UI → Harvester API: requests metrics
- Indexer API → Search endpoint: routes to
- Indexer API → Keyword graph endpoint: routes to
- Search endpoint → Text search engines: calls search (evidence: `src/bins/indexer/src/endpoints/post_search.rs`)
- Text search engines → Engine adapters: dispatches searches (evidence: `src/bins/indexer/src/scraping/search_text.rs`)
- Text search engines → External search engines: queries engines
- Search endpoint → Metadata ingestion: posts result metadata (evidence: `src/bins/indexer/src/endpoints/post_search.rs`)
- Parser API → Page ingestion: routes to
- Parser API → Metadata ingestion: routes to
- Parser API → PostgreSQL: initializes pool (evidence: `src/bins/parser/src/main.rs`)
- Parser API → Neo4j: initializes pool (evidence: `src/bins/parser/src/main.rs`)
- Indexer API → PostgreSQL: initializes pool (evidence: `src/bins/indexer/src/main.rs`)
- Indexer API → Neo4j: initializes pool (evidence: `src/bins/indexer/src/main.rs`)
- Page ingestion → HTML extraction: parses content
- HTML extraction → Keyword splitting: splits text (evidence: `src/libs/parsing/src/parse_html.rs`)
- Page ingestion → Page persistence: persists page
- Metadata ingestion → Metadata persistence: persists metadata
- Page ingestion → Graph persistence: stores keywords
- Page persistence → PostgreSQL: writes page data
- Metadata persistence → PostgreSQL: writes metadata
- Graph persistence → Neo4j: writes graph data
- Harvester API → Public routes: mounts routes (evidence: `src/bins/harvester/src/main.rs`)
- Harvester API → Control and metrics: mounts routes (evidence: `src/bins/harvester/src/main.rs`)
- Harvester API → Proxy identity middleware: configures middleware (evidence: `src/bins/harvester/src/main.rs`)
- Harvester API → Proxy connection store: uses store (evidence: `src/bins/harvester/src/main.rs`)
- Harvester API → Proxy settings store: uses store (evidence: `src/bins/harvester/src/main.rs`)
- Outlet agent → Proxy activity: starts proxy (evidence: `src/bins/outlet/src/main.rs`)
- Outlet agent → Uptime reporting: starts reporter (evidence: `src/bins/outlet/src/main.rs`)
- Proxy activity → Harvester API: sends proxy activity
- Uptime reporting → Harvester API: reports uptime
