# praneetsahoo/enterprise_transaction architecture

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

- Interactive diagram: https://gitdiagram.com/praneetsahoo/enterprise_transaction
- Repository: https://github.com/praneetsahoo/enterprise_transaction

## Overview

PayRecon is a planned batch transaction-reconciliation and fraud-telemetry pipeline. Its documented workflow takes raw payment dumps through S3, Python cleaning and validation, invalid-row DLQ handling, MySQL loading, then merchant settlement and sliding-window fraud analysis. The repository currently exposes configuration and a deterministic sample-data generator, while the application packages are empty; therefore, later-stage components and their links reflect README documentation, not inspected implementations. The README describes SQL analytics, but no SQL files appear in the supplied tree.

Main entry points: [`app/preprocessing`](https://github.com/praneetsahoo/enterprise_transaction/tree/main/app/preprocessing) (Clean and validate), [`scripts/generate_sample_data.py`](https://github.com/praneetsahoo/enterprise_transaction/blob/main/scripts/generate_sample_data.py) (Sample generator), [`data/raw`](https://github.com/praneetsahoo/enterprise_transaction/tree/main/data/raw) (Raw transaction files), [`data/processed`](https://github.com/praneetsahoo/enterprise_transaction/tree/main/data/processed) (Clean transaction data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Inputs"]
  node_sample_generator["Sample generator"]
  node_raw_files["Raw transaction files"]
  node_s3[("S3 object storage")]
end

subgraph group_preprocessing["Preprocessing"]
  node_config["Rules and settings<br/>[config.py]"]
  node_cleaning["Clean and validate"]
  node_dlq["Invalid-row DLQ"]
  node_clean_data["Clean transaction data"]
end

subgraph group_data["Data layer"]
  node_database["MySQL connection and loader"]
  node_rds[("RDS MySQL")]
end

subgraph group_analytics["Analytics"]
  node_settlement["Merchant settlement"]
  node_fraud["Sliding-window fraud"]
end

node_operator(("Data operator"))

node_operator -->|"generates samples"| node_sample_generator
node_sample_generator -->|"writes CSVs"| node_raw_files
node_operator -.->|"provides dumps"| node_s3
node_s3 -.->|"supplies dumps"| node_cleaning
node_raw_files -.->|"local input"| node_cleaning
node_cleaning -.->|"uses rules"| node_config
node_cleaning -.->|"routes invalid rows"| node_dlq
node_cleaning -.->|"writes clean data"| node_clean_data
node_clean_data -.->|"batch loads"| node_database
node_database -.->|"connects to"| node_rds
node_rds -.->|"provides transactions"| node_settlement
node_rds -.->|"provides transactions"| node_fraud

click node_sample_generator "https://github.com/praneetsahoo/enterprise_transaction/blob/main/scripts/generate_sample_data.py"
click node_raw_files "https://github.com/praneetsahoo/enterprise_transaction/tree/main/data/raw"
click node_config "https://github.com/praneetsahoo/enterprise_transaction/blob/main/app/config.py"
click node_cleaning "https://github.com/praneetsahoo/enterprise_transaction/tree/main/app/preprocessing"
click node_dlq "https://github.com/praneetsahoo/enterprise_transaction/tree/main/data/dlq"
click node_clean_data "https://github.com/praneetsahoo/enterprise_transaction/tree/main/data/processed"
click node_database "https://github.com/praneetsahoo/enterprise_transaction/tree/main/app/database"
click node_settlement "https://github.com/praneetsahoo/enterprise_transaction/tree/main/app/analytics"
click node_fraud "https://github.com/praneetsahoo/enterprise_transaction/tree/main/app/analytics"

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_sample_generator,node_raw_files,node_s3 toneBlue
class node_config,node_cleaning,node_dlq,node_clean_data toneAmber
class node_database,node_rds toneMint
class node_settlement,node_fraud toneRose
class node_operator toneIndigo
```

## Components

### Inputs

- [Sample generator](https://github.com/praneetsahoo/enterprise_transaction/blob/main/scripts/generate_sample_data.py): `scripts/generate_sample_data.py`
- [Raw transaction files](https://github.com/praneetsahoo/enterprise_transaction/tree/main/data/raw): `data/raw`
- **S3 object storage**

### Preprocessing

- [Rules and settings](https://github.com/praneetsahoo/enterprise_transaction/blob/main/app/config.py): `app/config.py`
- [Clean and validate](https://github.com/praneetsahoo/enterprise_transaction/tree/main/app/preprocessing): `app/preprocessing`
- [Invalid-row DLQ](https://github.com/praneetsahoo/enterprise_transaction/tree/main/data/dlq): `data/dlq`
- [Clean transaction data](https://github.com/praneetsahoo/enterprise_transaction/tree/main/data/processed): `data/processed`

### Data layer

- [MySQL connection and loader](https://github.com/praneetsahoo/enterprise_transaction/tree/main/app/database): `app/database`
- **RDS MySQL**

### Analytics

- [Merchant settlement](https://github.com/praneetsahoo/enterprise_transaction/tree/main/app/analytics): `app/analytics`
- [Sliding-window fraud](https://github.com/praneetsahoo/enterprise_transaction/tree/main/app/analytics): `app/analytics`

### Other components

- **Data operator**

## Connections

- Data operator → Sample generator: generates samples (evidence: `scripts/generate_sample_data.py`)
- Sample generator → Raw transaction files: writes CSVs (evidence: `scripts/generate_sample_data.py`)
- Data operator → S3 object storage: provides dumps (evidence: `README.md`)
- S3 object storage → Clean and validate: supplies dumps (evidence: `README.md`)
- Raw transaction files → Clean and validate: local input (evidence: `README.md`)
- Clean and validate → Rules and settings: uses rules (evidence: `README.md`)
- Clean and validate → Invalid-row DLQ: routes invalid rows (evidence: `README.md`)
- Clean and validate → Clean transaction data: writes clean data (evidence: `README.md`)
- Clean transaction data → MySQL connection and loader: batch loads (evidence: `README.md`)
- MySQL connection and loader → RDS MySQL: connects to (evidence: `README.md`)
- RDS MySQL → Merchant settlement: provides transactions (evidence: `README.md`)
- RDS MySQL → Sliding-window fraud: provides transactions (evidence: `README.md`)
