PHPackages                             fnnaeem/module-architecture-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. fnnaeem/module-architecture-generator

ActiveLibrary[Framework](/categories/framework)

fnnaeem/module-architecture-generator
=====================================

Laravel Module Generator Package

02PHP

Since Jan 26Pushed 3mo agoCompare

[ Source](https://github.com/fnnaeem1881/module-architecture-generator)[ Packagist](https://packagist.org/packages/fnnaeem/module-architecture-generator)[ RSS](/packages/fnnaeem-module-architecture-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Module Maker
====================

[](#laravel-module-maker)

A **Laravel 12+ module generator** for creating, managing, and deleting modules with clean architecture. Supports Controllers, Models, Services, Repositories, Views, Routes, Requests, Tests, Migrations, and Middleware. Compatible with Laravel 12+ bootstrap structure or older Kernel.php structure.

---

Features
--------

[](#features)

- Full module generator: Controllers, Services, Repositories, Models, Requests, Tests, Views, Routes, Migrations
- API-only or CRUD modules
- Module activation/deactivation with middleware
- Automatic ServiceProvider registration
- Auto PSR-4 autoload configuration
- Laravel 12+ and older versions support
- Safe module deletion with table data check

---

Installation
------------

[](#installation)

Run the command below to install via Composer

```
composer require fnnaeem1881/module-architecture-generator
```

Run composer dump-autoload:

```
composer dump-autoload
```

The package registers itself automatically via `ModuleLoaderServiceProvider`.

Commands
--------

[](#commands)

CommandDescription`php artisan make:module {name}`Create a new full module`php artisan make:module {name} --crud`Create a CRUD module with views`php artisan make:module {name} --api`Create API-only module`php artisan make:module {name} --migration`Create migration for the module`php artisan make:module {name} --request`Generate FormRequest classes`php artisan make:module {name} --test`Generate test file for module`php artisan make:module {name} --force`Overwrite existing module`php artisan make:module {name} --delete`Delete the module safely`php artisan make:module {name} --deactivate`Deactivate the module`php artisan make:module {name} --activate`Activate the moduleModule Structure
----------------

[](#module-structure)

```
app/Modules/ModuleName/
├── Controllers/
├── Services/
├── Repositories/
├── Models/
├── Requests/
├── Views/
├── Routes/
├── Migrations/
├── Tests/
└── ModuleNameServiceProvider.php

Example:
app/Modules/Order/
├── Controllers/
│   └── OrderController.php
├── Middleware/
│   └── OrderActiveMiddleware.php
├── Models/
│   └── Order.php
├── Repositories/
│   └── OrderRepository.php
├── Requests/
│   ├── OrderStoreRequest.php
│   └── OrderUpdateRequest.php
├── Routes/
│   ├── api.php
│   └── web.php
├── Services/
│   └── OrderService.php
├── Tests/
│   └── OrderTest.php
├── Views/
│   ├── index.blade.php
│   ├── create.blade.php
│   └── edit.blade.php
├── Migrations/
│   └── 2026_01_26_000000_create_orders_table.php
└── OrderServiceProvider.php

```

Middleware
----------

[](#middleware)

- Each module has `{ModuleName}ActiveMiddleware` created automatically.
- Middleware is registered in either `app/Http/Kernel.php` (if exists) or `bootstrap/app.php` (Laravel 12+).

Module Status
-------------

[](#module-status)

- The module status (active/inactive) is stored in `app/Modules/module_status.php`.
- Deactivated modules will throw a 404 when accessed.

Composer Autoload
-----------------

[](#composer-autoload)

- Adds `App\Modules\` namespace to composer.json PSR-4 autoload.
- Run `composer dump-autoload` after creating modules.

Example Usage
-------------

[](#example-usage)

```
php artisan make:module Order          # Full module
php artisan make:module Order --crud   # CRUD module
php artisan make:module Order --force   # Overwrite existing module if exists
php artisan make:module Order --api    # API only module
php artisan make:module Order --delete # Delete module
php artisan make:module Order --deactivate # Deactivate
php artisan make:module Order --activate   # Activate
php artisan make:module Order --test   # Generate Test files
php artisan make:module Order --migration   # Generate migration file inside the module
php artisan make:module Order --request   # Generate FormRequest files for store & update
```

Notes
-----

[](#notes)

- Laravel 12 uses `bootstrap/app.php` for middleware registration instead of `app/Http/Kernel.php`.
- ModuleLoaderServiceProvider loads only active modules automatically.

License
-------

[](#license)

Released under the MIT License attached with this code.

Copyright
---------

[](#copyright)

Made with ❤️ by Mehedi Hasan

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance57

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/03a4f26e2aaf1750564c6efd488157ca5ee58c8292197fe611d13833aa36db3c?d=identicon)[fnnaeem](/maintainers/fnnaeem)

---

Top Contributors

[![fnnaeem1881](https://avatars.githubusercontent.com/u/77448606?v=4)](https://github.com/fnnaeem1881 "fnnaeem1881 (5 commits)")

### Embed Badge

![Health badge](/badges/fnnaeem-module-architecture-generator/health.svg)

```
[![Health](https://phpackages.com/badges/fnnaeem-module-architecture-generator/health.svg)](https://phpackages.com/packages/fnnaeem-module-architecture-generator)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M190](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M255](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M591](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
