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.

Maintainers

Package info

github.com/haohuynh123-cola/Laravel-Blueprint

pkg:composer/haohuynh123-cola/laravel-blueprint

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.6.0 2026-05-02 06:42 UTC

This package is auto-updated.

Last update: 2026-05-02 07:24:44 UTC


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 blueprint says command 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 (.env rewritten, 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 wizard demo

โ”Œ 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:

  1. Hybrid CLI โ€” every prompt has a --flag, so the same binary works for humans and CI.
  2. Map-of-templaters โ€” choices are enum cases 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 add for existing projects
  • โœ… v0.4.0 โ€” Phar release + curl | bash install script + npm wrapper for npx
  • โœ… 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.