# tender-eval-ai/tender-evaluation-assistant architecture

> Architecture diagram of the GitHub repository tender-eval-ai/tender-evaluation-assistant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tender-eval-ai/tender-evaluation-assistant
- Repository: https://github.com/tender-eval-ai/tender-evaluation-assistant

## Overview

Tender Evaluation Assistant turns tender documents and bidder offers into an editable procurement review: a tender’s requirements are parsed and assembled into a rule set, a reviewer confirms it, each bid is checked, and reviewers resolve uncertain findings before reviewing results and pricing. The graph follows those documented stages and the sampled application wiring. The README architecture excerpt is truncated and many modules were not sampled, so uncertain runtime links are omitted or marked unverified.

Main entry points: [`app/checks/engine_bridge.py`](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/engine_bridge.py) (Engine adapter), [`app/rulesets`](https://github.com/tender-eval-ai/tender-evaluation-assistant/tree/main/app/rulesets) (Rule set build), [`app/jobs/tasks.py`](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/jobs/tasks.py) (Job tasks), [`app/parsing/layout_document_index.py`](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/parsing/layout_document_index.py) (Layout parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Reviewer interface"]
  node_webapp["Review UI<br/>[App.jsx]"]
  node_webapi["Web API client<br/>[api.js]"]
end

subgraph group_service["API and jobs"]
  node_backend["HTTP API<br/>[api.py]"]
  node_reviewroutes["Review routes<br/>[review.py]"]
  node_rulesroutes["Ruleset routes<br/>[rulesets.py]"]
  node_jobrunner["Job runner<br/>[runner.py]"]
  node_jobtasks["Job tasks<br/>[tasks.py]"]
  node_jobqueue["Job queue<br/>[queue.py]"]
  node_jobstore[("Job state<br/>[store.py]")]
end

subgraph group_tender["Tender preparation"]
  node_ingest["PDF ingestion<br/>[ingest.py]"]
  node_layoutparser["Layout parser"]
  node_citation["Citation resolution<br/>[citations.py]"]
  node_rulesbuild["Rule set build"]
  node_ruleschema["Rule set contract<br/>[schema.py]"]
end

subgraph group_evaluation["Bid evaluation"]
  node_triage["Page triage<br/>[triage.py]"]
  node_formchecks["Form extraction<br/>[forms.py]"]
  node_verification["Field verification<br/>[verify.py]"]
  node_bridge["Engine adapter<br/>[engine_bridge.py]"]
  node_engine["Rule engine<br/>[core.py]"]
  node_llm["LLM client<br/>[client.py]"]
end

subgraph group_results["Review and results"]
  node_corrections["Reviewer corrections<br/>[corrections.py]"]
  node_pricing["Price analysis<br/>[pricing.py]"]
  node_reports["Review reports<br/>[reports.py]"]
end

node_reviewer(("Reviewer"))

node_reviewer -->|"uses"| node_webapp
node_webapp -->|"requests data"| node_webapi
node_webapi -.->|"calls API"| node_backend
node_backend -.->|"starts jobs"| node_jobrunner
node_jobrunner -.->|"dispatches"| node_jobtasks
node_jobtasks -->|"uses queue"| node_jobqueue
node_jobtasks -->|"saves progress"| node_jobstore
node_ingest -->|"uses for OCR"| node_llm
node_ingest -.->|"loads for parsing"| node_layoutparser
node_layoutparser -.->|"supports citations"| node_citation
node_layoutparser -.->|"feeds rule building"| node_rulesbuild
node_rulesbuild -->|"produces contract"| node_ruleschema
node_rulesbuild -->|"resolves references"| node_citation
node_rulesroutes -.->|"manages rule sets"| node_rulesbuild
node_triage -.->|"labels pages for"| node_formchecks
node_formchecks -->|"prepares fields for"| node_verification
node_formchecks -->|"passes fields"| node_bridge
node_bridge -->|"evaluates rules"| node_engine
node_bridge -->|"reads contract"| node_ruleschema
node_verification -->|"applies review data"| node_bridge
node_bridge -.->|"requests model checks"| node_llm
node_reviewroutes -->|"records corrections"| node_corrections
node_reviewroutes -->|"reevaluates results"| node_bridge
node_reviewer -->|"corrects findings"| node_reviewroutes
node_reviewer -->|"reviews scoring"| node_pricing
node_reviewer -->|"reviews reports"| node_reports

click node_webapp "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/web/src/App.jsx"
click node_webapi "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/web/src/api.js"
click node_backend "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/backend/api.py"
click node_reviewroutes "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/backend/routes/review.py"
click node_rulesroutes "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/backend/routes/rulesets.py"
click node_jobrunner "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/jobs/runner.py"
click node_jobtasks "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/jobs/tasks.py"
click node_jobqueue "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/jobs/queue.py"
click node_jobstore "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/jobs/store.py"
click node_ingest "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/ingest.py"
click node_layoutparser "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/parsing/layout_document_index.py"
click node_citation "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/parsing/citations.py"
click node_rulesbuild "https://github.com/tender-eval-ai/tender-evaluation-assistant/tree/main/app/rulesets"
click node_ruleschema "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/rulesets/schema.py"
click node_triage "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/triage.py"
click node_formchecks "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/forms.py"
click node_verification "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/verify.py"
click node_bridge "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/engine_bridge.py"
click node_engine "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/engine/core.py"
click node_llm "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/llm/client.py"
click node_corrections "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/corrections.py"
click node_pricing "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/pricing.py"
click node_reports "https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/reports.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_webapp,node_webapi,node_reviewer toneBlue
class node_backend,node_reviewroutes,node_rulesroutes,node_jobrunner,node_jobtasks,node_jobqueue,node_jobstore toneAmber
class node_ingest,node_layoutparser,node_citation,node_rulesbuild,node_ruleschema toneMint
class node_triage,node_formchecks,node_verification,node_bridge,node_engine,node_llm toneRose
class node_corrections,node_pricing,node_reports toneIndigo
```

## Components

### Reviewer interface

- [Review UI](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/web/src/App.jsx): `web/src/App.jsx`
- [Web API client](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/web/src/api.js): `web/src/api.js`

### API and jobs

- [HTTP API](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/backend/api.py): `backend/api.py`
- [Review routes](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/backend/routes/review.py): `backend/routes/review.py`
- [Ruleset routes](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/backend/routes/rulesets.py): `backend/routes/rulesets.py`
- [Job runner](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/jobs/runner.py): `app/jobs/runner.py`
- [Job tasks](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/jobs/tasks.py): `app/jobs/tasks.py`
- [Job queue](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/jobs/queue.py): `app/jobs/queue.py`
- [Job state](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/jobs/store.py): `app/jobs/store.py`

### Tender preparation

- [PDF ingestion](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/ingest.py): `app/ingest.py`
- [Layout parser](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/parsing/layout_document_index.py): `app/parsing/layout_document_index.py`
- [Citation resolution](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/parsing/citations.py): `app/parsing/citations.py`
- [Rule set build](https://github.com/tender-eval-ai/tender-evaluation-assistant/tree/main/app/rulesets): `app/rulesets`
- [Rule set contract](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/rulesets/schema.py): `app/rulesets/schema.py`

### Bid evaluation

- [Page triage](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/triage.py): `app/checks/triage.py`
- [Form extraction](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/forms.py): `app/checks/forms.py`
- [Field verification](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/verify.py): `app/checks/verify.py`
- [Engine adapter](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/engine_bridge.py): `app/checks/engine_bridge.py`
- [Rule engine](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/engine/core.py): `app/engine/core.py`
- [LLM client](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/llm/client.py): `app/llm/client.py`

### Review and results

- [Reviewer corrections](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/corrections.py): `app/checks/corrections.py`
- [Price analysis](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/pricing.py): `app/checks/pricing.py`
- [Review reports](https://github.com/tender-eval-ai/tender-evaluation-assistant/blob/main/app/checks/reports.py): `app/checks/reports.py`

### Other components

- **Reviewer**

## Connections

- Reviewer → Review UI: uses
- Review UI → Web API client: requests data (evidence: `web/src/App.jsx`)
- Web API client → HTTP API: calls API
- HTTP API → Job runner: starts jobs
- Job runner → Job tasks: dispatches
- Job tasks → Job queue: uses queue (evidence: `app/jobs/tasks.py`)
- Job tasks → Job state: saves progress (evidence: `app/jobs/tasks.py`)
- PDF ingestion → LLM client: uses for OCR (evidence: `app/ingest.py`)
- PDF ingestion → Layout parser: loads for parsing
- Layout parser → Citation resolution: supports citations
- Layout parser → Rule set build: feeds rule building (evidence: `app/rulesets/locate.py`)
- Rule set build → Rule set contract: produces contract (evidence: `app/rulesets/schema.py`)
- Rule set build → Citation resolution: resolves references (evidence: `app/rulesets/locate.py`)
- Ruleset routes → Rule set build: manages rule sets
- Page triage → Form extraction: labels pages for
- Form extraction → Field verification: prepares fields for (evidence: `app/checks/forms.py`)
- Form extraction → Engine adapter: passes fields (evidence: `app/checks/engine_bridge.py`)
- Engine adapter → Rule engine: evaluates rules (evidence: `app/checks/engine_bridge.py`)
- Engine adapter → Rule set contract: reads contract (evidence: `app/checks/engine_bridge.py`)
- Field verification → Engine adapter: applies review data (evidence: `app/checks/engine_bridge.py`)
- Engine adapter → LLM client: requests model checks
- Review routes → Reviewer corrections: records corrections (evidence: `backend/routes/review.py`)
- Review routes → Engine adapter: reevaluates results (evidence: `backend/routes/review.py`)
- Reviewer → Review routes: corrects findings
- Reviewer → Price analysis: reviews scoring
- Reviewer → Review reports: reviews reports
