mehedi250/laravel-structure-kit
██████╗████████╗██████╗ ██╗ ██╗ ██████╗████████╗██╗ ██╗██████╗ ███████╗
██╔════╝╚══██╔══╝██╔══██╗██║ ██║██╔════╝╚══██╔══╝██║ ██║██╔══██╗██╔════╝
╚█████╗ ██║ ██████╔╝██║ ██║██║ ██║ ██║ ██║██████╔╝█████╗
╚═══██╗ ██║ ██╔══██╗██║ ██║██║ ██║ ██║ ██║██╔══██╗██╔══╝
██████╔╝ ██║ ██║ ██║╚██████╔╝╚██████╗ ██║ ╚██████╔╝██║ ██║███████╗
╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
A powerful UI + CLI scaffolding tool for generating structured Laravel components using industry best practices.
Design and preview your entire project structure — before writing a single line of code.
Laravel Structure Kit eliminates the repetitive boilerplate that comes with setting up clean architecture in Laravel. Instead of manually creating files and wiring up interfaces, simply enter a model name, select the components you need, and let the kit scaffold everything — instantly, from a clean browser UI.
It supports the Service Pattern and Repository Pattern out of the box, making it easy to maintain separation of concerns and write testable, scalable code from day one.
| Dependency | Version |
|---|---|
| PHP | ^8.1 |
| Laravel | ^10.0 | ^11.0 | ^12.0 | ^13.0 |
Install the package via Composer:
composer require mehedi250/laravel-structure-kit
The package uses Laravel's auto-discovery, so no manual service provider registration is needed.
After installation, visit the following URL in your browser:
http://localhost:8000/structure-kit
You'll be presented with the Laravel Structure Kit configuration panel.

Type your base model name in the Base Model Name field. This name is used to derive all generated file names.
Example: Product → generates ProductController.php, ProductService.php, ProductRepository.php, etc.
Choose which components to generate. All options are selected by default.
| Component | Description |
|---|---|
| Model | Eloquent model class |
| Controller | Resource controller class |
| Service Pattern | Service interface (Contract) + Service implementation class |
| Repository Pattern | Repository interface (Contract) + Eloquent repository class |
| Migration | Timestamped database migration file |
You can deselect any component you don't need using Deselect All or by toggling individual checkboxes.
Expand the Customize Namespaces section to override default file paths before generation.
| Component | Default Path |
|---|---|
| Model | app/Models |
| Controller | app/Http/Controllers |
| Service Interface | app/Services/Contracts |
| Service Class | app/Services/Implementations |
| Repository Interface | app/Repositories/Contracts |
| Repository Class | app/Repositories/Eloquent |
If you modify any path, files will be generated in your specified directory instead.
Click the 🚀 Generate Files button to scaffold all selected components. The Structure Output panel on the right will display a live preview of all the files that will be created.
Tip: Check Remember current path to persist your custom namespace configuration across sessions.
Running the generator with the model name User and all components selected produces the following file structure:
app/
├── Models/
│ └── User.php
├── Http/
│ └── Controllers/
│ └── UserController.php
├── Services/
│ ├── Contracts/
│ │ └── UserServiceInterface.php
│ └── Implementations/
│ └── UserService.php
└── Repositories/
├── Contracts/
│ └── UserRepositoryInterface.php
└── Eloquent/
└── UserRepository.php
database/
└── migrations/
└── xxxx_xx_xx_create_users_table.php
Prefer the terminal? The Artisan command gives you the same power without leaving your editor.
php artisan structure-kit {ModelName} {flags}
| Flag | Component | Generated Files |
|---|---|---|
m |
Model | Models/User.php |
c |
Controller | Http/Controllers/UserController.php |
s |
Service | Services/Contracts/UserServiceInterface.phpServices/Implementations/UserService.php |
r |
Repository | Repositories/Contracts/UserRepositoryInterface.phpRepositories/Eloquent/UserRepository.php |
t |
Migration | database/migrations/xxxx_create_users_table.php |
Generate everything:
php artisan structure-kit User mcsrt
Only Service + Repository (clean architecture layer):
php artisan structure-kit User sr
Model + Controller only:
php artisan structure-kit Product mc
Preview without generating (dry run):
php artisan structure-kit User mcsr --dry-run
Laravel Structure Kit fits naturally into a wide range of scenarios:
All contributions are welcome! Whether it's a bug fix, new feature, or documentation improvement.
# 1. Fork the repository on GitHub
# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/laravel-structure-kit.git
# 3. Create a feature branch
git checkout -b feature/your-amazing-feature
# 4. Commit your changes
git commit -m "feat: add your amazing feature"
# 5. Push and open a Pull Request
git push origin feature/your-amazing-feature
🔗 Repository: github.com/mehedi250/laravel-structure-kit
Released under the MIT License.
Copyright © 2026 Md. Mehedi Hasan Shawon
See the LICENSE file for full details.
If this package saved you time, please consider giving it a ⭐ on GitHub!
Made with ❤️ for the Laravel community · Report a Bug · Request a Feature
How can I help you explore Laravel packages today?