Skip to content

Latest commit

 

History

48 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel 13 × Stisla Admin Template

Laravel PHP Bootstrap Vite License CI

A production-ready Laravel 13 admin starter kit powered by the Stisla dashboard UI.
Clone → configure → start building business features immediately.


Table of Contents


Why This Template?

Without this template With this template
Set up auth from scratch Auth + OTP password reset ready
Build admin layout manually Stisla UI integrated with Vite
Write repetitive CRUD boilerplate make:crud-stisla generator
No activity tracking Built-in activity log system
No file management File manager with folder support
No notification center Database notifications ready
No settings panel Grouped dynamic settings

Core Features

  • Laravel 13 + PHP 8.3+ — latest framework with modern PHP features
  • Authentication via Laravel UI (login, register, password reset)
  • User Profile Management — edit profile & change password
  • Role & Permission Management — powered by Spatie Laravel Permission
  • Responsive Admin Layout — Stisla dashboard with Bootstrap 5
  • Dark/Light Theme Toggle — persisted in browser storage
  • Route Grouping — organized by domain for readability and maintenance

Advanced Features

Activity Log System (/activity-logs)

  • Track user and system events (login, logout, CRUD operations)
  • Filter by user, event type, date range, and keyword search
  • Safe bulk clear with explicit confirmation and optional retention period

Settings Management (/settings)

  • Grouped application settings managed from admin panel
  • Type-aware inputs: text, number, boolean, email, url, json, textarea
  • Cached for performance with automatic invalidation

Notifications (/notifications)

  • List, mark as read, mark all read, delete notifications
  • Admin notification sending to selected users
  • Livewire unread badge component with periodic polling

File Manager (/file-manager)

  • Upload, download, rename, and delete files with ownership checks
  • Folder organization with nested path support
  • Path traversal prevention for security hardening
  • File type icons and human-readable size display

Tech Stack

Backend

Technology Version Purpose
PHP ≥ 8.3 Runtime
Laravel 13.x Framework
Laravel UI 4.x Authentication scaffolding
Livewire 3.x Reactive Blade components
Spatie Permission 6.x Role and permission management
PHPUnit 12.x Testing
Laravel Pint 1.x Code style

Frontend

Technology Version Purpose
Bootstrap 5.3 UI framework
Vite 7.x Build tool
Sass 1.x CSS preprocessor
Axios 1.x HTTP client

Note: Legacy Stisla view attributes are shimmed in layout for compatibility while using modern Vite assets.


Prerequisites

  • PHP ≥ 8.3
  • PHP extensions: mbstring, pdo, pdo_sqlite, sqlite3
  • Composer
  • Node.js ≥ 20
  • npm
  • MySQL / PostgreSQL / SQLite
  • Git

Quick Start

# Clone the repository
git clone https://github.com/vickymaulana/laravel13-stisla.git
cd laravel13-stisla

# Install dependencies
composer install
npm install

# Environment setup
cp .env.example .env
php artisan key:generate

# Database
php artisan migrate
php artisan db:seed
php artisan storage:link

# Development server
npm run dev          # Terminal 1 — Vite dev server
php artisan serve    # Terminal 2 — Laravel dev server

Or run the combined development stack:

composer run dev

Open http://localhost:8000 and register a new account.

Superadmin Setup

After registration, promote a user to superadmin:

php artisan tinker
$user = App\Models\User::where('email', 'your@email.com')->first();
$user?->assignRole('superadmin');

Configuration

Key environment variables in .env.example:

# Password Reset
PASSWORD_RESET_METHOD=token          # or 'otp'
PASSWORD_RESET_OTP_EXPIRE=10         # minutes
PASSWORD_RESET_OTP_MAX_ATTEMPTS=5

# Database
DB_CONNECTION=mysql
DB_DATABASE=laravel_stisla

# Mail (required for OTP mode)
MAIL_MAILER=log

Password Reset Modes

1. Token Mode (default)

Standard Laravel password reset flow using email link with token.

2. OTP Mode (optional)

Enhanced security with OTP verification on top of the reset token:

  • OTP is time-limited (configurable expiry)
  • Rate-limited to prevent brute-force attacks
  • OTP state is invalidated after successful reset
PASSWORD_RESET_METHOD=otp

Quick Tour Routes

After login, visit /quick-tour to navigate key features.

Route Description Access
/home Dashboard All users
/profile/edit Edit profile All users
/profile/change-password Change password All users
/table-example Table component demo All users
/form-example Form component demo All users
/notifications Notification center All users
/file-manager File manager All users
/settings Application settings Superadmin
/activity-logs Activity log viewer Superadmin
/hakakses Role access management Superadmin

Generator Commands

Seeder + Factory Generator

