Build your first Meteorack module in 5 minutes.
Prerequisites: WordPress 6.0+ and PHP 8.2+ on any hosting provider.
The Hub provides the module runtime, crash isolation, service container, and CLI tools.
wp plugin install meteorack-suite --activateModules live in wp-content/meteorack/modules/. The Hub auto-discovers any folder with a valid module.json.
mkdir -p wp-content/meteorack/modules/my-first-moduleThis manifest tells the Hub everything about your module — what it needs, what services it uses, and how it appears in the admin.
{
"slug": "my-first-module",
"name": "My First Module",
"version": "1.0.0",
"entry": "class-module.php",
"requires": {
"php": "^8.2",
"hub": "^1.0"
},
"services": ["settings", "logger"],
"admin": {
"page": true,
"menu_title": "My Module"
}
}Your module class implements ModuleInterface. The container injects the services you declared in module.json automatically.
<?php
declare(strict_types=1);
use Meteorack\SDK\Contracts\ModuleInterface;
use Meteorack\SDK\Contracts\SettingsInterface;
use Meteorack\SDK\Contracts\LoggerInterface;
class My_First_Module implements ModuleInterface {
public function __construct(
private readonly SettingsInterface $settings,
private readonly LoggerInterface $logger,
) {}
public function boot(): void {
$this->logger->info('my-first-module.boot', [
'version' => '1.0.0',
]);
add_action('admin_init', [$this, 'register_settings']);
}
public function register_settings(): void {
$this->settings->register('my-first-module', [
'enabled' => true,
]);
}
}Run the CLI to confirm your module was discovered and booted:
wp meteorack modules list+------------------+---------+--------+
| Module | Version | Status |
+------------------+---------+--------+
| my-first-module | 1.0.0 | active |
+------------------+---------+--------+Your module is running. The Hub discovered it, booted it in isolation, and it's ready to serve.