# jakobvongehlen/tendertransparency architecture

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

- Interactive diagram: https://gitdiagram.com/jakobvongehlen/tendertransparency
- Repository: https://github.com/jakobvongehlen/tendertransparency

## Overview

Tender Transparency NL is a dashboard for exploring Dutch public procurement awards, buyer concentration and competition, and gaps in published records. Its workflow downloads TenderNed data, ingests and enriches it, builds analytical tables, then serves them through a read-only API to interactive dashboard pages. README documents the ETL stages and capabilities; sampled frontend excerpts show routing and API usage. Backend call details and some page implementations were not sampled, so those relationships rely on README documentation or are omitted.

Main entry points: [`web/src/App.tsx`](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/App.tsx) (App and routing), [`web/src/api.ts`](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/api.ts) (API client), [`web/src/pages/BuyerProfile.tsx`](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/BuyerProfile.tsx) (Buyer profile), [`web/src/pages/Overview.tsx`](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Overview.tsx) (Overview and buyers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_etl["Data pipeline"]
  node_download["Dataset download<br/>[download.py]"]
  node_ingest["OCDS ingestion<br/>[ingest.py]"]
  node_enrich["Geographic enrichment<br/>[enrich.py]"]
end

subgraph group_analysis["Procurement analysis"]
  node_model["Analytical model<br/>[model.sql]"]
  node_model_runner["Model runner<br/>[model.py]"]
end

subgraph group_service["API service"]
  node_database[("Tender database")]
  node_api["JSON API<br/>[main.py]"]
end

subgraph group_dashboard["Dashboard"]
  node_app["App and routing<br/>[App.tsx]"]
  node_client["API client<br/>[api.ts]"]
  node_overview["Overview and buyers<br/>[Overview.tsx]"]
  node_buyer_profile["Buyer profile<br/>[BuyerProfile.tsx]"]
  node_supplier_profile["Supplier profile"]
  node_compare["Peer comparison<br/>[Compare.tsx]"]
  node_patterns["Concentration patterns<br/>[Patterns.tsx]"]
  node_competition["Competition analysis<br/>[Competition.tsx]"]
  node_map["Municipal map<br/>[MapPage.tsx]"]
  node_gaps["Information gaps<br/>[Gaps.tsx]"]
  node_procedure["Procedure details<br/>[Procedure.tsx]"]
  node_method["Method guide<br/>[Method.tsx]"]
  node_drilldown["Cell drilldown<br/>[CellDrilldown.tsx]"]
  node_network["Buyer-supplier network<br/>[Network.tsx]"]
  node_charts["Charts<br/>[Chart.tsx]"]
  node_ui["Shared UI<br/>[ui.tsx]"]
  node_format["Value formatting<br/>[format.ts]"]
end

subgraph group_integrations["External data"]
  node_tenderned["TenderNed data"]
  node_pdok["PDOK services"]
  node_cbs["CBS data"]
end

node_user(("Dashboard user"))

node_tenderned -->|"provides datasets"| node_download
node_download -->|"downloads releases"| node_ingest
node_pdok -->|"provides geocoding"| node_enrich
node_cbs -->|"provides population"| node_enrich
node_ingest -->|"writes raw tables"| node_database
node_enrich -->|"adds lookups"| node_database
node_model_runner -->|"runs SQL model"| node_model
node_model -->|"builds analysis tables"| node_database
node_database -->|"serves read-only queries"| node_api
node_user -->|"explores dashboard"| node_app
node_app -->|"routes to"| node_overview
node_app -->|"routes to"| node_buyer_profile
node_app -->|"routes to"| node_supplier_profile
node_app -->|"routes to"| node_compare
node_app -->|"routes to"| node_patterns
node_app -->|"routes to"| node_competition
node_app -->|"routes to"| node_map
node_app -->|"routes to"| node_gaps
node_app -->|"routes to"| node_procedure
node_app -->|"routes to"| node_method
node_overview -->|"fetches data"| node_client
node_buyer_profile -->|"fetches data"| node_client
node_compare -->|"fetches data"| node_client
node_competition -->|"fetches data"| node_client
node_map -->|"fetches data"| node_client
node_client -->|"requests JSON"| node_api
node_drilldown -->|"fetches cell data"| node_client
node_network -->|"fetches network"| node_client
node_buyer_profile -->|"shows drilldown"| node_drilldown
node_buyer_profile -->|"shows network"| node_network
node_supplier_profile -->|"shows network"| node_network
node_overview -->|"renders charts"| node_charts
node_competition -->|"renders charts"| node_charts
node_buyer_profile -->|"uses shared UI"| node_ui
node_network -->|"renders graph"| node_charts
node_overview -->|"formats values"| node_format

click node_download "https://github.com/jakobvongehlen/tendertransparency/blob/main/etl/download.py"
click node_ingest "https://github.com/jakobvongehlen/tendertransparency/blob/main/etl/ingest.py"
click node_enrich "https://github.com/jakobvongehlen/tendertransparency/blob/main/etl/enrich.py"
click node_model "https://github.com/jakobvongehlen/tendertransparency/blob/main/etl/model.sql"
click node_model_runner "https://github.com/jakobvongehlen/tendertransparency/blob/main/etl/model.py"
click node_api "https://github.com/jakobvongehlen/tendertransparency/blob/main/api/main.py"
click node_app "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/App.tsx"
click node_client "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/api.ts"
click node_overview "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Overview.tsx"
click node_buyer_profile "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/BuyerProfile.tsx"
click node_supplier_profile "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/SupplierProfile.tsx"
click node_compare "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Compare.tsx"
click node_patterns "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Patterns.tsx"
click node_competition "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Competition.tsx"
click node_map "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/MapPage.tsx"
click node_gaps "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Gaps.tsx"
click node_procedure "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Procedure.tsx"
click node_method "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Method.tsx"
click node_drilldown "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/components/CellDrilldown.tsx"
click node_network "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/components/Network.tsx"
click node_charts "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/components/Chart.tsx"
click node_ui "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/components/ui.tsx"
click node_format "https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/format.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_download,node_ingest,node_enrich,node_user toneBlue
class node_model,node_model_runner toneAmber
class node_database,node_api toneMint
class node_app,node_client,node_overview,node_buyer_profile,node_supplier_profile,node_compare,node_patterns,node_competition,node_map,node_gaps,node_procedure,node_method,node_drilldown,node_network,node_charts,node_ui,node_format toneRose
class node_tenderned,node_pdok,node_cbs toneIndigo
```

## Components

### Data pipeline

- [Dataset download](https://github.com/jakobvongehlen/tendertransparency/blob/main/etl/download.py): `etl/download.py`
- [OCDS ingestion](https://github.com/jakobvongehlen/tendertransparency/blob/main/etl/ingest.py): `etl/ingest.py`
- [Geographic enrichment](https://github.com/jakobvongehlen/tendertransparency/blob/main/etl/enrich.py): `etl/enrich.py`

### Procurement analysis

- [Analytical model](https://github.com/jakobvongehlen/tendertransparency/blob/main/etl/model.sql): `etl/model.sql`
- [Model runner](https://github.com/jakobvongehlen/tendertransparency/blob/main/etl/model.py): `etl/model.py`

### API service

- **Tender database**
- [JSON API](https://github.com/jakobvongehlen/tendertransparency/blob/main/api/main.py): `api/main.py`

### Dashboard

- [App and routing](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [API client](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/api.ts): `web/src/api.ts`
- [Overview and buyers](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Overview.tsx): `web/src/pages/Overview.tsx`
- [Buyer profile](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/BuyerProfile.tsx): `web/src/pages/BuyerProfile.tsx`
- [Supplier profile](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/SupplierProfile.tsx): `web/src/pages/SupplierProfile.tsx`
- [Peer comparison](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Compare.tsx): `web/src/pages/Compare.tsx`
- [Concentration patterns](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Patterns.tsx): `web/src/pages/Patterns.tsx`
- [Competition analysis](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Competition.tsx): `web/src/pages/Competition.tsx`
- [Municipal map](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/MapPage.tsx): `web/src/pages/MapPage.tsx`
- [Information gaps](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Gaps.tsx): `web/src/pages/Gaps.tsx`
- [Procedure details](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Procedure.tsx): `web/src/pages/Procedure.tsx`
- [Method guide](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/pages/Method.tsx): `web/src/pages/Method.tsx`
- [Cell drilldown](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/components/CellDrilldown.tsx): `web/src/components/CellDrilldown.tsx`
- [Buyer-supplier network](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/components/Network.tsx): `web/src/components/Network.tsx`
- [Charts](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/components/Chart.tsx): `web/src/components/Chart.tsx`
- [Shared UI](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/components/ui.tsx): `web/src/components/ui.tsx`
- [Value formatting](https://github.com/jakobvongehlen/tendertransparency/blob/main/web/src/format.ts): `web/src/format.ts`

### External data

- **TenderNed data**
- **PDOK services**
- **CBS data**

### Other components

- **Dashboard user**

## Connections

- TenderNed data → Dataset download: provides datasets (evidence: `README.md`)
- Dataset download → OCDS ingestion: downloads releases (evidence: `README.md`)
- PDOK services → Geographic enrichment: provides geocoding (evidence: `README.md`)
- CBS data → Geographic enrichment: provides population (evidence: `README.md`)
- OCDS ingestion → Tender database: writes raw tables (evidence: `README.md`)
- Geographic enrichment → Tender database: adds lookups (evidence: `README.md`)
- Model runner → Analytical model: runs SQL model (evidence: `README.md`)
- Analytical model → Tender database: builds analysis tables (evidence: `README.md`)
- Tender database → JSON API: serves read-only queries (evidence: `README.md`)
- Dashboard user → App and routing: explores dashboard (evidence: `web/src/App.tsx`)
- App and routing → Overview and buyers: routes to (evidence: `web/src/App.tsx`)
- App and routing → Buyer profile: routes to (evidence: `web/src/App.tsx`)
- App and routing → Supplier profile: routes to (evidence: `web/src/App.tsx`)
- App and routing → Peer comparison: routes to (evidence: `web/src/App.tsx`)
- App and routing → Concentration patterns: routes to (evidence: `web/src/App.tsx`)
- App and routing → Competition analysis: routes to (evidence: `web/src/App.tsx`)
- App and routing → Municipal map: routes to (evidence: `web/src/App.tsx`)
- App and routing → Information gaps: routes to (evidence: `web/src/App.tsx`)
- App and routing → Procedure details: routes to (evidence: `web/src/App.tsx`)
- App and routing → Method guide: routes to (evidence: `web/src/App.tsx`)
- Overview and buyers → API client: fetches data (evidence: `web/src/pages/Overview.tsx`)
- Buyer profile → API client: fetches data (evidence: `web/src/pages/BuyerProfile.tsx`)
- Peer comparison → API client: fetches data (evidence: `web/src/pages/Compare.tsx`)
- Competition analysis → API client: fetches data (evidence: `web/src/pages/Competition.tsx`)
- Municipal map → API client: fetches data (evidence: `web/src/pages/MapPage.tsx`)
- API client → JSON API: requests JSON (evidence: `web/src/api.ts`)
- Cell drilldown → API client: fetches cell data (evidence: `web/src/components/CellDrilldown.tsx`)
- Buyer-supplier network → API client: fetches network (evidence: `web/src/components/Network.tsx`)
- Buyer profile → Cell drilldown: shows drilldown (evidence: `web/src/pages/BuyerProfile.tsx`)
- Buyer profile → Buyer-supplier network: shows network (evidence: `web/src/pages/BuyerProfile.tsx`)
- Supplier profile → Buyer-supplier network: shows network (evidence: `web/src/pages/SupplierProfile.tsx`)
- Overview and buyers → Charts: renders charts (evidence: `web/src/pages/Overview.tsx`)
- Competition analysis → Charts: renders charts (evidence: `web/src/pages/Competition.tsx`)
- Buyer profile → Shared UI: uses shared UI (evidence: `web/src/pages/BuyerProfile.tsx`)
- Buyer-supplier network → Charts: renders graph (evidence: `web/src/components/Network.tsx`)
- Overview and buyers → Value formatting: formats values (evidence: `web/src/pages/Overview.tsx`)
