isu73/laravel-bootstrap5

Laravel >=11 + Bootstrap 5 + Vite (Sass @use ready) starter template.

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:Blade

Type:project

pkg:composer/isu73/laravel-bootstrap5

v1.0.1 2025-10-18 15:01 UTC

This package is auto-updated.

Last update: 2025-10-18 17:02:08 UTC


README

Laravel PHP Node License: MIT Packagist Downloads

A modern Laravel 12 + Bootstrap 5 starter kit designed for clean front-end development and maintainable builds with Vite and Sass.

This template follows an β€œ@use ready” Sass structure, which means Bootstrap 5 components are imported modularly, rather than relying on precompiled CSS. This approach allows you to:

  • Include only the Bootstrap modules you actually use.
  • Easily override variables (_variables.scss) and theme tokens.
  • Enjoy a faster, optimized build process via Vite.

Using Bootstrap via Sass rather than a CDN or static .css file makes your project:

  • lighter (tree-shaken styles),
  • more customizable, and
  • future-proof for long-term scalability.

🧠 Why β€œ@use ready” and why Bootstrap via Sass?

This template follows an β€œ@use ready” Sass structure, meaning Bootstrap 5 components are imported modularly, rather than relying on precompiled CSS.

Benefits

  • 🧩 Import only the Bootstrap modules you actually need
  • 🎨 Easily override variables (_variables.scss) and customize themes
  • ⚑ Faster, optimized builds via Vite
  • πŸ”§ Consistent modular Sass that scales for long-term projects

Using Bootstrap via Sass instead of a CDN or static .css file makes your project:

  • lighter (tree-shaken output),
  • easier to maintain, and
  • future-proof for advanced theme or component customization.

🧩 Features

  • Laravel 12 Framework
  • Bootstrap 5 (via Vite + Sass @use)
  • Ready-to-use Sass architecture (resources/sass)
  • Pre-configured vite.config.js
  • Sanctum / Tinker / Pint / UI (dev)
  • Windows + Linux-compatible Composer scripts
  • Optional SQLite setup in .env.example

βš™οΈ Requirements

Component Minimum Version
PHP 8.2 or higher
Composer 2.6+
Node.js 18 or higher (LTS 20 or 24 recommended)
NPM 9 or 11
Database SQLite (default), MySQL 8+, MariaDB 10+, PostgreSQL 14+
OS Linux / macOS / Windows 10+

Make sure PHP includes these extensions:
pdo_mysql, pdo_pgsql, openssl, mbstring, tokenizer, xml, ctype, fileinfo, json, curl.

πŸ—‚οΈ Directory Structure

β”œβ”€β”€ app/                 β†’ Application logic
β”œβ”€β”€ bootstrap/           β†’ App bootstrap files
β”œβ”€β”€ config/              β†’ Configuration files
β”œβ”€β”€ database/            β†’ Migrations / seeders / SQLite DB
β”œβ”€β”€ public/              β†’ Web root (index.php + assets)
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ js/              β†’ Custom JavaScript
β”‚   β”œβ”€β”€ sass/            β†’ Bootstrap 5 + custom Sass
β”‚   └── views/           β†’ Blade templates
β”œβ”€β”€ routes/              β†’ Web / API routes
β”œβ”€β”€ storage/             β†’ Logs / cache / sessions
β”œβ”€β”€ artisan              β†’ Laravel CLI
β”œβ”€β”€ composer.json        β†’ PHP dependencies + scripts
β”œβ”€β”€ package.json         β†’ NPM dependencies
└── vite.config.js       β†’ Vite configuration

πŸš€ Installation

Create a new project

composer create-project isu73/laravel-bootstrap5 myapp
cd myapp

Install Node dependencies

npm install
npm run build   # or: npm run dev

Environment setup

cp .env.example .env
php artisan key:generate

If you prefer SQLite, simply run:

php artisan migrate

If you prefer MySQL or PostgreSQL, don’t forget to edit your .env file accordingly:

DB_CONNECTION=mysql      # or: pgsql
DB_HOST=127.0.0.1
DB_PORT=3306             # or: 5432 for PostgreSQL
DB_DATABASE=my_database
DB_USERNAME=my_user
DB_PASSWORD=my_password

πŸ§ͺ Development Server

php artisan serve
npm run dev

Laravel server β†’ http://127.0.0.1:8000 Vite HMR β†’ http://127.0.0.1:5173

Run both in parallel:

composer run dev

⚑ Composer Scripts

Command Description

composer setup Install dependencies, copy .env, migrate, and build

composer dev Run Laravel server + queue + Vite concurrently

composer test Run Laravel test suite

composer update Update PHP dependencies

Created by @isu73

A clean and modern Laravel 12 + Bootstrap 5 starter template for rapid development.