A base template to start projects with Laravel 12, Livewire, Tailwind CSS, Flowbite, permissions via Spatie, and common development utilities. It’s meant to be cloned and used as a starting point.
- Laravel ^12.0
- Livewire ^3.6
- Tailwind CSS ^4.1
- Flowbite for easy-to-use UI components
- Role and permission management with spatie/laravel-permission
- Power Components via livewire-powergrid for dynamic tables and advanced grids
- Development tools included (faker, testing with Pest, mockery, Pint, etc.)
These are the most important packages already configured:
Composer / Backend:
Package | What it’s for |
---|---|
php ^8.2 |
Minimum PHP version required |
laravel/framework ^12.0 |
Core framework |
laravel/tinker |
Interactive console tool |
livewire/livewire |
Reactive UI without much JavaScript |
power-components/livewire-powergrid |
Powerful tables/grids with Livewire |
spatie/laravel-permission |
Roles and permissions management |
Require-dev (backend, only for development/testing):
- fakerphp/faker (fake data)
- laravel/pint (code formatting)
- laravel/sail (local Docker environment)
- mockery/mockery, nunomaduro/collision (testing, error handling)
- pestphp/pest & pestphp/pest-plugin-laravel (more pleasant testing experience)
Node / Frontend:
- tailwindcss, postcss, autoprefixer
- vite + laravel-vite-plugin
- flowbite
- dev dependencies such as concurrently, etc.
Here are the steps to get started with your copy of the template:
-
Clone the repository
git clone https://github.com/antranix/template_laravel_flowbyte.git project-name cd project-name
-
Install PHP dependencies
composer install
-
Copy the environment file and configure
cp .env.example .env
- Set up the database (
DB_…
) - Adjust other environment variables like
APP_NAME
,APP_URL
, etc.
- Set up the database (
-
Generate application key
php artisan key:generate
-
Migrations and seeders (if applicable)
php artisan migrate
If you have seeders or initial users, run:
php artisan db:seed
-
Install Node dependencies and compile assets
npm install npm run dev
When you’re ready for production:
npm run build
-
Serve the application
You can use:
php artisan serve
Or with Sail (if you use it):
./vendor/bin/sail up
- Use Livewire for reusable components and reactive UI.
- Powergrid makes creating tables with search, filters, pagination, etc., easier.
spatie/laravel-permission
allows defining roles and permissions. In production, make sure to migrate its tables and assign proper roles.
The template includes:
- Pest + plugin for Laravel
- Mockery for mocks/stubs in tests
- Faker for generating fake/test data
You can run tests with:
./vendor/bin/pest
Here are some conventions and structure you might follow:
- Livewire Components in
app/Http/Livewire/
- Blade views for Livewire components in
resources/views/livewire/
- Custom styles in
resources/css
and Tailwind configuration intailwind.config.js
- JS / Vite assets in
resources/js
- Don’t expose sensitive logic in Livewire components (use protected properties, form requests, etc.)
- Always validate user input
- Use roles/permissions correctly
- Keep assets optimized and compiled for production
- Do frequent testing
This project will be under the MIT license (or whichever you decide). You may use it freely, adapt it, but preserve the original copyright if you publish it publicly.
If someone wants to use this as a base or contribute:
- Fork the repo
- Create branches for each feature/new change
- Keep the README updated
- Make sure tests pass before merging
Component | Minimum Version Used in Template |
---|---|
PHP | 8.2+ |
Laravel | 12+ |
Livewire | 3.6+ |
TailwindCSS | 4.1+ |
Flowbite | 3.1.2 |
PowerGrid | 6.6 |
Spatie Permission | 6.21 |
If you find bugs or have suggestions, open an issue in the repository. All collaboration is welcome!
Thanks for using this template! 🛠️