Download the PHP package blutrixx/generator-engine without Composer

On this page you can find all versions of the php package blutrixx/generator-engine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package generator-engine

blutrixx/generator-engine

A config-driven code generation engine for Laravel + Vue 3 + NativePHP Mobile projects. Given a structured module-configuration array, the package emits a full set of backend (Laravel), frontend (Vue 3), and mobile app (NativePHP) source files for a module.

The engine is config-source-agnostic. It can be driven by a UI that produces a config array (as in PROJECT_GENERATOR), by an Artisan command that introspects a database (as in SYSTEM_SHELL), or by any custom code that produces the same shape.

Primary namespace: Blutrixx\GeneratorEngine

Sub-namespaces:


Architecture Overview

Generation follows a three-step pipeline:

Config sources. The engine is config-driven: it does not care how the config array was produced.

Both paths produce the same GeneratorModule-shaped array and pass it to the same generator classes.

PathManager. A static service-locator that holds all cross-cutting context: the project output root, the project context, the module registry, the FK graph, and the template root paths. Generators read from PathManager rather than accepting these as constructor arguments.

Generators. Each generator receives ($moduleName, $moduleGroup, $config) and writes one or more files to the path computed by PathManager. Generators are standalone — they do not call each other, and they do not hit the database.


Installation

The package is published on Packagist:

That's the only step needed for any standard Laravel application.

Pinning a version in composer.json:

