# noorullahzamindar-007/employee-attrition-prediction-web-app architecture

> Architecture diagram of the GitHub repository noorullahzamindar-007/employee-attrition-prediction-web-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/noorullahzamindar-007/employee-attrition-prediction-web-app
- Repository: https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app

## Overview

This is a Flask employee-attrition predictor: an HR user submits employee attributes, the app encodes them into the model’s 23 features, obtains a classification and (when supported) a probability, then renders a result. The README also describes preprocessing and Logistic Regression training, represented by the available notebook. The source excerpt confirms the request, feature-building, inference, and rendering flow; template files are documented but absent from the supplied tree, so their path is unknown.

Main entry points: [`app.py`](https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/app.py) (Flask routes), [`model.pkl`](https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/model.pkl) (Persisted model), [`Attrition_Rate (1).ipynb`](https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/Attrition_Rate%20(1).ipynb) (Model training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Web prediction"]
  node_flask_app["Flask routes<br/>[app.py]"]
  node_feature_builder["Feature encoding<br/>[app.py]"]
end

subgraph group_ml["Machine learning"]
  node_classifier["Classifier inference<br/>[app.py]"]
  node_model_artifact[("Persisted model<br/>[model.pkl]")]
  node_training["Model training"]
end

subgraph group_presentation["User interface"]
  node_web_views["Web views"]
  node_prediction_result["Prediction result"]
end

node_hr_user(("HR user"))

node_hr_user -->|"submits request"| node_flask_app
node_flask_app -->|"renders home"| node_web_views
node_flask_app -->|"builds features"| node_feature_builder
node_feature_builder -->|"supplies features"| node_classifier
node_flask_app -->|"requests prediction"| node_classifier
node_classifier -->|"loads model"| node_model_artifact
node_classifier -->|"returns prediction"| node_flask_app
node_flask_app -->|"renders result"| node_web_views
node_web_views -.->|"displays output"| node_prediction_result
node_training -.->|"produces model"| node_model_artifact

click node_flask_app "https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/app.py"
click node_feature_builder "https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/app.py"
click node_classifier "https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/app.py"
click node_model_artifact "https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/model.pkl"
click node_training "https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/Attrition_Rate%20(1).ipynb"

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_flask_app,node_feature_builder,node_hr_user toneBlue
class node_classifier,node_model_artifact,node_training toneAmber
class node_web_views,node_prediction_result toneMint
```

## Components

### Web prediction

- [Flask routes](https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/app.py): `app.py`
- [Feature encoding](https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/app.py): `app.py`

### Machine learning

- [Classifier inference](https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/app.py): `app.py`
- [Persisted model](https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/model.pkl): `model.pkl`
- [Model training](https://github.com/noorullahzamindar-007/employee-attrition-prediction-web-app/blob/main/Attrition_Rate%20(1).ipynb): `Attrition_Rate (1).ipynb`

### User interface

- **Web views**
- **Prediction result**

### Other components

- **HR user**

## Connections

- HR user → Flask routes: submits request (evidence: `README.md`)
- Flask routes → Web views: renders home (evidence: `app.py`)
- Flask routes → Feature encoding: builds features (evidence: `app.py`)
- Feature encoding → Classifier inference: supplies features (evidence: `app.py`)
- Flask routes → Classifier inference: requests prediction (evidence: `app.py`)
- Classifier inference → Persisted model: loads model (evidence: `app.py`)
- Classifier inference → Flask routes: returns prediction (evidence: `app.py`)
- Flask routes → Web views: renders result (evidence: `app.py`)
- Web views → Prediction result: displays output
- Model training → Persisted model: produces model (evidence: `README.md`)
