# mongulu-cm/manzi-mfa architecture

> Architecture diagram of the GitHub repository mongulu-cm/manzi-mfa, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mongulu-cm/manzi-mfa
- Repository: https://github.com/mongulu-cm/manzi-mfa

## Overview

#### Purpose and entry points
Manzi MFA is a Kubernetes-operated “bridge for work” platform centered on an EasyAppointments deployment, MySQL persistence, SMTP, and automated job-listing ingestion. Primary deployment entry points are the Helm chart at `helm/Chart.yaml` and GitOps application set at `argo_appset/appset.yaml`. The scraper runs from `data_ingestion/jobs/main.py`.

#### Application platform
The Helm chart deploys the core scheduling stack:
- EasyAppointments application: `helm/templates/deployment-easyappointment.yaml`, `helm/templates/service-easyappointments.yaml`, `helm/templates/ingress-easyappointments.yaml`
- MySQL database and its credential secret: `helm/templates/deployment-mysql.yaml`, `helm/templates/secret-mysql.yaml`
- SMTP service for application email: `helm/templates/deployment-smtpd.yaml`, `helm/templates/service-smtpd.yaml`

Ingress is the external boundary for EasyAppointments; MySQL and SMTP are cluster services consumed by the application.

#### Job ingestion pipeline
A Python scraper collects job postings and persists normalized records. `data_ingestion/jobs/main.py` is the orchestrator; target sources are likely supplied through `data_ingestion/jobs/list.txt`. Data is represented by `data_ingestion/jobs/models/job.py` and column mapping/schema material is in `data_ingestion/jobs/models/jobs_colums.csv`.

#### Scraping execution layer
Scraper selection is centralized in `data_ingestion/jobs/scrapers/scraper_factory.py`. A common scraper contract in `data_ingestion/jobs/scrapers/base_scraper.py` supports distinct navigation strategies:
- Paginated sources: `data_ingestion/jobs/scrapers/pagination_scraper.py`
- Infinite-scroll sources: `data_ingestion/jobs/scrapers/scroll_scraper.py`

Browser automation is an important external-runtime boundary, with Selenium setup in `data_ingestion/jobs/utils/selenium.py`; scraper dependencies are declared in `data_ingestion/jobs/requirements.txt`.

#### Persistence and presentation boundary
The ingestion pipeline accesses its database through `data_ingestion/jobs/utils/db.py`, separating scraper logic from connection/write behavior. A simple page artifact at `data_ingestion/jobs/page/index.html` appears intended to expose or render job data, though no serving runtime is represented in the tree.

#### Backup and operational automation
Database backup is containerized at `database/backup/docker/Dockerfile` and scheduled/deployed by `helm/templates/database-backup.yml`. CI workflows drive testing, scraper jobs, and backup-image publication: `.github/workflows/tests.yml`, `.github/workflows/scrape_jobs.yml`, and `.github/workflows/deploy_data_backup_image.yml`.

#### Cluster and delivery infrastructure
The repository expects Kubernetes plus Helm, Argo CD, cert-manager/ACME, External Secrets backed by AWS Parameter Store, Diun image monitoring, and GitHub Actions Runner Controller. Cluster-level prerequisites are represented in `manifests/issuer-acme.yml`, `manifests/parameter-store.yml`, and `manifests/diun.yml`; Argo CD reconciles application deployment from `argo_appset/appset.yaml`.

