mehedi250 / laravel-structure-kit
A clean architecture and scalable file structure generator for Laravel projects (UI + CLI)
Package info
github.com/mehedi250/laravel-structure-kit
Language:Blade
pkg:composer/mehedi250/laravel-structure-kit
Requires
- php: ^8.1
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
README
UI-first architecture generator for Laravel Design and preview your project structure before writing code.
๐ Why Laravel Structure Kit?
This package helps you:
- Design architecture before generating files
- Maintain a clean and scalable structure
- Avoid namespace and folder mistakes
- Enforce clean architecture patterns
Architecture first. Code second.
โจ Features
๐ฅ๏ธ UI-Based Architecture Generator
- Visual file & architecture generator
- Select components with checkboxes
- Customizable paths for each component
- Live preview of the file structure
- Automatic namespace generation
๐งฉ Supported Components
- Model
- Controller
- Service (Interface + Implementation)
- Repository (Interface + Implementation)
- Migration
๐ฆ Installation
Install via Composer:
composer require mehedi250/laravel-structure-kit
Laravel will automatically discover the service provider.
๐ฅ๏ธ UI Generator
Access URL
http://your-app-url/structure-kit
Example:
http://localhost:8000/structure-kit
๐ธ Screenshot
๐งญ Workflow
- Enter Model / Module name
- Select components
- Customize folder paths
- Preview the file structure
- Click Generate
This will generate something like:
app/ โโโ Models/User.php โโโ Http/Controllers/UserController.php โโโ Services/Contacts/UserServiceInterface.php โโโ Services/Implementations/UserService.php โโโ Repositories/Contacts/UserRepositoryInterface.php โโโ Repositories/Eloquent/UserRepository.php database/migrations/ โโโ create_users_table.php
โ๏ธ CLI Generator (Optional)
If you prefer not to use the UI, you can generate files directly using an Artisan command.
Command
php artisan structure-kit ModelName mcsrt
| Flag | Description |
|---|---|
| m | Model |
| c | Controller |
| s | Service (Interface + Implementation) |
| r | Repository (Interface + Implementation) |
| t | Migration |
Examples
Generate everything:
php artisan structure-kit User mcsrt
Generate only service & repository:
php artisan structure-kit User sr
Preview without generating files:
php artisan structure-kit User mcsr --dry-run
๐งช Use Cases
- New Laravel projects
- Refactoring existing applications
- Enforcing team architecture
- Rapid scaffolding
๐ค Contributing
Contributions are welcome!
- Fork the repository
- Create your feature branch
- Submit a pull request
๐ Repository https://github.com/mehedi250/laravel-structure-kit
๐ Project Stats
๐ License
MIT License ยฉ 2026 Md. Mehedi Hasan Shawon
See the LICENSE file for details.
โญ If you like this project, consider giving it a star on GitHub.
