Repository navigation
Conversation
v2 reads the schema through Laravel's schema builder (MySQL, MariaDB, PostgreSQL, SQLite), resolves belongsTo, hasMany and many-to-many relations (pivot tables), and builds one resource definition that every generator renders from. Generated code uses javaabu/stencil forms, javaabu/filters, javaabu/bulk-actions, javaabu/permissions policies and permissions, and Blade (javaabu/forms) or Inertia React (@javaabu/forms) views, with feature tests that run in the app. Foundations: PHP 8.4, Laravel 12/13, Testbench 10/11, Pint with the Javaabu rules, the CI matrix with Codecov, schema tests on MySQL, MariaDB and PostgreSQL, and an integration app (workbench/) that generates a whole admin and runs its tests. Closes #6 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--media=featured_image:image,gallery:image:multiple gives the model attachment collections, the form MediaPickerFields, the show page the media, the routes the admin media library, and a test that attaches media from the user's library when the admin users are media owners. Refs #10 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tables with the translations and lang columns get JsonTranslatable models, translatable stencil fields and tests with Dhivehi translations, when javaabu/translatable is installed. Without it, the same table gives plain models. --translatable picks the columns, generators.translatable turns it off. Refs #16 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
generate:auth customers registers the user type (UserTypes::register), adds its session guard, user provider and password broker to config/auth.php, its auth routes (Route::authRoutes) and the admins' account actions (Route::userAccountActions), and generates the admin pages of its users with a password field and the account status. The model extends Javaabu\Auth\Models\User. --migration writes the table's migration with UserSchema::columns() first. auth v3 ships the auth controllers and pages, so none are generated. Refs #8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Docusaurus docs for every command, option, config key and generated part, the upgrade guide from v1, Dhivehi phrases to review, and tests that every page is linked from llms.txt and every link resolves. A generated admin user type gets HasRoles. Closes #13 Closes #14 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
javaabu/generators v2.0
v2 is a new major of the code generators for the Javaabu next-gen packages (epic #18). It reads a table and writes a complete, tested admin resource:
What's new
generators.enums.doctrine/dbalis dropped.--index,--form,--show, or--interactivewith Laravel Prompts.--views=blade|inertia. The Inertia output is TypeScript pages, a JSON resource,<StencilForm>,<FilterBar>and<BulkActionsTable>.--parent=productsgives scoped routes, parent-scoped controllers and bulk actions, and tests.--media=featured_image:image,gallery:image:multiplegives mediapicker attachment collections,MediaPickerFields, the media library routes, and a test that attaches media.generate:auth customers [--migration]writes:Javaabu\Auth\Models\Userconfig/auth.phpguard, provider and brokerUserTypes::register()Route::authRoutes()andRoute::userAccountActions()translations/langcolumns getJsonTranslatablemodels and->translatable()fields. CI also runs without the package.lang/enandlang/dv. Generic phrases are added to the app'slang/dv.json, and the generated tests use Thaana.docs/,llms.txt,resources/boost/andAGENTS.md.javaabu/helpersorjavaabu/settings ^1is in the production tree.How it's tested
Besides unit and snapshot tests, CI builds a Laravel app (
workbench/, an overlay on Testbench's skeleton) with every next-gen package installed. It generates:It then runs the generated tests (111 of them, plus hand-written checks that the user type's login works). It also checks the generated PHP with Pint, and type-checks and Prettier-checks the generated React pages.
Upgrading
See
docs/upgrading.md.generate:request(the stencil form validates), the API generators, the per-controllergenerate:auth_*commands,--path, and the icon config.javaabu/helpers.--force.For you to do
CODECOV_TOKENsecret, or coverage uploads and the badge won't work.docs/advanced-usage/dhivehi-and-rtl.md.🤖 Generated with Claude Code