How wenderhost/themakercity works
Main Components
• Environment & Configuration:
• The “config” folder is key. It contains the general application configuration (config/application.php) and additional environment-specific configuration files (development.php, staging.php).
• The .env.example file represents the environment variables management (via Dotenv) which injects environment-specific settings.
• Dependency Management:
• Composer (with composer.json and composer.lock) handles PHP package dependencies.
• Also, package.json and package-lock.json indicate the inclusion of npm-based assets/libraries for front-end assets.
• Web Root and Application Structure:
• The “web” directory stands for the public web root. It includes:
– wp-config.php: the WordPress configuration that bootstraps WordPress using Bedrock’s setup.
– app directory: This is the heart of the WordPress application where:
• “mu-plugins” (must-use plugins) include the Bedrock autoloader.
• “plugins” folder for regular plugins (currently with placeholder .gitkeep file).
• “themes” has a child theme (themakercity-child) with extensive assets, PHP files, templates, and even static assets (via adminkit-pro), suggesting a modern front-end integration with HTML/JS/CSS files.
– “uploads” folder for user-generated media.
• Build & Code Quality:
• Tools like phpcs.xml and various CSS/JS maps indicate quality and style checks.
• Supporting Files:
• Files such as wp-cli.yml support command-line management of the WordPress application.
Relationships and Interactions
• Composer dependency management:
• Application structure under the “web” folder:
• Front-end assets:
Architectural Patterns and Design Principles
• Separation of concerns common in Bedrock:
• Separation between web root (public access) and non-public configuration/code.
• Environment-specific configurations ensuring that development, staging, and production are clearly separated.
• “Twelve-Factor” like methodology by showing externalized configuration, dependency isolation (via Composer and npm), and codebase management with Git.
• Clearly delineate the role of the autoloader for mu-plugins which facilitates automatic plugin discovery and loading without further manual intervention.