# jrdittenber/project1aiml1013_rosestatecollege architecture

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

- Interactive diagram: https://gitdiagram.com/jrdittenber/project1aiml1013_rosestatecollege
- Repository: https://github.com/jrdittenber/project1aiml1013_rosestatecollege

## Overview

This is a supervised telco-customer-churn ML application. Its main workflow is a training pipeline that ingests customer records, validates and transforms them, trains and evaluates a classifier, then pushes an accepted model to S3; a separate prediction workflow accepts customer features and returns churn predictions. The graph preserves the major stages and the model-serving/storage layers. Evidence is limited to the README, SOURCE INDEX, and shown excerpts; links for unsampled implementation details are omitted or marked unverified.

Main entry points: [`telco_churn/pipeline/training_pipeline.py`](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/pipeline/training_pipeline.py) (Training orchestrator), [`telco_churn/entity/s3_estimator.py`](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/entity/s3_estimator.py) (Model estimator), [`telco_churn/cloud_storage/aws_storage.py`](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/cloud_storage/aws_storage.py) (S3 storage), [`app.py`](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/app.py) (Web application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entrypoints"]
  node_app["Web application<br/>[app.py]"]
end

subgraph group_training["Model training"]
  node_train_pipeline["Training orchestrator"]
  node_ingestion["Data ingestion<br/>[data_ingestion.py]"]
  node_validation["Data validation<br/>[data_validation.py]"]
  node_transformation["Data transformation"]
  node_trainer["Model trainer<br/>[model_trainer.py]"]
  node_evaluation["Model evaluation"]
  node_pusher["Model pusher<br/>[model_pusher.py]"]
end

subgraph group_serving["Prediction serving"]
  node_predict_pipeline["Prediction pipeline"]
  node_telco_data["Feature input"]
  node_estimator["Model estimator<br/>[s3_estimator.py]"]
  node_model["Preprocess and predict<br/>[estimator.py]"]
end

subgraph group_infra["Storage and configuration"]
  node_mongo_extract["Mongo extraction<br/>[mongo_extract.py]"]
  node_mongo_config["Mongo connection"]
  node_s3_storage["S3 storage<br/>[aws_storage.py]"]
  node_aws_config["AWS connection<br/>[aws_connection.py]"]
end

subgraph group_contracts["Pipeline contracts"]
  node_artifacts["Stage artifacts<br/>[artifact_entity.py]"]
  node_configs["Stage configuration<br/>[config_entity.py]"]
end

node_user(("User"))
node_mongo[("MongoDB")]
node_s3[("Amazon S3")]

node_user -->|"submits request"| node_app
node_app -->|"starts training"| node_train_pipeline
node_app -->|"requests prediction"| node_predict_pipeline
node_train_pipeline -->|"runs ingestion"| node_ingestion
node_train_pipeline -->|"runs validation"| node_validation
node_train_pipeline -->|"runs transformation"| node_transformation
node_train_pipeline -->|"runs training"| node_trainer
node_train_pipeline -->|"runs evaluation"| node_evaluation
node_train_pipeline -->|"runs publishing"| node_pusher
node_ingestion -->|"reads records"| node_mongo_extract
node_mongo_extract -->|"uses connection"| node_mongo_config
node_mongo_extract -.->|"fetches collection"| node_mongo
node_pusher -->|"uploads model"| node_s3_storage
node_evaluation -->|"checks model"| node_estimator
node_estimator -->|"loads model"| node_s3_storage
node_s3_storage -->|"uses client"| node_aws_config
node_s3_storage -.->|"reads and writes"| node_s3
node_predict_pipeline -->|"formats features"| node_telco_data
node_predict_pipeline -->|"requests prediction"| node_estimator
node_estimator -->|"delegates prediction"| node_model
node_train_pipeline -->|"passes stage results"| node_artifacts
node_train_pipeline -->|"configures stages"| node_configs

click node_app "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/app.py"
click node_train_pipeline "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/pipeline/training_pipeline.py"
click node_ingestion "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/components/data_ingestion.py"
click node_validation "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/components/data_validation.py"
click node_transformation "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/components/data_transformation.py"
click node_trainer "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/components/model_trainer.py"
click node_evaluation "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/components/model_evaluation.py"
click node_pusher "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/components/model_pusher.py"
click node_predict_pipeline "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/pipeline/prediction_pipeline.py"
click node_telco_data "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/pipeline/prediction_pipeline.py"
click node_estimator "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/entity/s3_estimator.py"
click node_model "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/entity/estimator.py"
click node_mongo_extract "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/database_access/mongo_extract.py"
click node_mongo_config "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/configuration/mongo_db_connect.py"
click node_s3_storage "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/cloud_storage/aws_storage.py"
click node_aws_config "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/configuration/aws_connection.py"
click node_artifacts "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/entity/artifact_entity.py"
click node_configs "https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/entity/config_entity.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_app,node_user toneBlue
class node_train_pipeline,node_ingestion,node_validation,node_transformation,node_trainer,node_evaluation,node_pusher,node_mongo,node_s3 toneAmber
class node_predict_pipeline,node_telco_data,node_estimator,node_model toneMint
class node_mongo_extract,node_mongo_config,node_s3_storage,node_aws_config toneRose
class node_artifacts,node_configs toneIndigo
```

## Components

### Application entrypoints

- [Web application](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/app.py): `app.py`

### Model training

- [Training orchestrator](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/pipeline/training_pipeline.py): `telco_churn/pipeline/training_pipeline.py`
- [Data ingestion](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/components/data_ingestion.py): `telco_churn/components/data_ingestion.py`
- [Data validation](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/components/data_validation.py): `telco_churn/components/data_validation.py`
- [Data transformation](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/components/data_transformation.py): `telco_churn/components/data_transformation.py`
- [Model trainer](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/components/model_trainer.py): `telco_churn/components/model_trainer.py`
- [Model evaluation](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/components/model_evaluation.py): `telco_churn/components/model_evaluation.py`
- [Model pusher](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/components/model_pusher.py): `telco_churn/components/model_pusher.py`

### Prediction serving

- [Prediction pipeline](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/pipeline/prediction_pipeline.py): `telco_churn/pipeline/prediction_pipeline.py`
- [Feature input](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/pipeline/prediction_pipeline.py): `telco_churn/pipeline/prediction_pipeline.py`
- [Model estimator](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/entity/s3_estimator.py): `telco_churn/entity/s3_estimator.py`
- [Preprocess and predict](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/entity/estimator.py): `telco_churn/entity/estimator.py`

### Storage and configuration

- [Mongo extraction](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/database_access/mongo_extract.py): `telco_churn/database_access/mongo_extract.py`
- [Mongo connection](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/configuration/mongo_db_connect.py): `telco_churn/configuration/mongo_db_connect.py`
- [S3 storage](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/cloud_storage/aws_storage.py): `telco_churn/cloud_storage/aws_storage.py`
- [AWS connection](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/configuration/aws_connection.py): `telco_churn/configuration/aws_connection.py`

### Pipeline contracts

- [Stage artifacts](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/entity/artifact_entity.py): `telco_churn/entity/artifact_entity.py`
- [Stage configuration](https://github.com/jrdittenber/project1aiml1013_rosestatecollege/blob/main/telco_churn/entity/config_entity.py): `telco_churn/entity/config_entity.py`

### Other components

- **User**
- **MongoDB**
- **Amazon S3**

## Connections

- User → Web application: submits request (evidence: `app.py`)
- Web application → Training orchestrator: starts training (evidence: `app.py`)
- Web application → Prediction pipeline: requests prediction (evidence: `app.py`)
- Training orchestrator → Data ingestion: runs ingestion (evidence: `telco_churn/pipeline/training_pipeline.py`)
- Training orchestrator → Data validation: runs validation (evidence: `telco_churn/pipeline/training_pipeline.py`)
- Training orchestrator → Data transformation: runs transformation (evidence: `telco_churn/pipeline/training_pipeline.py`)
- Training orchestrator → Model trainer: runs training (evidence: `telco_churn/pipeline/training_pipeline.py`)
- Training orchestrator → Model evaluation: runs evaluation (evidence: `telco_churn/pipeline/training_pipeline.py`)
- Training orchestrator → Model pusher: runs publishing (evidence: `telco_churn/pipeline/training_pipeline.py`)
- Data ingestion → Mongo extraction: reads records (evidence: `telco_churn/components/data_ingestion.py`)
- Mongo extraction → Mongo connection: uses connection (evidence: `telco_churn/database_access/mongo_extract.py`)
- Mongo extraction → MongoDB: fetches collection
- Model pusher → S3 storage: uploads model (evidence: `telco_churn/components/model_pusher.py`)
- Model evaluation → Model estimator: checks model (evidence: `telco_churn/components/model_evaluation.py`)
- Model estimator → S3 storage: loads model (evidence: `telco_churn/entity/s3_estimator.py`)
- S3 storage → AWS connection: uses client (evidence: `telco_churn/cloud_storage/aws_storage.py`)
- S3 storage → Amazon S3: reads and writes
- Prediction pipeline → Feature input: formats features (evidence: `telco_churn/pipeline/prediction_pipeline.py`)
- Prediction pipeline → Model estimator: requests prediction (evidence: `telco_churn/pipeline/prediction_pipeline.py`)
- Model estimator → Preprocess and predict: delegates prediction (evidence: `telco_churn/entity/s3_estimator.py`)
- Training orchestrator → Stage artifacts: passes stage results (evidence: `telco_churn/pipeline/training_pipeline.py`)
- Training orchestrator → Stage configuration: configures stages (evidence: `telco_churn/pipeline/training_pipeline.py`)
