# bhupesh-debug/senior-accountant-advisory-ml architecture

> Architecture diagram of the GitHub repository bhupesh-debug/senior-accountant-advisory-ml, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bhupesh-debug/senior-accountant-advisory-ml
- Repository: https://github.com/bhupesh-debug/senior-accountant-advisory-ml

## Overview

This is a synthetic-data accounting analytics prototype, not a live tax-preparation or bookkeeping service. Its main workflow is to generate and validate client, journal-entry, close, and tax-scenario data; engineer features and splits; run anomaly, close, and tax models; then produce metrics and charts. The graph emphasizes the documented `run_all.py` orchestration and sampled source. Tax arithmetic and several generator details are only partly excerpted, so those internal relationships are not expanded.

Main entry points: [`run_all.py`](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/run_all.py) (Pipeline runner), [`src/data_generation.py`](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/data_generation.py) (Synthetic data generator), [`src/data_pipeline.py`](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/data_pipeline.py) (Data loading and validation), [`data/synthetic`](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/tree/main/data/synthetic) (Synthetic datasets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Pipeline orchestration"]
  node_runner["Pipeline runner<br/>[run_all.py]"]
end

subgraph group_domain["Accounting analytics"]
  node_generator["Synthetic data generator<br/>[data_generation.py]"]
  node_validation["Data loading and validation<br/>[data_pipeline.py]"]
  node_features["Feature engineering and splits"]
  node_je_rules["Journal-entry rule checks<br/>[anomaly.py]"]
end

subgraph group_analysis["Modeling and reporting"]
  node_models["Model training and evaluation<br/>[models.py]"]
  node_charts["Analytics charts<br/>[charts.py]"]
end

subgraph group_artifacts["Data and outputs"]
  node_datasets[("Synthetic datasets")]
  node_metrics[("Metrics and review queue")]
  node_chart_outputs[("Chart outputs")]
end

node_operator(("Project operator"))

node_operator -->|"runs"| node_runner
node_runner -->|"runs when needed"| node_generator
node_generator -->|"generates"| node_datasets
node_runner -->|"loads and validates"| node_validation
node_validation -->|"reads"| node_datasets
node_runner -->|"engineers and splits"| node_features
node_runner -->|"computes rule flags"| node_je_rules
node_runner -->|"trains and evaluates"| node_models
node_runner -->|"writes metrics"| node_metrics
node_runner -->|"creates charts"| node_charts
node_runner -->|"writes charts"| node_chart_outputs

click node_runner "https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/run_all.py"
click node_generator "https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/data_generation.py"
click node_datasets "https://github.com/bhupesh-debug/senior-accountant-advisory-ml/tree/main/data/synthetic"
click node_validation "https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/data_pipeline.py"
click node_features "https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/feature_engineering.py"
click node_je_rules "https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/anomaly.py"
click node_models "https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/models.py"
click node_metrics "https://github.com/bhupesh-debug/senior-accountant-advisory-ml/tree/main/models"
click node_charts "https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/charts.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_runner toneBlue
class node_generator,node_validation,node_features,node_je_rules toneAmber
class node_models,node_charts toneMint
class node_datasets,node_metrics,node_chart_outputs toneRose
class node_operator toneIndigo
```

## Components

### Pipeline orchestration

- [Pipeline runner](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/run_all.py): `run_all.py`

### Accounting analytics

- [Synthetic data generator](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/data_generation.py): `src/data_generation.py`
- [Data loading and validation](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/data_pipeline.py): `src/data_pipeline.py`
- [Feature engineering and splits](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/feature_engineering.py): `src/feature_engineering.py`
- [Journal-entry rule checks](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/anomaly.py): `src/anomaly.py`

### Modeling and reporting

- [Model training and evaluation](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/models.py): `src/models.py`
- [Analytics charts](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/blob/main/src/charts.py): `src/charts.py`

### Data and outputs

- [Synthetic datasets](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/tree/main/data/synthetic): `data/synthetic`
- [Metrics and review queue](https://github.com/bhupesh-debug/senior-accountant-advisory-ml/tree/main/models): `models`
- **Chart outputs**

### Other components

- **Project operator**

## Connections

- Project operator → Pipeline runner: runs (evidence: `README.md`)
- Pipeline runner → Synthetic data generator: runs when needed (evidence: `run_all.py`)
- Synthetic data generator → Synthetic datasets: generates (evidence: `README.md`)
- Pipeline runner → Data loading and validation: loads and validates (evidence: `run_all.py`)
- Data loading and validation → Synthetic datasets: reads (evidence: `src/data_pipeline.py`)
- Pipeline runner → Feature engineering and splits: engineers and splits (evidence: `run_all.py`)
- Pipeline runner → Journal-entry rule checks: computes rule flags (evidence: `run_all.py`)
- Pipeline runner → Model training and evaluation: trains and evaluates (evidence: `run_all.py`)
- Pipeline runner → Metrics and review queue: writes metrics (evidence: `run_all.py`)
- Pipeline runner → Analytics charts: creates charts (evidence: `run_all.py`)
- Pipeline runner → Chart outputs: writes charts (evidence: `run_all.py`)
