A modern, production-ready starter kit for building Laravel applications with Vue 3 frontend using Inertia.js. This kit provides a robust foundation with TypeScript, Tailwind CSS, and shadcn-vue components.
- Laravel 12 with PHP 8.4+ support
- Vue 3 with Composition API and TypeScript
- Inertia.js 2 for seamless SPA experience
- Tailwind CSS 4 for utility-first styling
- shadcn-vue component library with Reka UI
- Laravel Fortify for authentication
- Server-Side Rendering (SSR) support
- Repository Pattern implementation
- ESLint & Prettier for code quality
- Vite for lightning-fast development
This starter kit extends the base Laravel installation with the following additions and modifications:
- Inertia.js v2 - Complete SPA setup with Vue 3 adapter
- Vue 3 with Composition API and TypeScript support
- Tailwind CSS v4 - Modern utility-first CSS framework
- shadcn-vue - Beautiful component library built on Reka UI
- Vite - Modern build tool replacing Laravel Mix
- TypeScript - Full type safety for frontend code
- VueUse - Essential Vue composition utilities
- Lucide Vue - Modern icon library
- Laravel Fortify - Headless authentication backend
- Two-Factor Authentication (2FA) - QR code-based 2FA with recovery codes
- Email Verification - Built-in email verification flow
- Password Reset - Complete password reset functionality
- Cookie Consent - GDPR-compliant cookie consent system
- Repository Pattern -
AbstractRepositorywith built-in caching - Service Pattern -
AbstractServicewith transaction support - Action Pattern - Single-responsibility action classes
- Contract Interfaces - Type-safe interfaces for all layers
- Facades - Application-specific facades for easy access
app/Actions/- Business logic actions (User, Fortify)app/Contracts/- Interface definitionsapp/Facades/- Application facadesapp/Repositories/- Data access layerapp/Services/- Business logic layerresources/js/pages/- Inertia page componentsresources/js/components/- Reusable Vue components (PublicHeader, PublicFooter, etc.)resources/js/composables/- Vue composition functionsresources/js/layouts/- Layout components (PublicLayout, AuthLayout, etc.)resources/js/types/- TypeScript type definitions (pages, models, forms)
- Laravel Pint - PHP code style fixer
- Laravel Pail - Real-time log viewer
- Laravel Debugbar - Development debugging toolbar
- ESLint - JavaScript/TypeScript linting
- Prettier - Code formatting
- TypeScript ESLint - TypeScript-specific linting rules
- Concurrently - Run multiple dev processes simultaneously
- Automated Setup Script -
composer run setupfor one-command installation - Concurrent Dev Server -
composer run devruns server, queue, logs, and Vite together - SSR Support - Server-side rendering for improved performance
- Hot Module Replacement - Instant frontend updates during development
- TypeScript Support - Full type checking and IntelliSense
- Link Prefetching - Automatic prefetching for faster navigation
- Mobile-First Design - Responsive design starting from mobile screens
- Code Splitting - Optimized bundle sizes with manual chunks
- PHPUnit - Comprehensive test suite
- Feature Tests - Full HTTP endpoint testing
- Unit Tests - Individual class and method testing
- GitHub Actions CI - Automated testing on push/PR
- Laravel Wayfinder - Route organization and type-safe route generation
- Laravel Boost - Enhanced development tools (MCP server)
- Laravel Sail - Docker development environment
- Laravel Updater - Application update system
- Dashboard - Starter dashboard page
- User Settings - Profile, password, and 2FA management pages
- Authentication Pages - Login, register, password reset, email verification
- Cookie Preferences - User-configurable cookie consent
- Appearance Settings - Theme switching (light/dark mode)
- Privacy Policy - GDPR-compliant privacy policy page
- Cookie Policy - Comprehensive cookie policy page
- Public Layout Components - Reusable header and footer components
- Fortify Configuration - Pre-configured authentication features
- Inertia Configuration - SSR and shared data setup
- Tailwind v4 Configuration - Modern CSS setup with custom breakpoints
- xs: < 768px (phones)
- sm: >= 768px (tablets)
- md: >= 992px (small laptops)
- lg: >= 1200px (laptops and desktops)
- TypeScript Configuration - Strict type checking
- ESLint Configuration - Vue 3 + TypeScript rules
- Prettier Configuration - Consistent code formatting
- Vite Build Optimization - Code splitting and chunk optimization
- Strict TypeScript - Type safety across frontend
- PHP Type Hints - Full type declarations in PHP 8.4
- PHPDoc Blocks - Comprehensive documentation for all classes and methods
- Code Formatting - Automated with Pint and Prettier
- Linting - ESLint for frontend, Pint for backend
- Reusable Components - DRY principle with shared components (PublicHeader, PublicFooter)
- Type Definitions - Complete TypeScript types for pages, models, and forms
Before you begin, ensure you have the following installed:
- PHP 8.4+ with required extensions
- Composer (latest version)
- Node.js 18+ and npm
- SQLite (default) or MySQL/PostgreSQL
- Git
The fastest way to get started is using the setup script:
# Clone the repository
git clone <repository-url> your-project-name
cd your-project-name
# Run the automated setup script
composer run setupThis script will:
- Install PHP dependencies
- Copy
.env.exampleto.envif it doesn't exist - Generate application key
- Run migrations
- Install Node.js dependencies
- Build frontend assets
If you prefer to set up manually:
# Clone the repository
git clone <repository-url> your-project-name
cd your-project-name
# Install PHP dependencies
composer install
# Install Node.js dependencies
npm install
# Setup environment
cp .env.example .env
php artisan key:generate
# Create database (SQLite)
touch database/database.sqlite
# Run migrations
php artisan migrate
# Build assets
npm run buildFor development with hot reloading:
# Start all development services
composer run devThis command runs:
- Laravel development server
- Queue worker
- Log viewer (Pail)
- Vite dev server with hot reload
For Server-Side Rendering development:
# Build SSR assets and start development
composer run dev:ssrβββ app/
β βββ Actions/ # Business logic actions (User, Fortify)
β βββ Contracts/ # Interfaces (Repository, Service, Action)
β βββ Facades/ # Application facades
β βββ Http/
β β βββ Controllers/ # Application controllers
β β βββ Middleware/ # Custom middleware
β β βββ Requests/ # Form request validation
β βββ Models/ # Eloquent models
β βββ Providers/ # Service providers
β βββ Repositories/ # Data access layer (Repository Pattern)
β βββ Services/ # Business logic layer (Service Pattern)
βββ resources/
β βββ js/
β β βββ components/ # Vue components (shadcn-vue)
β β βββ composables/ # Vue composables
β β βββ layouts/ # Inertia layouts
β β βββ pages/ # Inertia pages
β β βββ types/ # TypeScript type definitions
β βββ css/ # Global styles
βββ routes/
β βββ web.php # Web routes
β βββ settings.php # Settings routes
βββ tests/ # Feature and unit tests
# Start development server with hot reload
composer run dev
# Start development with SSR
composer run dev:ssr
# Run tests
composer run test# Start Vite dev server
npm run dev
# Build for production
npm run build
# Build with SSR
npm run build:ssr
# Format code
npm run format
# Lint code
npm run lint# Run migrations
php artisan migrate
# Clear caches
php artisan config:clear
php artisan cache:clear
php artisan view:clear
php artisan route:clear
# Generate application key
php artisan key:generate
# Format PHP code (Laravel Pint)
vendor/bin/pint
# Format only changed files
vendor/bin/pint --dirtyThis starter kit follows a clean architecture pattern with clear separation of concerns:
- AbstractRepository: Base repository with caching, CRUD operations, and query building
- RepositoryInterface: Contract defining repository methods
- Repositories handle all database interactions and provide a clean abstraction layer
- AbstractService: Base service with transaction support and validation helpers
- Services contain business logic and orchestrate repository operations
- Services can be easily tested and swapped without affecting controllers
- Actions encapsulate single, focused business operations
- Actions are reusable and can be composed to build complex workflows
- Used for user management, authentication, and other domain operations
Controllers β Services β Repositories β Models
β
Actions (when needed)
- Laravel 12 - PHP framework
- PHP 8.4+ - Programming language
- Laravel Fortify - Authentication scaffolding
- Laravel Wayfinder - Route organization
- Inertia.js Laravel - Server-side adapter
- Vue 3 - Progressive JavaScript framework
- TypeScript - Type-safe JavaScript
- Inertia.js Vue3 - Client-side adapter
- Tailwind CSS 4 - Utility-first CSS framework
- shadcn-vue - Component library
- Reka UI - Headless UI components
- Lucide Vue - Icon library
- VueUse - Vue composition utilities
- Vite - Build tool and dev server
- ESLint - Code linting
- Prettier - Code formatting
- TypeScript ESLint - TypeScript linting
- Laravel Pint - PHP code style fixer
- Laravel Pail - Real-time log viewer
- Laravel Debugbar - Development debugging toolbar
Key environment variables to configure:
APP_NAME="Your App Name"
APP_ENV=local
APP_DEBUG=true
APP_URL=http://localhost:8000
DB_CONNECTION=sqlite
DB_DATABASE=database/database.sqlite
MAIL_MAILER=logThe project uses Tailwind CSS 4 with custom configuration. Styles are located in resources/css/app.css.
shadcn-vue components are configured in components.json. Add new components using:
npx shadcn-vue@latest add [component-name]When creating new features, follow the established architecture:
- Create Model:
php artisan make:model ModelName -m - Create Repository: Extend
AbstractRepositoryinapp/Repositories/ - Create Service: Extend
AbstractServiceinapp/Services/ - Create Actions: Implement
ActionInterfaceinapp/Actions/ - Create Controller: Use services in controllers, not repositories directly
Example repository usage:
// In a Service
$user = $this->repository->find($id);
$users = $this->repository->paginate(15);Example service usage:
// In a Controller
$user = app(UserService::class)->getUser($id);This project uses PHPUnit for testing. All tests are located in the tests/ directory.
# Run all tests
composer run test
# Run specific test file
php artisan test tests/Feature/ExampleTest.php
# Run specific test by name
php artisan test --filter=TestName
# Run with coverage (if configured)
php artisan test --coverage- Feature Tests: Located in
tests/Feature/- Test complete features and HTTP endpoints - Unit Tests: Located in
tests/Unit/- Test individual classes and methods
The project includes a GitHub Actions workflow (.github/workflows/ci.yml) that:
- Runs tests on PHP 8.4
- Validates composer.json
- Ensures code quality on every push and pull request
- Laravel Documentation
- Vue 3 Documentation
- Inertia.js Documentation
- Tailwind CSS Documentation
- shadcn-vue Documentation
Thank you for considering contributing to this starter kit! Please review our contribution guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open-sourced software licensed under the MIT license.
- Laravel for the amazing PHP framework
- Vue.js for the progressive JavaScript framework
- Inertia.js for bridging Laravel and Vue
- Tailwind CSS for the utility-first CSS framework
- shadcn-vue for the beautiful component library