You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New major of the code generators: smarter generation (relations, pivot tables, filters, bulk actions), multi-auth, nested models, media, field selection, Blade and Inertia React output, translatable.
Built to the next-gen general rules: CI with test and coverage badges, full docs for people and agents, Laravel Boost guideline and skill, Javaabu codestyle, PHP 8.4 / Laravel 12+ (Laravel packages) or TypeScript (JS packages), Dhivehi and RTL, Blade and Inertia React for views, overridable controllers and policies with javaabu/permissions.
All work is on the next-gen branch (from master); one PR into master at the end.
Architecture
v2 keeps the v1 shape (read a table's schema, build typed fields, render stubs through javaabu/generator-helpers). The generated code is rewritten for the next-gen packages, and the internals are reorganised around one resolved definition per resource:
Schema\SchemaInspector: driver-agnostic schema reading through Laravel's Schema::getColumns()/getForeignKeys()/getIndexes(). It supports MySQL/MariaDB, PostgreSQL and SQLite and replaces the MySQL-only resolver. Enum options come from the column type (MySQL) or from check constraints (PostgreSQL, SQLite). Enum classes come from an enum: comment or the generators.enums config map. doctrine/dbal is dropped.
Schema\RelationResolver: scans every table.
belongsTo: foreign keys on this table.
hasMany: foreign keys on other tables pointing at this table.
belongsToMany: pivot tables (two foreign keys and no other data columns, such as category_product). These are skipped as resources of their own.
ResourceDefinition: the table plus the developer's choices: index/form/show fields, the parent for nested resources, media collections, the view stack, the user type/guard and translatable fields. Every generator renders from it.
The generator package has no runtime dependency on the packages it generates code for. They go in suggest and require-dev (for the integration app). Runtime require is only illuminate, javaabu/generator-helpers and laravel/prompts.
Relations from the schema, casts, SoftDeletes, HasAttachments for media, JsonTranslatable when the table has translations/lang and translatable is installed
javaabu/filters: text search over string columns, select for enums/belongsTo/belongsToMany, ternary for booleans, date and number ranges, trashed; sorts on sortable columns
app/BulkActions/ProductBulkActions.php
Delete / restore / force delete with can()
app/Stencil/ProductForm.php
javaabu/stencil fields, which also produce the validation rules, so there is no FormRequest any more
app/Http/Controllers/Admin/ProductsController.php
Resource controller plus restore/force delete; Blade or Inertia
Routes
In routes/admin.php: Route::resource(), Route::bulkActions()
generate:auth {table} --type=customer [--migration] creates a user type on javaabu/auth v3. auth v3 ships the auth controllers and views, so the generator emits:
the model extending Javaabu\Auth\Models\User
optionally a migration using UserSchema::columns()
the config/auth.php guard, provider and broker
the javaabu-auth.user_types entry
Route::authRoutes() and Route::userAccountActions()
permissions and policy
the admin CRUD for the type
Removed in v2 (documented in docs/upgrading.md):
The v1 API controller/test generators and the per-type auth controller generators (auth v3 owns those).
FormRequests (stencil forms validate).
Everything that depended on javaabu/helpers.
Testing
Unit and feature tests for the inspector (SQLite, MySQL, PostgreSQL in CI), the field types and each generator's output (golden files).
Integration (the real check): a CI job builds a Testbench app (workbench/ overlay on Testbench's skeleton) with every next-gen package installed. It migrates fixture tables, runs generate:all / generate:auth for Blade and Inertia, plain, nested, media and translatable cases, then runs the generated tests with PHPUnit. There is also a leg without javaabu/translatable.
CI fails if javaabu/helpers or javaabu/settings ^1 appears in composer show --tree --no-dev.
Layouts: the packages ship no admin layout, so Blade views extend a configurable layout (generators.blade.layout, default layouts.admin, section content), and Inertia pages rely on the app's persistent layout.
Admin user and guard: configurable (generators.admin.user_model, generators.admin.guard); nothing assumes web or App\Models\User.
Dhivehi in generated code: resource-specific strings in generated code can't be translated automatically. The generator adds Dhivehi for the generic phrases it uses to the app's lang/dv.json and lists the rest for the developer.
Every next-gen issue is closed except #17 (docs registration, needs-human). CI is green on next-gen. PR #19 into master is open for review and isn't merged.
What was built
Schema reading. Tables are read through Laravel's schema builder on MySQL, MariaDB, PostgreSQL and SQLite. Enum options come from column types or check constraints, and enum classes from comments or generators.enums.
Relations. belongsTo, hasMany and belongsToMany (pivot tables) are found from the whole schema.
The generated code. For each table:
a model and factory
a javaabu/permissions ResourcePolicy and Permissions::resource()
javaabu/filters filters and sorts
javaabu/bulk-actions bulk actions
a javaabu/stencil form, which also validates
a controller and routes
Blade (javaabu/forms v2) or Inertia React (@javaabu/forms) pages
feature tests that pass as generated
Dhivehi for the generic phrases
Options.
--index, --form, --show and --interactive to choose fields
--parent for nested resources
--media for mediapicker attachments
--translatable (optional; detected)
generate:auth for javaabu/auth v3 user types, which also generates the admin pages of their users
Testing.
Unit, schema and snapshot tests.
An integration app (workbench/). CI generates a whole admin into it (every column type, a pivot, soft deletes, enum classes, Blade and Inertia, a nested resource, media, a translatable model, a user type) and runs its 111 generated tests.
Pint on the generated PHP, and typecheck and Prettier on the generated React pages.
The PHP 8.4/8.5 × Laravel 12/13 × lowest/stable matrix, schema legs on MySQL, MariaDB and PostgreSQL, and a leg without javaabu/translatable.
Docs.docs/ (including upgrading.md), llms.txt, the Boost guideline and skill, and AGENTS.md.
Out of scope, on purpose
API generators (v1's generate:api*): they were built on javaabu/helpers and are removed.
FormRequests: the stencil form validates.
Per-controller auth generators: auth v3 ships the auth controllers and pages.
Sidebar menus and icons.
Exports:generate:export writes an exports v2 class but isn't part of generate:all, and isn't wired into the index page.
Parent authorization: nested controllers don't check the parent's policy. The docs show how to add it.
For the user
Codecov for the org with a CODECOV_TOKEN secret (the upload step runs, but needs the token).
A Dhivehi review of the strings in docs/advanced-usage/dhivehi-and-rtl.md.
Activity
n4ff4h commentedon Nov 5, 2026
Implementation plan (package agent)
All work is on the
next-genbranch (frommaster); one PR intomasterat the end.Architecture
v2 keeps the v1 shape (read a table's schema, build typed fields, render stubs through
javaabu/generator-helpers). The generated code is rewritten for the next-gen packages, and the internals are reorganised around one resolved definition per resource:Schema\SchemaInspector: driver-agnostic schema reading through Laravel'sSchema::getColumns()/getForeignKeys()/getIndexes(). It supports MySQL/MariaDB, PostgreSQL and SQLite and replaces the MySQL-only resolver. Enum options come from the column type (MySQL) or from check constraints (PostgreSQL, SQLite). Enum classes come from anenum:comment or thegenerators.enumsconfig map.doctrine/dbalis dropped.Schema\RelationResolver: scans every table.category_product). These are skipped as resources of their own.ResourceDefinition: the table plus the developer's choices: index/form/show fields, the parent for nested resources, media collections, the view stack, the user type/guard and translatable fields. Every generator renders from it.suggestandrequire-dev(for the integration app). Runtimerequireis only illuminate,javaabu/generator-helpersandlaravel/prompts.Generated code (per table,
php artisan generate:all products --create)app/Models/Product.phpSoftDeletes,HasAttachmentsfor media,JsonTranslatablewhen the table hastranslations/langand translatable is installeddatabase/factories/ProductFactory.phpapp/Policies/ProductPolicy.phpextends Javaabu\Permissions\Policies\ResourcePolicyPermissions::resource('products', …)AppServiceProvider::boot()app/Filters/ProductFilters.phpapp/BulkActions/ProductBulkActions.phpcan()app/Stencil/ProductForm.phpapp/Http/Controllers/Admin/ProductsController.phproutes/admin.php:Route::resource(),Route::bulkActions()resources/views/admin/products/*)<x-forms::…>,{{ $form }},<x-filters::bar>,<x-bulk-actions::actions>resources/js/pages/admin/products/*.tsx) +ProductResource<StencilForm>,<FilterBar>,<BulkActionsTable>tests/Feature/Admin/ProductsControllerTest.phppermissions:syncapp/Exports/ProductsExport.phpCommands and options
generate:all|model|factory|policy|permissions|filters|bulk-actions|form|controller|routes|views|test|export {table}--columns--index=name,price/--form=…/--show=…--interactive(Laravel Prompts multiselects for the fields)--views=blade|inertia--parent=categories, for nested routesadmin/categories/{category}/productswith scoped bindings--media=featured_image:image,gallery:image:multiple--translatable[=fields]--create,--force,--exceptgenerate:auth {table} --type=customer [--migration]creates a user type on javaabu/auth v3. auth v3 ships the auth controllers and views, so the generator emits:Javaabu\Auth\Models\UserUserSchema::columns()config/auth.phpguard, provider and brokerjavaabu-auth.user_typesentryRoute::authRoutes()andRoute::userAccountActions()docs/upgrading.md):javaabu/helpers.Testing
workbench/overlay on Testbench's skeleton) with every next-gen package installed. It migrates fixture tables, runsgenerate:all/generate:authfor Blade and Inertia, plain, nested, media and translatable cases, then runs the generated tests with PHPUnit. There is also a leg without javaabu/translatable.javaabu/helpersorjavaabu/settings ^1appears incomposer show --tree --no-dev.Order of work
Open questions (decided for now, recorded here)
generators.blade.layout, defaultlayouts.admin, sectioncontent), and Inertia pages rely on the app's persistent layout.generators.admin.user_model,generators.admin.guard); nothing assumesweborApp\Models\User.lang/dv.jsonand lists the rest for the developer.n4ff4h commentedon Nov 5, 2026
Summary
Every
next-genissue is closed except #17 (docs registration,needs-human). CI is green onnext-gen. PR #19 intomasteris open for review and isn't merged.What was built
generators.enums.ResourcePolicyandPermissions::resource()--index,--form,--showand--interactiveto choose fields--parentfor nested resources--mediafor mediapicker attachments--translatable(optional; detected)generate:authfor javaabu/auth v3 user types, which also generates the admin pages of their usersworkbench/). CI generates a whole admin into it (every column type, a pivot, soft deletes, enum classes, Blade and Inertia, a nested resource, media, a translatable model, a user type) and runs its 111 generated tests.docs/(includingupgrading.md),llms.txt, the Boost guideline and skill, andAGENTS.md.Out of scope, on purpose
generate:api*): they were built on javaabu/helpers and are removed.generate:exportwrites an exports v2 class but isn't part ofgenerate:all, and isn't wired into the index page.For the user
CODECOV_TOKENsecret (the upload step runs, but needs the token).docs/advanced-usage/dhivehi-and-rtl.md.