# suriyasandy/accounting architecture

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

- Interactive diagram: https://gitdiagram.com/suriyasandy/accounting
- Repository: https://github.com/suriyasandy/accounting

## Overview

#### Purpose and Scope
This repository is a multi-prototype workspace for an accounting-control and break-analysis system. It appears to cover ingestion of accounting data, cleansing and feature preparation, break/factor/LNA analysis, model training and prediction, and analyst-facing applications. Several ZIP archives and parallel application variants indicate active experimentation rather than a single clearly canonical deployment.

#### Primary Entry Points
Likely execution surfaces are the orchestration and UI directories:
- `Breakanalyisi/Main`
- `Breakanalyisi/Cli`
- `Breakanalyisi/Streamlit app`
- `Accounting_fastapi.zip`
- `Accounting_streamlit.zip`

`Main` and `Cli` likely support batch or command-driven workflows; the Streamlit and FastAPI artifacts suggest separate interactive and API-serving paths. No README content identifies a definitive production entry point.

#### Data Ingestion and Storage Boundary
The system’s first stage is accounting-data acquisition and normalization:
- `Breakanalyisi/Clean data and read excel`
- `Breakanalyisi/Excel to parquet`
- `Local loader`
- `Faster data download`

Excel is a material input format, with Parquet apparently serving as an optimized analytical representation. Loader/download components likely isolate local files or remote data retrieval from downstream analytical logic.

#### Core Analytical Pipeline
Break identification and accounting analysis appear to be the central domain workflow:
- `Breakanalyisi/Data engine`
- `Breakanalyisi/Factor analysis`
- `Breakanalyisi/Lna analysis`
- `Breakanalyisi/Pipeljne`
- `Mi analyis`

The data engine and pipeline likely coordinate prepared records through break, factor, and LNA analysis. “Break chaining” is additionally documented by `cashfoare break chaining.pdf`, suggesting relationships between breaks may be modeled as a separate analytical concern.

#### Modeling, Training, and Inference
Predictive capabilities are organized into distinct training and serving stages:
- `Breakanalyisi/Modeling`
- `Breakanalyisi/Train`
- `Breakanalyisi/Prediction`
- `Train_model`
- `Live inference`
- `Updated predictor`

The expected flow is normalized accounting data → feature selection/modeling → trained model artifacts → batch or live predictions. `Feature selection`, `Query pred`, and `Record from prediction` indicate prediction results may be filtered, queried, and persisted for analyst review.

#### Analyst Applications and Workflow Integrations
Multiple UI variants appear to expose the same or evolving analytical workflow:
- `Breakanalyisi/P1app original`
- `Breakanalyisi/P1appnewversion`
- `Breakanalyisi/P1appwithjira`
- `Ui/Single prediction`
- `Ui/Query main`
- `Ui/Query output`

These applications likely separate single-record scoring from query-driven investigation. The Jira-specific variant implies an external issue-management boundary for escalation or case tracking, though the integration implementation is not visible in the tree.

#### Configuration, Evaluation, and Governance
Operational controls and quality assessment are represented by:
- `Breakanalyisi/Config`
- `Breakanalyisi/P1config`
- `Breakanalyisi/Evaluation`
- `Breakanalyisi/AI-Governance-Usecase.md`
- `Breakanalyisi/Technical-Workflow.md`

Configuration is separated from analytical stages, while evaluation and governance materials suggest model validation, traceability, and control requirements are important. `Breakanalyisi/Accounting_Control_AI_Gap_Analysis.docx` indicates the project is positioned as an AI enhancement to accounting-control processes.

#### Repository Structure Risk
The repository contains many overlapping ZIPs, app generations, and named experiments, including `Accounting_Control.zip`, `End-To-End.zip`, and `phase1 final.zip`. Before extending it, identify the intended canonical pipeline and UI/API variant; otherwise changes may land in a deprecated prototype rather than the deployed architecture.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data preparation"]
  node_source_data[("Local and downloaded data<br/>data sources")]
  node_fast_download["Data download<br/>ingestion"]
  node_excel_clean["Excel cleansing<br/>normalization"]
  node_parquet["Excel to Parquet<br/>data conversion"]
