# mcroitor/automation architecture

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

- Interactive diagram: https://gitdiagram.com/mcroitor/automation
- Repository: https://github.com/mcroitor/automation

## Overview

This repository is a course on scripting and automation, with lessons, labs, and supporting examples. The principal learner workflow is to study the topic materials and practise automation through exercises; the curriculum also covers Git, CI/CD, Jenkins, infrastructure as code, optimization, and security. A separate lab-preparation sample implements a currency-conversion endpoint. Its request handling and helper calls are shown in the excerpts; broader links between lessons and individual labs are not established, so they are not drawn as a sequence.

Main entry points: [`labs/lab02prep/app/index.php`](https://github.com/mcroitor/automation/blob/main/labs/lab02prep/app/index.php) (API handler), [`labs/lab02prep/app/lib/convertor.php`](https://github.com/mcroitor/automation/blob/main/labs/lab02prep/app/lib/convertor.php) (Rate converter), [`labs/lab02prep/app/lib/currency.php`](https://github.com/mcroitor/automation/blob/main/labs/lab02prep/app/lib/currency.php) (Currency types), [`01_intro.md`](https://github.com/mcroitor/automation/blob/main/01_intro.md) (Automation intro)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_curriculum["Course curriculum"]
  node_intro["Automation intro<br/>[01_intro.md]"]
  node_scripting["Shell scripting<br/>[02_basic.md]"]
  node_advanced["Advanced techniques<br/>[03_advanced.md]"]
  node_git["Git collaboration<br/>[04_git.md]"]
  node_pipelines["CI/CD pipelines<br/>[05_pipelines.md]"]
  node_jenkins["Jenkins pipelines<br/>[06_jenkins.md]"]
  node_agents["Jenkins agents"]
  node_optimization["Optimization<br/>[08_optimization.md]"]
  node_iac["Infrastructure as code<br/>[09_iac.md]"]
  node_security["Automation security<br/>[10_security.md]"]
  node_practices["Best practices"]
end

subgraph group_practice["Labs and examples"]
  node_shell_lab["Shell lab<br/>[lab01.md]"]
  node_python_lab["Python lab<br/>[lab02.md]"]
  node_cron_example["Cron example<br/>[entrypoint.sh]"]
  node_jenkins_examples["Jenkins examples"]
end

subgraph group_sample_app["Currency sample"]
  node_api_handler["API handler<br/>[index.php]"]
  node_currency_types["Currency types<br/>[currency.php]"]
  node_converter["Rate converter<br/>[convertor.php]"]
  node_rates[("Exchange rates<br/>[data.json]")]
end

node_learner(("Learner"))

node_learner -->|"studies"| node_intro
node_learner -->|"studies"| node_scripting
node_learner -->|"studies"| node_advanced
node_learner -->|"studies"| node_git
node_learner -->|"studies"| node_pipelines
node_learner -->|"studies"| node_jenkins
node_learner -->|"studies"| node_agents
node_learner -->|"studies"| node_optimization
node_learner -->|"studies"| node_iac
node_learner -->|"studies"| node_security
node_learner -->|"studies"| node_practices
node_learner -->|"practises with"| node_shell_lab
node_learner -->|"practises with"| node_python_lab
node_api_handler -->|"loads"| node_currency_types
node_api_handler -->|"calls"| node_converter
node_api_handler -->|"reads"| node_rates
node_converter -->|"uses"| node_currency_types

click node_intro "https://github.com/mcroitor/automation/blob/main/01_intro.md"
click node_scripting "https://github.com/mcroitor/automation/blob/main/02_basic.md"
click node_advanced "https://github.com/mcroitor/automation/blob/main/03_advanced.md"
click node_git "https://github.com/mcroitor/automation/blob/main/04_git.md"
click node_pipelines "https://github.com/mcroitor/automation/blob/main/05_pipelines.md"
click node_jenkins "https://github.com/mcroitor/automation/blob/main/06_jenkins.md"
click node_agents "https://github.com/mcroitor/automation/blob/main/07_jenkins_agents.md"
click node_optimization "https://github.com/mcroitor/automation/blob/main/08_optimization.md"
click node_iac "https://github.com/mcroitor/automation/blob/main/09_iac.md"
click node_security "https://github.com/mcroitor/automation/blob/main/10_security.md"
click node_practices "https://github.com/mcroitor/automation/blob/main/11_best_practices.md"
click node_shell_lab "https://github.com/mcroitor/automation/blob/main/labs/lab01.md"
click node_python_lab "https://github.com/mcroitor/automation/blob/main/labs/lab02.md"
click node_cron_example "https://github.com/mcroitor/automation/blob/main/examples/03/cron/entrypoint.sh"
click node_jenkins_examples "https://github.com/mcroitor/automation/blob/main/examples/09/03_cicd_secrets/credential.jenkinsfile"
click node_api_handler "https://github.com/mcroitor/automation/blob/main/labs/lab02prep/app/index.php"
click node_currency_types "https://github.com/mcroitor/automation/blob/main/labs/lab02prep/app/lib/currency.php"
click node_converter "https://github.com/mcroitor/automation/blob/main/labs/lab02prep/app/lib/convertor.php"
click node_rates "https://github.com/mcroitor/automation/blob/main/labs/lab02prep/app/data.json"

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_intro,node_scripting,node_advanced,node_git,node_pipelines,node_jenkins,node_agents,node_optimization,node_iac,node_security,node_practices toneBlue
class node_shell_lab,node_python_lab,node_cron_example,node_jenkins_examples toneAmber
class node_api_handler,node_currency_types,node_converter,node_rates toneMint
class node_learner toneIndigo
```

## Components

### Course curriculum

- [Automation intro](https://github.com/mcroitor/automation/blob/main/01_intro.md): `01_intro.md`
- [Shell scripting](https://github.com/mcroitor/automation/blob/main/02_basic.md): `02_basic.md`
- [Advanced techniques](https://github.com/mcroitor/automation/blob/main/03_advanced.md): `03_advanced.md`
- [Git collaboration](https://github.com/mcroitor/automation/blob/main/04_git.md): `04_git.md`
- [CI/CD pipelines](https://github.com/mcroitor/automation/blob/main/05_pipelines.md): `05_pipelines.md`
- [Jenkins pipelines](https://github.com/mcroitor/automation/blob/main/06_jenkins.md): `06_jenkins.md`
- [Jenkins agents](https://github.com/mcroitor/automation/blob/main/07_jenkins_agents.md): `07_jenkins_agents.md`
- [Optimization](https://github.com/mcroitor/automation/blob/main/08_optimization.md): `08_optimization.md`
- [Infrastructure as code](https://github.com/mcroitor/automation/blob/main/09_iac.md): `09_iac.md`
- [Automation security](https://github.com/mcroitor/automation/blob/main/10_security.md): `10_security.md`
- [Best practices](https://github.com/mcroitor/automation/blob/main/11_best_practices.md): `11_best_practices.md`

### Labs and examples

- [Shell lab](https://github.com/mcroitor/automation/blob/main/labs/lab01.md): `labs/lab01.md`
- [Python lab](https://github.com/mcroitor/automation/blob/main/labs/lab02.md): `labs/lab02.md`
- [Cron example](https://github.com/mcroitor/automation/blob/main/examples/03/cron/entrypoint.sh): `examples/03/cron/entrypoint.sh`
- [Jenkins examples](https://github.com/mcroitor/automation/blob/main/examples/09/03_cicd_secrets/credential.jenkinsfile): `examples/09/03_cicd_secrets/credential.jenkinsfile`

### Currency sample

- [API handler](https://github.com/mcroitor/automation/blob/main/labs/lab02prep/app/index.php): `labs/lab02prep/app/index.php`
- [Currency types](https://github.com/mcroitor/automation/blob/main/labs/lab02prep/app/lib/currency.php): `labs/lab02prep/app/lib/currency.php`
- [Rate converter](https://github.com/mcroitor/automation/blob/main/labs/lab02prep/app/lib/convertor.php): `labs/lab02prep/app/lib/convertor.php`
- [Exchange rates](https://github.com/mcroitor/automation/blob/main/labs/lab02prep/app/data.json): `labs/lab02prep/app/data.json`

### Other components

- **Learner**

## Connections

- Learner → Automation intro: studies (evidence: `readme.md`)
- Learner → Shell scripting: studies (evidence: `readme.md`)
- Learner → Advanced techniques: studies (evidence: `readme.md`)
- Learner → Git collaboration: studies (evidence: `readme.md`)
- Learner → CI/CD pipelines: studies (evidence: `readme.md`)
- Learner → Jenkins pipelines: studies (evidence: `readme.md`)
- Learner → Jenkins agents: studies (evidence: `readme.md`)
- Learner → Optimization: studies (evidence: `readme.md`)
- Learner → Infrastructure as code: studies (evidence: `readme.md`)
- Learner → Automation security: studies (evidence: `readme.md`)
- Learner → Best practices: studies (evidence: `readme.md`)
- Learner → Shell lab: practises with (evidence: `readme.md`)
- Learner → Python lab: practises with (evidence: `readme.md`)
- API handler → Currency types: loads (evidence: `labs/lab02prep/app/index.php`)
- API handler → Rate converter: calls (evidence: `labs/lab02prep/app/index.php`)
- API handler → Exchange rates: reads (evidence: `labs/lab02prep/app/index.php`)
- Rate converter → Currency types: uses (evidence: `labs/lab02prep/app/lib/convertor.php`)
