# hrishita456/limitforge architecture

> Architecture diagram of the GitHub repository hrishita456/limitforge, 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/hrishita456/limitforge
- Repository: https://github.com/hrishita456/limitforge

## Overview

LimitForge is a credit-limit decision pipeline: it loads customer history, engineers behavioral features, forecasts spend and estimates default risk, then combines those predictions into a guarded credit-limit recommendation. The main workflow is orchestrated by `main.py`; it also saves model artifacts, evaluation plots, and sample outputs. The README documents feature fan-out and the recommendation policy. Source excerpts show the orchestration and data-loader fallback; plot and artifact behavior is represented from the `main.py` calls to `src/utils.py`.

Main entry points: [`main.py`](https://github.com/hrishita456/limitforge/blob/main/main.py) (Pipeline Runner), [`src/feature_engineering.py`](https://github.com/hrishita456/limitforge/blob/main/src/feature_engineering.py) (Feature Engineering), [`src/data_loader.py`](https://github.com/hrishita456/limitforge/blob/main/src/data_loader.py) (Dataset Loader), [`src/limit_recommendation_engine.py`](https://github.com/hrishita456/limitforge/blob/main/src/limit_recommendation_engine.py) (Limit Recommendation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Customer Data"]
  node_loader["Dataset Loader<br/>[data_loader.py]"]
  node_synthetic["Synthetic Generator<br/>[synthetic_data.py]"]
  node_features["Feature Engineering"]
end

subgraph group_models["Risk Modeling"]
  node_spend["Spend Forecast"]
  node_risk["Default Risk"]
end

subgraph group_delivery["Recommendations and Outputs"]
  node_pipeline["Pipeline Runner<br/>[main.py]"]
  node_policy["Business Rule Target"]
  node_recommendation["Limit Recommendation"]
  node_utils["Artifact and Plot Helpers<br/>[utils.py]"]
end

node_issuer(("Risk Team"))
node_history["Customer History"]
node_result["Recommendations and Evaluations"]

node_issuer -->|"runs pipeline"| node_pipeline
node_history -->|"provides dataset"| node_loader
node_pipeline -->|"loads data"| node_loader
node_loader -->|"generates fallback"| node_synthetic
node_pipeline -->|"engineers features"| node_features
node_features -->|"supplies features"| node_spend
node_features -->|"supplies features"| node_risk
node_pipeline -->|"trains and predicts"| node_spend
node_pipeline -->|"trains and predicts"| node_risk
node_pipeline -->|"builds and trains"| node_recommendation
node_recommendation -->|"builds target with"| node_policy
node_pipeline -->|"requests recommendations"| node_recommendation
node_pipeline -->|"saves and plots"| node_utils
node_pipeline -->|"writes outputs"| node_result

click node_pipeline "https://github.com/hrishita456/limitforge/blob/main/main.py"
click node_loader "https://github.com/hrishita456/limitforge/blob/main/src/data_loader.py"
click node_synthetic "https://github.com/hrishita456/limitforge/blob/main/src/synthetic_data.py"
click node_features "https://github.com/hrishita456/limitforge/blob/main/src/feature_engineering.py"
click node_spend "https://github.com/hrishita456/limitforge/blob/main/src/spend_forecast_model.py"
click node_risk "https://github.com/hrishita456/limitforge/blob/main/src/default_risk_model.py"
click node_policy "https://github.com/hrishita456/limitforge/blob/main/src/limit_recommendation_engine.py"
click node_recommendation "https://github.com/hrishita456/limitforge/blob/main/src/limit_recommendation_engine.py"
click node_utils "https://github.com/hrishita456/limitforge/blob/main/src/utils.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_loader,node_synthetic,node_features toneBlue
class node_spend,node_risk toneAmber
class node_pipeline,node_policy,node_recommendation,node_utils toneMint
class node_issuer,node_history,node_result toneIndigo
```

## Components

### Customer Data

- [Dataset Loader](https://github.com/hrishita456/limitforge/blob/main/src/data_loader.py): `src/data_loader.py`
- [Synthetic Generator](https://github.com/hrishita456/limitforge/blob/main/src/synthetic_data.py): `src/synthetic_data.py`
- [Feature Engineering](https://github.com/hrishita456/limitforge/blob/main/src/feature_engineering.py): `src/feature_engineering.py`

### Risk Modeling

- [Spend Forecast](https://github.com/hrishita456/limitforge/blob/main/src/spend_forecast_model.py): `src/spend_forecast_model.py`
- [Default Risk](https://github.com/hrishita456/limitforge/blob/main/src/default_risk_model.py): `src/default_risk_model.py`

### Recommendations and Outputs

- [Pipeline Runner](https://github.com/hrishita456/limitforge/blob/main/main.py): `main.py`
- [Business Rule Target](https://github.com/hrishita456/limitforge/blob/main/src/limit_recommendation_engine.py): `src/limit_recommendation_engine.py`
- [Limit Recommendation](https://github.com/hrishita456/limitforge/blob/main/src/limit_recommendation_engine.py): `src/limit_recommendation_engine.py`
- [Artifact and Plot Helpers](https://github.com/hrishita456/limitforge/blob/main/src/utils.py): `src/utils.py`

### Other components

- **Risk Team**
- **Customer History**
- **Recommendations and Evaluations**

## Connections

- Risk Team → Pipeline Runner: runs pipeline (evidence: `README.md`)
- Customer History → Dataset Loader: provides dataset (evidence: `src/data_loader.py`)
- Pipeline Runner → Dataset Loader: loads data (evidence: `main.py`)
- Dataset Loader → Synthetic Generator: generates fallback (evidence: `src/data_loader.py`)
- Pipeline Runner → Feature Engineering: engineers features (evidence: `main.py`)
- Feature Engineering → Spend Forecast: supplies features (evidence: `README.md`)
- Feature Engineering → Default Risk: supplies features (evidence: `README.md`)
- Pipeline Runner → Spend Forecast: trains and predicts (evidence: `main.py`)
- Pipeline Runner → Default Risk: trains and predicts (evidence: `main.py`)
- Pipeline Runner → Limit Recommendation: builds and trains (evidence: `main.py`)
- Limit Recommendation → Business Rule Target: builds target with (evidence: `src/limit_recommendation_engine.py`)
- Pipeline Runner → Limit Recommendation: requests recommendations (evidence: `main.py`)
- Pipeline Runner → Artifact and Plot Helpers: saves and plots (evidence: `main.py`)
- Pipeline Runner → Recommendations and Evaluations: writes outputs (evidence: `main.py`)
