PHPackages                             igne-agency/laravel-bootstrap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. igne-agency/laravel-bootstrap

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

igne-agency/laravel-bootstrap
=============================

A comprehensive Laravel application bootstrap package for local development with automatic dependency management, database setup, and multi-server support (Herd, Sail, Laravel). Development only - not for production use.

v1.0.1(2mo ago)01MITPHPPHP ^8.4

Since Mar 2Pushed 2mo agoCompare

[ Source](https://github.com/IGNE-Agency/larave-boot-up)[ Packagist](https://packagist.org/packages/igne-agency/laravel-bootstrap)[ RSS](/packages/igne-agency-laravel-bootstrap/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Laravel Bootstrap
=================

[](#laravel-bootstrap)

A comprehensive Laravel application bootstrap package for local development with automatic dependency management, database setup, and multi-server support.

Features
--------

[](#features)

- **Multi-Server Support**: Herd, Sail, or Laravel built-in server
- **Automatic Dependency Installation**: Auto-installs missing tools (bun, composer, node, etc.)
- **Smart Version Management**: Support for specific versions or 'latest' for safe updates
- **Database Auto-Setup**: Interactive database creation and credential management
- **Queue Management**: Automatic queue worker in separate terminal
- **Migration Auto-Run**: Runs migrations automatically when available
- **Interactive Prompts**: User-friendly setup experience
- **Configurable Package Managers**: Choose between bun (default), yarn, or npm
- **DRY, SOLID, KISS**: Clean, maintainable codebase following best practices

Installation
------------

[](#installation)

Install as a development dependency:

```
composer require igne-agency/laravel-bootstrap --dev
```

The package will auto-register via Laravel's package discovery.

> **Important:** Always use the `--dev` flag to ensure this package is only installed in development environments and excluded from production deployments.

Quick Start
-----------

[](#quick-start)

```
# Start your application (will prompt for server if not specified)
php artisan app:serve

# Or specify a server directly
php artisan app:serve herd
php artisan app:serve sail
php artisan app:serve laravel

# With options
php artisan app:serve herd --seed --update

# Stop your application
php artisan app:down
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=bootstrap-config
```

This creates `config/bootstrap.php` where you can configure all aspects of the package.

### Configuration Options

[](#configuration-options)

#### Server Configuration

[](#server-configuration)

```
'server' => [
    'default' => env('BOOTSTRAP_SERVER', null), // null = always prompt
    'prompt' => env('BOOTSTRAP_PROMPT_SERVER', true),
],
```

#### Package Manager

[](#package-manager)

```
'package_manager' => [
    'default' => env('BOOTSTRAP_PACKAGE_MANAGER', 'bun'),
    'available' => ['bun', 'yarn', 'npm'],
],
```

#### Tool Versions

[](#tool-versions)

```
'tools' => [
    'php' => env('PHP_VERSION', 'latest'),
    'node' => env('NODE_VERSION', 'latest'),
    'composer' => env('COMPOSER_VERSION', 'latest'),
    'bun' => env('BUN_VERSION', 'latest'),
    'yarn' => env('YARN_VERSION', 'latest'),
    'npm' => env('NPM_VERSION', 'latest'),
],
```

Use `'latest'` for automatic safe version updates, or specify exact versions like `'20.11.0'`.

#### Auto-Installation

[](#auto-installation)

```
'auto_install' => [
    'enabled' => env('BOOTSTRAP_AUTO_INSTALL', true),
    'tools' => ['php', 'node', 'composer', 'bun'],
],
```

#### Database Management

[](#database-management)

```
'database' => [
    'auto_create' => env('BOOTSTRAP_AUTO_CREATE_DB', true),
    'prompt_credentials' => env('BOOTSTRAP_PROMPT_DB_CREDENTIALS', true),
],
```

#### Queue Configuration

[](#queue-configuration)

```
'queue' => [
    'auto_start' => env('BOOTSTRAP_AUTO_START_QUEUE', true),
    'separate_terminal' => env('BOOTSTRAP_QUEUE_SEPARATE_TERMINAL', true),
    'connection' => env('QUEUE_CONNECTION', 'database'),
],
```

#### Shutdown Behavior

[](#shutdown-behavior)

```
'shutdown' => [
    'prompt_server_stop' => env('BOOTSTRAP_PROMPT_SERVER_STOP', true),
    'default_stop_server' => env('BOOTSTRAP_DEFAULT_STOP_SERVER', false),
],
```

Usage
-----

[](#usage)

### Starting Your Application

[](#starting-your-application)

```
php artisan app:serve {server?} {--seed} {--migrate} {--update} {--no-frontend}
```

**Arguments:**

- `server` (optional): Development server - `herd`, `sail`, or `laravel`

**Options:**

- `--seed`: Seed the database after migrations
- `--migrate`: Run migrations (default: true)
- `--update`: Update dependencies before starting
- `--no-frontend`: Skip frontend asset building

**What happens:**

1. Interactive server selection (if not specified)
2. Dependency checking and auto-installation
3. Database credential prompts (if needed)
4. Database creation (if doesn't exist)
5. Dependency installation (composer, npm/yarn/bun)
6. Migration execution
7. Queue worker startup (in separate terminal)
8. Application boot

### Stopping Your Application

[](#stopping-your-application)

```
php artisan app:down
```

Interactive prompt asks whether to:

- Stop only running processes (default)
- Stop the server itself (Herd/Sail)

Examples
--------

[](#examples)

### First-Time Setup

[](#first-time-setup)

```
# Clone your Laravel project
git clone https://github.com/yourname/project.git
cd project

# Install composer dependencies
composer install

# Start the application
php artisan app:serve
```

The package will:

- Prompt for server selection
- Check for missing tools (node, bun, etc.)
- Install missing tools automatically
- Prompt for database credentials if missing
- Create database if it doesn't exist
- Run migrations
- Start queue workers
- Boot your application

### Using Specific Versions

[](#using-specific-versions)

In your `.env`:

```
PHP_VERSION=8.4
NODE_VERSION=20.11.0
BUN_VERSION=1.0.25
COMPOSER_VERSION=2.7.0
```

Or use `latest` for automatic safe updates:

```
PHP_VERSION=latest
NODE_VERSION=latest
BUN_VERSION=latest
COMPOSER_VERSION=latest
```

### Different Servers

[](#different-servers)

**Laravel Herd:**

```
php artisan app:serve herd
```

**Laravel Sail:**

```
php artisan app:serve sail
```

**Laravel Built-in Server:**

```
php artisan app:serve laravel
```

### Server-Specific Configuration

[](#server-specific-configuration)

**Development (auto-install everything):**

```
BOOTSTRAP_AUTO_INSTALL=true
BOOTSTRAP_AUTO_CREATE_DB=true
BOOTSTRAP_AUTO_RUN_MIGRATIONS=true
BOOTSTRAP_AUTO_START_QUEUE=true
```

**Production-like (manual control):**

```
BOOTSTRAP_AUTO_INSTALL=false
BOOTSTRAP_AUTO_CREATE_DB=false
BOOTSTRAP_PROMPT_DB_CREDENTIALS=false
BOOTSTRAP_AUTO_START_QUEUE=false
```

Advanced Features
-----------------

[](#advanced-features)

### Custom Bootstrap Commands

[](#custom-bootstrap-commands)

You can hook into the bootstrap process to run your own commands (e.g., code generation, type generation). Create a class implementing `ProvidesBootstrapCommands` and register it in your service provider:

```
// app/Bootstrap/CustomBootstrapCommands.php
use Igne\LaravelBootstrap\Contracts\ProvidesBootstrapCommands;
use Igne\LaravelBootstrap\Data\DTOs\BootstrapCommand;

class CustomBootstrapCommands implements ProvidesBootstrapCommands
{
    public function beforeMigrations(): array
    {
        return [
            BootstrapCommand::artisan('wayfinder:generate', 'Generating TypeScript routes...'),
        ];
    }

    public function afterMigrations(): array
    {
        return [
            BootstrapCommand::artisan('model:typer', 'Generating model types...'),
        ];
    }
}

// AppServiceProvider
$this->app->singleton(
    ProvidesBootstrapCommands::class,
    CustomBootstrapCommands::class
);
```

Commands can be Artisan, Composer, or Package Manager commands. See [CUSTOM\_COMMANDS.md](CUSTOM_COMMANDS.md) for full documentation.

### Automatic Tool Installation

[](#automatic-tool-installation)

When enabled, the package automatically installs missing tools:

- Detects missing dependencies
- Downloads and installs them
- Verifies versions
- Updates to latest safe versions if configured

### Smart Version Management

[](#smart-version-management)

The `'latest'` version option:

- Checks for the latest stable/LTS version
- Only updates to safe, stable releases
- Caches version checks to avoid API rate limits
- Falls back to sensible defaults if API unavailable

### Database Auto-Creation

[](#database-auto-creation)

If database doesn't exist:

1. Prompts for credentials (if not in .env)
2. Updates .env file with credentials
3. Creates database with proper charset/collation
4. Runs migrations automatically

### Queue Worker Management

[](#queue-worker-management)

Queue workers run in separate terminal windows:

- **macOS**: Opens new Terminal.app window
- **Linux**: Opens new gnome-terminal window
- **Fallback**: Runs in background if terminal unavailable

Troubleshooting
---------------

[](#troubleshooting)

### Database Connection Issues

[](#database-connection-issues)

If you see database connection errors:

1. Check `.env` file has correct credentials
2. Ensure MySQL/PostgreSQL is running
3. Verify database exists
4. Run `php artisan config:clear`

### Tool Installation Failures

[](#tool-installation-failures)

If auto-installation fails:

1. Check internet connection
2. Verify system permissions
3. Install tools manually
4. Disable auto-install: `BOOTSTRAP_AUTO_INSTALL=false`

### Queue Worker Not Starting

[](#queue-worker-not-starting)

If queue worker doesn't start:

1. Check queue connection in `.env`
2. Verify database tables exist
3. Manually run: `php artisan queue:work`

### Sail-Specific Issues

[](#sail-specific-issues)

For Sail users:

1. Ensure Docker is installed and running
2. Check Docker has sufficient resources
3. Verify ports 80/3306 are available
4. Run `sail up -d` manually if needed

Requirements
------------

[](#requirements)

- PHP 8.4+
- Laravel 12.x
- Composer 2.x

Production Safety
-----------------

[](#production-safety)

This package is **automatically excluded** from production when installed with `--dev`. Composer will not install dev dependencies when you run:

```
composer install --no-dev
```

This ensures the package and its commands are never available in production.

### Environment Detection

[](#environment-detection)

The package includes safety checks to prevent accidental use in non-local environments. Commands will refuse to run if:

- `APP_ENV` is not set to `local` or `development`
- The system has detected as a remote server

License
-------

[](#license)

MIT License - see [LICENSE](LICENSE) for details.

Credits
-------

[](#credits)

Created by [Rick Blanksma](https://github.com/rickblanksma) at [IGNE](https://igne.nl)

Support
-------

[](#support)

For issues, questions, or contributions, please use the [GitHub issue tracker](https://github.com/igne/laravel-bootstrap/issues).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance86

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

71d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/97a26aa304e1e643b5efcfbcc97149ba134246e1c5d899b2a79f181e5b3a5b2e?d=identicon)[Rick Blanksma](/maintainers/Rick%20Blanksma)

---

Top Contributors

[![Rick-Blanksma](https://avatars.githubusercontent.com/u/148454049?v=4)](https://github.com/Rick-Blanksma "Rick-Blanksma (23 commits)")

---

Tags

laraveldevelopmentbootstrapsaildev-toolslocal-developmentherd

### Embed Badge

![Health badge](/badges/igne-agency-laravel-bootstrap/health.svg)

```
[![Health](https://phpackages.com/badges/igne-agency-laravel-bootstrap/health.svg)](https://phpackages.com/packages/igne-agency-laravel-bootstrap)
```

###  Alternatives

[anahkiasen/former

A powerful form builder

1.4k1.4M14](/packages/anahkiasen-former)[patricktalmadge/bootstrapper

Twitter Bootstrap markup generator

557407.2k4](/packages/patricktalmadge-bootstrapper)[rinvex/laravel-menus

Rinvex Menus is a simple menu builder package for Laravel, that supports hierarchical structure, ordering, and styling with full flexibility using presenters for easy styling and custom structure of menu rendering.

294.0k20](/packages/rinvex-laravel-menus)[nguyendachuy/laravel-menu

Laravel Menu Builder | Drag &amp; Drop | Bootstrap | Laravel 7 | Laravel 8 | Laravel 9 | Laravel 10 | Laravel 11 | Laravel 12

162.2k](/packages/nguyendachuy-laravel-menu)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
