baracod/larastarterkit 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

Latest Version on Packagist Total Downloads Tests License

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.x or 12.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:

  1. Saffold the directory structure in Modules/Blog.
  2. Generate the Service Provider, Routes (API & Web), and Composer file.
  3. Register the module in Modules/modules.json.
  4. 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.

  1. Publish Stubs:
    php artisan vendor:publish --tag=larastarterkit-stubs
  2. 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.

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/amazing-feature).
  3. Commit your changes (git commit -m 'Add some amazing feature').
  4. Push to the branch (git push origin feature/amazing-feature).
  5. 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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-15