php artisan make:seeder-factory Product

Generates a seeder and factory for the given model.

CRUD Generator with Stisla Views

php artisan make:crud-stisla Product

Scaffolds controller, model, migration, views, and routes with Stisla styling.
Supports custom fields and excluded fields options.


Project Structure

app/
  Console/Commands/           # Custom generators (crud-stisla, seeder-factory)
  Http/Controllers/           # Feature controllers
  Http/Controllers/Auth/      # Authentication controllers
  Http/Middleware/            # Access middleware (Superadmin)
  Livewire/                   # Livewire components (e.g. NotificationBadge)
  Models/                     # Eloquent models (User, File, Setting, ActivityLog)
  Notifications/              # Notification classes (GeneralNotification)
  Providers/                  # Service providers

bootstrap/
  app.php                     # Application bootstrap with middleware aliases

config/
  auth.php                    # Auth + OTP password reset configuration
  permission.php              # Spatie role/permission configuration

resources/
  views/                      # Blade templates (Stisla layout)
  sass/                       # Vite SCSS entry
  js/                         # Vite JS entry

routes/
  web.php                     # Route definitions grouped by domain
  console.php                 # Console commands

database/
  migrations/                 # Database schema
  seeders/                    # Seed data
  factories/                  # Model factories

tests/
  Feature/                    # Feature tests (auth, file manager, notifications, security)
  Unit/                       # Unit tests

stubs/                        # Generator stubs for CRUD scaffolding

Testing & Quality

# Run the test suite
php artisan test

# Confirm SQLite testing support is available
php -m | grep -E "pdo_sqlite|sqlite3"

# Validate all routes resolve correctly
php artisan route:list --except-vendor

# Check code style (PSR-12)
./vendor/bin/pint --test

# Auto-fix code style
composer lint

# Run static analysis (Larastan / PHPStan, level 5)
composer analyse

# Remove development artifacts from vendored public assets
php artisan assets:prune-vendored

# Build production assets
npm run build

CI Pipeline

GitHub Actions workflow: .github/workflows/ci.yml

Step Description
PHP 8.4 + SQLite Environment setup
composer install Backend dependencies
vendor/bin/pint --test Code style check
vendor/bin/phpstan analyse Static analysis (Larastan, level 5)
php artisan migrate Database schema
php artisan route:list Route integrity check
php artisan test Test suite
npm ci + npm run build Frontend build

Security

  • Path Traversal Prevention — File manager normalizes and validates all folder paths
  • Ownership Checks — Files are scoped to the authenticated user
  • OTP Rate Limiting — Password reset OTP is rate-limited per IP
  • CSRF Protection — All forms use Laravel CSRF tokens
  • Mass Assignment Protection — Models declare explicit $fillable arrays
  • Password Hashing — Bcrypt with configurable rounds

To report a security vulnerability, please open a private issue or email the maintainer directly.


Troubleshooting

php artisan route:list fails

Check for syntax or import errors in custom controllers.

php artisan test fails with could not find driver

Enable pdo_sqlite and sqlite3 for your PHP CLI installation. The test suite uses an in-memory SQLite database by default.

Password reset / OTP issues

  • Verify PASSWORD_RESET_METHOD and MAIL_* settings in .env
  • Ensure the reset link token is valid and not expired

File manager cannot display files

Run php artisan storage:link to create the public storage symlink.

Frontend changes not reflected

  • Use npm run dev during development for hot-reload
  • Use npm run build for production assets

Unable to locate file in Vite manifest: resources/css/app.css

Use SCSS entry in Blade: @vite(['resources/sass/app.scss', 'resources/js/app.js']), then rebuild assets.


Contributing

Please read CONTRIBUTING.md for coding standards, PR checklist, and validation commands.


License

This project is licensed under the MIT License.


Contributors

Project Maintainer

Vicky MaulanaGitHub

Special Thanks

Gratitude to all the interns at LLDIKTI 2 Division of Information System Development:

Ahmad Dimas Aldian Al-furqon · Abdillah Khalid · Haikal Tirta Albanna · Meta Berliana · Imelda Triadmajaya · Hilwa Izzatinnafisah · Triyana Sugiyarti · Adelia Isni Hendrawan Putri · Siti Nur Azizah · M. Husaini Hasyim · Andre Satriawan · Lathifah Putri Aresti · Sisca Amelia · M. Denny Tri Lisandi


Acknowledgments

  • Laravel — The PHP framework for web artisans
  • Stisla — Free Bootstrap admin template
  • Bootstrap — Frontend toolkit
  • Vite — Next generation frontend tooling

About

Laravel 13 + Auth + Stisla Template

Resources

Contributing

Stars

109 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages