Laravel Stack Installer is a powerful command-line tool to set up Laravel with different stacks quickly. It simplifies the installation process for developers by automating the setup of popular Laravel configurations.
- Interactive menu for easy selection of stacks.
- Install Laravel with a variety of pre-configured stacks:
- ▲ Next.js + Breeze
- ⚛ React + Tailwind Stack
- ✧ Vue + Inertia.js + Tailwind Stack
- τ TALL Stack
- ◉ Livewire + Tailwind Stack
- ◯ API-Only Stack
- ⬡ GraphQL Stack
Laravel Stack Installer is distributed as a Composer package and can be installed globally.
Run the following command to install the tool globally using Composer:
composer global require ngfw/laravel-stack -W
Make sure the composer path (e.g., ~/.composer/vendor/bin
or ~/.config/composer/vendor/bin
) is added to your system's PATH.
Or add it with command:
-
On Linux or macOS:
export PATH=$PATH:~/.composer/vendor/bin
Add the above line to your shell configuration file (e.g.,
~/.bashrc
or~/.zshrc
). -
On Windows: Add the global
composer\vendor\bin
directory to your system's environment variables.
Once installed, you can use the tool directly from the command line. Run the following command to start the interactive menu:
laravel-stack
To skip the menu and run a specific installer directly, use the following command format:
laravel-stack --project="<YOUR_PROJECT_NAME>" --db.host="<DB_HOST>" --db.user="<DB_USER>" --db.password="<DB_PASSWORD>"
For example:
laravel-stack --project="myFirstStack" --db.host="127.0.0.1" --db.user="root" --db.password="password"
Installer will create new MySQL database and name it your project name.
The following installers are available in Laravel Stack Installer. Each provides a tailored setup for a specific development stack.
Installer | Description |
---|---|
Next.js + Breeze | Next.js + Laravel API + Breeze: A seamless setup for modern web apps using Next.js as the frontend and Laravel as the backend. |
React + Tailwind Stack | React + Tailwind CSS: A stack for building modern frontend interfaces with React and styling with Tailwind CSS. |
TALL Stack | TALL Stack: Combines TailwindCSS, AlpineJS, Laravel, and FilamentPHP for a clean and productive UI/UX workflow. |
Livewire + Tailwind Stack | Livewire + Tailwind CSS: A powerful stack for dynamic and real-time UIs with Livewire and Tailwind CSS. |
API-Only Stack | API-Only Stack: A lightweight Laravel setup for purely API-driven applications. |
GraphQL Stack | GraphQL Stack: Integrates GraphQL with Laravel for flexible API queries. |
After installing your stack, a devServer.sh
script is included in your project directory. This script simplifies the process of setting up and running your development environment.
Move into the directory where your new stack is installed. For example, if your project is named MyFirstStack
, than run:
cd MyFirstStack/
Execute the devServer.sh script to start the development environment
./devServer.sh
The behavior of this script depends on the stack you’ve chosen. It typically manages multiple processes, such as:
- Running the Laravel backend server (php artisan serve).
- Launching frontend development servers (e.g., Next.js or Inertia.js).
- And last tailing logs for real-time updates.
Laravel Default Stack | Example Laravel + Next.js Stack |
---|---|
For most stacks, the devServer.sh script starts the Laravel development server, and the application can be accessed at: |
For stacks like Next.js, the development process involves multiple servers. When you run the devServer.sh script, three terminal panels may open: |
http://127.0.0.1:8000 |
- Laravel Backend Server Runs on http://127.0.0.1:8000 . |
- Next.js Development Server Runs on http://127.0.0.1:3000 . |
|
The first log message will confirm this: | Log message: |
[INFO] Laravel Installation Successfully |
[INFO] Laravel Installation Successfully |
[INFO] Your application is running on http://127.0.0.1:8000/ |
[INFO] Your Next.JS application is running on http://127.0.0.1:3000/ |
[INFO] Your Laravel API is running on http://127.0.0.1:8000/ |
Below is the current status of all supported installers:
- Next.js + Breeze
- React + Tailwind Stack
- Vue + Inertia.js + Tailwind Stack
- TALL Stack
- Livewire + Tailwind Stack
- API-Only Stack
- GraphQL Stack
Contributions are welcome! If you’d like to add new stacks or features, please submit a pull request or open an issue on the repository.
This project is licensed under the MIT License. See the LICENSE
file for details.