# mohammeddkhaled/employee-turnover architecture

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

- Interactive diagram: https://gitdiagram.com/mohammeddkhaled/employee-turnover
- Repository: https://github.com/mohammeddkhaled/employee-turnover

## Overview

This repository is an employee-attrition prediction application: a Flask interface accepts employee attributes and returns an attrition prediction. It also includes a separate model-training script and documents exploratory data analysis. The excerpts show the training and prediction code, but do not establish how the two Flask applications are deployed or whether they share a model artifact; those connections are left out.

Main entry points: [`application.py`](https://github.com/mohammeddkhaled/employee-turnover/blob/main/application.py) (Web interface), [`model.py`](https://github.com/mohammeddkhaled/employee-turnover/blob/main/model.py) (Logistic regression), [`app.py`](https://github.com/mohammeddkhaled/employee-turnover/blob/main/app.py) (Prediction API), [`templates/upload.html`](https://github.com/mohammeddkhaled/employee-turnover/blob/main/templates/upload.html) (Employee form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Prediction interfaces"]
  node_flask_web["Web interface<br/>[application.py]"]
  node_flask_api["Prediction API<br/>[app.py]"]
  node_employee_form["Employee form<br/>[upload.html]"]
  node_prediction_result["Prediction result<br/>[result.html]"]
end

subgraph group_ml["Attrition modeling"]
  node_prediction_model["Logistic regression<br/>[model.py]"]
end

subgraph group_analysis["Exploratory analysis"]
  node_eda["Data analysis<br/>[Attrition.ipynb]"]
end

node_employee(("HR user"))

node_employee -.->|"submits data"| node_flask_web
node_flask_web -.->|"renders"| node_employee_form
node_flask_web -->|"renders"| node_prediction_result
node_employee -.->|"sends attributes"| node_flask_api
node_prediction_model -.->|"analyzes data"| node_eda

click node_flask_web "https://github.com/mohammeddkhaled/employee-turnover/blob/main/application.py"
click node_flask_api "https://github.com/mohammeddkhaled/employee-turnover/blob/main/app.py"
click node_employee_form "https://github.com/mohammeddkhaled/employee-turnover/blob/main/templates/upload.html"
click node_prediction_result "https://github.com/mohammeddkhaled/employee-turnover/blob/main/templates/result.html"
click node_prediction_model "https://github.com/mohammeddkhaled/employee-turnover/blob/main/model.py"
click node_eda "https://github.com/mohammeddkhaled/employee-turnover/blob/main/Attrition.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_web,node_flask_api,node_employee_form,node_prediction_result,node_employee toneBlue
class node_prediction_model toneAmber
class node_eda toneMint
```

## Components

### Prediction interfaces

- [Web interface](https://github.com/mohammeddkhaled/employee-turnover/blob/main/application.py): `application.py`
- [Prediction API](https://github.com/mohammeddkhaled/employee-turnover/blob/main/app.py): `app.py`
- [Employee form](https://github.com/mohammeddkhaled/employee-turnover/blob/main/templates/upload.html): `templates/upload.html`
- [Prediction result](https://github.com/mohammeddkhaled/employee-turnover/blob/main/templates/result.html): `templates/result.html`

### Attrition modeling

- [Logistic regression](https://github.com/mohammeddkhaled/employee-turnover/blob/main/model.py): `model.py`

### Exploratory analysis

- [Data analysis](https://github.com/mohammeddkhaled/employee-turnover/blob/main/Attrition.ipynb): `Attrition.ipynb`

### Other components

- **HR user**

## Connections

- HR user → Web interface: submits data
- Web interface → Employee form: renders
- Web interface → Prediction result: renders (evidence: `application.py`)
- HR user → Prediction API: sends attributes (evidence: `README.md`)
- Logistic regression → Data analysis: analyzes data (evidence: `README.md`)
