laravel/svelte-starter-kit
Modern Laravel starter kit with a Svelte 5 + TypeScript frontend powered by Inertia. Includes Tailwind, shadcn-svelte, and bits-ui for UI, plus fast Vite builds. Ideal for building SPA-like apps with classic Laravel routing and controllers.
Inertia.get(), Inertia.post()) or Svelte’s reactivity model may face initial ramp-up. Mitigation: Leverage Laravel’s official Inertia docs and the starter kit’s example routes/controllers.vite build) optimize this, but monitoring TTFB (Time to First Byte) and bundle size is critical.app/Http/Controllers, resources/js), making it a drop-in replacement for traditional Laravel + Blade apps.Auth::user() works seamlessly).Scaffold the Starter Kit:
composer create-project laravel/svelte-starter-kit my-app
/dashboard, /posts).Replace Existing Frontend:
resources/views/dashboard.blade.php → resources/js/Pages/Dashboard.svelte).data() → let state, methods → functions).routes/api.php) are consumed via Inertia’s $page.props or fetch().Leverage Inertia Adapters:
Inertia::render() in controllers to pass data to Svelte pages:
public function show(Post $post) {
return Inertia::render('Posts/Show', ['post' => $post]);
}
@auth directives with Svelte’s +page.svelte auth checks or Inertia middleware.Gradual Adoption:
Inertia::render('Filament/Dashboard')).Echo.channel('...').listen() in Svelte).$page.props.Phase 1: Setup & Learning (1–2 weeks)
/dashboard).Phase 2: Core Migration (2–4 weeks)
useForm() from @inertiajs/svelte).interface Post { id: number; title: string }).Phase 3: Feature Parity (3–6 weeks)
/posts/{id}).Phase 4: Optimization (Ongoing)
console.error in production).composer.json (Laravel) + package.json (Svelte) simplifies updates.How can I help you explore Laravel packages today?