A production-ready starter for Laravel 12, Inertia 2, and React 19 with localization, Filament admin, feature flags, full-text search, and real-time support. Use it as a template or clone to build full-stack apps without redoing auth, i18n, theme, or tooling.
DOCUMENTATION: hojabbr.github.io/boilerplate/
- Full-stack app — Laravel backend + Inertia SSR + React frontend, no separate API layer
- Auth — Login, registration, password reset, email verification, optional 2FA (Laravel Fortify)
- Admin — Filament 5 panel at
/adminwith users, roles, settings, blog, pages, contact submissions, feature flags - Localization — Route prefixes per locale (mcamara), translatable content (Spatie), RTL (e.g. Arabic, Farsi)
- Theme — Light / dark / system with persistent preference (cookie + localStorage)
- Search — Laravel Scout + Meilisearch for typo-tolerant, faceted search
- Real-time — Laravel Reverb (WebSockets) + Laravel Echo for broadcasts
- Feature flags — Laravel Pennant to toggle blog, static pages, contact form, registration, 2FA
- Code quality — Pint, PHPStan, ESLint, Prettier, Husky + Commitlint, optional semantic-release
| Area | Packages |
|---|---|
| Framework | Laravel 12 |
| Auth | Laravel Fortify (credentials, 2FA, profile) |
| Admin | Filament 5, Lara Zeus (Spatie Translatable in Filament) |
| Localization | mcamara/laravel-localization (route prefixes, locale detection) |
| Content | Spatie Laravel Translatable, Spatie Media Library, Spatie Query Builder |
| Permissions | Spatie Laravel Permission (roles & permissions) |
| Search | Laravel Scout, Meilisearch (meilisearch-php) |
| Real-time | Laravel Reverb |
| Feature flags | Laravel Pennant |
| Queue / dev | Laravel Horizon, Laravel Telescope, Laravel Pail |
| Routes → TS | Laravel Wayfinder (typed route helpers for frontend) |
| OAuth | Laravel Socialite |
| Media | pbmedia/laravel-ffmpeg (video/audio processing) |
| Area | Packages |
|---|---|
| Stack | React 19, Inertia 2, Vite 7, TypeScript |
| Styling | Tailwind CSS v4, Tailwind Merge, class-variance-authority |
| UI | Shadcn-style components (Radix UI, Headless UI, Base UI), Lucide icons |
| i18n | i18next, react-i18next, i18next-browser-languagedetector |
| State | Zustand |
| Forms | React Hook Form, Zod, @hookform/resolvers |
| Motion | Motion (LazyMotion + domAnimation) |
| Real-time | Laravel Echo, Pusher JS |
- CI: GitHub Actions (lint, PHPStan, Pint, ESLint, Prettier, Pest, Playwright)
- PHP: Laravel Pint, Larastan (PHPStan), Pest 4, Pest Browser (Playwright)
- JS/TS: ESLint, Prettier (with Tailwind plugin), Husky, Commitlint (Conventional Commits)
- Releases: Optional semantic-release (changelog, tags, GitHub releases)
- Backend:
app/Core/(cross-cutting) andapp/Domains/<Name>/(vertical slices). Noapp/Models/; models in Core or Domains. Jobs inDomains/<Name>/Jobs/orCore/Jobs/. See docs: Architecture → Backend. - Frontend: Inertia pages in
resources/js/features/<name>/pages/; shared UI incomponents/(ui, common). See docs: Architecture → Frontend.
Filament → Settings → Feature flags toggles: Blog, Static pages, Contact form, Login, Registration. Two-factor authentication is controlled via Laravel Fortify configuration.
- Blog — Translatable posts, WYSIWYG, media (gallery, videos, documents), public listing and show with lightbox
- Static pages — Per-locale CMS pages (e.g. Privacy, Terms)
- Contact form — Public form with Filament list/edit of submissions
- Registration — Fortify registration (enable/disable in Fortify config)
- Two-factor authentication — TOTP-based 2FA (Fortify)
- PHP 8.5+
- Node 24+
- Composer and npm (or pnpm)
- Optional: Docker and Laravel Sail for a consistent environment
-
Clone (or use Use this template):
git clone https://github.com/hojabbr/boilerplate.git cd boilerplate -
Backend setup:
composer install cp .env.example .env php artisan key:generate
Edit
.env: setAPP_NAME,APP_URL,DB_*. Optionally setMEILISEARCH_*,REVERB_*, etc. (see .env.example). -
Frontend setup:
npm install npm run build
-
Database:
php artisan migrate
Optional:
php artisan db:seed.
./vendor/bin/sail up -d
./vendor/bin/sail composer install
cp .env.example .env
./vendor/bin/sail artisan key:generate
# Edit .env as needed
./vendor/bin/sail npm install && ./vendor/bin/sail npm run build
./vendor/bin/sail artisan migrate- Backend:
php artisan serveor./vendor/bin/sail up - Frontend (Vite):
npm run dev - All-in-one (server, queue, logs, Vite):
composer run dev(with Sail, run inside the container) - Admin: http://localhost/admin (locale-independent)
- Scaffolding:
php artisan boilerplate:domainandphp artisan boilerplate:locale(use--dry-run,--rollback=<name>). See docs: Scaffolding.
php artisan testWith Sail:
./vendor/bin/sail artisan testRun tests before submitting changes; see CONTRIBUTING.md.
Canonical documentation is in the /docs folder and on GitHub Pages (when enabled). It covers installation, configuration, architecture (overview, backend, frontend), features (localization, feature flags, search, admin), development (extending, scaffolding, testing), DevOps, and reference (paths, config, env). Use it as the single source of truth.
- docs/ — Start at docs/index.md or the GitHub Pages site for the full guide and sidebar navigation.
- EXTENDING.md — Short summary and links to the extending and scaffolding docs.
- .cursor/rules/ARCHITECTURE.mdc — Condensed rules for Cursor/IDE; points to /docs for full architecture and conventions.
Contributions are welcome. Please read CONTRIBUTING.md and our Code of Conduct.
This project is open-sourced under the MIT License.