Dev-environment installer for Saucebase applications.
Provides two Artisan commands: saucebase:install bootstraps the entire dev environment (Docker, dependencies, database, frontend), and saucebase:stack switches the frontend framework after the environment is running.
- PHP ^8.4
- Laravel ^13.0
composer require --dev saucebase/installerBootstraps a new Saucebase dev environment from scratch.
php artisan saucebase:installPrompts for the frontend stack (Vue or React) and the environment driver (Docker or native PHP), then runs the full setup sequence.
Docker driver (--driver=docker):
- Prompts whether to enable HTTPS via SSL (requires mkcert)
- Publishes Docker config files (
docker-compose.yml,Dockerfile,nginx.conf, etc.) - Generates SSL certificates with mkcert (if SSL enabled)
- Patches
.envwith Docker-appropriate defaults — MySQL credentials,MAIL_MAILER=smtpfor Mailpit, andAPP_URLmatching the SSL choice - Starts
docker composeand installs PHP dependencies inside the container - Generates
APP_KEY, runs migrations, wires up the frontend stack - Installs any selected modules (single
composer requirefor all → patches →modules:sync→migrate→db:seed --moduleper module) - Creates the storage symlink and clears caches
Native driver (--driver=native):
- Copies
.env.example→.envand generatesAPP_KEY - Runs migrations and seeds the database
- Wires up the selected frontend stack
- Installs any selected modules (same patch + migrate + seed flow as Docker)
- Creates the storage symlink and clears caches
Docker prerequisites
- Docker Desktop or Docker Engine with Compose plugin
- mkcert — only if you choose SSL (
brew install mkcert) - npm
Options
| Option | Description |
|---|---|
vue / react |
Frontend stack (positional argument — skips the prompt) |
--driver=docker|native |
Environment driver (skips the prompt) |
--fresh |
Run migrate:fresh instead of migrate (destructive — wipes all data) |
--all-modules |
Install every available module for the selected stack without prompting |
--modules=auth,billing |
Install specific modules by name (comma-separated, short or full package name) |
--dev |
Contributor mode — skips module installation |
--force |
Skip confirmations (Docker driver defaults to SSL when forced) |
--no-logo |
Suppress the welcome banner |
Examples
Fully interactive — prompts for stack, driver, SSL, and modules:
php artisan saucebase:installVue + Docker, fresh database, all compatible modules:
php artisan saucebase:install vue --driver=docker --fresh --all-modulesReact + native PHP, specific modules only:
php artisan saucebase:install react --driver=native --modules=auth,billingSelects or switches the frontend framework for an existing Saucebase installation.
php artisan saucebase:stack vue
php artisan saucebase:stack reactCopies the framework-specific JS source files, config files (package.json, vite.config.js, tsconfig.json, eslint.config.js, components.json), lockfile, and blade layout into place, then removes the unused framework's source directory. Writes frontend.json to record the selection.
Note: Framework selection is permanent for a given installation. To switch, start a new project or use
--reset.
Options
| Option | Description |
|---|---|
vue / react |
Framework to activate (positional argument) |
--dev |
Contributor mode — copies config files only, keeps both framework source directories, runs npm install |
--reset |
Reverts generated files to their pre-selection state (restores from git, deletes package-lock.json) |
--no-skip-worktree |
Do not mark generated files as skip-worktree in git (dev mode only) |
Examples
Activate Vue (install mode — irreversible):
php artisan saucebase:stack vueActivate React in contributor mode (keeps both source dirs):
php artisan saucebase:stack react --devUndo a previous --dev selection:
php artisan saucebase:stack --resetMIT