# adiatgithub/automated_da architecture

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

- Interactive diagram: https://gitdiagram.com/adiatgithub/automated_da
- Repository: https://github.com/adiatgithub/automated_da

## Overview

ADA is a Streamlit business-analytics application: users upload tabular files, inspect cleaned and role-detected data, then ask questions or explore generated business insights, charts, anomalies, and forecasts. Its documented core is deterministic and local, with SQL/Pandas translations and reasoning traces; optional AI narrative generation is a separate capability. The README documents the broad product flow, while sampled source confirms preparation, query, aggregation, and presentation responsibilities; some UI wiring and unsampled feature links are therefore left out.

Main entry points: [`app.py`](https://github.com/adiatgithub/automated_da/blob/main/app.py) (Streamlit app), [`pipeline.py`](https://github.com/adiatgithub/automated_da/blob/main/pipeline.py) (Analysis preparation), [`agent.py`](https://github.com/adiatgithub/automated_da/blob/main/agent.py) (Analyst agent), [`aggregation.py`](https://github.com/adiatgithub/automated_da/blob/main/aggregation.py) (Trend aggregation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Data preparation"]
  node_fileio["File ingestion<br/>[file_io.py]"]
  node_pipeline["Analysis preparation<br/>[pipeline.py]"]
  node_cleaning["Data cleaning<br/>[analysis.py]"]
  node_quality["Data quality<br/>[data_quality.py]"]
  node_schema["Role detection<br/>[schema.py]"]
end

subgraph group_analysis["Analysis and reasoning"]
  node_agent["Analyst agent<br/>[agent.py]"]
  node_nlq["Natural-language queries<br/>[nlq.py]"]
  node_sql["SQL engine<br/>[sql_engine.py]"]
  node_aggregation["Trend aggregation<br/>[aggregation.py]"]
  node_metrics["Metric semantics<br/>[metrics.py]"]
  node_timeseries["Time-series methods<br/>[timeseries.py]"]
  node_search["Record search<br/>[semantic_search.py]"]
  node_evaluation["Query evaluation<br/>[eval_framework.py]"]
end

subgraph group_insights["Business intelligence"]
  node_anomalies["Anomaly detection<br/>[anomalies.py]"]
  node_forecasting["Forecasting<br/>[forecasting.py]"]
  node_business["Business insights"]
  node_ai["AI narrative<br/>[ai_insights.py]"]
end

subgraph group_experience["Application experience"]
  node_app["Streamlit app<br/>[app.py]"]
  node_visuals["Chart generation<br/>[autovis.py]"]
  node_ui["Streamlit interface<br/>[ui.py]"]
end

subgraph group_governance["Governance"]
  node_auth["Role permissions<br/>[auth.py]"]
  node_observability["Audit telemetry<br/>[observability.py]"]
end

node_user(("Business user"))

node_user -->|"uses"| node_app
node_app -->|"loads files"| node_fileio
node_fileio -->|"provides frames"| node_pipeline
node_pipeline -->|"cleans data"| node_cleaning
node_pipeline -->|"detects roles"| node_schema
node_pipeline -->|"selects periods"| node_aggregation
node_pipeline -->|"builds brief"| node_business
node_fileio -->|"audits data"| node_quality
node_app -->|"renders"| node_ui
node_app -->|"prepares analysis"| node_pipeline
node_app -->|"routes requests"| node_agent
node_agent -->|"dispatches queries"| node_nlq
node_agent -->|"dispatches detection"| node_anomalies
node_agent -->|"dispatches forecasts"| node_forecasting
node_agent -->|"dispatches search"| node_search
node_nlq -->|"generates SQL"| node_sql
node_nlq -->|"builds trends"| node_aggregation
node_aggregation -->|"resolves metrics"| node_metrics
node_aggregation -->|"fits trends"| node_timeseries
node_business -->|"analyzes trends"| node_aggregation
node_business -->|"checks anomalies"| node_anomalies
node_ui -->|"renders charts"| node_visuals
node_ui -->|"checks permissions"| node_auth
node_ui -->|"shows telemetry"| node_observability
node_app -.->|"generates narrative"| node_ai
node_app -->|"runs benchmarks"| node_evaluation

click node_app "https://github.com/adiatgithub/automated_da/blob/main/app.py"
click node_fileio "https://github.com/adiatgithub/automated_da/blob/main/file_io.py"
click node_pipeline "https://github.com/adiatgithub/automated_da/blob/main/pipeline.py"
click node_cleaning "https://github.com/adiatgithub/automated_da/blob/main/analysis.py"
click node_quality "https://github.com/adiatgithub/automated_da/blob/main/data_quality.py"
click node_schema "https://github.com/adiatgithub/automated_da/blob/main/schema.py"
click node_agent "https://github.com/adiatgithub/automated_da/blob/main/agent.py"
click node_nlq "https://github.com/adiatgithub/automated_da/blob/main/nlq.py"
click node_sql "https://github.com/adiatgithub/automated_da/blob/main/sql_engine.py"
click node_aggregation "https://github.com/adiatgithub/automated_da/blob/main/aggregation.py"
click node_metrics "https://github.com/adiatgithub/automated_da/blob/main/metrics.py"
click node_timeseries "https://github.com/adiatgithub/automated_da/blob/main/timeseries.py"
click node_anomalies "https://github.com/adiatgithub/automated_da/blob/main/anomalies.py"
click node_forecasting "https://github.com/adiatgithub/automated_da/blob/main/forecasting.py"
click node_business "https://github.com/adiatgithub/automated_da/blob/main/business_insights.py"
click node_ai "https://github.com/adiatgithub/automated_da/blob/main/ai_insights.py"
click node_search "https://github.com/adiatgithub/automated_da/blob/main/semantic_search.py"
click node_visuals "https://github.com/adiatgithub/automated_da/blob/main/autovis.py"
click node_ui "https://github.com/adiatgithub/automated_da/blob/main/ui.py"
click node_auth "https://github.com/adiatgithub/automated_da/blob/main/auth.py"
click node_observability "https://github.com/adiatgithub/automated_da/blob/main/observability.py"
click node_evaluation "https://github.com/adiatgithub/automated_da/blob/main/eval_framework.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_fileio,node_pipeline,node_cleaning,node_quality,node_schema,node_user toneBlue
class node_agent,node_nlq,node_sql,node_aggregation,node_metrics,node_timeseries,node_search,node_evaluation toneAmber
class node_anomalies,node_forecasting,node_business,node_ai toneMint
class node_app,node_visuals,node_ui toneRose
class node_auth,node_observability toneIndigo
```

## Components

### Data preparation

- [File ingestion](https://github.com/adiatgithub/automated_da/blob/main/file_io.py): `file_io.py`
- [Analysis preparation](https://github.com/adiatgithub/automated_da/blob/main/pipeline.py): `pipeline.py`
- [Data cleaning](https://github.com/adiatgithub/automated_da/blob/main/analysis.py): `analysis.py`
- [Data quality](https://github.com/adiatgithub/automated_da/blob/main/data_quality.py): `data_quality.py`
- [Role detection](https://github.com/adiatgithub/automated_da/blob/main/schema.py): `schema.py`

### Analysis and reasoning

- [Analyst agent](https://github.com/adiatgithub/automated_da/blob/main/agent.py): `agent.py`
- [Natural-language queries](https://github.com/adiatgithub/automated_da/blob/main/nlq.py): `nlq.py`
- [SQL engine](https://github.com/adiatgithub/automated_da/blob/main/sql_engine.py): `sql_engine.py`
- [Trend aggregation](https://github.com/adiatgithub/automated_da/blob/main/aggregation.py): `aggregation.py`
- [Metric semantics](https://github.com/adiatgithub/automated_da/blob/main/metrics.py): `metrics.py`
- [Time-series methods](https://github.com/adiatgithub/automated_da/blob/main/timeseries.py): `timeseries.py`
- [Record search](https://github.com/adiatgithub/automated_da/blob/main/semantic_search.py): `semantic_search.py`
- [Query evaluation](https://github.com/adiatgithub/automated_da/blob/main/eval_framework.py): `eval_framework.py`

### Business intelligence

- [Anomaly detection](https://github.com/adiatgithub/automated_da/blob/main/anomalies.py): `anomalies.py`
- [Forecasting](https://github.com/adiatgithub/automated_da/blob/main/forecasting.py): `forecasting.py`
- [Business insights](https://github.com/adiatgithub/automated_da/blob/main/business_insights.py): `business_insights.py`
- [AI narrative](https://github.com/adiatgithub/automated_da/blob/main/ai_insights.py): `ai_insights.py`

### Application experience

- [Streamlit app](https://github.com/adiatgithub/automated_da/blob/main/app.py): `app.py`
- [Chart generation](https://github.com/adiatgithub/automated_da/blob/main/autovis.py): `autovis.py`
- [Streamlit interface](https://github.com/adiatgithub/automated_da/blob/main/ui.py): `ui.py`

### Governance

- [Role permissions](https://github.com/adiatgithub/automated_da/blob/main/auth.py): `auth.py`
- [Audit telemetry](https://github.com/adiatgithub/automated_da/blob/main/observability.py): `observability.py`

### Other components

- **Business user**

## Connections

- Business user → Streamlit app: uses
- Streamlit app → File ingestion: loads files
- File ingestion → Analysis preparation: provides frames
- Analysis preparation → Data cleaning: cleans data
- Analysis preparation → Role detection: detects roles
- Analysis preparation → Trend aggregation: selects periods
- Analysis preparation → Business insights: builds brief
- File ingestion → Data quality: audits data
- Streamlit app → Streamlit interface: renders
- Streamlit app → Analysis preparation: prepares analysis
- Streamlit app → Analyst agent: routes requests
- Analyst agent → Natural-language queries: dispatches queries
- Analyst agent → Anomaly detection: dispatches detection
- Analyst agent → Forecasting: dispatches forecasts
- Analyst agent → Record search: dispatches search
- Natural-language queries → SQL engine: generates SQL
- Natural-language queries → Trend aggregation: builds trends
- Trend aggregation → Metric semantics: resolves metrics
- Trend aggregation → Time-series methods: fits trends
- Business insights → Trend aggregation: analyzes trends
- Business insights → Anomaly detection: checks anomalies
- Streamlit interface → Chart generation: renders charts
- Streamlit interface → Role permissions: checks permissions
- Streamlit interface → Audit telemetry: shows telemetry
- Streamlit app → AI narrative: generates narrative
- Streamlit app → Query evaluation: runs benchmarks
