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
Requires
- php: ^8.2
- laravel/framework: ^12.0
- laravel/sanctum: ^4.2
- laravel/tinker: ^2.10.1
Requires (Dev)
- fakerphp/faker: ^1.23
- laravel/pint: ^1.24
- laravel/sail: ^1.41
- laravel/ui: ^4.6
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- phpunit/phpunit: ^11.5.3
README
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.