Skip to content

Generator EngineConfig-driven code generation

Laravel + Vue 3 + NativePHP Mobile — generate full-stack modules from a single config array.

Quick Start

Install via Composer:

bash
composer require blutrixx/generator-engine:^2.0

Bootstrap PathManager (a static service-locator — all setters are static, there is no constructor), build a config array (or introspect from DB), then call any generator:

php
use Blutrixx\GeneratorEngine\Generators\PathManager;
use Blutrixx\GeneratorEngine\Generators\Backend\Models\ModelGenerator;

PathManager::setProjectRoot($outputPath);
PathManager::setProjectContext($projectContext);

(new ModelGenerator($moduleName, $moduleGroup, $moduleConfig))->generate();

Documentation Map

SectionWhat it covers
ExamplesTask-oriented recipes — "I want to build X, what do I write?" Every recipe backed by a real, generated-and-verified fixture.
Module ConfigTop-level config structure — all keys, menu_config, seeder, constants
ColumnsColumn types, FK columns, morph pairs, featureSelections, field type mapping
Features Configfeatures.backend and features.frontend per-operation config
Mobile Configfeatures.mobile_app config, card layout, offline sync
DelegationsRelated-module tab/modal panel config
ActionsCustom action buttons and service config
ProcessorsLifecycle pipeline hooks (before/after save/delete)
Scaffold BlueprintBlueprint JSON for make:modules-from-db
UX BlueprintBlueprint for make:ux-from-blueprint — composites, wizards, shortcuts

JSON Schemas

Machine-readable schemas for editor validation and autocompletion (VS Code, IntelliJ, etc.) are bundled with the package at vendor/blutrixx/generator-engine/schema/:

  • module-config.schema.json
  • scaffold-blueprint.schema.json
  • ux-blueprint.schema.json

Released under the Apache-2.0 License.