akrista / bizkit
Batteries included starter kit for any laravel project.
Requires
- php: ^8.5
- dedoc/scramble: ^0.13.33
- filament/filament: ^5.6.8
- laravel/ai: ^0.7.2
- laravel/fortify: ^1.37.2
- laravel/framework: ^13.19.0
- laravel/horizon: ^5.47.2
- laravel/octane: ^2.17.5
- laravel/pennant: ^1.24
- laravel/prompts: ^0.3.21
- laravel/pulse: ^1.7.4
- laravel/reverb: ^1.10.2
- laravel/tinker: ^3.0.2
- league/flysystem-aws-s3-v3: 3.0
- livewire/flux: ^2.15.0
- livewire/livewire: ^4.3.3
- nunomaduro/termwind: ^2.4
- spatie/laravel-permission: ^8.3
- wildside/userstamps: ^4.0
Requires (Dev)
- barryvdh/laravel-ide-helper: ^3.7
- driftingly/rector-laravel: ^2.5
- fakerphp/faker: ^1.24.1
- larastan/larastan: ^3.10.0
- laravel/boost: ^2.4.12
- laravel/pail: ^1.2.7
- laravel/pao: ^1.1.2
- laravel/pint: ^1.29.3
- laravel/sail: ^1.63
- mockery/mockery: ^1.6.12
- nunomaduro/collision: ^8.9.4
- pestphp/pest: ^4.7.5
- pestphp/pest-plugin-browser: ^4.3.1
- pestphp/pest-plugin-laravel: ^4.1
- pestphp/pest-plugin-type-coverage: ^4.0.4
- phpunit/phpunit: ^12.5.30
- rector/rector: ^2.5.6
- roave/security-advisories: dev-latest
README
Bizkit is a batteries-included Laravel starter kit based on Laravel Starter Kits. It is designed to serve as a complete and robust baseline to rapidly bootstrap both complex and simple Laravel applications.
Bizkit is a personal Laravel starter kit built for visual excellence, modern reactivity, and developer ergonomics. While built primarily as a personal foundation, contributions are welcome, and the project is fully licensed under the MIT license.
Key Features
🚀 Performance & Real-time
- Octane with FrankenPHP: Pre-configured high-performance application serving with FrankenPHP.
- Reverb: Native, lightning-fast WebSockets for real-time Laravel broadcasting.
- Horizon: Beautiful Redis queue monitor dashboard to oversee job processing.
- Pulse: Real-time application performance and resource monitoring. Database support: MySQL, MariaDB, or PostgreSQL only — Pulse is not compatible with SQLite/MSSQL.
🛡️ Authentication & Security
- Robust Authentication: Powered by Laravel Fortify featuring secure registration, email verification, and password resets.
- Passkey/WebAuthn: Out-of-the-box native passwordless authentication.
- Two-Factor Authentication (2FA): One-Time Password (OTP) verification with TOTP & recovery codes.
- Granular Permissions & Roles: Tenancy-aware database-driven authorization powered by Spatie Laravel Permission, featuring automatic policy generation and dynamic permissions synchronization.
🛠️ Developer Experience & Architecture
- Interactive UI: Powered by Livewire v4 and beautiful Flux UI components.
- API Routing & Documentation: Integrated API routing with automatic interactive documentation via Dedoc Scramble and Scalar.
- S3 Filesystem: Pre-configured support for AWS S3 file storage.
- Production-Ready Docker: Containerized with a multi-stage Alpine Linux image running FrankenPHP, Supervisor, and Supercronic scheduler.
- Feature Flags: Native feature flagging and targeting built with Laravel Pennant.
- Quality Baseline: Pre-configured linting, analysis, and testing using Pint, Rector, Larastan, and Pest PHP.
Authorization & Roles
Bizkit uses a hybrid, team-scoped authorization layer built on top of Spatie Laravel Permission.
Architecture
- Gate-Level Scoping: Dynamically registers a
Gate::beforecallback that scopes all authorization checks (e.g.$user->can()) to the active team (current_team_id). - Super Admin Bypass: Allows administrators matching
config('bizkit.admin_email')or possessing the Spatieadminrole to bypass policy checks. - Dynamic Fallbacks: Checks database-configured roles/permissions first and falls back to static
TeamRole/TeamPermissionenums if not found in the DB.
Artisan Commands
- Sync Permissions: Seed all registered permissions (resources, pages, widgets, custom) and automatically map them to any
adminrole:php artisan bizkit:sync-permissions
- Generate Policies: Scaffold policies for your models using a predefined stub mapping Eloquent resource actions to Spatie permissions:
php artisan bizkit:generate-policies [--force]
Upstream Upgrade System
To ensure that projects started with Bizkit can receive upstream template updates with minimal friction, Bizkit features an interactive self-updating CLI tool. It compares your local code against the lighthouse repository and lets you selectively merge improvements.
Usage Commands
Ensure your Git working tree is clean before running upgrades:
# 1. Dry run (preview pending changes only) php artisan bizkit:upgrade --dry-run # 2. Perform interactive merge comparing against the latest stable release php artisan bizkit:upgrade # 3. Pull bleeding-edge updates from the development branch php artisan bizkit:upgrade --dev
When file differences are detected, the command runs an interactive diff selection where you can choose whether to keep your custom code or adopt the upstream version. The sync state is recorded in bizkit.json.
Installation & Setup
Prerequisites
Ensure you have PHP 8.5+, Composer, Git, and Bun installed globally.
Important
Windows Users: Because Laravel Horizon requires pcntl and posix extensions (which are not natively supported on Windows), use the Manual Installation section below with the --ignore-platform-reqs flag. Horizon itself will not run on Windows — skip it or run your app via WSL/Herd if you need a queue worker.
One-Command Install (Recommended)
The fastest way to bootstrap a new project from Bizkit is via the official Laravel installer. This single command scaffolds a new project called test, pulls Bizkit as the template, installs JS/TS assets with Bun, and initializes a Git repository:
laravel new test --using=akrista/bizkit --bun --git
Flag breakdown:
--using=akrista/bizkit— Pulls Bizkit from Packagist as the project template.--bun— Installs frontend dependencies with Bun and runs the initial asset build.--git— Initializes a Git repository and creates the initial commit.
Tip
The Laravel installer automatically runs php artisan key:generate and migrates the database, so you can skip composer run setup for a quick start. Run it afterwards only if you need the full Bizkit bootstrap (Octane, Husky hooks, IDE helpers, etc.).
Manual Installation
If you prefer explicit control over each step, bootstrap Bizkit via Composer instead:
-
Bootstrap the project:
# macOS / Linux / WSL composer create-project akrista/bizkit my-awesome-app # Windows (Horizon requires pcntl/posix, unavailable on Windows) composer create-project --ignore-platform-reqs akrista/bizkit my-awesome-app
cd my-awesome-app -
Initialize services and build assets:
composer run setup
-
Start the local development environment:
composer run dev
Git Hooks (Husky)
Bizkit uses Husky to automate code style checks before commits are finalized. The pre-commit hook automatically runs Laravel Pint (composer lint:check) on staged files.
These hooks are configured automatically during composer run setup (which calls bun install), but you can also manually set them up or re-enable them by running:
bun run prepare
Troubleshooting: Git Hooks / Husky on Windows (Laravel Herd)
If you encounter composer: command not found or php: command not found errors during git commit (caused by Husky executing in a bash environment that cannot natively run Windows .bat files), create extensionless shell wrappers in your Herd bin directory (C:\Users\<YourUser>\.config\herd\bin):
-
Composer Wrapper (
composer):#!/bin/sh php "$(dirname "$0")/composer.phar" "$@"
-
PHP Wrapper (
php):#!/bin/sh PHP_EXE=$(grep -o '"[^"]*"' "$(dirname "$0")/php.bat" | head -n 1 | tr -d '"') exec "$PHP_EXE" "$@"
Docker Deployment
Bizkit comes with a production-ready, high-performance Docker setup powered by FrankenPHP and Supervisor.
1. Running with Docker Compose
To spin up the application stack locally:
- Copy the example Compose file:
cp compose.example.yml compose.yml
- Configure your Environment:
Make sure you have a
.envfile generated withcomposer run setupor by copying.env.example. - Start the containers:
docker compose up --build -d
By default, this launches two services:
bizkit-app: FrankenPHP web server listening on port8000.bizkit-scheduler: Supervisor-managed container running Laravel's task scheduler.
2. HTTPS & SSL Requirements (Critical for Production)
For any production or public deployment, Bizkit must be served over HTTPS.
Why HTTPS is Required
- Passkeys / WebAuthn: Browser security specifications strictly restrict WebAuthn APIs to secure contexts (HTTPS). Passkey registration and login will fail entirely on unencrypted HTTP.
- Two-Factor Authentication (2FA) & Session Security: Secure session cookies and 2FA credential transfers require SSL to prevent intercept attacks.
Production SSL Setup
To deploy securely, you should place Bizkit behind a reverse proxy or SSL termination layer (e.g., Traefik, Nginx, Cloudflare, or a frontend Caddy load balancer):
- Proxy Configuration: Direct your external proxy to route HTTPS traffic (port
443) to port8000(HTTP) of thebizkit-appcontainer. - Environment Variables: Update the following variables in your production
.envfile:APP_URL=https://your-domain.com OCTANE_HTTPS=true
SettingOCTANE_HTTPS=trueensures Laravel correctly generateshttps://URLs for assets, routing redirects, and secure cookies. - HSTS (HTTP Strict Transport Security):
The
deployment/Caddyfileincludes high-security headers. For production, you should uncomment the HSTS header in the Caddyfile:Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
[!WARNING] Do not uncomment HSTS during local development, or browsers will cache the rule and prevent access to local IP/localhost connections over HTTP, resulting in
SSL_ERROR_RX_RECORD_TOO_LONGerrors.
Future Roadmap
The following features are planned for future releases of Bizkit:
- 📖 Application Documentation: A comprehensive documentation site/viewer built into the kit.
- 🔗 Webhooks: Outbound webhooks and subscription management for integrations.
- 🔑 Permissions & Roles (Completed): Advanced granular access control out of the box.
Project Structure
├── app/
│ ├── Actions/Fortify/ # Fortify registration and 2FA logic
│ ├── Http/Responses/ # Custom Fortify response overrides
│ ├── Livewire/ # Interactive Livewire components
│ ├── Models/ # Core Eloquent models (User, Team, Membership)
│ └── Console/Commands/Upgrade/ # Downstream upgrade system code
├── config/ # Application configuration overrides
├── database/migrations/ # Fortify, Passkeys, Pulse, and Teams tables
├── deployment/ # Docker deployment configs (Caddyfile, supervisord)
├── resources/views/ # Blade views and Flux UI layouts
└── bizkit.json # Local upgrade status receipt
License
Bizkit is open-sourced software licensed under the MIT license.
TODO
A consolidated backlog of work for this project. Items are grouped by status and source so contributors can pick up where scaffolding left off.
Declared Roadmap (from "Future Roadmap" section)
- Application Documentation — Build an in-app documentation site/viewer for the kit (routes, components, and a renderer that scans the codebase to produce reference pages).
- Webhooks — Implement outbound webhook delivery and a subscription management UI so apps can broadcast events to third parties with retries, signing, and logs.
- Permissions & Roles — Add an advanced, granular access-control layer on top of the existing
TeamPermission/TeamRoleenums, including aPermissiontable, gate definitions, and a policy generator.
Partially Implemented (scaffolding present, finish needed)
- AI / Agent scaffolding — Stubs exist in
stubs/(agent.stub,structured-agent.stub,tool.stub,agent-middleware.stub) and theagent_conversationsmigration is shipped, but there is nomake:agentArtisan command, no example agents underapp/Ai/, and noagent_conversationsmodel/relations. Wire these up so the kit can actually generate and run agents. - Filament admin panel —
app/Providers/Filament/AdminPanelProvider.phpandconfig/filament.phpare present, but noapp/Filament/Resources, Pages, or Widgets are committed. Add a baseline admin shell (e.g.,UserResource,TeamResource) and document how to extend it. - Upstream upgrade CLI —
php artisan bizkit:upgradeis wired throughapp/Console/Commands/UpgradeCommand.phpwithFileClassifier+FileStatus, butbizkit.jsoncurrently only tracks{version, repository}. Add a per-file sync state map and a--status/--resetsubcommand to introspect or clear it. - API surface —
routes/api.phponly exposes the default/userSanctum endpoint. Add versioned API routes (routes/api/v1.php) with a token-issuing endpoint, and configure Scramble + Scalar to document them. - Dashboard page —
resources/views/dashboard.blade.phpis the only authenticated landing page and currently shows the placeholder. Build a real dashboard view (stats cards, recent activity) that demonstrates the layout. - Welcome page polish —
resources/views/welcome.blade.phpis a marketing surface; add the hero, feature grid, and footer sections referenced in the kit's design language.
Auth, Security & Teams (extending what exists)
- Passkey UX tests — Only the
SecurityTestcovers 2FA. Add feature tests for passkey registration, passkey login, and passkey removal flows. - Team invitations —
TeamInvitationTestexists, but there is no test for invitation expiry, reuse-after-acceptance, or email throttling. Cover these edge cases. - Team-switcher component —
resources/views/components/team-switcher.blade.phpis present; verify it works end-to-end with the team-scoped routes andSetTeamUrlDefaultsmiddleware, then add a regression test. - Session/device management — Add a "Sessions" section under
settings/securitylisting and revoking active sessions/devices.
Quality, Tooling & CI
- Bring CI in line with composer —
composer.jsonrequires PHP^8.3, butboost.jsonand the README claim 8.5, andtests.ymlonly matrixes 8.3/8.4/8.5. Pin a single supported floor (8.3) in docs and align the matrix. - Bun vs npm in CI —
.github/workflows/tests.ymlusesnpm i/npm run build, but the project depends on Bun (per README andcomposer.jsonscripts). Switch CI tobun install/bun run buildto match local development. - Lint workflow coverage —
.github/workflows/lint.ymlonly runs Pint viacomposer lint; it skips Rector, Larastan, and Pest. Wire the fullcomposer testscript into CI (or add a separateci.yml) so type coverage and static analysis are gated. - Type coverage gate —
composer.jsonexposestest:type-coverageat 100%, but the gate isn't enforced in CI. Add acomposer ci:checkjob. - Browser tests —
pestphp/pest-plugin-browseris a dev dependency but notests/Browser/directory exists. Add at least one smoke test (e.g., login → dashboard) to validate JS-rendered flows. - Filament tests — No tests exist for the (planned) Filament resources. When added, include
arch()coverage so admin classes follow the kit's conventions.
Deployment & Infrastructure
- Compose example —
compose.example.ymlexists, but there's no publishedcompose.ymlfor Laravel Cloud / local Docker Compose workflows. Promote it and document the env vars. - Laravel Cloud readiness —
boost.jsonenablescloud: true; add acloudworkflow file (or document the deploy command) and verifyherd.ymlworks for Laravel Cloud. - Nightwatch toggle —
boost.jsonhasnightwatch: false; add a contributor note for when to flip it and whichNIGHTWATCH_*env vars must be set. - FrankenPHP supervisor profiles —
deployment/has split files (supervisord.frankenphp.conf,.horizon.conf,.reverb.conf,.scheduler.conf,.worker.conf,.services.conf,.inertia.conf). Consolidate the README's "Production-Ready Docker" section to list exactly which supervisord configs ship and in which combinations.
Developer Experience
-
composer run setupsmoke test — Confirm the setup script works on a fresh clone (creates.env, generates key, migrates, installs Bun packages, builds assets) and capture any missing prerequisites (Bun, Node) in aCONTRIBUTINGtroubleshooting table. -
bizkit:upgradedocumentation — Document the interactive diff UI, thebizkit.jsonschema, and the conflict-resolution rules in the README. - Local Octane guide — Octane is installed but no
composer run octanescript exists. Add one (e.g.,php artisan octane:start --watch) and a one-paragraph guide. - Reverb dev recipe — Add
php artisan reverb:startto thedevscript alongside the queue, vite, and pail watchers. - Pint preset —
pint.jsonexists; document the rule overrides and add apint.jsoncomment block explaining which Laravel preset is used.
Documentation
- Architecture decision records — Create
docs/adr/(or similar) covering: Octane+FrankenPHP choice, team-scoped routing, Pennant for feature flags, and AI SDK integration shape. - Stubs reference — Document each stub in
stubs/(what command consumes it, what gets generated, and an example of the produced class). - README badges — Add CI status, code coverage, and Packagist download badges near the existing version badges.
- License file — README links to
LICENSE.mdbut onlyLICENSEis present. Either rename or update the link. - CONTRIBUTING guide —
CONTRIBUTINGfile exists (no extension); rename toCONTRIBUTING.mdso GitHub renders it.
Nice-to-have
- Activity log integration —
spatie/laravel-activitylogis not installed; if team actions need an audit trail, add it as an opt-in package with a migration stub. - Billing / Cashier — Decide whether Stripe / Paddle integration is in scope; if yes, ship a
composer require laravel/cashierrecipe. - Marketing site generator — Provide a
php artisan bizkit:make:landingcommand that scaffolds apages/marketing/*.blade.phpset using Flux UI primitives. - Theming — Add dark/light theme tokens in
resources/css/(Tailwind v4) and document how to brand a Bizkit app.