# xitizkadwe/autoschema-etl-works---project architecture

> Architecture diagram of the GitHub repository xitizkadwe/autoschema-etl-works---project, 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/xitizkadwe/autoschema-etl-works---project
- Repository: https://github.com/xitizkadwe/autoschema-etl-works---project

## Overview

AutoSchema ETL is a local CSV/XLS data-quality workspace. A user uploads a file through the React app; the API processes and persists normalized accepted and quarantined rows, then returns metrics and rows for review, filtering, numeric summaries, and CSV export. Users can revisit recent batches, download a synthetic sample, or optionally request Gemini advice based only on column names and aggregate metrics. Core paths and calls are supported by the excerpts and README; database internals and sample generation were not sampled.

Main entry points: [`frontend/src/App.jsx`](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/App.jsx) (Workspace), [`backend/app/main.py`](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/main.py) (Dataset API), [`frontend/src/api.js`](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/api.js) (API client), [`frontend/src/components/NumericSummary.jsx`](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/NumericSummary.jsx) (Numeric summary)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Workspace UI"]
  node_app["Workspace<br/>[App.jsx]"]
  node_api_client["API client<br/>[api.js]"]
  node_upload_ui["Upload control<br/>[UploadZone.jsx]"]
  node_metrics_ui["Pipeline metrics"]
  node_filters_ui["Data filters<br/>[DataFilters.jsx]"]
  node_quarantine_ui["Quarantine review"]
  node_numeric_ui["Numeric summary<br/>[NumericSummary.jsx]"]
  node_advisor_ui["Advice report"]
end

subgraph group_etl["ETL processing"]
  node_etl_engine["File normalization<br/>[etl_engine.py]"]
  node_sample["Sample generator"]
end

subgraph group_backend["API and persistence"]
  node_api["Dataset API<br/>[main.py]"]
  node_models["Batch models<br/>[models.py]"]
  node_database[("SQLite persistence<br/>[database.py]")]
end

subgraph group_insights["Analysis and advice"]
  node_analysis["Row analysis<br/>[dataAnalysis.js]"]
  node_advisor["Gemini advisor<br/>[ai_advisor.py]"]
end

node_user(("User"))
node_gemini{{"Gemini service"}}

node_user -->|"uses"| node_app
node_app -->|"renders"| node_upload_ui
node_app -->|"calls"| node_api_client
node_app -->|"renders"| node_metrics_ui
node_app -->|"renders"| node_filters_ui
node_app -->|"renders"| node_quarantine_ui
node_app -->|"renders"| node_numeric_ui
node_app -->|"renders"| node_advisor_ui
node_app -->|"uses"| node_analysis
node_numeric_ui -->|"calculates with"| node_analysis
node_api_client -->|"requests"| node_api
node_api -->|"processes upload"| node_etl_engine
node_api -->|"reads and writes"| node_database
node_models -->|"uses base"| node_database
node_api -->|"returns batch schemas"| node_models
node_api -->|"generates sample"| node_sample
node_api -->|"requests advice"| node_advisor
node_advisor -->|"requests recommendations"| node_gemini

click node_app "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/App.jsx"
click node_api_client "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/api.js"
click node_upload_ui "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/UploadZone.jsx"
click node_metrics_ui "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/PipelineMetrics.jsx"
click node_filters_ui "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/DataFilters.jsx"
click node_quarantine_ui "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/QuarantineTable.jsx"
click node_numeric_ui "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/NumericSummary.jsx"
click node_advisor_ui "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/AdvisorResponse.jsx"
click node_analysis "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/dataAnalysis.js"
click node_api "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/main.py"
click node_etl_engine "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/etl_engine.py"
click node_sample "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/sample_generator.py"
click node_models "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/models.py"
click node_database "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/database.py"
click node_advisor "https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/ai_advisor.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_app,node_api_client,node_upload_ui,node_metrics_ui,node_filters_ui,node_quarantine_ui,node_numeric_ui,node_advisor_ui,node_user toneBlue
class node_etl_engine,node_sample toneAmber
class node_api,node_models,node_database toneMint
class node_analysis,node_advisor toneRose
class node_gemini toneIndigo
```

## Components

### Workspace UI

- [Workspace](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API client](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Upload control](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/UploadZone.jsx): `frontend/src/components/UploadZone.jsx`
- [Pipeline metrics](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/PipelineMetrics.jsx): `frontend/src/components/PipelineMetrics.jsx`
- [Data filters](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/DataFilters.jsx): `frontend/src/components/DataFilters.jsx`
- [Quarantine review](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/QuarantineTable.jsx): `frontend/src/components/QuarantineTable.jsx`
- [Numeric summary](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/NumericSummary.jsx): `frontend/src/components/NumericSummary.jsx`
- [Advice report](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/components/AdvisorResponse.jsx): `frontend/src/components/AdvisorResponse.jsx`

### ETL processing

- [File normalization](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/etl_engine.py): `backend/app/etl_engine.py`
- [Sample generator](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/sample_generator.py): `backend/app/sample_generator.py`

### API and persistence

- [Dataset API](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/main.py): `backend/app/main.py`
- [Batch models](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/models.py): `backend/app/models.py`
- [SQLite persistence](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/database.py): `backend/app/database.py`

### Analysis and advice

- [Row analysis](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/frontend/src/dataAnalysis.js): `frontend/src/dataAnalysis.js`
- [Gemini advisor](https://github.com/xitizkadwe/autoschema-etl-works---project/blob/main/backend/app/ai_advisor.py): `backend/app/ai_advisor.py`

### Other components

- **User**
- **Gemini service**

## Connections

- User → Workspace: uses (evidence: `README.md`)
- Workspace → Upload control: renders (evidence: `frontend/src/App.jsx`)
- Workspace → API client: calls (evidence: `frontend/src/App.jsx`)
- Workspace → Pipeline metrics: renders (evidence: `frontend/src/App.jsx`)
- Workspace → Data filters: renders (evidence: `frontend/src/App.jsx`)
- Workspace → Quarantine review: renders (evidence: `frontend/src/App.jsx`)
- Workspace → Numeric summary: renders (evidence: `frontend/src/App.jsx`)
- Workspace → Advice report: renders (evidence: `frontend/src/App.jsx`)
- Workspace → Row analysis: uses (evidence: `frontend/src/App.jsx`)
- Numeric summary → Row analysis: calculates with (evidence: `frontend/src/components/NumericSummary.jsx`)
- API client → Dataset API: requests (evidence: `frontend/src/api.js`)
- Dataset API → File normalization: processes upload (evidence: `backend/app/main.py`)
- Dataset API → SQLite persistence: reads and writes (evidence: `backend/app/main.py`)
- Batch models → SQLite persistence: uses base (evidence: `backend/app/models.py`)
- Dataset API → Batch models: returns batch schemas (evidence: `backend/app/main.py`)
- Dataset API → Sample generator: generates sample (evidence: `backend/app/main.py`)
- Dataset API → Gemini advisor: requests advice (evidence: `backend/app/main.py`)
- Gemini advisor → Gemini service: requests recommendations (evidence: `backend/app/ai_advisor.py`)
