# noor-alishba/ai_ml_internship architecture

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

- Interactive diagram: https://gitdiagram.com/noor-alishba/ai_ml_internship
- Repository: https://github.com/noor-alishba/ai_ml_internship

## Overview

This repository is an internship portfolio spanning student-record management, a command-line calculator, data analysis and heart-disease modeling, and model-serving APIs. The clearest runtime workflows are student CRUD through CLI or web interfaces into validated in-memory records and JSON persistence, calculator menu actions into arithmetic/scientific operations, and patient requests into model predictions and JSON responses. The README documents broader analysis, model-optimization, and API capabilities; those branches are represented at the available directory or file level. Unsampled notebook and Week 6 implementation details limit finer-grained relationships.

Main entry points: [`Week_1/Student_Management_System/student_manager.py`](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/student_manager.py) (Record operations), [`Week_1/advanced_calculator/main.py`](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/advanced_calculator/main.py) (Menu and console), [`Week_6/app.py`](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_6/app.py) (Final Flask API), [`Week_1/Student_Management_System/main.py`](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/main.py) (CLI interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_student["Student Management"]
  node_student_cli["CLI interface<br/>[main.py]"]
  node_student_web["Flask interface<br/>[app.py]"]
  node_student_manager["Record operations<br/>[student_manager.py]"]
  node_student_validation["Record validation<br/>[validator.py]"]
  node_student_model["Student records<br/>[student.py]"]
  node_student_store[("JSON persistence<br/>[file_manager.py]")]
  node_student_log["Activity logging<br/>[logger.py]"]
end

subgraph group_calculator["CLI Calculator"]
  node_calculator_cli["Menu and console<br/>[main.py]"]
  node_calculator_ops["Calculator operations<br/>[calculator.py]"]
  node_calculator_validation["Input validation<br/>[validator.py]"]
end

subgraph group_analysis["Data &amp; Modeling"]
  node_titanic["Titanic analysis"]
  node_heart_failure["Heart failure modeling"]
  node_heart_optimization["Model optimization"]
  node_trained_model[("Persisted model")]
end

subgraph group_serving["Prediction APIs"]
  node_week5_api["Prediction API<br/>[app.py]"]
  node_week5_model[("Serving model")]
  node_week6_flask["Final Flask API<br/>[app.py]"]
  node_week6_frontend["HTML frontend<br/>[index.html]"]
  node_week6_wrapper["ASGI wrapper<br/>[fastapi_app.py]"]
end

node_student_user(("Student user"))
node_calculator_user(("Calculator user"))
node_patient(("Patient-data client"))

node_student_user -->|"uses CLI"| node_student_cli
node_student_user -->|"uses web app"| node_student_web
node_student_cli -->|"invokes operations"| node_student_manager
node_student_web -->|"routes operations"| node_student_manager
node_student_manager -->|"validates fields"| node_student_validation
node_student_manager -->|"creates records"| node_student_model
node_student_manager -->|"loads and saves"| node_student_store
node_student_manager -->|"records actions"| node_student_log
node_student_store -->|"serializes records"| node_student_model
node_calculator_user -->|"selects actions"| node_calculator_cli
node_calculator_cli -->|"calls operations"| node_calculator_ops
node_calculator_cli -->|"validates inputs"| node_calculator_validation
node_calculator_ops -->|"checks operands"| node_calculator_validation
node_titanic -.->|"later project"| node_heart_failure
node_heart_failure -->|"advanced evaluation"| node_heart_optimization
node_heart_optimization -->|"persists model"| node_trained_model
node_patient -->|"sends prediction"| node_week5_api
node_week5_api -->|"loads and predicts"| node_week5_model
node_patient -->|"uses final API"| node_week6_flask
node_week6_frontend -.->|"frontend access"| node_week6_flask
node_week6_wrapper -->|"mounts Flask app"| node_week6_flask

click node_student_cli "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/main.py"
click node_student_web "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/app.py"
click node_student_manager "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/student_manager.py"
click node_student_validation "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/validator.py"
click node_student_model "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/student.py"
click node_student_store "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/file_manager.py"
click node_student_log "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/logger.py"
click node_calculator_cli "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/advanced_calculator/main.py"
click node_calculator_ops "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/advanced_calculator/calculator.py"
click node_calculator_validation "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/advanced_calculator/validator.py"
click node_titanic "https://github.com/noor-alishba/ai_ml_internship/tree/main/Week_2"
click node_heart_failure "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_3/notebook/Heart_Failure_Prediction.ipynb"
click node_heart_optimization "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_4/notebook/Heart_Disease_Prediction.ipynb"
click node_trained_model "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_4/models/heart_disease_model.pkl"
click node_week5_api "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_5/app.py"
click node_week5_model "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_5/model/heart_disease_model.pkl"
click node_week6_flask "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_6/app.py"
click node_week6_frontend "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_6/templates/index.html"
click node_week6_wrapper "https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_6/fastapi_app.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_student_cli,node_student_web,node_student_manager,node_student_validation,node_student_model,node_student_store,node_student_log,node_student_user,node_calculator_user,node_patient toneBlue
class node_calculator_cli,node_calculator_ops,node_calculator_validation toneAmber
class node_titanic,node_heart_failure,node_heart_optimization,node_trained_model toneMint
class node_week5_api,node_week5_model,node_week6_flask,node_week6_frontend,node_week6_wrapper toneRose
```

## Components

### Student Management

- [CLI interface](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/main.py): `Week_1/Student_Management_System/main.py`
- [Flask interface](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/app.py): `Week_1/Student_Management_System/app.py`
- [Record operations](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/student_manager.py): `Week_1/Student_Management_System/student_manager.py`
- [Record validation](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/validator.py): `Week_1/Student_Management_System/validator.py`
- [Student records](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/student.py): `Week_1/Student_Management_System/student.py`
- [JSON persistence](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/file_manager.py): `Week_1/Student_Management_System/file_manager.py`
- [Activity logging](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/Student_Management_System/logger.py): `Week_1/Student_Management_System/logger.py`

### CLI Calculator

- [Menu and console](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/advanced_calculator/main.py): `Week_1/advanced_calculator/main.py`
- [Calculator operations](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/advanced_calculator/calculator.py): `Week_1/advanced_calculator/calculator.py`
- [Input validation](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_1/advanced_calculator/validator.py): `Week_1/advanced_calculator/validator.py`

### Data & Modeling

- [Titanic analysis](https://github.com/noor-alishba/ai_ml_internship/tree/main/Week_2): `Week_2`
- [Heart failure modeling](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_3/notebook/Heart_Failure_Prediction.ipynb): `Week_3/notebook/Heart_Failure_Prediction.ipynb`
- [Model optimization](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_4/notebook/Heart_Disease_Prediction.ipynb): `Week_4/notebook/Heart_Disease_Prediction.ipynb`
- [Persisted model](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_4/models/heart_disease_model.pkl): `Week_4/models/heart_disease_model.pkl`

### Prediction APIs

- [Prediction API](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_5/app.py): `Week_5/app.py`
- [Serving model](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_5/model/heart_disease_model.pkl): `Week_5/model/heart_disease_model.pkl`
- [Final Flask API](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_6/app.py): `Week_6/app.py`
- [HTML frontend](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_6/templates/index.html): `Week_6/templates/index.html`
- [ASGI wrapper](https://github.com/noor-alishba/ai_ml_internship/blob/main/Week_6/fastapi_app.py): `Week_6/fastapi_app.py`

### Other components

- **Student user**
- **Calculator user**
- **Patient-data client**

## Connections

- Student user → CLI interface: uses CLI (evidence: `README.md`)
- Student user → Flask interface: uses web app (evidence: `README.md`)
- CLI interface → Record operations: invokes operations (evidence: `Week_1/Student_Management_System/main.py`)
- Flask interface → Record operations: routes operations (evidence: `Week_1/Student_Management_System/app.py`)
- Record operations → Record validation: validates fields (evidence: `Week_1/Student_Management_System/student_manager.py`)
- Record operations → Student records: creates records (evidence: `Week_1/Student_Management_System/student_manager.py`)
- Record operations → JSON persistence: loads and saves (evidence: `Week_1/Student_Management_System/student_manager.py`)
- Record operations → Activity logging: records actions (evidence: `Week_1/Student_Management_System/student_manager.py`)
- JSON persistence → Student records: serializes records (evidence: `Week_1/Student_Management_System/file_manager.py`)
- Calculator user → Menu and console: selects actions (evidence: `Week_1/advanced_calculator/main.py`)
- Menu and console → Calculator operations: calls operations (evidence: `Week_1/advanced_calculator/main.py`)
- Menu and console → Input validation: validates inputs (evidence: `Week_1/advanced_calculator/main.py`)
- Calculator operations → Input validation: checks operands (evidence: `Week_1/advanced_calculator/calculator.py`)
- Titanic analysis → Heart failure modeling: later project (evidence: `README.md`)
- Heart failure modeling → Model optimization: advanced evaluation (evidence: `README.md`)
- Model optimization → Persisted model: persists model (evidence: `README.md`)
- Patient-data client → Prediction API: sends prediction (evidence: `README.md`)
- Prediction API → Serving model: loads and predicts (evidence: `Week_5/app.py`)
- Patient-data client → Final Flask API: uses final API (evidence: `README.md`)
- HTML frontend → Final Flask API: frontend access (evidence: `README.md`)
- ASGI wrapper → Final Flask API: mounts Flask app (evidence: `Week_6/fastapi_app.py`)
