# bashutosh017/credit-card-approval-model-live architecture

> Architecture diagram of the GitHub repository bashutosh017/credit-card-approval-model-live, 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/bashutosh017/credit-card-approval-model-live
- Repository: https://github.com/bashutosh017/credit-card-approval-model-live

## Overview

This is a Flask-based credit-approval assessment app. Applicants enter financial details in a browser form; the server validates them, scores them with a packaged model, and returns an approval estimate. It also serves informational pages and records request outcomes in logs. The tree and excerpts establish the route, validation, scoring, and audit flow; template internals and other frontend assets were not sampled.

Main entry points: [`app.py`](https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/app.py) (Prediction endpoint), [`static/js/app.js`](https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/static/js/app.js) (Assessment form), [`templates`](https://github.com/bashutosh017/credit-card-approval-model-live/tree/main/templates) (Site pages), [`Lightgbm_credit2.pkl`](https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/Lightgbm_credit2.pkl) (Credit model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_pages["Site pages"]
  node_form["Assessment form<br/>[app.js]"]
end

subgraph group_service["Assessment service"]
  node_routes["Page routes<br/>[app.py]"]
  node_predict["Prediction endpoint<br/>[app.py]"]
  node_validation["Input validation<br/>[app.py]"]
end

subgraph group_operations["Model and audit"]
  node_inference["Model scoring<br/>[app.py]"]
  node_model["Credit model"]
  node_features["Feature schema<br/>[Model_feature2.pkl]"]
  node_audit["Request logging<br/>[app.py]"]
  node_logs[("Log files")]
end

node_applicant(("Applicant"))

node_applicant -.->|"enters details"| node_form
node_form -->|"posts JSON"| node_predict
node_routes -->|"renders pages"| node_pages
node_predict -->|"validates input"| node_validation
node_predict -->|"runs scoring"| node_inference
node_inference -->|"predicts probability"| node_model
node_inference -->|"selects columns"| node_features
node_predict -->|"records outcome"| node_audit
node_audit -->|"writes records"| node_logs

click node_pages "https://github.com/bashutosh017/credit-card-approval-model-live/tree/main/templates"
click node_form "https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/static/js/app.js"
click node_routes "https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/app.py"
click node_predict "https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/app.py"
click node_validation "https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/app.py"
click node_inference "https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/app.py"
click node_model "https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/Lightgbm_credit2.pkl"
click node_features "https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/Model_feature2.pkl"
click node_audit "https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/app.py"
click node_logs "https://github.com/bashutosh017/credit-card-approval-model-live/tree/main/logs"

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_pages,node_form toneBlue
class node_routes,node_predict,node_validation toneAmber
class node_inference,node_model,node_features,node_audit,node_logs toneMint
class node_applicant toneIndigo
```

## Components

### Web experience

- [Site pages](https://github.com/bashutosh017/credit-card-approval-model-live/tree/main/templates): `templates`
- [Assessment form](https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/static/js/app.js): `static/js/app.js`

### Assessment service

- [Page routes](https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/app.py): `app.py`
- [Prediction endpoint](https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/app.py): `app.py`
- [Input validation](https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/app.py): `app.py`

### Model and audit

- [Model scoring](https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/app.py): `app.py`
- [Credit model](https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/Lightgbm_credit2.pkl): `Lightgbm_credit2.pkl`
- [Feature schema](https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/Model_feature2.pkl): `Model_feature2.pkl`
- [Request logging](https://github.com/bashutosh017/credit-card-approval-model-live/blob/main/app.py): `app.py`
- [Log files](https://github.com/bashutosh017/credit-card-approval-model-live/tree/main/logs): `logs`

### Other components

- **Applicant**

## Connections

- Applicant → Assessment form: enters details
- Assessment form → Prediction endpoint: posts JSON (evidence: `static/js/app.js`)
- Page routes → Site pages: renders pages (evidence: `app.py`)
- Prediction endpoint → Input validation: validates input (evidence: `app.py`)
- Prediction endpoint → Model scoring: runs scoring (evidence: `app.py`)
- Model scoring → Credit model: predicts probability (evidence: `app.py`)
- Model scoring → Feature schema: selects columns (evidence: `app.py`)
- Prediction endpoint → Request logging: records outcome (evidence: `app.py`)
- Request logging → Log files: writes records (evidence: `app.py`)
