# jithendra-data/datrixon architecture

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

- Interactive diagram: https://gitdiagram.com/jithendra-data/datrixon
- Repository: https://github.com/jithendra-data/datrixon

## Overview

Datrixon turns synthetic ERP records into controlled analytics and a static investigation dashboard. The main workflow is generation or reuse of raw CSVs, mandatory source checks, normalized staging, SQLite loading, SQL and Python analytics, independent reconciliation, contract validation, and approved JSON publication; the browser then presents financial views and investigation queues. The README documents major marts and operational analyses beyond the sampled excerpts. Exact wiring for unsampled analytics and browser modules is limited to documented behavior.

Main entry points: [`etl/run_pipeline.py`](https://github.com/jithendra-data/datrixon/blob/main/etl/run_pipeline.py) (Pipeline orchestrator), [`web/js/app.js`](https://github.com/jithendra-data/datrixon/blob/main/web/js/app.js) (Dashboard application), [`etl/export_dashboard_data.py`](https://github.com/jithendra-data/datrixon/blob/main/etl/export_dashboard_data.py) (Dashboard exporter), [`etl/clean_data.py`](https://github.com/jithendra-data/datrixon/blob/main/etl/clean_data.py) (CSV normalization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Data pipeline"]
  node_runner["Pipeline orchestrator<br/>[run_pipeline.py]"]
  node_generator["Synthetic ERP generator<br/>[generate_all.py]"]
  node_masterdata["Master data generator"]
  node_staging["CSV normalization<br/>[clean_data.py]"]
  node_warehouse["SQLite warehouse loader<br/>[warehouse.py]"]
  node_exporter["Dashboard exporter"]
end

subgraph group_analytics["Analytics and controls"]
  node_controls["Source quality checks"]
  node_sqlmodel["SQL marts and KPIs"]
  node_pyanalytics["Python analytics<br/>[build_analytics.py]"]
  node_operational["Operational analytics<br/>[operational.py]"]
  node_reconcile["Independent reconciliation<br/>[reconciliation.py]"]
  node_publication["Publication controls<br/>[publication.py]"]
end

subgraph group_product["Decision product"]
  node_browser["Static dashboard<br/>[index.html]"]
  node_app["Dashboard application<br/>[app.js]"]
  node_executive["Executive views<br/>[executive.js]"]
  node_metrics["Metric views<br/>[metrics.js]"]
  node_decisions["Investigation queues<br/>[decisions.js]"]
  node_reliability["Reliability views<br/>[reliability.js]"]
end

subgraph group_storage["Published data"]
  node_raw["Raw ERP CSVs"]
  node_sqlite[("SQLite reference warehouse<br/>[warehouse.sql]")]
  node_dashboarddata["Approved dashboard JSON<br/>[dashboard.json]"]
end

node_leadership(("Distribution leadership"))

node_leadership -->|"investigates"| node_browser
node_runner -->|"creates masters"| node_masterdata
node_runner -->|"builds transactions"| node_generator
node_masterdata -->|"supplies records"| node_generator
node_runner -->|"writes CSVs"| node_raw
node_runner -->|"validates sources"| node_controls
node_controls -->|"checks records"| node_raw
node_runner -->|"normalizes CSVs"| node_staging
node_raw -->|"reads sources"| node_staging
node_runner -->|"loads staging"| node_warehouse
node_staging -->|"provides CSVs"| node_warehouse
node_warehouse -->|"populates facts"| node_sqlite
node_runner -->|"builds aggregates"| node_pyanalytics
node_runner -->|"builds operations"| node_operational
node_runner -->|"exports analytics"| node_exporter
node_sqlmodel -->|"provides marts"| node_exporter
node_pyanalytics -->|"provides aggregates"| node_exporter
node_operational -->|"provides findings"| node_exporter
node_runner -->|"reconciles outputs"| node_reconcile
node_runner -->|"validates contract"| node_publication
node_reconcile -->|"supplies results"| node_publication
node_exporter -->|"serializes candidate"| node_dashboarddata
node_publication -->|"approves replacement"| node_dashboarddata
node_browser -->|"hosts application"| node_app
node_app -->|"fetches JSON"| node_dashboarddata
node_app -->|"renders overview"| node_executive
node_app -->|"renders metrics"| node_metrics
node_app -->|"renders queues"| node_decisions
node_app -->|"renders controls"| node_reliability

click node_runner "https://github.com/jithendra-data/datrixon/blob/main/etl/run_pipeline.py"
click node_generator "https://github.com/jithendra-data/datrixon/blob/main/python/generators/generate_all.py"
click node_masterdata "https://github.com/jithendra-data/datrixon/blob/main/python/generators/generate_master_data.py"
click node_raw "https://github.com/jithendra-data/datrixon/tree/main/data/raw"
click node_controls "https://github.com/jithendra-data/datrixon/blob/main/validation/run_data_quality_checks.py"
click node_staging "https://github.com/jithendra-data/datrixon/blob/main/etl/clean_data.py"
click node_warehouse "https://github.com/jithendra-data/datrixon/blob/main/etl/warehouse.py"
click node_sqlite "https://github.com/jithendra-data/datrixon/blob/main/sql/sqlite/warehouse.sql"
click node_sqlmodel "https://github.com/jithendra-data/datrixon/blob/main/sql/06_marts/sales_performance.sql"
click node_pyanalytics "https://github.com/jithendra-data/datrixon/blob/main/etl/build_analytics.py"
click node_operational "https://github.com/jithendra-data/datrixon/blob/main/etl/operational.py"
click node_exporter "https://github.com/jithendra-data/datrixon/blob/main/etl/export_dashboard_data.py"
click node_reconcile "https://github.com/jithendra-data/datrixon/blob/main/validation/reconciliation.py"
click node_publication "https://github.com/jithendra-data/datrixon/blob/main/validation/publication.py"
click node_dashboarddata "https://github.com/jithendra-data/datrixon/blob/main/web/data/dashboard.json"
click node_browser "https://github.com/jithendra-data/datrixon/blob/main/web/index.html"
click node_app "https://github.com/jithendra-data/datrixon/blob/main/web/js/app.js"
click node_executive "https://github.com/jithendra-data/datrixon/blob/main/web/js/executive.js"
click node_metrics "https://github.com/jithendra-data/datrixon/blob/main/web/js/metrics.js"
click node_decisions "https://github.com/jithendra-data/datrixon/blob/main/web/js/decisions.js"
click node_reliability "https://github.com/jithendra-data/datrixon/blob/main/web/js/reliability.js"

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_runner,node_generator,node_masterdata,node_staging,node_warehouse,node_exporter toneBlue
class node_controls,node_sqlmodel,node_pyanalytics,node_operational,node_reconcile,node_publication toneAmber
class node_browser,node_app,node_executive,node_metrics,node_decisions,node_reliability toneMint
class node_raw,node_sqlite,node_dashboarddata toneRose
class node_leadership toneIndigo
```

## Components

### Data pipeline

- [Pipeline orchestrator](https://github.com/jithendra-data/datrixon/blob/main/etl/run_pipeline.py): `etl/run_pipeline.py`
- [Synthetic ERP generator](https://github.com/jithendra-data/datrixon/blob/main/python/generators/generate_all.py): `python/generators/generate_all.py`
- [Master data generator](https://github.com/jithendra-data/datrixon/blob/main/python/generators/generate_master_data.py): `python/generators/generate_master_data.py`
- [CSV normalization](https://github.com/jithendra-data/datrixon/blob/main/etl/clean_data.py): `etl/clean_data.py`
- [SQLite warehouse loader](https://github.com/jithendra-data/datrixon/blob/main/etl/warehouse.py): `etl/warehouse.py`
- [Dashboard exporter](https://github.com/jithendra-data/datrixon/blob/main/etl/export_dashboard_data.py): `etl/export_dashboard_data.py`

### Analytics and controls

- [Source quality checks](https://github.com/jithendra-data/datrixon/blob/main/validation/run_data_quality_checks.py): `validation/run_data_quality_checks.py`
- [SQL marts and KPIs](https://github.com/jithendra-data/datrixon/blob/main/sql/06_marts/sales_performance.sql): `sql/06_marts/sales_performance.sql`
- [Python analytics](https://github.com/jithendra-data/datrixon/blob/main/etl/build_analytics.py): `etl/build_analytics.py`
- [Operational analytics](https://github.com/jithendra-data/datrixon/blob/main/etl/operational.py): `etl/operational.py`
- [Independent reconciliation](https://github.com/jithendra-data/datrixon/blob/main/validation/reconciliation.py): `validation/reconciliation.py`
- [Publication controls](https://github.com/jithendra-data/datrixon/blob/main/validation/publication.py): `validation/publication.py`

### Decision product

- [Static dashboard](https://github.com/jithendra-data/datrixon/blob/main/web/index.html): `web/index.html`
- [Dashboard application](https://github.com/jithendra-data/datrixon/blob/main/web/js/app.js): `web/js/app.js`
- [Executive views](https://github.com/jithendra-data/datrixon/blob/main/web/js/executive.js): `web/js/executive.js`
- [Metric views](https://github.com/jithendra-data/datrixon/blob/main/web/js/metrics.js): `web/js/metrics.js`
- [Investigation queues](https://github.com/jithendra-data/datrixon/blob/main/web/js/decisions.js): `web/js/decisions.js`
- [Reliability views](https://github.com/jithendra-data/datrixon/blob/main/web/js/reliability.js): `web/js/reliability.js`

### Published data

- [Raw ERP CSVs](https://github.com/jithendra-data/datrixon/tree/main/data/raw): `data/raw`
- [SQLite reference warehouse](https://github.com/jithendra-data/datrixon/blob/main/sql/sqlite/warehouse.sql): `sql/sqlite/warehouse.sql`
- [Approved dashboard JSON](https://github.com/jithendra-data/datrixon/blob/main/web/data/dashboard.json): `web/data/dashboard.json`

### Other components

- **Distribution leadership**

## Connections

- Distribution leadership → Static dashboard: investigates
- Pipeline orchestrator → Master data generator: creates masters
- Pipeline orchestrator → Synthetic ERP generator: builds transactions
- Master data generator → Synthetic ERP generator: supplies records
- Pipeline orchestrator → Raw ERP CSVs: writes CSVs
- Pipeline orchestrator → Source quality checks: validates sources
- Source quality checks → Raw ERP CSVs: checks records
- Pipeline orchestrator → CSV normalization: normalizes CSVs
- Raw ERP CSVs → CSV normalization: reads sources
- Pipeline orchestrator → SQLite warehouse loader: loads staging
- CSV normalization → SQLite warehouse loader: provides CSVs
- SQLite warehouse loader → SQLite reference warehouse: populates facts
- Pipeline orchestrator → Python analytics: builds aggregates
- Pipeline orchestrator → Operational analytics: builds operations
- Pipeline orchestrator → Dashboard exporter: exports analytics
- SQL marts and KPIs → Dashboard exporter: provides marts
- Python analytics → Dashboard exporter: provides aggregates
- Operational analytics → Dashboard exporter: provides findings
- Pipeline orchestrator → Independent reconciliation: reconciles outputs
- Pipeline orchestrator → Publication controls: validates contract
- Independent reconciliation → Publication controls: supplies results
- Dashboard exporter → Approved dashboard JSON: serializes candidate
- Publication controls → Approved dashboard JSON: approves replacement
- Static dashboard → Dashboard application: hosts application
- Dashboard application → Approved dashboard JSON: fetches JSON
- Dashboard application → Executive views: renders overview
- Dashboard application → Metric views: renders metrics
- Dashboard application → Investigation queues: renders queues
- Dashboard application → Reliability views: renders controls
