# smdlabtech/vat-vies-validator-batch-eu-excel-file architecture

> Architecture diagram of the GitHub repository smdlabtech/vat-vies-validator-batch-eu-excel-file, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/smdlabtech/vat-vies-validator-batch-eu-excel-file
- Repository: https://github.com/smdlabtech/vat-vies-validator-batch-eu-excel-file

## Overview

##### Project Type and Purpose
- This is a lightweight full-stack (single-page) web application built with Streamlit.
- Purpose: allow users to upload an Excel file of EU VAT numbers, validate them in bulk against the EU’s VIES REST API, display progress and stats in real time, and download results.

##### File Structure Analysis
- Top-level directories and files:
- .streamlit/config.toml – Streamlit UI settings
- app/main.py – core Streamlit application (UI + orchestration)
- app/requirements.txt & pyproject.toml – Python dependencies
- data/Test_Check_VAT.xlsx – sample/test data
- No database or persistent storage; all processing is in-memory per session.
- CI/CD, deployment scripts or microservices are not present—app runs as a single Streamlit process.

##### README Insights
- Confirms single-process web UI + business logic in Python.
- Highlights batch processing (chunk size, delays, retries), real-time stats, file I/O and external API calls.
- No backend-only API or separate frontend code—UI and logic co-exist in main.py.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Client"
        Browser["User Browser"]:::user
    end

    subgraph "Streamlit Application"
        Config["Streamlit Configuration"]:::config
        UI["Streamlit UI Layer"]:::frontend
        BL["Validation Engine\n(batch scheduler, retry logic, chunk manager)"]:::logic
        DP["Data Processing Module\n(pandas Excel/CSV I/O)"]:::logic
        Store["In-Memory Data Store\n(DataFrame buffer)"]:::storage
        Download["Download Endpoint\n(Streamlit download buttons)"]:::frontend
    end

    External["EU VIES REST API"]:::external

    subgraph "Project Files"
        Sample["Sample/Test Data"]:::data
        Req["requirements.txt"]:::config
        Pyproj["pyproject.toml"]:::config
        Readme["README.md"]:::config
        License["LICENSE"]:::config
    end

    Browser -->|"uploads Excel"| UI
    UI -->|"reads file"| DP
    DP -->|"initial DataFrame"| Store
    UI -->|"triggers batch job"| BL
    BL -->|"HTTP request (JSON)"| External
    External -->|"JSON response"| BL
    BL -->|"update buffer"| Store
    Store -->|"stats & results"| UI
    BL -->|"final DataFrame"| Download
    Download -->|"Excel/CSV"| Browser
    UI -->|"loads settings"| Config
    DP -->|"reads sample"| Sample

    click UI "https://github.com/smdlabtech/vat-vies-validator-batch-eu-excel-file/blob/main/app/main.py"
    click Config "https://github.com/smdlabtech/vat-vies-validator-batch-eu-excel-file/blob/main/.streamlit/config.toml"
    click BL "https://github.com/smdlabtech/vat-vies-validator-batch-eu-excel-file/blob/main/app/main.py"
    click DP "https://github.com/smdlabtech/vat-vies-validator-batch-eu-excel-file/blob/main/app/main.py"
    click Store "https://github.com/smdlabtech/vat-vies-validator-batch-eu-excel-file/blob/main/app/main.py"
    click Download "https://github.com/smdlabtech/vat-vies-validator-batch-eu-excel-file/blob/main/app/main.py"
    click Sample "https://github.com/smdlabtech/vat-vies-validator-batch-eu-excel-file/blob/main/data/Test_Check_VAT.xlsx"
    click Req "https://github.com/smdlabtech/vat-vies-validator-batch-eu-excel-file/blob/main/app/requirements.txt"
    click Pyproj "https://github.com/smdlabtech/vat-vies-validator-batch-eu-excel-file/blob/main/app/pyproject.toml"
    click Readme "https://github.com/smdlabtech/vat-vies-validator-batch-eu-excel-file/blob/main/README.md"
    click License "https://github.com/smdlabtech/vat-vies-validator-batch-eu-excel-file/tree/main/LICENSE"

    classDef user fill:#ADD8E6,stroke:#000
    classDef frontend fill:#ADD8E6,stroke:#000
    classDef logic fill:#90EE90,stroke:#000
    classDef external fill:#FFA500,stroke:#000
    classDef storage fill:#D3D3D3,stroke:#000
    classDef config fill:#E6E6FA,stroke:#000
    classDef data fill:#F5DEB3,stroke:#000
```
