# rcatalanvargas/tarea-1-cloud-computing architecture

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

- Interactive diagram: https://gitdiagram.com/rcatalanvargas/tarea-1-cloud-computing
- Repository: https://github.com/rcatalanvargas/tarea-1-cloud-computing

## Overview

This repository is a FastAPI service for predicting whether a student is placed in employment. The main workflow accepts and validates a student record (or batch), arranges features using metadata, invokes the serialized model, and returns class probabilities. The README also documents model exploration, evaluation, health and model-info endpoints, and interactive API documentation. The training workflow is described but its implementation was not sampled, so its wiring to the deployed artifact is not shown.

Main entry points: [`app/main.py`](https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py) (Prediction routes), [`model/model.pkl`](https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/model/model.pkl) (Inference pipeline), [`model/metadata.json`](https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/model/metadata.json) (Model metadata)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Inference API"]
  node_routes["Prediction routes<br/>[main.py]"]
  node_validation["Input contracts<br/>[main.py]"]
  node_response["Response builder<br/>[main.py]"]
  node_health["Health endpoint<br/>[main.py]"]
  node_info["Model info endpoint<br/>[main.py]"]
  node_swagger["Interactive docs<br/>[main.py]"]
end

subgraph group_artifacts["Model artifacts"]
  node_model["Inference pipeline<br/>[model.pkl]"]
  node_metadata["Model metadata<br/>[metadata.json]"]
end

subgraph group_development["Model development"]
  node_exploration["Data exploration"]
end

node_client(("API client"))

node_client -->|"submits prediction"| node_routes
node_routes -->|"validates input"| node_validation
node_routes -->|"selects features"| node_metadata
node_routes -->|"predicts classes"| node_model
node_routes -->|"estimates probabilities"| node_model
node_routes -->|"builds response"| node_response
node_response -->|"returns results"| node_client
node_client -->|"checks status"| node_health
node_client -->|"requests model details"| node_info
node_client -->|"opens documentation"| node_swagger
node_health -->|"checks loaded model"| node_model
node_info -->|"reads details"| node_metadata
node_routes -->|"loads at startup"| node_model
node_routes -->|"loads at startup"| node_metadata

click node_routes "https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py"
click node_validation "https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py"
click node_response "https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py"
click node_health "https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py"
click node_info "https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py"
click node_swagger "https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py"
click node_model "https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/model/model.pkl"
click node_metadata "https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/model/metadata.json"
click node_exploration "https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/notebooks/00_Exploracion_inicial.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_routes,node_validation,node_response,node_health,node_info,node_swagger,node_client toneBlue
class node_model,node_metadata toneAmber
class node_exploration toneMint
```

## Components

### Inference API

- [Prediction routes](https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py): `app/main.py`
- [Input contracts](https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py): `app/main.py`
- [Response builder](https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py): `app/main.py`
- [Health endpoint](https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py): `app/main.py`
- [Model info endpoint](https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py): `app/main.py`
- [Interactive docs](https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/app/main.py): `app/main.py`

### Model artifacts

- [Inference pipeline](https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/model/model.pkl): `model/model.pkl`
- [Model metadata](https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/model/metadata.json): `model/metadata.json`

### Model development

- [Data exploration](https://github.com/rcatalanvargas/tarea-1-cloud-computing/blob/main/notebooks/00_Exploracion_inicial.ipynb): `notebooks/00_Exploracion_inicial.ipynb`

### Other components

- **API client**

## Connections

- API client → Prediction routes: submits prediction
- Prediction routes → Input contracts: validates input
- Prediction routes → Model metadata: selects features
- Prediction routes → Inference pipeline: predicts classes
- Prediction routes → Inference pipeline: estimates probabilities
- Prediction routes → Response builder: builds response
- Response builder → API client: returns results
- API client → Health endpoint: checks status
- API client → Model info endpoint: requests model details
- API client → Interactive docs: opens documentation
- Health endpoint → Inference pipeline: checks loaded model
- Model info endpoint → Model metadata: reads details
- Prediction routes → Inference pipeline: loads at startup
- Prediction routes → Model metadata: loads at startup
