baracod/larastarterkit
最新稳定版本:v0.0.3
Composer 安装命令:
composer require baracod/larastarterkit
包简介
A powerful Modular Monolith Starter Kit for Laravel with Vue, Vuetify and Nwidart Modules.
README 文档
README
Larastarterkit is the ultimate Modular Monolith starter kit for Laravel. It empowers you to generate full-stack modules (Backend + Frontend) in seconds, enforcing a solid architecture based on nwidart/laravel-modules.
Stop reinventing the wheel. Focus on your business logic, not the boilerplate.
✨ Features
- 🚀 Modular Architecture: Built on top of
nwidart/laravel-modules. Separate your domain logic cleanly. - 🎨 Fullstack Ready: Generates Vue 3 components, Vuetify UIs, and TypeScript definitions automatically.
- 🔐 Auth & Permissions: Includes a pre-configured Auth module with Sanctum, Role-Based Access Control (RBAC), and menu management.
- 🛠 Powerful Generators:
module:make: Scaffolds a complete module (API, Web, Vue).- Generators for Models, Controllers, Requests, and Routes.
- 📄 Auto-Documentation: Integrated Swagger UI. Your API documentation is generated automatically.
- 🌍 Auto-Translation: Internationalize your app instantly using the Google Translate API (Free tier supported).
- 📝 Stub Overrides: Fully customizable templates. Bring your own code style.
📋 Requirements
- PHP
^8.3 - Laravel
11.xor12.x - Composer
📦 Installation
You can install the package via composer:
composer require baracod/larastarterkit
After installation, you can publish the configuration file (optional but recommended for customization):
php artisan vendor:publish --tag=larastarterkit-modules-config
🚀 Usage
creating a New Module
The magic happens with a single command. To create a fully working module named Blog:
php artisan module:make Blog
This command will:
- Saffold the directory structure in
Modules/Blog. - Generate the Service Provider, Routes (API & Web), and Composer file.
- Register the module in
Modules/modules.json. - Generate the default Vue.js frontend structure.
Generating Resources
You can also programmatically generate resources (useful for seeders or custom scripts):
use Baracod\Larastarterkit\Generator\ModuleGenerator; use Baracod\Larastarterkit\Generator\ModelGen; // 1. Initialize Module $moduleGen = new ModuleGenerator('Ecommerce'); $moduleGen->generate(); // 2. Generate a Model from a DB Table $modelGen = new ModelGen(); $module = $moduleGen->getModuleOfTable('products'); $modelGen->generateModelFromTable('products', $module);
🔧 Configuration & Stubs
Larastarterkit is designed to be customizable. You can override any file generated by the package.
- Publish Stubs:
php artisan vendor:publish --tag=larastarterkit-stubs
- Edit Templates:
Go to
stubs/larastarterkit/in your project root and modify the files (e.g.,controller.stub,vue-component.stub). The package will prioritize your custom stubs automatically.
📚 Documentation
For full documentation, guides, and API reference, please visit our official documentation:
👉 Read the Documentation (Replace with your real URL)
🧪 Testing
composer test
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/amazing-feature). - Commit your changes (
git commit -m 'Add some amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a Pull Request.
📄 License
The MIT License (MIT). Please see License File for more information.
Made with ❤️ by Baracod统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-15