# pphson/worldskill2024 architecture

> Architecture diagram of the GitHub repository pphson/worldskill2024, 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/pphson/worldskill2024
- Repository: https://github.com/pphson/worldskill2024

## Overview

The tree contains several independent WorldSkill modules rather than one integrated application. Module B is a product/company catalogue: visitors and administrators enter through its PHP router, which selects public pages, admin views, or JSON endpoints backed by MySQL. Module C is a Lyon heritage directory with article parsing and list/detail templates. Modules A, D, E, and F are retained as distinct runtime areas based on their source paths and filenames; their broader workflows cannot be established from the README or shown excerpts.

Main entry points: [`XX_module_b/index.php`](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/index.php) (Request router), [`XX_module_b/db.php`](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/db.php) (Catalogue database), [`XX_module_c/templates/list_view.php`](https://github.com/pphson/worldskill2024/blob/main/XX_module_c/templates/list_view.php) (Article listing), [`XX_module_c/templates/single_view.php`](https://github.com/pphson/worldskill2024/blob/main/XX_module_c/templates/single_view.php) (Article detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalogue["Product catalogue"]
  node_catalogue_router["Request router<br/>[index.php]"]
  node_login["Admin login<br/>[login.php]"]
  node_product_admin["Product admin<br/>[admin_products.php]"]
  node_product_form["Product editor<br/>[product_form.php]"]
  node_company_admin["Company admin"]
  node_company_form["Company editor<br/>[company_form.php]"]
  node_company_detail["Company details<br/>[company_detail.php]"]
  node_public_product["Public product<br/>[public_product.php]"]
  node_bulk_verify["Bulk verification<br/>[bulk_verify.php]"]
  node_products_api["Product listing API<br/>[products.php]"]
  node_product_api["Product detail API<br/>[product_detail.php]"]
  node_catalogue_db[("Catalogue database<br/>[db.php]")]
end

subgraph group_heritage["Heritage directory"]
  node_heritage_index["Directory entry<br/>[index.php]"]
  node_file_scanner["File scanner<br/>[file_scanner.php]"]
  node_article_parser["Article parser<br/>[parser.php]"]
  node_search_logic["Search logic<br/>[search_logic.php]"]
  node_heritage_list["Article listing<br/>[list_view.php]"]
  node_heritage_detail["Article detail<br/>[single_view.php]"]
  node_heritage_header["Shared header<br/>[layout_header.php]"]
  node_heritage_footer["Shared footer<br/>[layout_footer.php]"]
end

subgraph group_module_d["Module D"]
  node_module_d_frontend["Frontend script<br/>[script.js]"]
  node_module_d_api["API<br/>[module_d_api.php]"]
  node_module_d_cors_api["CORS API"]
  node_geo_distance["Distance helper"]
end

subgraph group_module_e["Module E"]
  node_module_e_config["Config loader<br/>[load-config.js]"]
  node_module_e_main["Main script<br/>[main.js]"]
  node_module_e_reorder["Drag reorder"]
  node_module_e_slideshow["Slideshow<br/>[slideshow.js]"]
end

subgraph group_module_f["Module F"]
end

subgraph group_module_a["Module A"]
  node_module_a_b35["B35 script<br/>[script.js]"]
  node_module_a_b39["B39 script<br/>[script.js]"]
  node_module_a_b9["B9 script<br/>[script.js]"]
end

node_visitor(("Visitor"))
node_admin(("Administrator"))
node_consumer(("API consumer"))

node_admin -->|"requests pages"| node_catalogue_router
node_visitor -->|"requests pages"| node_catalogue_router
node_consumer -->|"requests JSON"| node_catalogue_router
node_catalogue_router -->|"routes to"| node_login
node_catalogue_router -->|"routes to"| node_product_admin
node_catalogue_router -->|"routes to"| node_product_form
node_catalogue_router -->|"routes to"| node_company_admin
node_catalogue_router -->|"routes to"| node_company_form
node_catalogue_router -->|"routes to"| node_company_detail
node_catalogue_router -->|"routes to"| node_public_product
node_catalogue_router -->|"routes to"| node_bulk_verify
node_catalogue_router -->|"routes to"| node_products_api
node_catalogue_router -->|"routes to"| node_product_api
node_products_api -->|"queries"| node_catalogue_db
node_product_api -->|"queries"| node_catalogue_db
node_product_form -->|"reads and writes"| node_catalogue_db
node_company_form -->|"reads and writes"| node_catalogue_db
node_company_detail -->|"queries"| node_catalogue_db
node_public_product -->|"queries"| node_catalogue_db
node_heritage_list -->|"parses articles"| node_article_parser
node_heritage_list -->|"includes"| node_heritage_header
node_heritage_list -->|"includes"| node_heritage_footer
node_heritage_detail -->|"uses layout"| node_heritage_header
node_heritage_detail -->|"uses layout"| node_heritage_footer

click node_catalogue_router "https://github.com/pphson/worldskill2024/blob/main/XX_module_b/index.php"
click node_login "https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/login.php"
click node_product_admin "https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/admin_products.php"
click node_product_form "https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/product_form.php"
click node_company_admin "https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/admin_companies.php"
click node_company_form "https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/company_form.php"
click node_company_detail "https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/company_detail.php"
click node_public_product "https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/public_product.php"
click node_bulk_verify "https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/bulk_verify.php"
click node_products_api "https://github.com/pphson/worldskill2024/blob/main/XX_module_b/api/products.php"
click node_product_api "https://github.com/pphson/worldskill2024/blob/main/XX_module_b/api/product_detail.php"
click node_catalogue_db "https://github.com/pphson/worldskill2024/blob/main/XX_module_b/db.php"
click node_heritage_index "https://github.com/pphson/worldskill2024/blob/main/XX_module_c/index.php"
click node_file_scanner "https://github.com/pphson/worldskill2024/blob/main/XX_module_c/includes/file_scanner.php"
click node_article_parser "https://github.com/pphson/worldskill2024/blob/main/XX_module_c/includes/parser.php"
click node_search_logic "https://github.com/pphson/worldskill2024/blob/main/XX_module_c/includes/search_logic.php"
click node_heritage_list "https://github.com/pphson/worldskill2024/blob/main/XX_module_c/templates/list_view.php"
click node_heritage_detail "https://github.com/pphson/worldskill2024/blob/main/XX_module_c/templates/single_view.php"
click node_heritage_header "https://github.com/pphson/worldskill2024/blob/main/XX_module_c/templates/layout_header.php"
click node_heritage_footer "https://github.com/pphson/worldskill2024/blob/main/XX_module_c/templates/layout_footer.php"
click node_module_a_b35 "https://github.com/pphson/worldskill2024/blob/main/XX_module_a/B35/script.js"
click node_module_a_b39 "https://github.com/pphson/worldskill2024/blob/main/XX_module_a/B39/script.js"
click node_module_a_b9 "https://github.com/pphson/worldskill2024/blob/main/XX_module_a/B9/script.js"
click node_module_d_frontend "https://github.com/pphson/worldskill2024/blob/main/XX_module_d/front-end/script.js"
click node_module_d_api "https://github.com/pphson/worldskill2024/blob/main/XX_module_d/module_d_api.php"
click node_module_d_cors_api "https://github.com/pphson/worldskill2024/blob/main/XX_module_d/module_d_api-cors-version.php"
click node_geo_distance "https://github.com/pphson/worldskill2024/blob/main/XX_module_d/geolocation_distance.js"
click node_module_e_config "https://github.com/pphson/worldskill2024/blob/main/XX_module_e/js/load-config.js"
click node_module_e_main "https://github.com/pphson/worldskill2024/blob/main/XX_module_e/js/main.js"
click node_module_e_reorder "https://github.com/pphson/worldskill2024/blob/main/XX_module_e/js/reorder-drag-drop.js"
click node_module_e_slideshow "https://github.com/pphson/worldskill2024/blob/main/XX_module_e/js/slideshow.js"

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_catalogue_router,node_login,node_product_admin,node_product_form,node_company_admin,node_company_form,node_company_detail,node_public_product,node_bulk_verify,node_products_api,node_product_api,node_catalogue_db toneBlue
class node_heritage_index,node_file_scanner,node_article_parser,node_search_logic,node_heritage_list,node_heritage_detail,node_heritage_header,node_heritage_footer toneAmber
class node_module_d_frontend,node_module_d_api,node_module_d_cors_api,node_geo_distance,node_consumer toneMint
class node_module_e_config,node_module_e_main,node_module_e_reorder,node_module_e_slideshow toneRose
class node_module_a_b35,node_module_a_b39,node_module_a_b9 toneTeal
class node_visitor,node_admin toneIndigo
```

## Components

### Product catalogue

- [Request router](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/index.php): `XX_module_b/index.php`
- [Admin login](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/login.php): `XX_module_b/views/login.php`
- [Product admin](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/admin_products.php): `XX_module_b/views/admin_products.php`
- [Product editor](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/product_form.php): `XX_module_b/views/product_form.php`
- [Company admin](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/admin_companies.php): `XX_module_b/views/admin_companies.php`
- [Company editor](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/company_form.php): `XX_module_b/views/company_form.php`
- [Company details](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/company_detail.php): `XX_module_b/views/company_detail.php`
- [Public product](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/public_product.php): `XX_module_b/views/public_product.php`
- [Bulk verification](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/views/bulk_verify.php): `XX_module_b/views/bulk_verify.php`
- [Product listing API](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/api/products.php): `XX_module_b/api/products.php`
- [Product detail API](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/api/product_detail.php): `XX_module_b/api/product_detail.php`
- [Catalogue database](https://github.com/pphson/worldskill2024/blob/main/XX_module_b/db.php): `XX_module_b/db.php`

### Heritage directory

- [Directory entry](https://github.com/pphson/worldskill2024/blob/main/XX_module_c/index.php): `XX_module_c/index.php`
- [File scanner](https://github.com/pphson/worldskill2024/blob/main/XX_module_c/includes/file_scanner.php): `XX_module_c/includes/file_scanner.php`
- [Article parser](https://github.com/pphson/worldskill2024/blob/main/XX_module_c/includes/parser.php): `XX_module_c/includes/parser.php`
- [Search logic](https://github.com/pphson/worldskill2024/blob/main/XX_module_c/includes/search_logic.php): `XX_module_c/includes/search_logic.php`
- [Article listing](https://github.com/pphson/worldskill2024/blob/main/XX_module_c/templates/list_view.php): `XX_module_c/templates/list_view.php`
- [Article detail](https://github.com/pphson/worldskill2024/blob/main/XX_module_c/templates/single_view.php): `XX_module_c/templates/single_view.php`
- [Shared header](https://github.com/pphson/worldskill2024/blob/main/XX_module_c/templates/layout_header.php): `XX_module_c/templates/layout_header.php`
- [Shared footer](https://github.com/pphson/worldskill2024/blob/main/XX_module_c/templates/layout_footer.php): `XX_module_c/templates/layout_footer.php`

### Module D

- [Frontend script](https://github.com/pphson/worldskill2024/blob/main/XX_module_d/front-end/script.js): `XX_module_d/front-end/script.js`
- [API](https://github.com/pphson/worldskill2024/blob/main/XX_module_d/module_d_api.php): `XX_module_d/module_d_api.php`
- [CORS API](https://github.com/pphson/worldskill2024/blob/main/XX_module_d/module_d_api-cors-version.php): `XX_module_d/module_d_api-cors-version.php`
- [Distance helper](https://github.com/pphson/worldskill2024/blob/main/XX_module_d/geolocation_distance.js): `XX_module_d/geolocation_distance.js`

### Module E

- [Config loader](https://github.com/pphson/worldskill2024/blob/main/XX_module_e/js/load-config.js): `XX_module_e/js/load-config.js`
- [Main script](https://github.com/pphson/worldskill2024/blob/main/XX_module_e/js/main.js): `XX_module_e/js/main.js`
- [Drag reorder](https://github.com/pphson/worldskill2024/blob/main/XX_module_e/js/reorder-drag-drop.js): `XX_module_e/js/reorder-drag-drop.js`
- [Slideshow](https://github.com/pphson/worldskill2024/blob/main/XX_module_e/js/slideshow.js): `XX_module_e/js/slideshow.js`

### Module A

- [B35 script](https://github.com/pphson/worldskill2024/blob/main/XX_module_a/B35/script.js): `XX_module_a/B35/script.js`
- [B39 script](https://github.com/pphson/worldskill2024/blob/main/XX_module_a/B39/script.js): `XX_module_a/B39/script.js`
- [B9 script](https://github.com/pphson/worldskill2024/blob/main/XX_module_a/B9/script.js): `XX_module_a/B9/script.js`

### Other components

- **Visitor**
- **Administrator**
- **API consumer**

## Connections

- Administrator → Request router: requests pages (evidence: `XX_module_b/index.php`)
- Visitor → Request router: requests pages (evidence: `XX_module_b/index.php`)
- API consumer → Request router: requests JSON (evidence: `XX_module_b/index.php`)
- Request router → Admin login: routes to (evidence: `XX_module_b/index.php`)
- Request router → Product admin: routes to (evidence: `XX_module_b/index.php`)
- Request router → Product editor: routes to (evidence: `XX_module_b/index.php`)
- Request router → Company admin: routes to (evidence: `XX_module_b/index.php`)
- Request router → Company editor: routes to (evidence: `XX_module_b/index.php`)
- Request router → Company details: routes to (evidence: `XX_module_b/index.php`)
- Request router → Public product: routes to (evidence: `XX_module_b/index.php`)
- Request router → Bulk verification: routes to (evidence: `XX_module_b/index.php`)
- Request router → Product listing API: routes to (evidence: `XX_module_b/index.php`)
- Request router → Product detail API: routes to (evidence: `XX_module_b/index.php`)
- Product listing API → Catalogue database: queries (evidence: `XX_module_b/api/products.php`)
- Product detail API → Catalogue database: queries (evidence: `XX_module_b/api/product_detail.php`)
- Product editor → Catalogue database: reads and writes (evidence: `XX_module_b/views/product_form.php`)
- Company editor → Catalogue database: reads and writes (evidence: `XX_module_b/views/company_form.php`)
- Company details → Catalogue database: queries (evidence: `XX_module_b/views/company_detail.php`)
- Public product → Catalogue database: queries (evidence: `XX_module_b/views/public_product.php`)
- Article listing → Article parser: parses articles (evidence: `XX_module_c/templates/list_view.php`)
- Article listing → Shared header: includes (evidence: `XX_module_c/templates/list_view.php`)
- Article listing → Shared footer: includes (evidence: `XX_module_c/templates/list_view.php`)
- Article detail → Shared header: uses layout (evidence: `XX_module_c/templates/single_view.php`)
- Article detail → Shared footer: uses layout (evidence: `XX_module_c/templates/single_view.php`)