Main entry points: [`data_ingestion/jobs/main.py`](https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/main.py) (Scraper orchestrator), [`helm/templates/deployment-mysql.yaml`](https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/deployment-mysql.yaml) (MySQL), [`helm/templates/deployment-easyappointment.yaml`](https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/deployment-easyappointment.yaml) (EasyAppointments), [`.github/workflows/scrape_jobs.yml`](https://github.com/mongulu-cm/manzi-mfa/blob/main/.github/workflows/scrape_jobs.yml) (GitHub Actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_delivery["Delivery &amp; Cluster"]
  node_appset["Argo CD ApplicationSet<br/>GitOps deployment<br/>[appset.yaml]"]
  node_helm["Helm chart<br/>Kubernetes packaging<br/>[Chart.yaml]"]
  node_cluster{{"Kubernetes cluster<br/>runtime"}}
  node_external_secrets[("AWS Parameter Store secrets<br/>external secret backend")]
  node_acme["cert-manager / ACME<br/>TLS issuer<br/>[issuer-acme.yml]"]
end

subgraph group_scheduling["Scheduling Platform"]
  node_easyappointments["EasyAppointments<br/>scheduling application"]
  node_ingress["EasyAppointments ingress<br/>external HTTP boundary"]
  node_mysql[("MySQL<br/>application database")]
  node_mysql_secret["MySQL credentials<br/>Kubernetes secret<br/>[secret-mysql.yaml]"]
  node_smtp["SMTP service<br/>email delivery"]
end

subgraph group_ingestion["Job Ingestion"]
  node_scraper_main["Scraper orchestrator<br/>Python job<br/>[main.py]"]
  node_source_list["Job source list<br/>scrape input<br/>[list.txt]"]
  node_scraper_factory["Scraper factory<br/>strategy selection<br/>[scraper_factory.py]"]
  node_scraper_strategies["Pagination &amp; scroll scrapers<br/>navigation strategies"]
  node_selenium{{"Selenium browser runtime<br/>browser automation<br/>[selenium.py]"}}
  node_ingestion_db["Ingestion database access<br/>persistence adapter<br/>[db.py]"]
  node_job_model["Job schema<br/>normalized job model<br/>[job.py]"]
end

subgraph group_operations["Operations"]
  node_backup["Database backup job<br/>containerized backup"]
  node_backup_image["Backup image<br/>container build"]
  node_github_actions{{"GitHub Actions<br/>CI automation<br/>[scrape_jobs.yml]"}}
  node_diun["Diun image monitor<br/>cluster monitoring<br/>[diun.yml]"]
end

node_appset -->|"deploys"| node_helm
node_helm -->|"installs into"| node_cluster
node_external_secrets -.->|"provides"| node_mysql_secret
node_mysql_secret -->|"configures"| node_mysql
node_ingress -->|"routes requests"| node_easyappointments
node_acme -.->|"issues TLS for"| node_ingress
node_easyappointments -->|"stores scheduling data"| node_mysql
node_easyappointments -->|"sends email through"| node_smtp
node_scraper_main -->|"reads sources"| node_source_list
node_scraper_main -->|"selects scraper"| node_scraper_factory
node_scraper_factory -->|"creates"| node_scraper_strategies
node_scraper_strategies -->|"automates browser"| node_selenium
node_scraper_main -->|"normalizes records"| node_job_model
node_scraper_main -->|"persists through"| node_ingestion_db
node_ingestion_db -->|"writes job data"| node_mysql
node_backup_image -->|"builds runtime for"| node_backup
node_backup -->|"backs up"| node_mysql
node_github_actions -.->|"runs"| node_scraper_main
node_github_actions -.->|"publishes"| node_backup_image
node_diun -.->|"monitors images"| node_cluster

click node_appset "https://github.com/mongulu-cm/manzi-mfa/blob/main/argo_appset/appset.yaml"
click node_helm "https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/Chart.yaml"
click node_external_secrets "https://github.com/mongulu-cm/manzi-mfa/blob/main/manifests/parameter-store.yml"
click node_acme "https://github.com/mongulu-cm/manzi-mfa/blob/main/manifests/issuer-acme.yml"
click node_easyappointments "https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/deployment-easyappointment.yaml"
click node_ingress "https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/ingress-easyappointments.yaml"
click node_mysql "https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/deployment-mysql.yaml"
click node_mysql_secret "https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/secret-mysql.yaml"
click node_smtp "https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/deployment-smtpd.yaml"
click node_scraper_main "https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/main.py"
click node_source_list "https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/list.txt"
click node_scraper_factory "https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/scrapers/scraper_factory.py"
click node_scraper_strategies "https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/scrapers/pagination_scraper.py"
click node_selenium "https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/utils/selenium.py"
click node_ingestion_db "https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/utils/db.py"
click node_job_model "https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/models/job.py"
click node_backup "https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/database-backup.yml"
click node_backup_image "https://github.com/mongulu-cm/manzi-mfa/blob/main/database/backup/docker/Dockerfile"
click node_github_actions "https://github.com/mongulu-cm/manzi-mfa/blob/main/.github/workflows/scrape_jobs.yml"
click node_diun "https://github.com/mongulu-cm/manzi-mfa/blob/main/manifests/diun.yml"

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_appset,node_helm,node_cluster,node_external_secrets,node_acme toneBlue
class node_easyappointments,node_ingress,node_mysql,node_mysql_secret,node_smtp toneAmber
class node_scraper_main,node_source_list,node_scraper_factory,node_scraper_strategies,node_selenium,node_ingestion_db,node_job_model toneMint
class node_backup,node_backup_image,node_github_actions,node_diun toneRose
```

## Components

### Delivery & Cluster

- [Argo CD ApplicationSet](https://github.com/mongulu-cm/manzi-mfa/blob/main/argo_appset/appset.yaml): GitOps deployment · Reconciles the platform into Kubernetes. · `argo_appset/appset.yaml`
- [Helm chart](https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/Chart.yaml): Kubernetes packaging · Defines the deployed scheduling stack and backup workload. · `helm/Chart.yaml`
- **Kubernetes cluster**: runtime
- [AWS Parameter Store secrets](https://github.com/mongulu-cm/manzi-mfa/blob/main/manifests/parameter-store.yml): external secret backend · Supplies cluster secrets through External Secrets. · `manifests/parameter-store.yml`
- [cert-manager / ACME](https://github.com/mongulu-cm/manzi-mfa/blob/main/manifests/issuer-acme.yml): TLS issuer · `manifests/issuer-acme.yml`

### Scheduling Platform

- [EasyAppointments](https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/deployment-easyappointment.yaml): scheduling application · Core appointment application. · `helm/templates/deployment-easyappointment.yaml`
- [EasyAppointments ingress](https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/ingress-easyappointments.yaml): external HTTP boundary · `helm/templates/ingress-easyappointments.yaml`
- [MySQL](https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/deployment-mysql.yaml): application database · `helm/templates/deployment-mysql.yaml`
- [MySQL credentials](https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/secret-mysql.yaml): Kubernetes secret · `helm/templates/secret-mysql.yaml`
- [SMTP service](https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/deployment-smtpd.yaml): email delivery · `helm/templates/deployment-smtpd.yaml`

### Job Ingestion

- [Scraper orchestrator](https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/main.py): Python job · Collects and persists job postings. · `data_ingestion/jobs/main.py`
- [Job source list](https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/list.txt): scrape input · `data_ingestion/jobs/list.txt`
- [Scraper factory](https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/scrapers/scraper_factory.py): strategy selection · Selects a scraper for each source. · `data_ingestion/jobs/scrapers/scraper_factory.py`
- [Pagination & scroll scrapers](https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/scrapers/pagination_scraper.py): navigation strategies · Implements paginated and infinite-scroll collection. · `data_ingestion/jobs/scrapers/pagination_scraper.py`
- [Selenium browser runtime](https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/utils/selenium.py): browser automation · `data_ingestion/jobs/utils/selenium.py`
- [Ingestion database access](https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/utils/db.py): persistence adapter · Separates database writes from scraper logic. · `data_ingestion/jobs/utils/db.py`
- [Job schema](https://github.com/mongulu-cm/manzi-mfa/blob/main/data_ingestion/jobs/models/job.py): normalized job model · `data_ingestion/jobs/models/job.py`

### Operations

- [Database backup job](https://github.com/mongulu-cm/manzi-mfa/blob/main/helm/templates/database-backup.yml): containerized backup · Scheduled database backup workload. · `helm/templates/database-backup.yml`
- [Backup image](https://github.com/mongulu-cm/manzi-mfa/blob/main/database/backup/docker/Dockerfile): container build · `database/backup/docker/Dockerfile`
- [GitHub Actions](https://github.com/mongulu-cm/manzi-mfa/blob/main/.github/workflows/scrape_jobs.yml): CI automation · Runs tests, scraper jobs, and backup-image publication. · `.github/workflows/scrape_jobs.yml`
- [Diun image monitor](https://github.com/mongulu-cm/manzi-mfa/blob/main/manifests/diun.yml): cluster monitoring · `manifests/diun.yml`

## Connections

- Argo CD ApplicationSet → Helm chart: deploys
- Helm chart → Kubernetes cluster: installs into
- AWS Parameter Store secrets → MySQL credentials: provides
- MySQL credentials → MySQL: configures
- EasyAppointments ingress → EasyAppointments: routes requests
- cert-manager / ACME → EasyAppointments ingress: issues TLS for
- EasyAppointments → MySQL: stores scheduling data
- EasyAppointments → SMTP service: sends email through
- Scraper orchestrator → Job source list: reads sources
- Scraper orchestrator → Scraper factory: selects scraper
- Scraper factory → Pagination & scroll scrapers: creates
- Pagination & scroll scrapers → Selenium browser runtime: automates browser
- Scraper orchestrator → Job schema: normalizes records
- Scraper orchestrator → Ingestion database access: persists through
- Ingestion database access → MySQL: writes job data
- Backup image → Database backup job: builds runtime for
- Database backup job → MySQL: backs up
- GitHub Actions → Scraper orchestrator: runs
- GitHub Actions → Backup image: publishes
- Diun image monitor → Kubernetes cluster: monitors images