end

subgraph group_analysis["Break analysis"]
  node_data_engine{{"Data engine<br/>analysis core"}}
  node_pipeline["Analysis pipeline<br/>orchestration"]
  node_factor["Factor analysis<br/>analytical stage"]
  node_lna["LNA analysis<br/>analytical stage"]
  node_break_chaining["Break chaining<br/>domain documentation"]
end

subgraph group_ml["Model lifecycle"]
  node_modeling["Modeling<br/>feature and model design"]
  node_training["Training"]
  node_prediction["Prediction<br/>batch inference"]
  node_live_inference["Live inference<br/>serving"]
end

subgraph group_apps["Analyst surfaces"]
  node_streamlit["Streamlit app<br/>interactive app"]
  node_query_ui["Query workflow UI<br/>analyst UI"]
  node_single_prediction["Single prediction UI<br/>analyst UI"]
  node_jira_app["Jira-enabled app<br/>workflow integration"]
end

subgraph group_controls["Controls"]
  node_evaluation["Evaluation<br/>model assessment"]
  node_governance["AI governance<br/>governance documentation"]
  node_workflow_doc["Technical workflow<br/>architecture documentation"]
end

node_source_data -->|"acquired through"| node_fast_download
node_fast_download -->|"raw accounting data"| node_excel_clean
node_source_data -->|"local input"| node_excel_clean
node_excel_clean -->|"clean Excel"| node_parquet
node_parquet -->|"prepared records"| node_data_engine
node_data_engine -->|"analysis-ready data"| node_pipeline
node_pipeline -->|"factors"| node_factor
node_pipeline -->|"LNA cases"| node_lna
node_break_chaining -.->|"informs break relationships"| node_pipeline
node_pipeline -->|"analytical features"| node_modeling
node_modeling -->|"model design"| node_training
node_training -->|"trained model"| node_prediction
node_training -->|"deployed model"| node_live_inference
node_prediction -->|"query results"| node_query_ui
node_live_inference -->|"record score"| node_single_prediction
node_pipeline -->|"analyst analysis"| node_streamlit
node_query_ui -.->|"escalated cases"| node_jira_app
node_evaluation -.->|"validates"| node_training
node_governance -.->|"control requirements"| node_evaluation
node_workflow_doc -.->|"documents"| node_pipeline

