| Install | |
|---|---|
composer require imsus/laravel-inertia-vue-starter-kit |
|
| PHP: | ^8.3 |
A modern Laravel starter kit with Inertia, Vue 3, and an enhanced developer experience inspired by Nuxt.
This starter kit brings Nuxt-like conveniences to Vue development:
| Feature | Description |
|---|---|
| Auto-import Composables | Functions in resources/js/composables/ are auto-imported |
| Auto-load Components | Components in resources/js/components/ are auto-registered |
| Auto-load Icons | Any icon from Lucide/Phosphor is available as <IconName /> |
| Type-safe Routes | Wayfinder generates TypeScript functions from Laravel controllers |
Composables (auto-imported)
<script setup>
// useTheme() is auto-imported from resources/js/composables/
const { isDark, toggleDark } = useTheme();
const toggleDark = useToggle(isDark);
</script>
Components (auto-registered)
<template>
<!-- DarkModeToggle.vue is auto-registered -->
<DarkModeToggle />
</template>
Icons (auto-imported)
<template>
<IconHome />
<IconSettings />
<IconUser />
</template>
Wayfinder Routes (type-safe)
import { show } from "@/actions/App/Http/Controllers/PostController";
// Type-safe routing
const post = show(1); // { url: "/posts/1", method: "get" }
npm install -g vite-plus)# Install PHP dependencies
composer install
# Install JavaScript dependencies
vp install
# Start development servers
vp dev
| Command | Description |
|---|---|
vp dev |
Start Vite dev server |
vp build |
Build for production |
vp build:ssr |
Build for SSR |
vp fmt |
Format JS/TS/Vue |
vp lint |
Lint JS/TS/Vue |
vp check |
Format, lint & type check |
composer lint |
Lint PHP (mago) |
composer format |
Format PHP (mago) |
php artisan test |
Run Pest tests |
/
├── app/ # Laravel application
│ ├── Http/Controllers/ # Controllers (auto-discovered by Wayfinder)
│ ├── Models/ # Eloquent models
│ └── Providers/ # Service providers
├── bootstrap/ # Laravel bootstrap files
├── config/ # Configuration files
├── database/ # Migrations, factories, seeders
├── resources/
│ └── js/
│ ├── app.ts # Inertia app entry
│ ├── ssr.ts # SSR entry point
│ ├── components/ # Auto-registered Vue components
│ ├── composables/ # Auto-imported Vue composables
│ ├── lib/ # Utility libraries
│ └── pages/ # Inertia pages
├── routes/ # Route definitions
├── storage/ # Storage files
├── tests/ # Pest tests
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
└── mago.toml # Mago configuration
| File | Purpose |
|---|---|
vite.config.ts |
Vite plugins (AutoImport, Components, Icons, Wayfinder) |
tsconfig.json |
TypeScript configuration with paths alias |
mago.toml |
Mago PHP linter/formatter rules |
boost.json |
Laravel Boost MCP configuration |
This starter kit includes two icon sets:
@iconify-json/lucide) - Clean, modern icons@iconify-json/ph) - Versatile icon familyUsage: <Icon[Name] /> where Name is the icon identifier in kebab-case.