A production-ready Laravel 12 starter kit with SvelteKit, Svelte 5, Skeleton UI, Tailwind CSS v4, and complete authentication scaffolding — including SSO, two-factor auth, and email verification.
SvelteKit handles routing and SSR. Laravel serves as the API backend with session-based auth.
npm create laravelte my-app
cd my-app
composer dev
The CLI scaffolds the project, installs dependencies, and launches an interactive setup wizard that configures everything.
MustVerifyEmail on the User modelFive OAuth providers supported out of the box:
| Provider | Env Prefix | Callback URL |
|---|---|---|
| GitHub | GITHUB_ |
/auth/github/callback |
FACEBOOK_ |
/auth/facebook/callback |
|
| X (Twitter) | X_ |
/auth/x/callback |
GOOGLE_ |
/auth/google/callback |
|
| Apple | APPLE_ |
/auth/apple/callback |
For each provider, the setup wizard writes three env vars to .env:
{PREFIX}_CLIENT_ID=your-client-id
{PREFIX}_CLIENT_SECRET=your-client-secret
{PREFIX}_REDIRECT_URI=http://localhost/auth/{slug}/callback
Only providers with a non-empty CLIENT_ID render login buttons on the frontend.
SvelteKit owns routing and SSR. Laravel serves a REST API with session-based auth.
src/
├── routes/ # SvelteKit file-based routing
│ ├── (auth)/ # Auth pages (login, register, etc.)
│ ├── (app)/ # Authenticated pages (dashboard, settings)
│ └── auth/ # OAuth proxy endpoints
├── lib/
│ ├── api.ts # laravelFetch() helper with CSRF handling
│ ├── components/ # Reusable Svelte components
│ ├── types/ # TypeScript interfaces
│ └── utils/ # Utilities (theme, initials, etc.)
└── hooks.server.ts # Cookie and XSRF token extraction
src/routes/+page.server.ts load functionsenhance actionlaravelFetch() with cookie forwarding| Variable | Default | Description |
|---|---|---|
APP_NAME |
Laravel | Application name |
APP_URL |
http://localhost | Base URL (used for SSO callbacks) |
APP_KEY |
— | Generated during setup |
DB_CONNECTION |
sqlite | Database driver |
LARAVEL_URL |
http://localhost:8000 | Laravel API URL for SvelteKit |
Each provider uses three env vars:
| Variable | Description |
|---|---|
{PREFIX}_CLIENT_ID |
OAuth Client ID |
{PREFIX}_CLIENT_SECRET |
OAuth Client Secret |
{PREFIX}_REDIRECT_URI |
OAuth callback URL |
Prefixes: GITHUB, FACEBOOK, X, GOOGLE, APPLE
| Command | Description |
|---|---|
composer dev |
Start Laravel + SvelteKit dev servers concurrently |
composer setup |
Re-run the interactive setup wizard |
| Command | Description |
|---|---|
php artisan app:setup |
Interactive setup wizard |
php artisan serve |
Start Laravel dev server |
php artisan test |
Run PHPUnit tests |
| Command | Description |
|---|---|
npm run dev |
Start SvelteKit dev server |
npm run build |
Production build |
npm run preview |
Preview production build |
npm run lint |
ESLint with auto-fix |
npm run format |
Prettier formatting |
npm run types:check |
TypeScript type checking |
http://localhost/auth/github/callback.env)http://localhost/auth/google/callback.env)http://localhost/auth/facebook/callback.env)http://localhost/auth/x/callback.env)http://localhost/auth/apple/callback.env)| Layer | Technology | Version |
|---|---|---|
| Backend | Laravel | 12.x |
| Auth | Laravel Fortify | 1.x |
| Social Auth | Laravel Socialite | 5.x |
| Frontend | Svelte | 5.x |
| Full-stack | SvelteKit | 2.x |
| CSS | Tailwind CSS | 4.x |
| UI Components | Skeleton UI | 4.x |
| Icons | Lucide Svelte | — |
| Build Tool | Vite | 6.x |
| Language | TypeScript | 5.x |
| Database | SQLite (default) | — |
| Testing | PHPUnit | 11.x |
git clone https://github.com/kuddusclank/laravel-svelte-starter.git my-app
cd my-app
composer install
cp .env.example .env
php artisan app:setup
MIT