click node_source_data "https://github.com/suriyasandy/accounting/blob/main/Local%20loader"
click node_fast_download "https://github.com/suriyasandy/accounting/blob/main/Faster%20data%20download"
click node_excel_clean "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Clean%20data%20and%20read%20excel"
click node_parquet "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Excel%20to%20parquet"
click node_data_engine "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Data%20engine"
click node_pipeline "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Pipeljne"
click node_factor "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Factor%20analysis"
click node_lna "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Lna%20analysis"
click node_break_chaining "https://github.com/suriyasandy/accounting/blob/main/cashfoare%20break%20chaining.pdf"
click node_modeling "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Modeling"
click node_training "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Train"
click node_prediction "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Prediction"
click node_live_inference "https://github.com/suriyasandy/accounting/blob/main/Live%20inference"
click node_streamlit "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Streamlit%20app"
click node_query_ui "https://github.com/suriyasandy/accounting/blob/main/Ui/Query%20main"
click node_single_prediction "https://github.com/suriyasandy/accounting/blob/main/Ui/Single%20prediction"
click node_jira_app "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/P1appwithjira"
click node_evaluation "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Evaluation"
click node_governance "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/AI-Governance-Usecase.md"
click node_workflow_doc "https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Technical-Workflow.md"

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_source_data,node_fast_download,node_excel_clean,node_parquet toneBlue
class node_data_engine,node_pipeline,node_factor,node_lna,node_break_chaining toneAmber
class node_modeling,node_training,node_prediction,node_live_inference toneMint
class node_streamlit,node_query_ui,node_single_prediction,node_jira_app toneRose
class node_evaluation,node_governance,node_workflow_doc toneIndigo
```

## Components

### Data preparation

- [Local and downloaded data](https://github.com/suriyasandy/accounting/blob/main/Local%20loader): data sources · Accounting data acquired from local or remote sources. · `Local loader`
- [Data download](https://github.com/suriyasandy/accounting/blob/main/Faster%20data%20download): ingestion · `Faster data download`
- [Excel cleansing](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Clean%20data%20and%20read%20excel): normalization · `Breakanalyisi/Clean data and read excel`
- [Excel to Parquet](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Excel%20to%20parquet): data conversion · Creates an optimized analytical representation. · `Breakanalyisi/Excel to parquet`

### Break analysis

- [Data engine](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Data%20engine): analysis core · Coordinates prepared accounting records for downstream analysis. · `Breakanalyisi/Data engine`
- [Analysis pipeline](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Pipeljne): orchestration · `Breakanalyisi/Pipeljne`
- [Factor analysis](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Factor%20analysis): analytical stage · `Breakanalyisi/Factor analysis`
- [LNA analysis](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Lna%20analysis): analytical stage · `Breakanalyisi/Lna analysis`
- [Break chaining](https://github.com/suriyasandy/accounting/blob/main/cashfoare%20break%20chaining.pdf): domain documentation · Documents relationships between accounting breaks. · `cashfoare break chaining.pdf`

### Model lifecycle

- [Modeling](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Modeling): feature and model design · `Breakanalyisi/Modeling`
- [Training](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Train): model training · `Breakanalyisi/Train`
- [Prediction](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Prediction): batch inference · `Breakanalyisi/Prediction`
- [Live inference](https://github.com/suriyasandy/accounting/blob/main/Live%20inference): serving · `Live inference`

### Analyst surfaces

- [Streamlit app](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Streamlit%20app): interactive app · One of several evolving analyst-facing variants. · `Breakanalyisi/Streamlit app`
- [Query workflow UI](https://github.com/suriyasandy/accounting/blob/main/Ui/Query%20main): analyst UI · `Ui/Query main`
- [Single prediction UI](https://github.com/suriyasandy/accounting/blob/main/Ui/Single%20prediction): analyst UI · `Ui/Single prediction`
- [Jira-enabled app](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/P1appwithjira): workflow integration · Prototype variant for issue-management escalation. · `Breakanalyisi/P1appwithjira`

### Controls

- [Evaluation](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Evaluation): model assessment · `Breakanalyisi/Evaluation`
- [AI governance](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/AI-Governance-Usecase.md): governance documentation · `Breakanalyisi/AI-Governance-Usecase.md`
- [Technical workflow](https://github.com/suriyasandy/accounting/blob/main/Breakanalyisi/Technical-Workflow.md): architecture documentation · `Breakanalyisi/Technical-Workflow.md`

## Connections

- Local and downloaded data → Data download: acquired through
- Data download → Excel cleansing: raw accounting data
- Local and downloaded data → Excel cleansing: local input
- Excel cleansing → Excel to Parquet: clean Excel
- Excel to Parquet → Data engine: prepared records
- Data engine → Analysis pipeline: analysis-ready data
- Analysis pipeline → Factor analysis: factors
- Analysis pipeline → LNA analysis: LNA cases
- Break chaining → Analysis pipeline: informs break relationships
- Analysis pipeline → Modeling: analytical features
- Modeling → Training: model design
- Training → Prediction: trained model
- Training → Live inference: deployed model
- Prediction → Query workflow UI: query results
- Live inference → Single prediction UI: record score
- Analysis pipeline → Streamlit app: analyst analysis
- Query workflow UI → Jira-enabled app: escalated cases
- Evaluation → Training: validates
- AI governance → Evaluation: control requirements
- Technical workflow → Analysis pipeline: documents
