haohuynh123-cola / laravel-blueprint
Scaffold production-ready Laravel projects with your choice of starter kit, database, queue, and extras โ like go-blueprint, but for Laravel.
Package info
github.com/haohuynh123-cola/Laravel-Blueprint
pkg:composer/haohuynh123-cola/laravel-blueprint
Requires
- php: ^8.2
- laravel/prompts: ^0.3
- symfony/console: ^7.0
- symfony/filesystem: ^7.0
- symfony/process: ^7.0
Requires (Dev)
- laravel/pint: ^1.18
- pestphp/pest: ^3.0
- phpstan/phpstan: ^2.0
README
One command, your Laravel stack. Pick a starter kit, database, and the extras you actually use โ get a runnable, opinionated, production-ready Laravel project in seconds.
Inspired by go-blueprint, but for Laravel.
๐ Live configurator: haohuynh123-cola.github.io/Laravel-Blueprint โ click options, copy the command.
๐ฆ Packagist: haohuynh123-cola/laravel-blueprint
Quick start โ pick the install that fits you
curl | bash โ no Composer needed, just PHP
curl -sSL https://raw.githubusercontent.com/haohuynh123-cola/Laravel-Blueprint/main/install.sh | bash
blueprint new
Downloads the single-file phar from the latest GitHub Release and drops it into /usr/local/bin/blueprint. Override with INSTALL_DIR=~/bin VERSION=v0.4.0 bash if needed.
npx โ no install at all
npx laravel-blueprint new my-app
Spawns the phar via Node โ handy if you're already in a JS project. Requires PHP 8.2+ on your PATH.
Homebrew โ macOS / Linux
brew tap haohuynh123-cola/laravel-blueprint brew install laravel-blueprint blueprint new
Pulls PHP if missing, installs the matching phar, puts blueprint on your PATH. Update with brew upgrade laravel-blueprint.
Docker โ zero PHP install
docker run --rm -it -v "$PWD:/work" -w /work \
ghcr.io/haohuynh123-cola/laravel-blueprint new my-app
Image bundles PHP 8.3 + Composer + Node + git. Multi-arch (amd64 + arm64). Tag latest or pin :0.5.0. The bind-mount drops the generated project in your current directory.
Composer โ the canonical PHP way
composer global require haohuynh123-cola/laravel-blueprint blueprint new
PATH: if
blueprintsayscommand not found, add Composer's global bin:echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
The wizard walks you through every choice, then scaffolds the project.
What you get
A Laravel project that's already wired up the way you wanted โ no manual composer require X && php artisan Y:install chains.
- Base install โ current stable Laravel via
composer create-project - Starter kits โ Breeze ยท Jetstream ยท Filament (each installed and configured for your chosen frontend)
- Frontend stacks โ Blade ยท Livewire ยท Inertia + Vue ยท Inertia + React ยท API only
- Database โ MySQL ยท PostgreSQL ยท SQLite ยท MariaDB (
.envrewritten, SQLite file created) - Cache โ Database ยท File ยท Redis ยท Memcached
- Queue โ Sync ยท Database ยท Redis ยท Beanstalkd ยท SQS ยท RabbitMQ (Redis/RabbitMQ auto-install their driver packages)
- Extras โ Horizon ยท Telescope ยท Pulse ยท Octane ยท Scout ยท Sanctum ยท Pint ยท Larastan ยท Dusk ยท Sail
- Docker โ production Dockerfile + nginx + php.ini, or Sail dev environment, or both
- CI โ GitHub Actions workflow (tests + Pint + PHPStan)
- Git โ
git init+ initial commit (optional)
How it looks (interactive wizard)
โ Laravel Blueprint โ scaffold a new Laravel project โโ
โ Project name โ type a name
โ my-app
โ Starter kit โ โโ then enter
โ โ None โ bare Laravel
โ โ Breeze โ minimal auth scaffold
โ โ Jetstream โ teams, 2FA, profile
โ โ Filament โ admin panel
โ Frontend stack โ shown only if kit โ none
โ ...
โ Database โ โโ then enter
โ โ SQLite (zero setup)
โ โ MySQL
โ โ PostgreSQL
โ โ MariaDB
โ Test runner โ Pest or PHPUnit
โ Extras โ MULTI-SELECT: space toggles, enter confirms
โ โผ Pint
โ โผ Larastan
โ โป Horizon
โ โป Telescope
โ ...
โ Docker
โ โ None โ Sail โ Production โ Both
โ Continuous integration
โ โ None โ GitHub Actions
โ Initialize git
โ โ Skip โ git init โ git init + commit
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
After the last prompt, the tool runs every selected generator and leaves you with a project ready to php artisan serve.
Non-interactive (CI / scripts)
Every prompt has a --flag. Pass --yes to skip prompts and use defaults for any flag you omit.
blueprint new my-app \ --kit=breeze \ --stack=inertia-vue \ --database=pgsql \ --tests=pest \ --extra=pint --extra=larastan --extra=horizon \ --docker=production \ --ci=github-actions \ --git=commit \ --yes
All flags
| Flag | Values |
|---|---|
--kit |
none, breeze, jetstream, filament |
--stack |
blade, livewire, inertia-vue, inertia-react, api, none |
--database |
mysql, pgsql, sqlite, mariadb |
--cache |
database, file, redis, memcached |
--queue |
sync, database, redis, beanstalkd, sqs, rabbitmq |
--tests |
pest, phpunit |
--extra |
horizon, telescope, pulse, octane, scout, sanctum, pint, larastan, dusk, sail (repeatable) |
--docker |
none, sail, production, both |
--ci |
none, github-actions |
--git |
skip, init, commit |
--yes / -y |
Skip prompts |
Add layers to an existing Laravel project
Already have a Laravel app and want to bolt on Docker, GitHub Actions, or an extra? Use blueprint add:
cd existing-laravel-app blueprint add --extra=horizon --extra=pulse # add packages blueprint add --docker=production # write Dockerfile + nginx.conf + php.ini blueprint add --ci=github-actions # write .github/workflows/*.yml blueprint add --extra=pint --extra=larastan --ci=github-actions # combine
blueprint add refuses to overwrite existing files (Dockerfile, workflows). Pass --force to replace them. It also refuses to run in directories that aren't Laravel projects (no artisan + no laravel/framework in composer.json).
Add flags
| Flag | Values |
|---|---|
--extra |
Same as new (repeatable) |
--cache |
Same as new |
--queue |
Same as new |
--docker |
none, sail, production, both |
--ci |
none, github-actions |
--database |
Used by Sail install only |
--force / -f |
Overwrite existing Docker / CI files |
Recipes
Smallest possible project (~20 sec)
blueprint new demo --database=sqlite --git=skip --yes cd demo && php artisan serve
API + Sanctum + Pest + GH Actions
blueprint new api \ --kit=breeze --stack=api \ --database=pgsql --tests=pest \ --extra=sanctum --extra=pint --extra=larastan \ --ci=github-actions --git=commit --yes
High-throughput app with Redis cache + RabbitMQ queue
blueprint new orders \ --kit=breeze --stack=inertia-vue \ --database=pgsql --cache=redis --queue=rabbitmq \ --tests=pest --extra=horizon --extra=pulse \ --docker=both --ci=github-actions --git=commit --yes
Full-stack Inertia + Vue + production Docker
blueprint new shop \ --kit=breeze --stack=inertia-vue \ --database=pgsql --tests=pest \ --extra=horizon --extra=pulse --extra=pint --extra=larastan \ --docker=production --ci=github-actions --git=commit --yes
Install (other ways)
Per-project install (binary in vendor/bin/blueprint)
composer require --dev haohuynh123-cola/laravel-blueprint vendor/bin/blueprint new
From source (for contributing)
git clone https://github.com/haohuynh123-cola/Laravel-Blueprint.git
cd Laravel-Blueprint
composer install
./bin/blueprint new
Update / uninstall
composer global update haohuynh123-cola/laravel-blueprint # update composer global remove haohuynh123-cola/laravel-blueprint # uninstall
Develop
composer install composer test # Pest composer lint # Pint composer stan # PHPStan level 8
Architecture
src/
โโโ Application.php Symfony Console app
โโโ Commands/NewCommand.php Wizard + flag parsing
โโโ Config/ BlueprintConfig + enum types per choice
โโโ Generators/ One class per generator step
โ โโโ Generator.php interface
โ โโโ BaseInstaller.php composer create-project laravel/laravel
โ โโโ DatabaseConfigurator.php rewrites .env
โ โโโ StarterKitGenerator.php composer require + artisan {kit}:install
โ โโโ ExtrasGenerator.php map-driven: one entry per extra
โ โโโ DockerGenerator.php writes Dockerfile/nginx/php.ini, or Sail
โ โโโ CiGenerator.php writes .github/workflows/*.yml
โ โโโ GitInitializer.php git init [+ commit]
โโโ Support/
โ โโโ ProcessRunner.php symfony/process wrapper, streams output
โ โโโ StubLoader.php {{ var }} substitution for stub files
โโโ Templates/ Real .stub files โ lintable, syntax-highlighted
โโโ docker/ Dockerfile, nginx.conf, php.ini, .dockerignore
โโโ ci/ tests.yml, lint.yml
Two design rules borrowed from go-blueprint:
- Hybrid CLI โ every prompt has a
--flag, so the same binary works for humans and CI. - Map-of-templaters โ choices are
enumcases keyed to generators. Adding a new database or extra is one enum case + one map entry.
One we deliberately changed: go-blueprint keeps templates as Go string literals. We use real .stub files under src/Templates/ so they stay syntax-highlighted, lintable, and editable in isolation.
Roadmap
- โ v0.0.1 โ base install + database + git
- โ v0.2.0 โ starter kit + extras + Docker + CI generators
- โ
v0.3.0 โ
blueprint addfor existing projects - โ
v0.4.0 โ Phar release +
curl | bashinstall script + npm wrapper fornpx - โ v0.5.0 โ Homebrew tap + Docker image (zero-PHP install)
- โ v0.6.0 โ Cache + Queue drivers (Redis, RabbitMQ, Memcached, etc.) (current)
- โ Configurator site โ live at haohuynh123-cola.github.io/Laravel-Blueprint
Contributing
PRs welcome. Each generator is a single class implementing Generators\Generator, so adding a new option is small and self-contained. Open an issue first for new flags or stack choices.
License
MIT โ see LICENSE.