Installing directly from Git (for forks, pre-release branches, or environments that don't use Packagist):

Runtime requirements (from composer.json):

Dependency Constraint
PHP ^8.2
illuminate/support ^11.0 \| ^12.0 \| ^13.0
illuminate/filesystem ^11.0 \| ^12.0 \| ^13.0

The package has zero App\ dependencies at runtime. It works in any Laravel 11 / 12 application without modification, and in standalone PHP scripts that happen to have the two illuminate/* packages on their classpath.


Public API

1. Bootstrap PathManager

PathManager must be seeded before any generator is invoked. All setters are static.

2. Build a config from DB introspection

IntrospectionToConfig converts raw SchemaIntrospector::columns() output into a GeneratorModule config array.

The returned $config is the same shape that V1's UI produces — pass it directly to generators.

3. Run generators

Each generator follows the same constructor / generate() pattern:

All output paths are resolved through PathManager using the project root set earlier.

By default, generate() returns false and skips writing when the target file already exists (preserving hand-edits). To overwrite existing files, call setForce(true) before generate():

4. PathManager utility methods

Method Returns Purpose
PathManager::getProjectRoot() ?string Current project root
PathManager::getBackendBasePath() string {root}/BACKEND
PathManager::getFrontendBasePath() string {root}/FRONTEND
PathManager::getBackendModulePath($group, $name) string Full backend module directory
PathManager::getFrontendModulePath($group, $name) string Full frontend module directory
PathManager::findModuleInRegistry($name) ?array Look up a module by name
PathManager::findModuleByTable($table) ?array Look up a module by table name
PathManager::resolveBackendModuleNamespace($name) string Resolve PHP namespace for a related module
PathManager::resolveFrontendImportSegment($name) string Resolve Vue import path segment
PathManager::getForeignKeyGraph() array Current FK graph
PathManager::normalizeGroupName($group) string PascalCase normalization of a module type
PathManager::resetProjectRoot() void Clear project root + context
PathManager::getMobileAppBasePath() string {root}/MOBILE_APP
PathManager::getMobileAppModulePath($group, $name) string Full mobile frontend module directory
PathManager::getMobileUxTemplatePath() string Mobile UX stub directory (overridable)
PathManager::getMobileAppBackendModulePath($group, $name) string {root}/MOBILE_APP/app/Modules/{group}/{name}
PathManager::getMobileAppBackendTemplatePath() string Mobile backend stub directory (overridable)

Configuration Shape

The GeneratorModule config array is the contract between config producers (V1 UI, IntrospectionToConfig) and generators. Top-level keys:

Key Type Description
module_name string StudlyCase singular name, e.g. "Products"
module_type string Module group/category, e.g. "Custom", "Core"
table_name string Database table, snake plural, e.g. "products"
id_type string Primary key strategy: "uuid" or "bigint"
columns array Column definitions including type, nullable, FK metadata, and per-feature visibility flags
morphs array Polymorphic morph pairs auto-detected from *_type + *_id column pairs
delegations array Related modules rendered as embedded sub-tabs on the view page
actions array Custom action definitions (state transitions, etc.)
seeder array Seed record definitions used by SeederGenerator
menu_config array\|null Sidebar menu entry configuration used by MenusJsonGenerator
features.backend.* array Per-operation backend config: endpoint paths, permissions, filterable/sortable fields, validation rules
features.frontend.* array Per-operation frontend config: list columns, form fields, view fields
inline_items array\|null Parent-child inline data (e.g. Order Items). Each key maps to an InlineItemConfig array describing the child module, parent_fk, field definitions, and optional inject_from_parent mappings. Drives [[inlineItemsBlock]] / [[inlineItemsFieldDefs]] on frontend forms and [[inlineItemsSave]] / [[inlineItemsSync]] / [[inlineItemsLoad]] on backend services.

features contains sub-keys: backend (with list, create, view, edit, delete) and frontend (same operations). Each sub-key holds the relevant field lists and endpoint metadata consumed by the corresponding generator.

inline_items shape


Generator Catalog

Backend

All backend generators live under Blutrixx\GeneratorEngine\Generators\Backend\.

Generator Namespace segment Emits
ModelGenerator Models\ Eloquent model with relationships, fillable, casts
MigrationGenerator Migrations\ create_{table} migration
MigrationUpdateGenerator Migrations\ update_{table} migration (add/alter columns)
ControllerGenerator Controller\ Resource controller wiring services
RoutesGenerator Routes\ API route file for the module
ListServiceGenerator Services\ Paginated list query with filters and sorts
CreateServiceGenerator Services\ Record creation with validation
EditServiceGenerator Services\ Record update with validation
ViewServiceGenerator Services\ Single-record fetch with eager loads
DeleteServiceGenerator Services\ Soft/hard delete
DeleteCheckServiceGenerator Services\ FK constraint check before delete
ActionServiceGenerator Services\Action\ Custom action handler
BulkActionServiceGenerator Services\ Bulk operation handler
DelegationServiceGenerator Services\Delegation\ Related sub-resource list service
SeederGenerator Seeders\ Database seeder for seed data
ModuleConfigGenerator Config\ Module config file registered in the app
ActivityServiceGenerator Services\ Activity-log service stub
CreateSplashServiceGenerator Services\ Splash/constants-driven create service
EditSplashServiceGenerator Services\ Splash/constants-driven edit service

Frontend

All frontend generators live under Blutrixx\GeneratorEngine\Generators\Frontend\.

Generator Namespace segment Emits
ListPageGenerator Pages\ Vue list page with data table
ListComponentGenerator Components\ Reusable list data-table component
CreatePageGenerator Pages\ Vue create page wrapper
CreateFormGenerator Components\ Create form with field bindings
EditPageGenerator Pages\ Vue edit page wrapper
EditFormGenerator Components\ Edit form with pre-populated fields
ViewLayoutGenerator Pages\ View page layout shell
ViewOverviewGenerator Components\ Overview panel on the view page
DeletePageGenerator Pages\ Delete confirmation page
DeleteFormGenerator Components\ Delete confirmation form
FrontendRoutesGenerator Routes\ Vue Router route definitions
MenusJsonGenerator Adds module entry to menus.json
ActionComponentGenerator Components\Actions\ Vue component for a custom action
DelegationTabComponentGenerator Components\Delegations\ Tab component for a delegated sub-resource
DelegationModalComponentGenerator Components\Delegations\ Modal for delegation interaction
DelegationRelatedFormGenerator Components\Delegations\ Form embedded inside a delegation tab

Mobile App (Frontend)

All mobile frontend generators live under Blutrixx\GeneratorEngine\Generators\MobileApp\.

Generator Namespace segment Emits
ListPageGenerator Pages\ NativePHP mobile list page
CreatePageGenerator Pages\ NativePHP mobile create page
EditPageGenerator Pages\ NativePHP mobile edit page
ViewLayoutGenerator Pages\ NativePHP mobile details layout
DeletePageGenerator Pages\ NativePHP mobile delete page
MobileRoutesGenerator Routes\ Vue Router route definitions for mobile
ActionModalGenerator Components\Actions\ Vue modal component for a custom action (hasUI: true)

Mobile App (Backend)

All mobile backend generators live under Blutrixx\GeneratorEngine\Generators\MobileApp\Backend\. These generate a full PHP/Laravel backend inside MOBILE_APP/app/Modules/{Group}/{Module}/ for use with NativePHP Mobile's embedded Laravel runtime.

Generator Emits
MobileModelGenerator {Module}Model.php
MobileControllerGenerator {Module}Controller.php
MobileApiRoutesGenerator Routes/api.php (CRUD + sync endpoints)
MobileMigrationGenerator Migrations/{date}_create_{table}_table.php (SQLite-safe)
MobileSeederGenerator Seeders/{Module}SeederData.json
MobileListServiceGenerator Services/{Module}ListService.php
MobileCreateServiceGenerator Services/{Module}CreateService.php
MobileViewServiceGenerator Services/{Module}ViewService.php
MobileEditServiceGenerator Services/{Module}EditService.php
MobileDeleteServiceGenerator Services/{Module}DeleteService.php
MobileDeleteCheckServiceGenerator Services/{Module}DeleteCheckService.php
MobileActivityListServiceGenerator Services/{Module}ActivityListService.php
MobileBulkActionServiceGenerator Services/{Module}BulkActionService.php
MobileSyncServiceGenerator Services/{Module}SyncService.php (push/pull offline sync)
MobileSyncComposableGenerator resources/js/src/composables/use{Module}Sync.ts
MobileRegistryGenerator Updates MOBILE_APP/app/Modules/registry.json (always runs last)

All mobile backend stubs are SQLite-safe (TEXT not JSON, LIKE not JSON operators, direct uuid()->primary()). Every generated module includes last_synced_at and /sync/push + /sync/pull endpoints.


Bundled Stub Templates

The package ships stub files under src/Generators/Templates/:

PathManager::getBackendTemplatePath(), getFrontendTemplatePath(), getMobileAppTemplatePath(), getMobileUxTemplatePath(), and getMobileAppBackendTemplatePath() default to these bundled paths.

Consumers can override any or all of them by passing an array of absolute paths:

Only the keys that need overriding must be supplied; omitted keys continue to use the bundled stubs.

Frontend stub assumptions

The bundled frontend stubs assume the following conventions in the target Vue 3 project:

Assumption Detail
UUID source in child tabs Tab components (delegation/tab.stub, custom/tab_action.stub) read the parent record ID from route.params.[[idParam]] via useRoute(). The parent layout must define a route with the corresponding named parameter (e.g. :uuid).
Loading skeleton component details_layout.stub imports CardSkeleton from @/components/ui/loading/CardSkeleton.vue. The target project must provide this component.
Toast utility Action and UX stubs import { toast } from @/lib/toast (a Sonner wrapper). The shadcn @/components/ui/toast module is not used.
Tabs strip styling The generated *DetailsLayout tabs wrapper uses the CSS class tabs-header border-y bg-card. The tabs-header class should be defined in the project's global stylesheet to handle the -mb-px tab underline trick.

Schema Introspection

Blutrixx\GeneratorEngine\Schema\SchemaIntrospector inspects a live DB table and returns structured column metadata. It works with any Laravel-supported driver (MySQL, SQLite, PostgreSQL) via Schema::getColumns() / Schema::getForeignKeys() / Schema::getIndexes() — no Doctrine DBAL.

Column metadata shape (each entry in columns()):

SKIP_COLUMNS (excluded from columns() output): id, uuid, created_at, updated_at, deleted_at, created_by_id, updated_by_id


Auto-Detection Features

When IntrospectionToConfig processes raw column data, it applies the following heuristics automatically:


Issue Handling

Generators and PathManager use a single internal reporting channel. When the engine encounters a non-fatal issue (an unresolvable FK module reference, a missing index, an ambiguous namespace), it calls:

This calls the registered handler if one is set, or silently no-ops if none is registered.

Registering a handler:

Resetting to default (no-op):


Decoupling Notes

The package is deliberately free of consumer-side dependencies:

The package works identically when bootstrapped from a web-request context (e.g. a UI-driven generator), an Artisan command (e.g. a database-introspection scaffolder), or a standalone PHP script.


Testing

A manual smoke test is available at:

Run it from the package root:

The script exercises IntrospectionToConfig::build() with a synthetic column set and prints the resulting config array for visual inspection. There is no PHPUnit harness at this time.


UX Generators (blueprint-driven)

In addition to the per-module pipeline, the engine ships a second pipeline driven by a blueprint JSON file. The blueprint describes higher-level UX constructs: multi-section create flows (composites), step-by-step wizards, record shortcuts, and dashboard quick-action buttons.

Running the command

The command is registered automatically via GeneratorEngineServiceProvider. When running from inside a BACKEND directory the project root is inferred (dirname(base_path())); no manual PathManager::setProjectRoot() call is needed.

Each generator produces output for both FRONTEND and MOBILE_APP in a single run. The command output is split into [Frontend] and [Mobile] sections for clarity.

Blueprint keys consumed

Key Generator Frontend output Mobile output
composites CompositeGenerator {Module}CreatePage.vue (+ backend service) {Module}CreatePage.vue
wizards WizardGenerator {Wizard}WizardPage.vue, routes.ts (+ backend service) {Wizard}WizardPage.vue, routes.ts
shortcuts ShortcutGenerator {Module}Shortcuts.vue, patches DetailsLayout {Module}Shortcuts.vue, patches DetailsLayout
dashboard.quick_actions DashboardGenerator DashboardQuickActions.vue DashboardQuickActions.vue

Stub overrides

Frontend UX stubs live in Generators/Templates/ux/; mobile UX stubs in Generators/Templates/mobile_app/ux/. Override per-project:


Status

Actively maintained. v2.5.0 is the current stable release.

Source https://github.com/joelnjoshkibona/generator-engine
Packagist https://packagist.org/packages/blutrixx/generator-engine
License Apache-2.0
Issues GitHub issues on the source repo
Docs docs/ directory — see docs/README.md

Contributing

Clone, branch, PR. The package has no PHPUnit harness yet; the manual smoke test under tests/manual/ is the existing safety net. Keep changes free of App\ imports and Laravel facades — see "Decoupling Notes" above.


All versions of generator-engine with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/filesystem Version ^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package blutrixx/generator-engine contains the following files

Loading the files please wait ...