Expert scaffolding for Vue 3. Specialized for Laravel Inertia stacks, but supports Nuxt/Vite. Enforces Composition API & TypeScript.
CRITICAL: Before creating files, identify the “Flavor” of Vue being used.
composer.json has inertiajs/inertia-laravel OR resources/js/Pages directory exists.nuxt.config.ts exists.pages/ directory.vite.config.ts exists but no Inertia/Nuxt.vue-router.When asked to create a component or page:
<script setup lang="ts">.onMounted. Expect data to be passed as props from the Laravel Controller.defineProps<{
user: App.Models.User; // Use namespace if types are generated
errors: Record<string, string>;
}>();
<a href="/dashboard"> (Causes full page reload).import { Link } from '@inertiajs/vue3'; -> <Link href="/dashboard">.ref for each field and calling axios.post.import { useForm } from '@inertiajs/vue3';
const form = useForm({
email: '',
password: '',
remember: false,
});
const submit = () => {
form.post(route('login'), {
onFinish: () => form.reset('password'),
});
};
:error="form.errors.email".usePage() to access global data (User, Flash Messages, CSRF).
import { usePage } from '@inertiajs/vue3';
const user = computed(() => usePage().props.auth.user);
ref() for UI state (modals, dropdowns). // In your Page component
import AppLayout from '@/Layouts/AppLayout.vue';
defineOptions({
layout: AppLayout,
});
ziggy-js library is detected (standard in Laravel), NEVER hardcode URLs like axios.post('/api/user').route() helper: form.post(route('users.store')).