# marcus39-web/homepage architecture

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

- Interactive diagram: https://gitdiagram.com/marcus39-web/homepage
- Repository: https://github.com/marcus39-web/homepage

## Overview

This is a PHP photography website: visitors browse curated photo galleries and images, explore a customizable calendar, and use contact/feedback forms; an authenticated statistics area supports the site owner. The main request path runs through index.php, which bootstraps shared helpers, handles form actions and access checks, then renders a page template. PhotoLibrary supplies catalog data and public/photo.php serves protected, cached image variants. README-described calendar ordering and local print-proof features are included; source excerpts do not expose every internal call, so uncertain links are omitted.

Main entry points: [`index.php`](https://github.com/marcus39-web/homepage/blob/main/index.php) (Request front controller), [`Components/pages/kalender.php`](https://github.com/marcus39-web/homepage/blob/main/Components/pages/kalender.php) (Calendar page), [`bootstrap.php`](https://github.com/marcus39-web/homepage/blob/main/bootstrap.php) (Contact and feedback), [`src/PhotoLibrary.php`](https://github.com/marcus39-web/homepage/blob/main/src/PhotoLibrary.php) (Photo catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website routing and pages"]
  node_front["Request front controller<br/>[index.php]"]
  node_shared["Session and helpers<br/>[bootstrap.php]"]
  node_home["Home page<br/>[home.php]"]
  node_legal["Legal pages<br/>[impressum.php]"]
  node_privacy["Privacy page<br/>[datenschutz.php]"]
  node_not_found["Not-found page<br/>[error-404.php]"]
  node_layout["Shared page layout<br/>[header.php]"]
end

subgraph group_photos["Photo catalog and delivery"]
  node_gallery["Gallery page<br/>[galerie.php]"]
  node_photo_library["Photo catalog<br/>[PhotoLibrary.php]"]
  node_photo_endpoint["Image delivery<br/>[photo.php]"]
  node_photo_cache[("WebP photo cache")]
end

subgraph group_calendar["Calendar features"]
  node_calendar_page["Calendar page<br/>[kalender.php]"]
  node_calendar_print["Print proof handler<br/>[CalendarPrint.php]"]
  node_calendar_pdf["PDF renderer"]
  node_calendar_orders[("Calendar requests")]
end

subgraph group_engagement["Forms and operations"]
  node_contact_page["Contact page<br/>[contact.php]"]
  node_stats_login["Statistics login"]
  node_stats["Visitor statistics<br/>[statistik.php]"]
  node_contact_forms["Contact and feedback<br/>[bootstrap.php]"]
  node_visit_stats[("Visit records")]
  node_mail_service["Email delivery"]
end

node_visitor(("Visitor"))
node_owner(("Site owner"))

node_visitor -->|"requests pages"| node_front
node_front -->|"loads helpers"| node_shared
node_front -->|"routes request"| node_home
node_front -->|"routes request"| node_gallery
node_front -->|"routes request"| node_calendar_page
node_front -->|"routes request"| node_contact_page
node_front -->|"routes request"| node_legal
node_front -->|"routes request"| node_privacy
node_front -->|"routes request"| node_stats_login
node_front -->|"routes request"| node_stats
node_front -->|"renders unknown route"| node_not_found
node_front -->|"dispatches image request"| node_photo_endpoint
node_front -->|"handles print POST"| node_calendar_print
node_front -->|"handles form POST"| node_contact_forms
node_front -->|"records entry"| node_visit_stats
node_home -->|"loads photo catalog"| node_photo_library
node_gallery -.->|"loads photo catalog"| node_photo_library
node_calendar_page -.->|"selects photo motifs"| node_photo_library
node_photo_endpoint -.->|"resolves image path"| node_photo_library
node_photo_endpoint -.->|"serves cached variants"| node_photo_cache
node_calendar_page -.->|"submits order"| node_calendar_orders
node_calendar_print -->|"runs renderer"| node_calendar_pdf
node_calendar_print -->|"stores print proof"| node_calendar_orders
node_contact_forms -.->|"sends email"| node_mail_service
node_contact_forms -.->|"stores requests"| node_calendar_orders
node_owner -->|"signs in"| node_stats_login
node_stats -.->|"reads visit records"| node_visit_stats
node_visitor -->|"opens contact form"| node_contact_page
node_visitor -->|"browses calendar"| node_calendar_page
node_layout -->|"renders feedback form"| node_contact_forms

click node_front "https://github.com/marcus39-web/homepage/blob/main/index.php"
click node_shared "https://github.com/marcus39-web/homepage/blob/main/bootstrap.php"
click node_home "https://github.com/marcus39-web/homepage/blob/main/Components/pages/home.php"
click node_gallery "https://github.com/marcus39-web/homepage/blob/main/Components/pages/galerie.php"
click node_calendar_page "https://github.com/marcus39-web/homepage/blob/main/Components/pages/kalender.php"
click node_contact_page "https://github.com/marcus39-web/homepage/blob/main/Components/pages/contact.php"
click node_legal "https://github.com/marcus39-web/homepage/blob/main/Components/pages/impressum.php"
click node_privacy "https://github.com/marcus39-web/homepage/blob/main/Components/pages/datenschutz.php"
click node_stats_login "https://github.com/marcus39-web/homepage/blob/main/Components/pages/statistik-login.php"
click node_stats "https://github.com/marcus39-web/homepage/blob/main/Components/pages/statistik.php"
click node_not_found "https://github.com/marcus39-web/homepage/blob/main/Components/pages/error-404.php"
click node_layout "https://github.com/marcus39-web/homepage/blob/main/Components/layout/header.php"
click node_photo_library "https://github.com/marcus39-web/homepage/blob/main/src/PhotoLibrary.php"
click node_photo_endpoint "https://github.com/marcus39-web/homepage/blob/main/public/photo.php"
click node_photo_cache "https://github.com/marcus39-web/homepage/tree/main/data/photo-cache"
click node_calendar_print "https://github.com/marcus39-web/homepage/blob/main/src/CalendarPrint.php"
click node_calendar_pdf "https://github.com/marcus39-web/homepage/blob/main/tools/generate_calendar_pdf.py"
click node_contact_forms "https://github.com/marcus39-web/homepage/blob/main/bootstrap.php"

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_front,node_shared,node_home,node_legal,node_privacy,node_not_found,node_layout toneBlue
class node_gallery,node_photo_library,node_photo_endpoint,node_photo_cache toneAmber
class node_calendar_page,node_calendar_print,node_calendar_pdf,node_calendar_orders toneMint
class node_contact_page,node_stats_login,node_stats,node_contact_forms,node_visit_stats,node_mail_service toneRose
class node_visitor,node_owner toneIndigo
```

## Components

### Website routing and pages

- [Request front controller](https://github.com/marcus39-web/homepage/blob/main/index.php): `index.php`
- [Session and helpers](https://github.com/marcus39-web/homepage/blob/main/bootstrap.php): `bootstrap.php`
- [Home page](https://github.com/marcus39-web/homepage/blob/main/Components/pages/home.php): `Components/pages/home.php`
- [Legal pages](https://github.com/marcus39-web/homepage/blob/main/Components/pages/impressum.php): `Components/pages/impressum.php`
- [Privacy page](https://github.com/marcus39-web/homepage/blob/main/Components/pages/datenschutz.php): `Components/pages/datenschutz.php`
- [Not-found page](https://github.com/marcus39-web/homepage/blob/main/Components/pages/error-404.php): `Components/pages/error-404.php`
- [Shared page layout](https://github.com/marcus39-web/homepage/blob/main/Components/layout/header.php): `Components/layout/header.php`

### Photo catalog and delivery

- [Gallery page](https://github.com/marcus39-web/homepage/blob/main/Components/pages/galerie.php): `Components/pages/galerie.php`
- [Photo catalog](https://github.com/marcus39-web/homepage/blob/main/src/PhotoLibrary.php): `src/PhotoLibrary.php`
- [Image delivery](https://github.com/marcus39-web/homepage/blob/main/public/photo.php): `public/photo.php`
- [WebP photo cache](https://github.com/marcus39-web/homepage/tree/main/data/photo-cache): `data/photo-cache`

### Calendar features

- [Calendar page](https://github.com/marcus39-web/homepage/blob/main/Components/pages/kalender.php): `Components/pages/kalender.php`
- [Print proof handler](https://github.com/marcus39-web/homepage/blob/main/src/CalendarPrint.php): `src/CalendarPrint.php`
- [PDF renderer](https://github.com/marcus39-web/homepage/blob/main/tools/generate_calendar_pdf.py): `tools/generate_calendar_pdf.py`
- **Calendar requests**

### Forms and operations

- [Contact page](https://github.com/marcus39-web/homepage/blob/main/Components/pages/contact.php): `Components/pages/contact.php`
- [Statistics login](https://github.com/marcus39-web/homepage/blob/main/Components/pages/statistik-login.php): `Components/pages/statistik-login.php`
- [Visitor statistics](https://github.com/marcus39-web/homepage/blob/main/Components/pages/statistik.php): `Components/pages/statistik.php`
- [Contact and feedback](https://github.com/marcus39-web/homepage/blob/main/bootstrap.php): `bootstrap.php`
- **Visit records**
- **Email delivery**

### Other components

- **Visitor**
- **Site owner**

## Connections

- Visitor → Request front controller: requests pages (evidence: `README.md`)
- Request front controller → Session and helpers: loads helpers (evidence: `index.php`)
- Request front controller → Home page: routes request (evidence: `index.php`)
- Request front controller → Gallery page: routes request (evidence: `index.php`)
- Request front controller → Calendar page: routes request (evidence: `index.php`)
- Request front controller → Contact page: routes request (evidence: `index.php`)
- Request front controller → Legal pages: routes request (evidence: `index.php`)
- Request front controller → Privacy page: routes request (evidence: `index.php`)
- Request front controller → Statistics login: routes request (evidence: `index.php`)
- Request front controller → Visitor statistics: routes request (evidence: `index.php`)
- Request front controller → Not-found page: renders unknown route (evidence: `index.php`)
- Request front controller → Image delivery: dispatches image request (evidence: `index.php`)
- Request front controller → Print proof handler: handles print POST (evidence: `index.php`)
- Request front controller → Contact and feedback: handles form POST (evidence: `index.php`)
- Request front controller → Visit records: records entry (evidence: `README.md`)
- Home page → Photo catalog: loads photo catalog (evidence: `Components/pages/home.php`)
- Gallery page → Photo catalog: loads photo catalog
- Calendar page → Photo catalog: selects photo motifs
- Image delivery → Photo catalog: resolves image path
- Image delivery → WebP photo cache: serves cached variants
- Calendar page → Calendar requests: submits order (evidence: `README.md`)
- Print proof handler → PDF renderer: runs renderer (evidence: `src/CalendarPrint.php`)
- Print proof handler → Calendar requests: stores print proof (evidence: `src/CalendarPrint.php`)
- Contact and feedback → Email delivery: sends email (evidence: `README.md`)
- Contact and feedback → Calendar requests: stores requests (evidence: `README.md`)
- Site owner → Statistics login: signs in (evidence: `README.md`)
- Visitor statistics → Visit records: reads visit records
- Visitor → Contact page: opens contact form (evidence: `README.md`)
- Visitor → Calendar page: browses calendar (evidence: `README.md`)
- Shared page layout → Contact and feedback: renders feedback form
