A modern Laravel + Inertia + Vue + Fortify starter with opinionated defaults: auth ready out of the box, development login prefill, demo user seeding, and a home route that conditionally directs guests to login and authenticated users to the dashboard.
- Laravel (Fortify for authentication)
- Inertia + Vue 3 (TypeScript)
- Vite (build/dev)
- Tailwind CSS
- Pest + PHPUnit (testing)
- GitHub Actions (lint + tests)
- PHP 8.2+ and Composer
- Node.js 18+ and npm
- MySQL/MariaDB
- Git
- Copy environment config:
- Create
.envfrom.env.exampleand adjust values. - Do not commit
.env(it’s already ignored).
- Basic
.envsetup:
- App:
APP_ENV=localAPP_DEBUG=trueAPP_URL=http://localhost:8000
- Generate app key:
php artisan key:generate
- Database (example for local MySQL):
DB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=adsveloDB_USERNAME=rootDB_PASSWORD=your_db_password
- Mail (optional, adjust to your SMTP provider):
MAIL_MAILER=smtpMAIL_HOST=smtp.yourprovider.comMAIL_PORT=587MAIL_USERNAME=your_inbox@example.comMAIL_PASSWORD=your_mail_app_passwordMAIL_ENCRYPTION=tlsMAIL_FROM_ADDRESS=your_inbox@example.comMAIL_FROM_NAME="${APP_NAME}"
- Development login prefill:
- Active only in local environment (
app()->isLocal()). - Add to
.env:DEMO_LOGIN_EMAIL=demo@example.com DEMO_LOGIN_PASSWORD=password
- Install dependencies:
composer installnpm install- Migrate and seed:
- Reload config so
.envis picked up:
php artisan config:clear- Run migrations and seeders:
php artisan migrate --seed- Seeder is idempotent:
- Creates or updates
test@example.comand the demo user (DEMO_LOGIN_EMAIL), hashes password via model casts, verifies email, and disables 2FA for smooth local login.
- Creates or updates
- Run the app:
- Laravel dev server:
php artisan serve- Vite dev server:
npm run dev- Visit
http://localhost:8000.
- The login form will prefill
emailandpasswordwithDEMO_LOGIN_EMAILandDEMO_LOGIN_PASSWORDwhen running locally. - Demo user is created/updated by the seeder with verified email and 2FA disabled to avoid OTP on local dev.
- Root
/usesauthmiddleware and redirects to/dashboard.- Guests are redirected to Fortify
/login. - Authenticated users go to
/dashboard(withverified).
- Guests are redirected to Fortify
npm run dev— start Vite in development mode.npm run build— build assets for production.npm run build:ssr— build client + SSR.npm run lint— ESLint with auto-fix.npm run format— Prettier format forresources/.npm run format:check— Prettier check.
- Run tests (Windows):
vendor\bin\pest.bator
vendor\bin\phpunit.bat- Workflows
lint.ymlandtests.ymlrun automatically on push. - Never commit
.env. Use repositorysecretsfor CI if environment variables are needed.
- Keep credentials out of version control. Use
.env.exampleto document required variables. DEMO_LOGIN_*should be used for local development only; disable for staging/production.- If enabling 2FA in production, remove 2FA disabling from seeder for non-demo accounts.
- Duplicate email during seeding:
- Seeder is idempotent; re-run
php artisan db:seedafter fixes.
- Seeder is idempotent; re-run
- Email not sending:
- Check Windows firewall/antivirus, SMTP port (587/465), and whether your provider requires an App Password.
- Assets not loading:
- Ensure
npm run devis running in development or usenpm run buildfor production.
- Ensure