Laravel + Svelte Setup
Build a fresh Laravel + Svelte project in the order below. Run commands in the Laravel application, not this docs repo. File labels are application destinations; merge the relevant changes from full-file snapshots rather than overwriting newer starter code.
Fresh local database only
Finish the name split before adding users. Project and owner names throughout these chapters come from the site's .env (see .env.example); replace example addresses as needed. Keep real credentials out of .env.example and Git.
Version Baseline
Recorded baseline: Laravel Installer 5.32.0 and the official Laravel 13 / Inertia 3 / Svelte 5 starter kit, September 12, 2026. These notes use Laravel authentication, registration, two-factor authentication, and passkeys; no teams or WorkOS.
The installer fetches the current starter. Check the generated composer.json, package.json, and lockfiles before applying snapshots; commands below assume the baseline's Vite Plus scripts.
Preferred Local Tool Versions
Local preferences, not framework minimums. The baseline starter declares PHP ^8.3; step 01 raises the project requirement to ^8.5.
- Herd, with the site and CLI on PHP 8.5
- Composer 2.x
- Node.js 24 LTS
- MySQL 9.x; for PostgreSQL 15+, adjust the installer flag and
DB_*settings - GitHub CLI (
gh), authenticated before creating the remote
Laravel Installer
Skip installation if Herd already provides laravel; check laravel --version.
bash
composer global require "laravel/installer"For a Composer-managed installer, find its global binary directory:
bash
composer global config bin-dir --absoluteAdd that directory to PATH in ~/.zshrc. Add Zsh completion once, not on every project setup:
bash
laravel completion zsh >> ~/.zshrcSetup Steps
Required
- 01 - Create Project — application, environment, database, and repository
- 02 - Agent Instructions
- 03 - User Name Split
- 04 - Spatie Permissions
- 05 - Page Stubs
- 06 - Mail Setup
Optional
Independent of each other; apply any subset after step 06.
Agent Rules
Every chapter ends with an Agent Prompt that applies just that chapter, validates it, and stops. Each prompt points the agent here first. Run one chapter per agent session to keep context small.
- Work only in the current Laravel application. Fetch the prompt's URLs with
curl -fsSLand read them in full; they are plain Markdown with every source file inlined. If a fetch fails, or any line starts with<<<(an unbuilt copy with missing source files), stop and report. - Confirm the working tree is clean and every earlier required chapter is committed (
git log --oneline). If not, stop and report. - Snapshots are changes to merge, not files to paste. Open the application's current file first, keep anything newer or unrelated, and apply only what the chapter describes. Create files that do not exist yet.
- Replace
vehub-app,vehub_app,Vehub, andzoonixwith this project's values fromcomposer.json,.env, andgit remote -v. - Run the chapter's commands in order. Do not skip, reorder, or add packages the chapter does not name.
- Run everything under Verify, then the prompt's own checks. Fix failures caused by this chapter; if a failure predates it, stop and report.
- Never touch real credentials, send live mail, push, or deploy. Anything that needs a browser, a secret, or an interactive prompt goes in the report as a manual check.
- Commit with the chapter's commit message only when every check passes. Then report: files changed, checks run with results, manual checks left. Stop; do not start the next chapter.
Original Validation Record
The source notes record PHP syntax, Svelte, and isolated SQLite checks on September 12, 2026: Laravel 13.31.0, Fortify 1.39.0, Inertia Laravel 3.3.4, Spatie Permission 8.3.0, Resend PHP 1.14.0, and PHP 8.5.8. Coverage included split names, registration, profile updates, role assignment, repeatable local seeding, and mail rendering without delivery.
Those application checks have not been rerun here. The old PHP image checks do not cover the current enhanced-image setup. Run each chapter's checks in the application; the docs build does not execute imported examples. Browser behavior, MySQL/PostgreSQL, live mail, and deployment still need application-level verification.