How elementary/website works
This is elementary.io, a PHP-templated website for presenting elementary OS, its community and resources, and release downloads and payments. The main visitor flow is routed page requests to page rendering, with the homepage additionally loading download and payment logic. Separate branches cover localization and translation maintenance, checkout, and cache support. The README describes the simple PHP template model; some page capabilities are represented by their exact paths in the tree, but their implementations were not sampled, so their internal links are omitted.
Main entry points: index.php Homepage · preload.php Page setup · bootstrap.php Backend bootstrap · create-checkout-session.php Checkout endpoint
Components 25
Website pages
- Request router
router.php - Homepage
index.php - Brand guide
brand.php - Open source
open-source.php - Community pages
get-involved.php - Support pages
support.php - Not found page
404.php
Rendering and configuration
- Page setup
_backend/preload.php - Backend bootstrap
_backend/bootstrap.php - Configuration loader
_backend/config.loader.php - Shared templates
_templates/header.php - Page footer
_templates/footer.php - Response logging
_backend/log-echo.php
Release and payment
- Download link
_backend/download.php - Payment cookies
_backend/os-payment.php - Checkout endpoint
api/create-checkout-session.php
Localization
- Localization runtime
_backend/Lib/L10n.php - Text extraction
_backend/Console/Extract.php - Translation updates
_backend/Console/Translation.php
Cache support
- Cache facade
_backend/Lib/Cache/Cache.php - Store interface
_backend/Lib/Cache/StoreInterface.php - Base store
_backend/Lib/Cache/Store/BaseStore.php - File store
_backend/Lib/Cache/Store/FileStore.php
Other components
- Site visitor
- Stripe checkout
Connections 24
- Site visitor → Request router: requests pages
- Request router → Homepage: routes root
router.php - Request router → Not found page: routes missing
router.php - Homepage → Download link: loads link
index.php - Homepage → Page setup: loads setup
index.php - Homepage → Payment cookies: loads payment logic
index.php - Page setup → Backend bootstrap: loads bootstrap
_backend/preload.php - Backend bootstrap → Configuration loader: loads config
_backend/bootstrap.php - Page setup → Response logging: loads logging
_backend/preload.php - Homepage → Shared templates: renders shared header
- Homepage → Page footer: renders shared footer
- Shared templates → Localization runtime: uses translations
_templates/header.php - Translation updates → Text extraction: runs extraction
_backend/Console/Translation.php - Translation updates → Localization runtime: loads language data
_backend/Console/Translation.php - Text extraction → Localization runtime: extracts translated text
_backend/Console/Extract.php - Payment cookies → Backend bootstrap: loads bootstrap
_backend/os-payment.php - Payment cookies → Response logging: loads logging
_backend/os-payment.php - Checkout endpoint → Backend bootstrap: loads bootstrap
api/create-checkout-session.php - Checkout endpoint → Page setup: loads site setup
api/create-checkout-session.php - Checkout endpoint → Stripe checkout: creates session
api/create-checkout-session.php - Cache facade → Store interface: uses contract
_backend/Lib/Cache/Cache.php - File store → Store interface: implements contract
_backend/Lib/Cache/Store/FileStore.php - File store → Base store: extends store
_backend/Lib/Cache/Store/FileStore.php - File store → Cache facade: references facade
_backend/Lib/Cache/Store/FileStore.php