# eillanrt/capstone-google-it-automation-with-python architecture

> Architecture diagram of the GitHub repository eillanrt/capstone-google-it-automation-with-python, 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/eillanrt/capstone-google-it-automation-with-python
- Repository: https://github.com/eillanrt/capstone-google-it-automation-with-python

## Overview

This repository combines an online fruit-store server with Python automation for supplier data and operational reporting. Supplier description files are parsed and posted to the server; a separate reporting flow turns those descriptions into a PDF and emails it. Supplier images can be resized and uploaded, while a health check diagnoses local system conditions and emails failures. The README is empty, so the map reflects only behavior evidenced by sampled source; in particular, image uploads are shown reaching the server, but no subsequent use of stored images is evidenced.

Main entry points: [`server/server.js`](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/server/server.js) (Express server), [`report_email.py`](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/report_email.py) (Description collector), [`run.py`](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/run.py) (Description parser), [`health_check.py`](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/health_check.py) (Health diagnostics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_store["Fruit store"]
  node_store_server["Express server<br/>[server.js]"]
  node_store_pages["Store pages"]
  node_fruit_records[("In-memory fruits<br/>[server.js]")]
  node_image_upload["Image upload endpoint<br/>[server.js]"]
end

subgraph group_supplier["Supplier automation"]
  node_description_parser["Description parser<br/>[run.py]"]
  node_fruit_submitter["Fruit submitter<br/>[run.py]"]
  node_image_resizer["Image resizer<br/>[changeImage.py]"]
  node_image_uploader["Image uploader"]
  node_description_files["Supplier descriptions"]
  node_supplier_images["Supplier image files"]
end

subgraph group_reporting["Reporting and email"]
  node_report_builder["Description collector<br/>[report_email.py]"]
  node_pdf_generator["PDF generator<br/>[reports.py]"]
  node_email_builder["Email builder<br/>[emails.py]"]
  node_smtp_service{{"Yahoo SMTP"}}
end

subgraph group_monitoring["Health monitoring"]
  node_health_check["Health diagnostics<br/>[health_check.py]"]
  node_system_metrics{{"System metrics"}}
end

node_user(("Store user"))
node_supplier_actor["Supplier data"]
node_image_actor["Supplier images"]
node_operator(("Operator"))

node_user -->|"requests pages"| node_store_server
node_store_server -->|"renders"| node_store_pages
node_store_server -->|"stores fruits"| node_fruit_records
node_user -->|"submits fruit"| node_store_server
node_supplier_actor -->|"provides files"| node_description_parser
node_description_parser -->|"reads"| node_description_files
node_fruit_submitter -->|"parses via"| node_description_parser
node_fruit_submitter -->|"posts fruit"| node_store_server
node_image_actor -->|"provides files"| node_supplier_images
node_image_resizer -->|"resizes in place"| node_supplier_images
node_image_uploader -->|"reads"| node_supplier_images
node_image_uploader -->|"posts image"| node_image_upload
node_image_upload -->|"handled by"| node_store_server
node_report_builder -->|"parses via"| node_description_parser
node_report_builder -->|"lists"| node_description_files
node_report_builder -->|"generates PDF"| node_pdf_generator
node_report_builder -->|"builds message"| node_email_builder
node_email_builder -->|"sends through"| node_smtp_service
node_operator -->|"runs check"| node_health_check
node_health_check -->|"reads metrics"| node_system_metrics
node_health_check -->|"builds alert"| node_email_builder

click node_store_server "https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/server/server.js"
click node_store_pages "https://github.com/eillanrt/capstone-google-it-automation-with-python/tree/main/server/views"
click node_fruit_records "https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/server/server.js"
click node_image_upload "https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/server/server.js"
click node_description_parser "https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/run.py"
click node_fruit_submitter "https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/run.py"
click node_image_resizer "https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/changeImage.py"
click node_image_uploader "https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/supplier_image_upload.py"
click node_description_files "https://github.com/eillanrt/capstone-google-it-automation-with-python/tree/main/supplier-data/descriptions"
click node_supplier_images "https://github.com/eillanrt/capstone-google-it-automation-with-python/tree/main/supplier-data/images"
click node_report_builder "https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/report_email.py"
click node_pdf_generator "https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/reports.py"
click node_email_builder "https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/emails.py"
click node_health_check "https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/health_check.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_store_server,node_store_pages,node_fruit_records,node_image_upload,node_user toneBlue
class node_description_parser,node_fruit_submitter,node_image_resizer,node_image_uploader,node_description_files,node_supplier_images toneAmber
class node_report_builder,node_pdf_generator,node_email_builder,node_smtp_service toneMint
class node_health_check,node_system_metrics toneRose
class node_supplier_actor,node_image_actor,node_operator toneIndigo
```

## Components

### Fruit store

- [Express server](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/server/server.js): `server/server.js`
- [Store pages](https://github.com/eillanrt/capstone-google-it-automation-with-python/tree/main/server/views): `server/views`
- [In-memory fruits](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/server/server.js): `server/server.js`
- [Image upload endpoint](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/server/server.js): `server/server.js`

### Supplier automation

- [Description parser](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/run.py): `run.py`
- [Fruit submitter](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/run.py): `run.py`
- [Image resizer](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/changeImage.py): `changeImage.py`
- [Image uploader](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/supplier_image_upload.py): `supplier_image_upload.py`
- [Supplier descriptions](https://github.com/eillanrt/capstone-google-it-automation-with-python/tree/main/supplier-data/descriptions): `supplier-data/descriptions`
- [Supplier image files](https://github.com/eillanrt/capstone-google-it-automation-with-python/tree/main/supplier-data/images): `supplier-data/images`

### Reporting and email

- [Description collector](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/report_email.py): `report_email.py`
- [PDF generator](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/reports.py): `reports.py`
- [Email builder](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/emails.py): `emails.py`
- **Yahoo SMTP**

### Health monitoring

- [Health diagnostics](https://github.com/eillanrt/capstone-google-it-automation-with-python/blob/main/health_check.py): `health_check.py`
- **System metrics**

### Other components

- **Store user**
- **Supplier data**
- **Supplier images**
- **Operator**

## Connections

- Store user → Express server: requests pages (evidence: `server/server.js`)
- Express server → Store pages: renders (evidence: `server/server.js`)
- Express server → In-memory fruits: stores fruits (evidence: `server/server.js`)
- Store user → Express server: submits fruit (evidence: `server/server.js`)
- Supplier data → Description parser: provides files (evidence: `run.py`)
- Description parser → Supplier descriptions: reads (evidence: `run.py`)
- Fruit submitter → Description parser: parses via (evidence: `run.py`)
- Fruit submitter → Express server: posts fruit (evidence: `run.py`)
- Supplier images → Supplier image files: provides files
- Image resizer → Supplier image files: resizes in place (evidence: `changeImage.py`)
- Image uploader → Supplier image files: reads (evidence: `supplier_image_upload.py`)
- Image uploader → Image upload endpoint: posts image (evidence: `supplier_image_upload.py`)
- Image upload endpoint → Express server: handled by (evidence: `server/server.js`)
- Description collector → Description parser: parses via (evidence: `report_email.py`)
- Description collector → Supplier descriptions: lists (evidence: `report_email.py`)
- Description collector → PDF generator: generates PDF (evidence: `report_email.py`)
- Description collector → Email builder: builds message (evidence: `report_email.py`)
- Email builder → Yahoo SMTP: sends through (evidence: `emails.py`)
- Operator → Health diagnostics: runs check (evidence: `health_check.py`)
- Health diagnostics → System metrics: reads metrics (evidence: `health_check.py`)
- Health diagnostics → Email builder: builds alert (evidence: `health_check.py`)
