How klyp/hummingbird works
Project type and purpose
• This is a WordPress‐based theme starter project, packaged and delivered via Composer (composer create-project klyp/hummingbird).
• Its primary purpose is to scaffold a WordPress installation plus the “Hummingbird” base theme, allowing you to build a child theme in public_html/wp-content/themes/child-theme.
• Key pieces: environment configuration (.env), pre‐install checks (pre-install.php), WordPress core under public_html/, and theme code.
File structure
• Top‐level:
• .env-example / wp-config-env.php: environment variable templates for database, ACF key, etc.
• composer.json / composer.lock: declares dependencies (Hummingbird theme repo, possibly WP-CLI or ACF).
• pre-install.php: script run before install to validate environment variables or permissions.
• public_html/: webroot containing WP core.
• Under public_html/wp-content/themes/:
• index.php (Hummingbird theme bootstrap)
• Instructions to create child-theme/ directory.
• No custom plugins or microservices; it’s a monolithic PHP app (WordPress).
Extract architecture hints from the README
• Describes steps to clone, configure .env, run composer install, ensure ACF plugin key is set.
• Emphasizes creating a child theme under public_html/wp-content/themes/child-theme.
• No mention of external APIs, so assume direct DB access and PHP rendering.
Main components
• Developer machine / CI: runs Composer & pre-install script
• Web server (Apache/Nginx + PHP-FPM)
• public_html directory (WordPress core files)
• Themes folder:
• Hummingbird base theme (installed by Composer)
• Child theme (custom code)
• MySQL (or configured database): stores WP data (posts, settings, ACF fields)
• Environment config loader (wp-config-env.php reading .env)
• External service: Hummingbird Theme Repo (GitHub) for Composer fetch
Relationships & data flows
• Composer → GitHub: fetch base theme & dependencies
• Composer → local filesystem: writes vendor/, public_html/wp-content/themes/hummingbird/
• Browser → Web server: HTTP requests
• Web server → PHP runtime: routes through public_html/index.php (WP front controller)
• PHP → .env loader: reads DB creds & plugin keys
• PHP → MySQL: queries and writes data
• Theme engine: Hummingbird core templates + child-theme overrides ← PHP
Architectural patterns & principles
• Monolithic MVC-style: WordPress core acts as controller & model; theme templates are view layer
• Separation of concerns:
• Core vs. custom code (base theme vs. child theme)
• Configuration vs. code (.env + wp-config-env.php)
• Dependency management (Composer)
• Components clearly labeled
• Scripts/configs: .env-example, wp-config-env.php, pre-install.php
• Composer’s role as both installer and dependency manager