# sakethlingerker/mlops-project architecture

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

- Interactive diagram: https://gitdiagram.com/sakethlingerker/mlops-project
- Repository: https://github.com/sakethlingerker/mlops-project

## Overview

This is a vehicle-insurance MLOps application: a training run ingests MongoDB data, validates and transforms it, trains and evaluates a model, and pushes an accepted model to S3; the web app also exposes prediction using the stored model. The training pipeline excerpt shows the orchestration; the source index supports several internal dependencies. README statements document MongoDB and AWS capabilities where implementation excerpts are unavailable, so those links are identified as documentation-based.

Main entry points: [`src/pipline/training_pipeline.py`](https://github.com/sakethlingerker/mlops-project/blob/main/src/pipline/training_pipeline.py) (Training orchestrator), [`src/entity/artifact_entity.py`](https://github.com/sakethlingerker/mlops-project/blob/main/src/entity/artifact_entity.py) (Pipeline artifacts), [`src/components/model_trainer.py`](https://github.com/sakethlingerker/mlops-project/blob/main/src/components/model_trainer.py) (Model trainer), [`src/pipline/prediction_pipeline.py`](https://github.com/sakethlingerker/mlops-project/blob/main/src/pipline/prediction_pipeline.py) (Prediction pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_web_app["Web application<br/>[app.py]"]
  node_training_pipeline["Training orchestrator"]
  node_prediction_pipeline["Prediction pipeline"]
  node_vehicle_input["Vehicle input mapping"]
end

subgraph group_training["Training workflow"]
  node_ingestion["Data ingestion<br/>[data_ingestion.py]"]
  node_validation["Data validation<br/>[data_validation.py]"]
  node_transformation["Data transformation"]
end

subgraph group_model["Model lifecycle"]
  node_trainer["Model trainer<br/>[model_trainer.py]"]
  node_evaluation["Model evaluation"]
  node_pusher["Model pusher<br/>[model_pusher.py]"]
  node_estimator["Model estimator<br/>[estimator.py]"]
  node_s3_estimator["S3 model estimator<br/>[s3_estimator.py]"]
end

subgraph group_integrations["Data and cloud"]
  node_mongo_access["Mongo data access<br/>[proj1_data.py]"]
  node_mongo_connection["Mongo connection"]
  node_mongo[("MongoDB")]
  node_storage["S3 storage service<br/>[aws_storage.py]"]
  node_aws[("AWS S3")]
end

subgraph group_foundation["Shared foundation"]
  node_artifacts["Pipeline artifacts<br/>[artifact_entity.py]"]
  node_configs["Pipeline configuration<br/>[config_entity.py]"]
  node_utilities["Data utilities<br/>[main_utils.py]"]
end

node_operator(("Operator"))

node_operator -.->|"uses"| node_web_app
node_web_app -->|"starts training"| node_training_pipeline
node_web_app -->|"requests prediction"| node_prediction_pipeline
node_prediction_pipeline -->|"builds input"| node_vehicle_input
node_vehicle_input -->|"returns dataframe"| node_prediction_pipeline
node_prediction_pipeline -->|"predicts with"| node_s3_estimator
node_training_pipeline -->|"runs ingestion"| node_ingestion
node_training_pipeline -->|"runs validation"| node_validation
node_training_pipeline -->|"runs transformation"| node_transformation
node_training_pipeline -->|"runs training"| node_trainer
node_training_pipeline -->|"runs evaluation"| node_evaluation
node_training_pipeline -->|"runs pushing"| node_pusher
node_training_pipeline -->|"uses configuration"| node_configs
node_ingestion -->|"fetches records"| node_mongo_access
node_mongo_access -->|"uses connection"| node_mongo_connection
node_mongo_connection -.->|"connects to"| node_mongo
node_ingestion -->|"creates artifact"| node_artifacts
node_validation -->|"uses utilities"| node_utilities
node_transformation -->|"uses utilities"| node_utilities
node_transformation -->|"creates artifact"| node_artifacts
node_trainer -->|"uses estimator"| node_estimator
node_trainer -->|"uses utilities"| node_utilities
node_evaluation -->|"checks stored model"| node_s3_estimator
node_pusher -->|"uploads model"| node_storage
node_s3_estimator -->|"loads and saves"| node_storage
node_storage -->|"reads and writes"| node_aws
node_trainer -.->|"produces result"| node_artifacts
node_evaluation -.->|"produces result"| node_artifacts
node_pusher -.->|"produces result"| node_artifacts

click node_web_app "https://github.com/sakethlingerker/mlops-project/blob/main/app.py"
click node_training_pipeline "https://github.com/sakethlingerker/mlops-project/blob/main/src/pipline/training_pipeline.py"
click node_prediction_pipeline "https://github.com/sakethlingerker/mlops-project/blob/main/src/pipline/prediction_pipeline.py"
click node_vehicle_input "https://github.com/sakethlingerker/mlops-project/blob/main/src/pipline/prediction_pipeline.py"
click node_ingestion "https://github.com/sakethlingerker/mlops-project/blob/main/src/components/data_ingestion.py"
click node_validation "https://github.com/sakethlingerker/mlops-project/blob/main/src/components/data_validation.py"
click node_transformation "https://github.com/sakethlingerker/mlops-project/blob/main/src/components/data_transformation.py"
click node_trainer "https://github.com/sakethlingerker/mlops-project/blob/main/src/components/model_trainer.py"
click node_evaluation "https://github.com/sakethlingerker/mlops-project/blob/main/src/components/model_evaluation.py"
click node_pusher "https://github.com/sakethlingerker/mlops-project/blob/main/src/components/model_pusher.py"
click node_estimator "https://github.com/sakethlingerker/mlops-project/blob/main/src/entity/estimator.py"
click node_s3_estimator "https://github.com/sakethlingerker/mlops-project/blob/main/src/entity/s3_estimator.py"
click node_mongo_access "https://github.com/sakethlingerker/mlops-project/blob/main/src/data_access/proj1_data.py"
click node_mongo_connection "https://github.com/sakethlingerker/mlops-project/blob/main/src/configuration/mongo_db_connection.py"
click node_storage "https://github.com/sakethlingerker/mlops-project/blob/main/src/cloud_storage/aws_storage.py"
click node_artifacts "https://github.com/sakethlingerker/mlops-project/blob/main/src/entity/artifact_entity.py"
click node_configs "https://github.com/sakethlingerker/mlops-project/blob/main/src/entity/config_entity.py"
click node_utilities "https://github.com/sakethlingerker/mlops-project/blob/main/src/utils/main_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_web_app,node_training_pipeline,node_prediction_pipeline,node_vehicle_input toneBlue
class node_ingestion,node_validation,node_transformation toneAmber
class node_trainer,node_evaluation,node_pusher,node_estimator,node_s3_estimator toneMint
class node_mongo_access,node_mongo_connection,node_mongo,node_storage,node_aws toneRose
class node_artifacts,node_configs,node_utilities,node_operator toneIndigo
```

## Components

### Application entry

- [Web application](https://github.com/sakethlingerker/mlops-project/blob/main/app.py): `app.py`
- [Training orchestrator](https://github.com/sakethlingerker/mlops-project/blob/main/src/pipline/training_pipeline.py): `src/pipline/training_pipeline.py`
- [Prediction pipeline](https://github.com/sakethlingerker/mlops-project/blob/main/src/pipline/prediction_pipeline.py): `src/pipline/prediction_pipeline.py`
- [Vehicle input mapping](https://github.com/sakethlingerker/mlops-project/blob/main/src/pipline/prediction_pipeline.py): `src/pipline/prediction_pipeline.py`

### Training workflow

- [Data ingestion](https://github.com/sakethlingerker/mlops-project/blob/main/src/components/data_ingestion.py): `src/components/data_ingestion.py`
- [Data validation](https://github.com/sakethlingerker/mlops-project/blob/main/src/components/data_validation.py): `src/components/data_validation.py`
- [Data transformation](https://github.com/sakethlingerker/mlops-project/blob/main/src/components/data_transformation.py): `src/components/data_transformation.py`

### Model lifecycle

- [Model trainer](https://github.com/sakethlingerker/mlops-project/blob/main/src/components/model_trainer.py): `src/components/model_trainer.py`
- [Model evaluation](https://github.com/sakethlingerker/mlops-project/blob/main/src/components/model_evaluation.py): `src/components/model_evaluation.py`
- [Model pusher](https://github.com/sakethlingerker/mlops-project/blob/main/src/components/model_pusher.py): `src/components/model_pusher.py`
- [Model estimator](https://github.com/sakethlingerker/mlops-project/blob/main/src/entity/estimator.py): `src/entity/estimator.py`
- [S3 model estimator](https://github.com/sakethlingerker/mlops-project/blob/main/src/entity/s3_estimator.py): `src/entity/s3_estimator.py`

### Data and cloud

- [Mongo data access](https://github.com/sakethlingerker/mlops-project/blob/main/src/data_access/proj1_data.py): `src/data_access/proj1_data.py`
- [Mongo connection](https://github.com/sakethlingerker/mlops-project/blob/main/src/configuration/mongo_db_connection.py): `src/configuration/mongo_db_connection.py`
- **MongoDB**
- [S3 storage service](https://github.com/sakethlingerker/mlops-project/blob/main/src/cloud_storage/aws_storage.py): `src/cloud_storage/aws_storage.py`
- **AWS S3**

### Shared foundation

- [Pipeline artifacts](https://github.com/sakethlingerker/mlops-project/blob/main/src/entity/artifact_entity.py): `src/entity/artifact_entity.py`
- [Pipeline configuration](https://github.com/sakethlingerker/mlops-project/blob/main/src/entity/config_entity.py): `src/entity/config_entity.py`
- [Data utilities](https://github.com/sakethlingerker/mlops-project/blob/main/src/utils/main_utils.py): `src/utils/main_utils.py`

### Other components

- **Operator**

## Connections

- Operator → Web application: uses (evidence: `README.md`)
- Web application → Training orchestrator: starts training (evidence: `app.py`)
- Web application → Prediction pipeline: requests prediction (evidence: `app.py`)
- Prediction pipeline → Vehicle input mapping: builds input (evidence: `src/pipline/prediction_pipeline.py`)
- Vehicle input mapping → Prediction pipeline: returns dataframe (evidence: `src/pipline/prediction_pipeline.py`)
- Prediction pipeline → S3 model estimator: predicts with (evidence: `src/pipline/prediction_pipeline.py`)
- Training orchestrator → Data ingestion: runs ingestion (evidence: `src/pipline/training_pipeline.py`)
- Training orchestrator → Data validation: runs validation (evidence: `src/pipline/training_pipeline.py`)
- Training orchestrator → Data transformation: runs transformation (evidence: `src/pipline/training_pipeline.py`)
- Training orchestrator → Model trainer: runs training (evidence: `src/pipline/training_pipeline.py`)
- Training orchestrator → Model evaluation: runs evaluation (evidence: `src/pipline/training_pipeline.py`)
- Training orchestrator → Model pusher: runs pushing (evidence: `src/pipline/training_pipeline.py`)
- Training orchestrator → Pipeline configuration: uses configuration (evidence: `src/pipline/training_pipeline.py`)
- Data ingestion → Mongo data access: fetches records (evidence: `src/components/data_ingestion.py`)
- Mongo data access → Mongo connection: uses connection (evidence: `src/data_access/proj1_data.py`)
- Mongo connection → MongoDB: connects to (evidence: `README.md`)
- Data ingestion → Pipeline artifacts: creates artifact (evidence: `src/components/data_ingestion.py`)
- Data validation → Data utilities: uses utilities (evidence: `src/components/data_validation.py`)
- Data transformation → Data utilities: uses utilities (evidence: `src/components/data_transformation.py`)
- Data transformation → Pipeline artifacts: creates artifact (evidence: `src/components/data_transformation.py`)
- Model trainer → Model estimator: uses estimator (evidence: `src/components/model_trainer.py`)
- Model trainer → Data utilities: uses utilities (evidence: `src/components/model_trainer.py`)
- Model evaluation → S3 model estimator: checks stored model (evidence: `src/components/model_evaluation.py`)
- Model pusher → S3 storage service: uploads model (evidence: `src/components/model_pusher.py`)
- S3 model estimator → S3 storage service: loads and saves (evidence: `src/entity/s3_estimator.py`)
- S3 storage service → AWS S3: reads and writes (evidence: `src/cloud_storage/aws_storage.py`)
- Model trainer → Pipeline artifacts: produces result (evidence: `src/components/model_trainer.py`)
- Model evaluation → Pipeline artifacts: produces result (evidence: `src/components/model_evaluation.py`)
- Model pusher → Pipeline artifacts: produces result (evidence: `src/components/model_pusher.py`)
