- How do I create a new Laravel project with Svelte using this starter kit?
- Run `composer create-project laravel/blank-svelte-starter-kit my-app` to scaffold a new Laravel project with Svelte pre-installed. The kit replaces Blade with Svelte components while keeping Laravel’s backend intact. No additional setup is required for basic usage.
- Can I integrate this starter kit into an existing Laravel project?
- Yes, replace your `resources/views` directory with Svelte components in `resources/js/Pages`, then update your controllers to use `Inertia::render()` instead of Blade. Start with non-critical pages to test compatibility before full migration.
- What Laravel versions does this starter kit support?
- The kit is optimized for Laravel 10+ and requires PHP 8.1+. It leverages Laravel’s latest features like Eloquent, API resources, and Sanctum/Passport for auth. Always check the [Laravel docs](https://laravel.com/docs/starter-kits) for version-specific notes.
- Does this kit include authentication (e.g., Laravel Breeze or Sanctum)?
- No, the starter kit intentionally omits auth scaffolding to allow customization. You’ll need to integrate Laravel Sanctum, Passport, or Firebase Auth manually. Svelte stores can sync with Laravel sessions or API tokens for state management.
- How does Inertia.js improve performance compared to traditional Laravel Blade?
- Inertia.js enables SPA-like navigation without full-page reloads, reducing latency. Combined with Vite, you get near-instant HMR (Hot Module Replacement) and optimized asset bundling. For SEO, consider `@inertiajs/svelte` SSR or hybrid Blade/Svelte rendering.
- What if my team isn’t familiar with Svelte or Inertia.js?
- The learning curve is manageable: Svelte’s reactivity model is intuitive, and Inertia.js abstracts API calls behind Laravel’s familiar controllers. Start with the [Inertia.js docs](https://inertiajs.com) and the [Laravel Svelte guide](https://laravel.com/docs/starter-kits).
- Can I use this kit with Tailwind CSS or other CSS frameworks?
- Yes, Tailwind is pre-configured but fully customizable. Replace `tailwind.config.js` or import other CSS frameworks (e.g., Bootstrap) via Vite. The kit’s modularity ensures no framework is enforced.
- How do I handle state management (e.g., user auth) across Laravel and Svelte?
- Use Svelte stores to manage frontend state (e.g., auth tokens, notifications) and sync with Laravel via Sanctum’s API tokens or session cookies. Avoid mixing Laravel sessions directly with Svelte stores to prevent inconsistencies.
- Will this starter kit work with Laravel Forge or other hosting platforms?
- Yes, but ensure your server supports Node.js 16+ for Vite builds. Laravel Forge users can deploy the frontend via `npm run build`, while shared hosting may require manual adjustments for Node.js dependencies.
- Are there alternatives to this kit for Laravel + Svelte projects?
- For full-stack Svelte, consider `laravel-inertiajs/svelte` (community package) or build from scratch with Inertia.js. This official kit prioritizes Laravel’s ecosystem (e.g., Eloquent, Blade hybrid) over pure SPA setups. Evaluate based on your need for auth scaffolding or hybrid rendering.