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:^3.5

Track the changelog

The minor version matters here, not just ^3.0. ^3.4 is the floor for two bugs that affect nearly every real project (v3.4.6/v3.4.7 — an actions[].fields crash and a Create/Edit splash 404 that a green test suite doesn't catch); ^3.5 is required for prototyping. See the Changelog for the full release history.

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
Prototypinggen-frontend — a runnable app from configs alone, with the API served from SQLite in the browser
ChangelogEvery release, newest first

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

Released under the Apache-2.0 License.