# alitouil2602/wtecc-cicd_practicecode architecture

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

- Interactive diagram: https://gitdiagram.com/alitouil2602/wtecc-cicd_practicecode
- Repository: https://github.com/alitouil2602/wtecc-cicd_practicecode

## Overview

This repository is primarily hands-on CI/CD practice material: six Tekton labs progress from a basic pipeline through GitHub triggers, catalog tasks, automated tests, image building, and Kubernetes deployment. The tree identifies the lab manifests, while the top-level README documents their capabilities; the individual pipeline wiring was not sampled, so no manifest-to-manifest runtime calls are inferred. It also contains a small Flask hit-counter service, whose routes and supporting modules are represented separately.

Main entry points: [`service/routes.py`](https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/routes.py) (Counter Routes), [`service/__init__.py`](https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/__init__.py) (Flask App), [`labs/01_base_pipeline`](https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/01_base_pipeline) (Base Pipeline), [`labs/02_add_git_trigger`](https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/02_add_git_trigger) (GitHub Trigger)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_labs["Tekton Labs"]
  node_base["Base Pipeline"]
  node_git_trigger["GitHub Trigger"]
  node_catalog["Catalog Tasks"]
  node_unit_tests["Unit Test Automation"]
  node_image_build["Image Build"]
  node_k8s_deploy["Kubernetes Deploy"]
end

subgraph group_service["Hit Counter Service"]
  node_flask_app["Flask App<br/>[__init__.py]"]
  node_counter_routes["Counter Routes<br/>[routes.py]"]
  node_counter_state[("In-Memory Counters<br/>[routes.py]")]
end

subgraph group_support["Service Support"]
  node_log_setup["Logging Setup<br/>[log_handlers.py]"]
  node_error_handlers["Error Responses<br/>[error_handlers.py]"]
  node_http_status["HTTP Status Codes<br/>[status.py]"]
end

node_learner(("Learner"))
node_http_client(("HTTP Client"))

node_learner -->|"starts with"| node_base
node_base -->|"next lab"| node_git_trigger
node_git_trigger -->|"next lab"| node_catalog
node_catalog -->|"next lab"| node_unit_tests
node_unit_tests -->|"next lab"| node_image_build
node_image_build -->|"next lab"| node_k8s_deploy
node_http_client -.->|"sends requests"| node_counter_routes
node_flask_app -->|"imports routes"| node_counter_routes
node_flask_app -->|"initializes logging"| node_log_setup
node_counter_routes -->|"reads and updates"| node_counter_state
node_counter_routes -->|"uses codes"| node_http_status
node_error_handlers -->|"uses codes"| node_http_status

click node_base "https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/01_base_pipeline"
click node_git_trigger "https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/02_add_git_trigger"
click node_catalog "https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/03_use_tekton_catalog"
click node_unit_tests "https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/04_unit_test_automation"
click node_image_build "https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/05_build_an_image"
click node_k8s_deploy "https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/06_deploy_to_kubernetes"
click node_flask_app "https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/__init__.py"
click node_counter_routes "https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/routes.py"
click node_counter_state "https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/routes.py"
click node_log_setup "https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/common/log_handlers.py"
click node_error_handlers "https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/common/error_handlers.py"
click node_http_status "https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/common/status.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_base,node_git_trigger,node_catalog,node_unit_tests,node_image_build,node_k8s_deploy,node_http_client toneBlue
class node_flask_app,node_counter_routes,node_counter_state toneAmber
class node_log_setup,node_error_handlers,node_http_status toneMint
class node_learner toneIndigo
```

## Components

### Tekton Labs

- [Base Pipeline](https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/01_base_pipeline): `labs/01_base_pipeline`
- [GitHub Trigger](https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/02_add_git_trigger): `labs/02_add_git_trigger`
- [Catalog Tasks](https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/03_use_tekton_catalog): `labs/03_use_tekton_catalog`
- [Unit Test Automation](https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/04_unit_test_automation): `labs/04_unit_test_automation`
- [Image Build](https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/05_build_an_image): `labs/05_build_an_image`
- [Kubernetes Deploy](https://github.com/alitouil2602/wtecc-cicd_practicecode/tree/main/labs/06_deploy_to_kubernetes): `labs/06_deploy_to_kubernetes`

### Hit Counter Service

- [Flask App](https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/__init__.py): `service/__init__.py`
- [Counter Routes](https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/routes.py): `service/routes.py`
- [In-Memory Counters](https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/routes.py): `service/routes.py`

### Service Support

- [Logging Setup](https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/common/log_handlers.py): `service/common/log_handlers.py`
- [Error Responses](https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/common/error_handlers.py): `service/common/error_handlers.py`
- [HTTP Status Codes](https://github.com/alitouil2602/wtecc-cicd_practicecode/blob/main/service/common/status.py): `service/common/status.py`

### Other components

- **Learner**
- **HTTP Client**

## Connections

- Learner → Base Pipeline: starts with (evidence: `README.md`)
- Base Pipeline → GitHub Trigger: next lab (evidence: `README.md`)
- GitHub Trigger → Catalog Tasks: next lab (evidence: `README.md`)
- Catalog Tasks → Unit Test Automation: next lab (evidence: `README.md`)
- Unit Test Automation → Image Build: next lab (evidence: `README.md`)
- Image Build → Kubernetes Deploy: next lab (evidence: `README.md`)
- HTTP Client → Counter Routes: sends requests
- Flask App → Counter Routes: imports routes (evidence: `service/__init__.py`)
- Flask App → Logging Setup: initializes logging (evidence: `service/__init__.py`)
- Counter Routes → In-Memory Counters: reads and updates (evidence: `service/routes.py`)
- Counter Routes → HTTP Status Codes: uses codes (evidence: `service/routes.py`)
- Error Responses → HTTP Status Codes: uses codes (evidence: `service/common/error_handlers.py`)
