baracod/larastarterkit

A powerful Modular Monolith Starter Kit for Laravel with Vue, Vuetify and Nwidart Modules.

Fund package maintenance!
baracod

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 2

pkg:composer/baracod/larastarterkit

v0.0.3 2025-12-27 22:13 UTC

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