A Laravel package to generate a complete, structured backend architecture from business models.
This package provides Artisan commands to scaffold Models, Migrations, Controllers, Services, Repositories, Policies, Events, Listeners, Notifications, and Resources in a single interactive execution, enforcing clean architecture principles and separation of concerns.
For detailed usage, configuration, and guidelines, please refer to the following documents:
- English Guide - Complete documentation and usage examples.
- French Guide (Guide en Français) - Documentation complète en français.
- French README (README en Français) - Présentation générale en français.
- Contributing Guidelines - How to contribute to this project.
- Release Notes - Version history and changes.
- Single Command Scaffolding: Create Models, Migrations, versioned Controllers, Services, Repositories, Form Requests, Resources, Policies, Events, Listeners, and Notifications at once.
- Clean Architecture: Automatically isolates business logic within a Service layer and abstracts database access with Repositories.
- Interactive CLI: Prompts guide you through defining fields (name and type), selecting API versions, and choosing which architectural components to generate.
- Smart Form Requests: Generates validation rules dynamically, including proper database uniqueness rules.
Install the package via Composer:
composer require nosleepman1/arch-cliThe package service provider will be automatically registered by Laravel Package Discovery.
To generate a new module, execute the following command:
php artisan make:module {ModuleName}You will be prompted to:
- Define database fields in
name:typeformat (e.g.,title:string,description:text). Press Enter on an empty line to finish. - Select the API controller version (v1, v2, v3).
- Toggle optional components (Services, Repositories, Policies, Events, Listeners, Notifications).
The package will then generate all files in their standard Laravel directory locations.
This package is open-source software licensed under the MIT License. See the LICENSE file for more information.