# mihaeladivoiu/uk-vat-enrichment architecture

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

- Interactive diagram: https://gitdiagram.com/mihaeladivoiu/uk-vat-enrichment
- Repository: https://github.com/mihaeladivoiu/uk-vat-enrichment

## Overview

This repository is a research proof of concept for UK company VAT enrichment, but the visible runtime implements only a preparation step: a user runs a script that reads Companies House CSVs, selects a reproducible sample of active records, and writes a processed CSV. The README mentions discovering, verifying, and enriching VAT identifiers, but no implementation of those stages appears in the provided source or tree. The raw input location is referenced by the script but is absent from the tree.

Main entry points: [`src/sample_companies.py`](https://github.com/mihaeladivoiu/uk-vat-enrichment/blob/main/src/sample_companies.py) (Company sampler), [`data/processed/sample_companies.csv`](https://github.com/mihaeladivoiu/uk-vat-enrichment/blob/main/data/processed/sample_companies.csv) (Sample companies)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_company_csvs["Companies House CSVs"]
node_sampler["Company sampler"]
node_sample_output["Sample companies"]

node_user -->|"runs"| node_sampler
node_company_csvs -->|"reads"| node_sampler
node_sampler -->|"writes"| node_sample_output

click node_sampler "https://github.com/mihaeladivoiu/uk-vat-enrichment/blob/main/src/sample_companies.py"
click node_sample_output "https://github.com/mihaeladivoiu/uk-vat-enrichment/blob/main/data/processed/sample_companies.csv"

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_user toneBlue
class node_company_csvs toneIndigo
class node_sampler,node_sample_output toneTeal
```

## Components

### Other components

- **User**
- **Companies House CSVs**
- [Company sampler](https://github.com/mihaeladivoiu/uk-vat-enrichment/blob/main/src/sample_companies.py): `src/sample_companies.py`
- [Sample companies](https://github.com/mihaeladivoiu/uk-vat-enrichment/blob/main/data/processed/sample_companies.csv): `data/processed/sample_companies.csv`

## Connections

- User → Company sampler: runs (evidence: `src/sample_companies.py`)
- Companies House CSVs → Company sampler: reads (evidence: `src/sample_companies.py`)
- Company sampler → Sample companies: writes (evidence: `src/sample_companies.py`)
