Skip to content

saucebase-dev/installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Saucebase Installer

Tests PHP Laravel Saucebase

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.

Requirements

  • PHP ^8.4
  • Laravel ^13.0

Installation

composer require --dev saucebase/installer

Commands

saucebase:install

Bootstraps a new Saucebase dev environment from scratch.

php artisan saucebase:install

Prompts 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):

  1. Prompts whether to enable HTTPS via SSL (requires mkcert)
  2. Publishes Docker config files (docker-compose.yml, Dockerfile, nginx.conf, etc.)
  3. Generates SSL certificates with mkcert (if SSL enabled)
  4. Patches .env with Docker-appropriate defaults — MySQL credentials, MAIL_MAILER=smtp for Mailpit, and APP_URL matching the SSL choice
  5. Starts docker compose and installs PHP dependencies inside the container
  6. Generates APP_KEY, runs migrations, wires up the frontend stack
  7. Installs any selected modules (single composer require for all → patches → modules:syncmigratedb:seed --module per module)
  8. Creates the storage symlink and clears caches

Native driver (--driver=native):

  1. Copies .env.example.env and generates APP_KEY
  2. Runs migrations and seeds the database
  3. Wires up the selected frontend stack
  4. Installs any selected modules (same patch + migrate + seed flow as Docker)
  5. 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:install

Vue + Docker, fresh database, all compatible modules:

php artisan saucebase:install vue --driver=docker --fresh --all-modules

React + native PHP, specific modules only:

php artisan saucebase:install react --driver=native --modules=auth,billing

saucebase:stack

Selects or switches the frontend framework for an existing Saucebase installation.

php artisan saucebase:stack vue
php artisan saucebase:stack react

Copies 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 vue

Activate React in contributor mode (keeps both source dirs):

php artisan saucebase:stack react --dev

Undo a previous --dev selection:

php artisan saucebase:stack --reset

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors