AuthForge is a production-grade, modular RBAC starter kit built on Laravel 12. To ensure high maintainability, it avoids the standard Laravel directory bloat by segregating logic into the app/Modules/RBAC namespace. This kit provides a complete dashboard for managing Users, Roles, and Permissions with real-time UI interactions powered by Alpine.js.
- Framework: Laravel 12 (PHP 8.3)
- Database: PostgreSQL (Docker-based)
- Frontend: Blade Templates + Alpine.js (Lightweight Interactivity)
- Styling: Tailwind CSS (Lucid & Modern UI)
- Virtualization: Docker & Docker Compose (Nginx + PHP-FPM + Postgres)
app/Modules/RBAC/
├── Actions/ # Pure business logic (e.g., CreateRoleAction, AssignRoleAction)
├── Controllers/ # Thin orchestrators (RoleController, UserController, PermissionController)
├── Models/ # Database entities (Role, Permission)
├── Traits/ # Shared logic (HasRolesAndPermissions on User model)
└── ...
- Dynamic RBAC: Create permissions and roles on the fly via the dashboard.
- Permission Middleware: Route-level protection using
permission:resource.action. - Super Admin Gate: Instant access for
super-adminrole viaGate::before. - Modern Login Flow: Beautiful, secure, and responsive custom login interface.
- Docker Ready: One-command setup for the entire development environment.
- Docker & Docker Compose installed.
- Clone the repository.
- Run the environment setup:
docker compose up -d
- Run migrations and seeders:
docker compose exec app php artisan migrate:fresh --seed - Access the dashboard at
http://localhost:8000/login.- User:
superadmin@example.com - Password:
password
- User:
- Thin Controllers: Controllers only handle requests and responses; all logic resides in Actions.
- Alpine.js Modals: Zero page reloads for CRUD operations while maintaining a server-side rendered (SSR) core.
- PostgreSQL: Chosen for its robust support for relational integrity and industrial throughput.
AuthForge © 2026. Built for scalability.