Week 1 infrastructure: Docker environments, deploy pipeline, bookstore-core scaffold

Docker Compose environments for dev/staging/production (MariaDB, Redis,
Caddy, Action Scheduler cron sidecar), an idempotent deploy script,
git-hook-based deploy pipeline, backup/restore scripts, and the
bookstore-core plugin stub with WooCommerce HPOS compatibility declared.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-27 09:50:18 -04:00
co-authored by Claude Sonnet 5
commit c9d637c907
23 changed files with 757 additions and 0 deletions
@@ -0,0 +1,38 @@
<?php
/**
* Plugin Name: Bookstore Core
* Description: Owns catalog, pricing, supplier routing, and order-state business logic for the bookstore. See docs/ for the technical design document.
* Version: 0.1.0
* Requires PHP: 8.1
* Requires Plugins: woocommerce
* Author: Bookstore
*/
defined('ABSPATH') || exit;
define('BSC_PLUGIN_FILE', __FILE__);
define('BSC_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('BSC_VERSION', '0.1.0');
// Declare HPOS (custom order tables) compatibility per design doc §01/§06 —
// the order state machine and audit tables are built against HPOS, not
// legacy post-based orders.
add_action('before_woocommerce_init', function () {
if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility(
'custom_order_tables',
__FILE__,
true
);
}
});
register_activation_hook(__FILE__, function () {
if (!class_exists('WooCommerce')) {
deactivate_plugins(plugin_basename(__FILE__));
wp_die('Bookstore Core requires WooCommerce to be installed and active.');
}
});
// Catalog schema, pricing engine, supplier adapters, and the order state
// machine (design doc §02–§07) are built here starting Week 2.
@@ -0,0 +1,13 @@
{
"name": "bookstore/bookstore-core",
"description": "Business logic plugin for the bookstore: catalog, pricing, supplier routing, order state.",
"type": "wordpress-plugin",
"require": {
"php": ">=8.1"
},
"autoload": {
"psr-4": {
"Bookstore\\Core\\": "includes/"
}
}
}