Repository navigation
v0.3.0
Frontend, routes and views inside modules
A module can now hold its whole feature: its Vue or React pages, Blade views and components, and its routes, laid out the way Laravel lays out an app. Wire an Inertia app for module pages once, then generate them:
php artisan mod:install inertia
php artisan mod:page Inventory:Widget/IndexRoutes load with one call, Mod::routes(), and views resolve as inventory::…. Scaffolds can now include frontend files, so a page and its controller come from one command, and modules can carry their own templates and scaffolds. Every command that writes files can preview its plan as JSON, and Laravel Boost users get read-only mod tools for their agents. See Upgrading from 0.2: HTTP classes now live under Http/.
Added
- Frontend files from templates: a
.stubwhose name ends in another extension becomes a generator (card.blade.php.stub→mod:card,filter.vue.stub→mod:filter). File names follow the stack's casing. mod:pagewrites a minimal Inertia page for the app's stack (Vue or React, TypeScript whentsconfig.jsonexists) into the module, following the app'spages/orPages/casing.mod:install inertiapreviews and wires Vue and React apps for module pages: the page resolver shipped invendor/, the@modulesVite and TypeScript aliases, and Tailwind sources. Rerunning reports "Already wired."; custom setups get manual instructions.- Placeholders that link PHP and frontend files:
{{ page }}(Inventory::Widget/Index),{{ view }},{{ import }}and{{ tag }}. Only known names are replaced,@{{ }}escapes, and an ambiguous bare name in Vue or Blade warns with its file and line. - Frontend files as scaffold members, with stack-specific variants, file questions and anchored inserts.
mod:template --fromcopies a Vue or Blade file byte for byte and reports which names to turn into placeholders.->frontend(pages:, components:, css:, views:)relocates a layout's frontend folders. Folders that differ only by case are refused.- Module view namespaces (
view('inventory::widgets.show')) and anonymous components (<x-inventory::widget-card />), withmod:viewandmod:component.mod:mail --markdownandmod:notification --markdownwrite their views in the module. Mod::routes()loads each module'sroutes/web.php,api.phpandconsole.phpwith Laravel's groups, frombootstrap/app.phpor inside your own route group.only:,except:andconfig('mod.routes.order')control which modules load and when. Works withroute:cache.- Optional
RegistersRoutesclasses for routes in PHP, andmod:routesandmod:route-registrarto start either. Scaffolds can insert routes withinto: 'routes'. - Scaffold members can be
ungrouped: true, ask their owngroup:, or useexisting: 'keep'to write a shared file once. - Modules can carry their own templates (
<module>/stubs/mod/) and scaffolds (<module>/Scaffolds/orMod::scaffolds()). The module wins over the app, and the app over packages. --dry-run --jsonon every command that writes files prints a plan of what it would write, without writing or prompting.mod:list --jsonadds stack, frontend, views, routes and wiring sections, and where each template and scaffold comes from.- With Laravel Boost installed, read-only
mod-inventoryandmod-planMCP tools let agents read the inventory and preview generators.
Changed
- HTTP classes (controllers, requests, middleware, resources) now live under Http/
- Class discovery skips a module's
resources/androutes/folders.
What's Changed
- Add machine-readable plans and a sectioned inventory for agents by @jaspertey in #29
- Shape modules like Laravel: Http/ classes, resources/ and routes/ folders by @jaspertey in #30
- Add mod:install inertia to wire module pages into Vue and React apps by @jaspertey in #31
- Load module routes with Mod::routes(), route files and registrars by @jaspertey in #33
- Give modules their own Blade views, components and mail views by @jaspertey in #32
- Generate frontend and plain files: pages, components, scripts and more by @jaspertey in #34
- Place scaffold members per member, and let modules own generators by @jaspertey in #36
- Give agents read-only mod tools through Laravel Boost's MCP server by @jaspertey in #35
- Prepare the README, Boost guidance and changelog for 0.3 by @jaspertey in #37
Full Changelog: v0.2.0...v0.3.0