pyaesoneaung / laravel-starter-kit-vue
Laravel 12 Vue starter kit with built-in strict typing, enhanced code quality tools, and safety features.
Package info
github.com/PyaeSoneAungRgn/laravel-starter-kit-vue
Language:Vue
Type:project
pkg:composer/pyaesoneaung/laravel-starter-kit-vue
Requires
- php: ^8.3
- inertiajs/inertia-laravel: ^3.0
- internachi/modular: ^3.0
- laravel/framework: ^13.0
- laravel/nightwatch: ^1.28
- laravel/octane: ^2.17
- laravel/reverb: ^1.0
- laravel/sanctum: ^4.0
- laravel/tinker: ^3.0
- modules/demo: *
- tightenco/ziggy: ^2.4
Requires (Dev)
- driftingly/rector-laravel: ^2.0
- fakerphp/faker: ^1.23
- larastan/larastan: ^3.0
- laravel/boost: ^2.4
- laravel/doctor: ^0.1.0
- laravel/pail: ^1.2.2
- laravel/pao: ^1.0
- laravel/pint: ^1.18
- laravel/sail: ^1.41
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- pestphp/pest: ^5.0
- pestphp/pest-plugin-laravel: ^5.0
- pestphp/pest-plugin-phpstan: ^5.0
- pestphp/pest-plugin-rector: ^5.0
- rector/rector: ^2.0
- tightenco/duster: ^3.2
README
A Laravel 13 + Inertia v3 + Vue 3 starter kit with built-in strict typing, enhanced code quality tools, safety features, modular architecture, AI-readiness via Laravel Boost, and production-ready containerization.
Stack
| Layer | Technology |
|---|---|
| Framework | Laravel 13, PHP 8.4+ |
| Frontend | Inertia v3, Vue 3.5, Vite 7 |
| Styling | Tailwind CSS 4, shadcn-vue, reka-ui |
| Routing (JS) | Ziggy |
| Server | Laravel Octane (FrankenPHP / RoadRunner) |
| Real-time | Laravel Reverb + Echo-Vue |
| Monitoring | Laravel Nightwatch |
| Auth | Laravel Sanctum |
| Testing | Pest |
| Code quality | Duster (Laravel Pint + Rector + PHPStan) |
| AI-assisted development | Laravel Boost (MCP server for agents) |
Requirements
- PHP 8.4+
- Composer 2
- Node.js 22+
Installation
laravel new --using pyaesoneaung/laravel-starter-kit-vue --git
Setup Git Hooks
npm install
Copy the environment file and generate an application key, then migrate the default SQLite database:
cp .env.example .env php artisan key:generate php artisan migrate
Development
Run all development processes (Laravel dev server, queue worker, log tailing with Pail, and Vite) in one command:
composer run dev
Run the development server with Inertia SSR:
composer run dev:ssr
Build frontend assets:
npm run build
Features
✅ Strict Models
Model::shouldBeStrict();
This does three things:
- Prevents lazy loading.
- Prevents silently discarding attributes.
- Prevents accessing missing attributes.
✋ Prevent Destructive Commands
Preventing the execution of destructive commands in production environments.
DB::prohibitDestructiveCommands(app()->isProduction());
⚡️ Automatic Relation Loading
Laravel can automatically eager load the relationships you access.
Model::automaticallyEagerLoadRelationships();
🧩 Modular
This starter kit uses internachi/modular for domain modules under app-modules/.
php artisan make:module {name}
php artisan make:model {Name} --module={module}
php artisan modules:list
php artisan modules:sync
php artisan test app-modules/{module-name}/tests
Each module is a self-contained Composer package (Modules\{Name}\) with its own routes, controllers, models, migrations, factories, seeders, Vue pages, and tests. A full reference implementation is included in the demo module, showcasing a complete Product CRUD:
app-modules/demo/src/Http/Controllers/Backend/ProductController.phpapp-modules/demo/src/Models/Product.phpapp-modules/demo/src/Enums/app-modules/demo/database/migrations/,factories/,seeders/app-modules/demo/resources/js/pages/products/app-modules/demo/routes/demo-routes.phpapp-modules/demo/tests/Feature/ProductCrudTest.php
Run the demo module tests with:
php artisan test app-modules/demo/tests
⚡️ Inertia + Vue
Pages live under resources/js/pages/ and module pages under app-modules/*/resources/js/pages/, rendered server-side with Inertia::render():
return Inertia::render('demo::products/Index', [ 'products' => $this->model->query()->latest()->paginate(), ]);
UI components are powered by shadcn-vue (built on reka-ui) with Tailwind CSS 4.
🤖 AI-Ready with Laravel Boost
This starter kit is AI-ready out of the box. Laravel Boost exposes your application to AI coding agents through a Model Context Protocol (MCP) server, giving them live access to:
- Database schema and read-only queries
- Application and browser error logs
- Version-specific Laravel documentation search
- Absolute URL resolution
- Durable project rules via
record-rule
It's preconfigured for OpenCode in opencode.json:
{
"mcp": {
"laravel-boost": {
"type": "local",
"enabled": true,
"command": ["php", "artisan", "boost:mcp"]
}
}
}
Project-wide settings live in boost.json, including enabled agents, domain skills (Pest, modular, Octane, Inertia, Tailwind, Echo, and more), and package-specific guidance. Each skill provides step-by-step, version-aware instructions so agents follow this project's exact conventions without guessing.
🪝 Git Commit Hook
Run duster lint for PHPStan, duster fix for refactor with Rector, and format with Laravel Pint before every commit via husky + lint-staged.
Default Laravel Rector Rules
The following Rector rules are applied via LaravelSetList::LARAVEL_CODE_QUALITY, LARAVEL_COLLECTION, and LARAVEL_TYPE_DECLARATIONS sets, targeting app/, config/, routes/, tests/, and all module source, route, and test directories.
// rector.php return RectorConfig::configure() ->withPaths([ __DIR__ . '/app', __DIR__ . '/config', __DIR__ . '/routes', __DIR__ . '/tests', __DIR__ . '/app-modules/*/src', __DIR__ . '/app-modules/*/routes', __DIR__ . '/app-modules/*/tests', ]) ->withSetProviders(LaravelSetProvider::class) ->withComposerBased(laravel: true) ->withSets([ LaravelSetList::LARAVEL_CODE_QUALITY, LaravelSetList::LARAVEL_COLLECTION, LaravelSetList::LARAVEL_TYPE_DECLARATIONS, ]) ->withPhpSets();
EloquentMagicMethodToQueryBuilderRector
use App\Models\User; -$user = User::find(1); +$user = User::query()->find(1);
EloquentWhereRelationTypeHintingParameterRector
-User::whereHas('posts', function ($query) { +User::whereHas('posts', function (Builder $query) { $query->where('is_published', true); }); -$query->whereHas('posts', function ($query) { +$query->whereHas('posts', function (Builder $query) { $query->where('is_published', true); });
EloquentWhereTypeHintClosureParameterRector
/** @var \Illuminate\Contracts\Database\Query\Builder $query */ -$query->where(function ($query) { +$query->where(function (Builder $query) { $query->where('id', 1); });
ModelCastsPropertyToCastsMethodRector
use Illuminate\Database\Eloquent\Model;
class Person extends Model
{
- protected $casts = [
- 'age' => 'integer',
- ];
+ protected function casts(): array
+ {
+ return [
+ 'age' => 'integer',
+ ];
+ }
}
ScopeNamedClassMethodToScopeAttributedClassMethodRector
class User extends Model
{
- public function scopeActive($query)
+ #[\Illuminate\Database\Eloquent\Attributes\Scope]
+ protected function active($query)
{
return $query->where('active', 1);
}
}
WhereToWhereLikeRector
-$query->where('name', 'like', 'Rector'); -$query->orWhere('name', 'like', 'Rector'); -$query->where('name', 'like binary', 'Rector'); +$query->whereLike('name', 'Rector'); +$query->orWhereLike('name', 'Rector'); +$query->whereLike('name', 'Rector', true);
🧪 Testing
Tests are written with Pest and organized into unit, feature, and module suites.
php artisan test php artisan test --compact php artisan test --compact --filter=ProductCrudTest php artisan test app-modules/demo/tests
🐳 Docker & Production
The container runs PHP with FrankenPHP (via serversideup/php) and serves the app through Laravel Octane. Frontend assets are built at image build time.
docker compose up -d api
The compose.yml file provides the following services:
| Service | Purpose |
|---|---|
api |
Main HTTP server (Octane/FrankenPHP, port 80) |
backend |
Secondary HTTP server (Octane/FrankenPHP, port 8080) |
reverb |
WebSocket server for Laravel Reverb |
horizon |
Queue worker |
task |
Scheduled task runner (schedule:work) |
nightwatch-agent |
Collects Nightwatch monitoring data |
😺 GitHub Actions
Automated workflows for continuous integration and deployment:
- Tests — runs the Pest suite on every pull request.
- Duster Lint — runs
duster lint(PHPStan) on every pull request. - Duster Fix — runs
duster fix(Pint) and auto-commits the fixes on every pull request. - OpenCode — triggers OpenCode on
/ocor/opencodecomments in issues and pull requests. - Deploy to DigitalOcean — manually triggered deployment of the selected branch and service to a DigitalOcean droplet via SSH and
docker compose up.
⚡️ Real-time Broadcasting
Broadcasting is configured with Laravel Reverb and Echo-Vue. Reverb settings live in config/reverb.php and are exposed to the frontend via VITE_REVERB_* environment variables. Start the Reverb server locally with:
php artisan reverb:start
The application is also instrumented with Laravel Nightwatch for production monitoring — configure NIGHTWATCH_TOKEN to enable it.