tooinfinity / infinity-starter-kit
Infinity Starter Kit (Laravel + Inertia + React) a full-featured, modular Laravel starter kit powered by Laravel Chisel and Laravel Fortify.
Package info
github.com/tooinfinity/infinity-starter-kit
Type:project
pkg:composer/tooinfinity/infinity-starter-kit
Requires
- php: ^8.5.0
- erag/laravel-lang-sync-inertia: ^2.4
- inertiajs/inertia-laravel: ^3.0.6
- laravel/chisel: ^0.1.1
- laravel/fortify: ^1.41.0
- laravel/framework: ^13.40.0
- laravel/wayfinder: ^0.1.21
- nunomaduro/essentials: ^1.2.0
- spatie/laravel-activitylog: ^5.1.5
- spatie/laravel-data: ^4.23
- spatie/laravel-permission: ^8.3
Requires (Dev)
- brianium/paratest: 7.27.5
- driftingly/rector-laravel: ^2.6.2
- fakerphp/faker: ^1.24.1
- larastan/larastan: ^3.13.0
- laravel/boost: ^2.10.3
- laravel/pail: ^1.2.7
- laravel/pao: ^1.1.5
- laravel/pint: ^1.32.1
- laravel/tinker: ^3.0.2
- mockery/mockery: ^1.6.15
- nunomaduro/collision: ^8.9.5
- pestphp/pest: ^5.3.5
- pestphp/pest-plugin-browser: ^5.1.2
- pestphp/pest-plugin-laravel: ^5.0.1
- pestphp/pest-plugin-type-coverage: ^5.0.3
- phpunit/phpunit: 13.4.5
- rector/rector: ^2.7.0
- roave/security-advisories: dev-latest
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-28 23:45:40 UTC
README
A full-featured, modular Laravel starter kit powered by Laravel Chisel, Laravel Fortify, and Spatie Laravel Permission.
Designed for speed and cleanliness: choose your features during composer create-project, and Chisel automatically prunes unused backend routes, controllers, actions, Inertia pages, traits, model interfaces, and Pest tests.
β‘ Tech Stack
- Framework: Laravel 13 (PHP 8.5+)
- Frontend SPA: Inertia.js v3 + React 19
- TypeScript & Routing: Laravel Wayfinder (
@/actions,@/routes) - Styling: Tailwind CSS v4 + Radix UI primitives + Lucide Icons
- Bundler: Vite-Plus / Bun
- Authentication: Laravel Fortify
- Authorization / RBAC: Spatie Laravel Permission
- Feature Pruning: Laravel Chisel
- Testing: Pest 5
π Supported Runtime & Toolchain Versions
| Component | Supported Version / Constraint | Notes |
|---|---|---|
| PHP | ^8.5.0 (8.5+) |
Required baseline extensions: pdo, mbstring, tokenizer, xml, ctype, json, filter, openssl. Plus the PDO driver for your configured database (see below). |
| Composer | v2.x |
Strictly reproducible installs with composer.lock |
| Bun | ^1.2 / ^1.3 (1.2+) |
Fast package manager, scripts, and runtime |
| Node.js | >= 24.x |
Used by Vite+ toolchain and Playwright |
| Laravel | ^13.40.0 (Laravel 13) |
Core application framework |
| Inertia.js | ^3.0.6 (Laravel) / ^3.7.1 (React) |
Full-stack SPA bridge |
| React | ^19.3.0 (React 19) |
Frontend UI library |
| TypeScript | ^7.0.2 |
Typed frontend codebase and Wayfinder routes |
| Tailwind CSS | ^4.3.3 (Tailwind 4) |
CSS compiler & styling |
| Database Engines | SQLite 3.35+, MySQL 8.0+, PostgreSQL 16+ | Tested continuously across all 3 engines |
PHP Extension Requirements
The installer's preflight check requires the baseline runtime extensions on every installation:
pdo, mbstring, tokenizer, xml, ctype, json, filter, openssl
In addition, the PDO driver for the database you configure must be installed. Only the driver matching your DB_CONNECTION is required β you do not need all of them:
| Database Engine | Supported Version | Required PDO Extension |
|---|---|---|
| SQLite | 3.35+ | pdo_sqlite |
| MySQL / MariaDB | MySQL 8.0+ | pdo_mysql |
| PostgreSQL | 16+ | pdo_pgsql |
| SQL Server | Not specified | pdo_sqlsrv |
Development & CI Only Extensions
Coverage drivers such as pcov (or Xdebug) are optional and are only needed when you want to measure code coverage:
composer test:coverage
They are not part of the generated application's runtime requirements, are not installed by composer create-project, and are not checked by the installer preflight. CI enables pcov explicitly when running coverage jobs.
π Quick Start
1. Create a New Project
composer create-project tooinfinity/infinity-starter-kit my-app
During setup, the post-create-project-cmd hook will automatically:
- Generate your application encryption key.
- Initialize your local database (
database/database.sqlite). - Run database migrations.
- Trigger the interactive
php artisan install:featurescommand powered by Chisel.
2. Select Your Features
When prompted:
Which authentication features would you like to enable?
[x] Registration
[x] Email verification
[x] Two-factor authentication
Which optional modules should be installed?
[x] Authorization
[x] Settings
[x] User Management
[x] Localization
[x] Notifications
[x] Audit Trails
Select the features you want using Space, then press Enter.
3. Authorization & Super Admin (if enabled)
During interactive installation, authorization permissions and an administrator account are configured automatically. If you installed non-interactively, need to bootstrap a fresh production database, or updated the Permission or Role enums:
php artisan authorization:setup # Synchronizes permissions + Super Admin role
Note: Always run
php artisan authorization:setupbefore assigning thesuper-adminrole so that the role and permissions exist in the database.
To create the initial Super Admin interactively (with hidden password prompts and confirmation):
php artisan authorization:create-admin
Or pass --email and --name, piping the password via STDIN for non-interactive deployment automation:
echo "your-secure-password" | php artisan authorization:create-admin --name="Administrator" --email="admin@example.com" --no-interaction
To promote an existing registered user to Super Admin:
php artisan authorization:create-admin --email="admin@example.com"
4. Start Development
cd my-app
composer run dev
π οΈ Implemented Modules
π Authentication Module
| Feature | Description | Chisel Pruning |
|---|---|---|
| Registration | User registration form, routes, and user creation action. | Removes /register route, registration page, and login page register links. |
| Email Verification | Native Fortify verification flow (MustVerifyEmail), verification notice page, resend notifications. |
Strips MustVerifyEmail interface, removes verification controllers, views, and tests. |
| Two-Factor Authentication | TOTP / QR codes, recovery codes, security settings page, and 2FA challenge flow. | Strips TwoFactorAuthenticatable trait, removes 2FA routes, settings UI, controllers, and tests. |
| Account & Security | Login/logout, password reset, profile updates, password change, appearance settings. | Core β always retained. |
π‘οΈ Authorization & RBAC Module
A Policy-Free role-based access control system powered by spatie/laravel-permission, PHP string-backed enums, and Laravel Gates.
Architecture
Permission enum (source of truth)
β
βΌ
Spatie Permission models
β
Gate::before() ββ Super Admin bypass
β
Form Request authorize() ββ Per-endpoint access control
β
Inertia shared props ββ Frontend authorization data
β
useAuthorization() hook / <Can> component ββ UI helpers
Key Design Decisions
- No Policies β All authorization uses
Gate::before()for super-admin bypass, Spatie permission checks, and Form Requestauthorize()methods. - PHP Enums β
App\Enums\PermissionandApp\Enums\Roleare the single source of truth for permission/role identifiers. No magic strings. - Dedicated Setup Commands β
authorization:setupsynchronizes permissions and roles from PHP enums to the database. Initial Super Admin provisioning is handled during installation or via the runtimeauthorization:create-admincommand. - Frontend UI Helpers β
useAuthorization()hook and<Can>component read shared Inertia props. These are UI helpers only; server-side authorization is the actual security boundary.
Permission Enum
enum Permission: string { case AuthorizationManage = 'authorization.manage'; case UsersView = 'users.view'; case UsersCreate = 'users.create'; case UsersUpdate = 'users.update'; case UsersDelete = 'users.delete'; case UsersManageRoles = 'users.manage-roles'; case UsersManagePassword = 'users.manage-password'; case SettingsManage = 'settings.manage'; case AuditView = 'audit.view'; }
Add your own permissions by extending the enum. Run php artisan authorization:setup to synchronize.
Role Enum
enum Role: string { case SuperAdmin = 'super-admin'; }
Only super-admin is included in the starter kit. Add application-specific roles as needed.
Super Admin Bypass
Configured in AppServiceProvider via Gate::before():
Gate::before(function (User $user, string $ability): ?true { if ($user->hasRole(Role::SuperAdmin->value)) { return true; } return null; });
Form Request Authorization
Use the Permission enum in Form Request authorize() methods:
public function authorize(): bool { return $this->user()?->can(Permission::UsersCreate->value) ?? false; }
Frontend Authorization
useAuthorization hook:
const { can, canAny, canAll, hasRole } = useAuthorization(); if (can('users.create')) { /* ... */ } if (canAny(['users.update', 'users.delete'])) { /* ... */ } if (hasRole('super-admin')) { /* ... */ }
Can component:
<Can permission="users.create"> <Button>Create User</Button> </Can> <Can permissions={['users.update', 'users.delete']} mode="any"> <Button>Manage Users</Button> </Can>
Chisel Pruning
When authorization is disabled, Chisel removes:
HasRolestrait fromUsermodelGate::before()fromAppServiceProvider- Authorization shared props from
HandleInertiaRequests config/permission.phpand Spatie migrationsapp/Enums/Permission.phpandapp/Enums/Role.php- Both setup commands
- Frontend hook,
<Can>component, and authorization types - All authorization tests
π§© Chisel-Based Scaffolding & Feature Installation
The Infinity Starter Kit features a deterministic, declarative feature configuration and pruning system built on Laravel Chisel (matching the architecture of official starter kits like laravel/react-starter-kit). The system operates strictly as a one-time project generation and scaffolding tool. Once configured via php artisan install:features, Chisel prunes all unselected features, cleans up its own installer files (chisel.php, InstallFeaturesCommand.php, and Chisel requirements), leaving behind pure, zero-overhead Laravel application code.
Feature Categories
- Core (Permanent): Authentication foundation (Laravel Fortify), base layout, Inertia v3 infrastructure, React 19 application shell, shared UI primitives (shadcn/ui), TypeScript configs, and SQLite database foundation. Core functionality is never pruned.
- Optional Modules:
- Authorization (
authorization): Spatie Roles & Permissions, PHP enums, Gate super-admin bypass, frontend<Can>component anduseAuthorizationhook. - Settings (
settings): Key-value application settings storage,Settingmodel, settings controllers, forms, and pages. Settings (such as application name and display timezone) are dynamically applied per web request viaHandleSettingsmiddleware using a cached payload (settings.all); CLI commands and queued background workers rely on base environment configuration (.env/config/app.php). - User Management (
user-management): Administrative user directory, creation/edit modals, role assignment, user activation/deactivation. - Localization (
localization): Trilingual support (EN, FR, AR), RTL layout switching,Localeenum,LanguageSelectorcomponent, and@erag/lang-sync-inertia. - Notifications (
notifications): Database and email notification center, user preference toggles, notification dropdown and bell. - Audit Trails (
audit-trails): Searchable activity log tracking user actions, IP addresses, user agents, and timestamps, with automated retention pruning and transactional PII anonymization on account deletion.
- Authorization (
πΊοΈ Feature Compatibility Matrix
| Module | Identifier | Description | Required Dependencies | Optional Dependencies | Composer Packages | Frontend Packages (Bun) | Permissions | Default | Capabilities |
|---|---|---|---|---|---|---|---|---|---|
| Authorization | authorization |
Policy-free role-based access control powered by Spatie Permission, PHP enums, and super-admin gate bypass. | β | β | spatie/laravel-permission |
β | authorization.manage |
Enabled | Role & permission management, Super-admin gate bypass, Inertia shared auth props, component & useAuthorization hook |
| Settings | settings |
Key-value application settings storage with per-request caching and dynamic runtime configuration. | authorization |
β | β | β | settings.manage |
Enabled | Key-value settings storage, Cached per-request runtime resolution, Application name & timezone configuration, Settings management UI |
| User Management | user-management |
Administrative user directory with user creation, profile editing, role assignment, and lifecycle controls. | authorization |
β | β | β | users.view, users.create, users.update, users.delete, users.manage-roles, users.manage-password |
Enabled | User directory listing & filtering, User creation & editing, Role assignment & self-protection, Account activation & deactivation, Password management |
| Localization | localization |
Trilingual localization with real-time language switching, RTL layout support, and Inertia translation sync. | β | β | erag/laravel-lang-sync-inertia |
@erag/lang-sync-inertia |
β | Enabled | Trilingual support (EN, FR, AR), RTL layout auto-switching, Language selector component, Persistent guest & user locale cookie, Inertia translation synchronization |
| Notifications | notifications |
Database and email notification system with user channel preferences and interactive notification center. | β | β | β | β | β | Enabled | Database & email notifications, User notification channel preferences, Header bell & interactive dropdown, Mark all as read & batch prune, Security event alerts |
| Audit Trails | audit-trails |
Security audit logging capturing actor context, IP addresses, events, and automated retention pruning. | authorization |
β | spatie/laravel-activitylog |
β | audit.view |
Enabled | Security & activity event tracking, Actor, IP, and user agent recording, Searchable audit log viewer, Automated log pruning command |
π¦ Installation Flow
During composer create-project, the post-create-project-cmd hook triggers php artisan install:features, prompting:
Which authentication features would you like to enable?
[x] Login
[x] Logout
[x] Registration
[x] Email verification
[x] Password reset
[x] Password update
[x] Two-factor authentication
Which optional modules should be installed?
[x] Authorization
[x] Settings
[x] User Management
[x] Localization
[x] Notifications
[x] Audit Trails
Include AI assistant guidelines?
[x] AI assistant guidelines (.claude, .cursor, AGENTS.md, ...)
Non-Interactive Installation (--answers)
For continuous integration, automation scripts, and reproducible setups, pass an inline JSON object to --answers with --no-interaction:
php artisan install:features \
--answers='{"auth_features":["login","logout","registration","email-verification","password-reset","password-update"],"optional_modules":["authorization","settings","user-management","notifications"]}' \
--no-interaction
Configuration Contract & Schema
- Interactive Default: When
--answersis omitted, the installer runs the interactive flow. - Strict Non-Interactive Mode: In non-interactive mode (
--no-interaction), the--answersoption is required. Prompts are never triggered. - Required Keys:
--answersmust supply bothauth_featuresandoptional_modulesas arrays. Missing keys or unknown feature names fail immediately before any filesystem mutation occurs. - Secure Administrator Handling: Administrator passwords cannot be provided via
--answersor command-line options. In non-interactive installations whereauthorizationis enabled, the installer skips interactive admin account prompts. After installation, create an initial administrator securely using:echo "SecurePassword123" | php artisan authorization:create-admin --name="Admin" --email="admin@example.com" --stdin
Supported JSON Schema
{
"auth_features": [
"login",
"logout",
"registration",
"email-verification",
"password-reset",
"password-update",
"two-factor"
],
"optional_modules": [
"authorization",
"settings",
"user-management",
"localization",
"notifications",
"audit-trails"
],
"ai_guidelines": [
"guidelines"
]
}
auth_features(array of strings, required): Authentication capabilities to retain.optional_modules(array of strings, required): Starter kit modules to retain. Dependencies are validated before pruning (e.g.user-managementrequiresauthorization).ai_guidelines(array or boolean, optional): Pass["guidelines"]ortrue(default) to keep AI guidelines. Pass[]orfalseto prune all maintainer AI configuration files (.agents,.ai,.amp,.claude,.codex,.cursor,.gemini,.junie,.mcp.json,AGENTS.md,CLAUDE.md,GEMINI.md,opencode.json,boost.json).
Unselected modules and declined guidelines have all exclusive code, routes, permissions, translations, and configs cleanly pruned.
Post-Installation Self-Cleanup
Upon finishing execution, Chisel automatically cleans up the repository:
- Strips
@php artisan install:features --ansiand"laravel/chisel"fromcomposer.json. - Formats all PHP code using Laravel Pint (
vendor/bin/pint --format agent). - Re-generates Wayfinder typed routes and actions (
php artisan wayfinder:generate --with-form --no-interaction). - Deletes
chisel.php,chisel-paths.php,app/Console/Commands/InstallFeaturesCommand.php,app/Console/Commands/SetupAdminUserCommand.php, and Chisel installer tests.
Note:
InstallFeaturesCommand,SetupAdminUserCommand,chisel.php, andchisel-paths.phpare installer-only infrastructure. They are used while creating the application viacomposer create-projectand are automatically removed from the generated application after successful installation. Your generated project will not contain any of these files.SetupAuthorizationCommandandCreateAdminCommandare persistent runtime commands that remain available in the generated application when Authorization is enabled.
ποΈ Installer Architecture & Responsibilities
The starter kit separates installer concerns into data, behavior, and orchestration:
- Feature Metadata (
App\Chisel\FeatureRegistry) β The authoritative single source of truth for all feature definitions (FeatureDefinition), paths, dependencies, Composer packages, and npm packages. - Dependency Validation (
App\Chisel\Installer\DependencyValidator) β Pre-mutation validation that verifies required module dependencies and fails fast before mutations occur. - Composer Manifest & Lock Synchronization (
App\Chisel\Installer\ComposerManifestPruner,App\Chisel\Installer\ComposerLockSynchronizer) β Modifiescomposer.jsonrequirements and synchronizescomposer.lockvia dynamic candidate discovery. - Directory & Frontend Pruning (
App\Chisel\Installer\DirectoryPruner,App\Chisel\Installer\FrontendPackagePruner,App\Chisel\Installer\FeaturePruner) β Handles safe directory pruning respecting protected directories and npm package pruning supportingLARAVEL_INSTALLER_NO_NODE. - Config & Infrastructure Cleanup (
App\Chisel\Installer\ConfigCleaner,App\Chisel\Installer\Cleanup) β Cleans PHPStan NEON, PHPUnit XML, strips installer files, and ensures zero runtime installer overhead. - Chisel Orchestration (
chisel.php) β Pure orchestration layer defining CLI prompts, life cycle, and feature delegation. - Chisel Paths (
chisel-paths.php) β Framework-specific path configuration sourced authoritatively fromFeatureRegistry.
β Developer Checklist: Adding a New Scaffolding Feature
Adding a new optional module or feature is simple and declarative:
- Register Feature in
FeatureRegistry: Add aFeatureDefinitiontoApp\Chisel\FeatureRegistry::optionalModules()defining itskey,label,sectionMarker,markerFiles,exclusiveFiles,emptyDirectories,composerPackages,frontendPackages, anddependencies. - Wire in
chisel.php: The questions and dependency validation automatically discover features fromFeatureRegistry. Wire the feature handler via->selected('optional_modules', '<key>', then: fn($c) => FeaturePruner::applySelected($c, $feature), else: fn($c) => FeaturePruner::pruneUnselected($directory, $c, $feature)). - Handle Shared Packages:
Use
->selectedAny('optional_modules', ['<feature1>', '<feature2>'], else: ...)for packages shared across multiple features. - Wrap Shared Code in Markers:
Surround feature-specific routes, sidebar items, and type definitions with
/* @chisel-<tag> */and/* @end-chisel-<tag> */. - Verify with Pint & Pest:
Run
vendor/bin/pint --format agentandphp artisan test.
π§ͺ Testing & Quality Control
Pre-Merge Verification (Complete Gate)
The authoritative pre-merge verification command runs linting, static analysis, type coverage, and the complete test suite with a 100% code coverage requirement:
# Complete authoritative pre-merge gate composer test
Fast Local Commands
During active development, run targeted, fast local commands without redundant coverage or setup overhead:
# Fast parallel test run across all unit and feature tests (no coverage overhead) composer test:quick # Invariant, database-independent unit and architecture tests composer test:unit # Database-sensitive feature and query tests composer test:database # Invariant quality checks (linting, types, type coverage, unit tests) composer test:quality # Dependency compatibility and resolution verification composer test:dependencies # End-to-end browser tests (Playwright) composer test:browser # Full suite code coverage verification (100% required) composer test:coverage
Feature Combination Verification
To guarantee that generated applications pass composer test with 100% type and code coverage across feature combinations:
# Verify a specific feature combination in an isolated temporary environment bash scripts/verify-combo.sh '{"auth_features":["login","logout"],"optional_modules":["authorization"]}' # Generate matrix configurations for CI or local runs (tiers: fast, pairwise, full) php scripts/combos.php fast php scripts/combos.php pairwise
Performance Budgets for Generated Applications
Lightweight, deterministic performance budgets are established and continuously verified for representative generated application profiles (minimal, default, full):
- Deterministic Query Budgets: Zero-query guarantee for
minimalcanonical endpoints (GET /,GET /login,GET /dashboard), and bounded query ceilings fordefaultandfullabsorbingHandleSettingsmiddleware, permissions, roles, and unread notifications. - Frontend Production Bundle Ceilings: Strict byte budgets for entry JavaScript (
resources/js/app.tsx), entry CSS (resources/css/app.css), and total built bundle assets. - Flaky Timing Exclusion: Strictly deterministic metrics (query counts and file sizes) preventing flaky false positives on shared CI runners.
For complete baselines, metrics, and policy for updating budgets, see docs/performance-budgets.md.
CI Pipeline Architecture
Continuous Integration separates database-independent invariant checks from the database integration matrix:
quality(runs once): Installs dependencies, builds frontend assets, runs Pint/Rector/Vite+ linting, PHPStan & TypeScript checks, Pest type coverage (100%), database-independent unit & architecture tests, and full code coverage verification (100%).dependencies(runs once): Verifies clean backend and frontend dependency resolution, strict lockfile reproducibility, supported PHP/toolchain constraints, and critical framework integration compatibility (package discovery, Wayfinder routes, asset compilation) without relying on pre-cached vendor or package stores.database(matrix: SQLite, MySQL, PostgreSQL): Exercises database-sensitive feature and query behavior across supported database engines without repeating frontend, lint, or static-analysis overhead.browser(runs once): Executes browser end-to-end tests on the canonical test database with Playwright.combos(matrix: tiered combinations): Verifies generated projects across optional feature combinations.
Architecture Constraints (Pest Arch)
The starter kit enforces structural and architectural boundaries through executable Pest architecture tests in tests/Unit/ArchTest.php:
- Controllers:
- Application controllers in
app/Http/Controllersmust befinalandreadonly. - Controllers must not be directly invoked or used by other classes in application code.
- Application controllers in
- Actions:
- Actions in
app/Actionsmust befinal,readonly, and expose ahandle()method. - Actions expose
handle()as their only public operation (with documented exceptionUpdateSettings::set()for single setting updates). - Actions adhere to CRUD naming prefix conventions (
Create,Update,Delete) with documented intentional exceptions (RecordAuditTrail,MarkAllNotificationsAsRead,MarkNotificationAsRead). - Actions never return or depend on HTTP responses (
RedirectResponse,JsonResponse, etc.).
- Actions in
- Enums:
- All application enums must be defined in
app/Enums, must be string-backed, and no enums may exist outsideapp/Enums.
- All application enums must be defined in
- Installer & Chisel Boundaries:
- Runtime application code (
Actions,Http,Models,Queries,Enums,Rules,Services,Notifications,Data,Providers) must never depend on installer-only Chisel infrastructure (App\Chisel,Laravel\Chisel). - Runtime console commands must not depend on Chisel infrastructure (only installer commands
InstallFeaturesCommandandGenerateFeatureDocsCommandmay use Chisel).
- Runtime application code (
- Cross-Feature Modular Boundaries:
- Optional feature modules follow strict acyclic dependency rules:
audit-trailsdoes not depend onuser-management.settingsdoes not depend onuser-management.notificationsdoes not depend onaudit-trailsorsettings.localizationdoes not depend on other optional feature modules.
- Optional feature modules follow strict acyclic dependency rules:
- Test Suite Organization:
- HTTP controller and middleware tests belong strictly in
tests/Feature, never intests/Unit.
- HTTP controller and middleware tests belong strictly in
π Key Directory Structure
βββ app/
β βββ Actions/ # Reusable business logic actions
β βββ Console/Commands/ # Artisan commands
β β βββ CreateAdminCommand.php # π‘οΈ Super Admin user creation & promotion
β β βββ GenerateFeatureDocsCommand.php # βοΈ Installer-only (removed after install)
β β βββ InstallFeaturesCommand.php # βοΈ Installer-only (removed after install)
β β βββ SetupAuthorizationCommand.php # π‘οΈ Authorization runtime synchronization
β β βββ SetupAdminUserCommand.php # βοΈ Installer-only (removed after install)
β βββ Data/ # Spatie Data transfer objects
β βββ Enums/ # PHP string-backed enums
β β βββ AuditEvent.php
β β βββ Permission.php
β β βββ Role.php
β βββ Http/
β β βββ Controllers/ # Inertia HTTP controllers
β β β βββ AuditTrails/
β β β βββ Users/
β β βββ Middleware/ # HandleInertiaRequests (shares auth data)
β β βββ Requests/ # Form Requests with authorize() & validation
β βββ Models/ # Eloquent models (User, Activity, Setting)
β βββ Queries/ # Read-only query & export services
β β βββ AuditTrails/
β β βββ Users/
β βββ Providers/ # AppServiceProvider (Gate::before)
βββ chisel.php # βοΈ Installer-only feature pruning (removed after install)
βββ config/
β βββ fortify.php
β βββ permission.php # Spatie Permission config
βββ database/migrations/ # Users, Audit Trails, Settings, Permissions
βββ lang/ # Localized translations (en, fr, ar)
βββ resources/js/
β βββ components/
β β βββ can.tsx # <Can> authorization component
β βββ hooks/
β β βββ use-authorization.ts # useAuthorization() hook
β βββ types/
β βββ auth.ts # Auth type with permissions/roles
βββ tests/
βββ Feature/
β βββ Authorization/ # RBAC + command tests
βββ Unit/
βββ Enums/ # Enum tests
π License
This starter kit is open-sourced software licensed under the MIT license.