Skip to content

nosleepman1/arch-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arch CLI

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.

Documentation

For detailed usage, configuration, and guidelines, please refer to the following documents:

Key Features

  • 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.

Installation

Install the package via Composer:

composer require nosleepman1/arch-cli

The package service provider will be automatically registered by Laravel Package Discovery.

Quick Start

To generate a new module, execute the following command:

php artisan make:module {ModuleName}

You will be prompted to:

  1. Define database fields in name:type format (e.g., title:string, description:text). Press Enter on an empty line to finish.
  2. Select the API controller version (v1, v2, v3).
  3. Toggle optional components (Services, Repositories, Policies, Events, Listeners, Notifications).

The package will then generate all files in their standard Laravel directory locations.

License

This package is open-source software licensed under the MIT License. See the LICENSE file for more information.

About

Laravel package for generating scalable clean architecture boilerplates with services layer, repositories, requests, migrations, events-listeners and versioned APIs.

Topics

Resources

License

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages