Laravel 12 template for rapid development of robust administrative systems with focus on security, scalability and user experience.
- About the Project
- Features
- Tech Stack
- Installation
- Configuration
- Usage
- API
- Project Structure
- Contributing
- License
This is a Laravel 12 template developed to accelerate the development of robust administrative systems. The project incorporates best practices in development, security and architecture, being ideal for projects that require:
- Advanced authentication system with 2FA
- Granular access control (ACL)
- Modern administrative interface
- Secure RESTful APIs
- Monitoring and analytics
- PWA (Progressive Web App)
- Multi-factor Authentication (Google 2FA)
- Permission System (Spatie Laravel Permission)
- JWT Authentication for APIs
- Laravel Sanctum for SPA
- Soft Deletes in all models
- Robust data validation
- AdminLTE 3 - Modern administrative interface
- Bootstrap 5 - Responsive CSS framework
- DataTables Server-side - Optimized tables
- PWA Ready - Progressive Web App
- Laravel Debugbar - Development debugging
- Visitor Tracking - Visitor analytics
- Changelog System - Change logging
- Error Tracking - Error monitoring
- Laravel Vite - Optimized build tool
- Asset Minification - Resource optimization
- Redis Cache - High-performance cache
- Meilisearch - Fast search
- Laravel 12 - PHP framework
- PHP 8.2+ - Programming language
- MySQL 8 - Database
- Redis - Cache and sessions
- Docker - Containerization
- Bootstrap 5 - CSS framework
- AdminLTE 3 - Administrative template
- Vite - Build tool
- SASS - CSS preprocessor
- Laravel Sail - Docker environment
- Laravel Pint - Code style fixer
- PEST - Testing framework
- Laravel Debugbar - Debug toolbar
- Docker and Docker Compose
- Node.js 18+ (for local development)
- Composer (for local development)
- Clone the repository
git clone <repository-url>
cd base-laravel- Prepare the environment
cp .env.example .env- Configure environment variables
# Edit the .env file with your settings
nano .env- Install dependencies
composer install
npm install- Configure Laravel
php artisan key:generate
php artisan jwt:secret- Configure Docker (optional)
# Alias for Laravel Sail
alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'- Run migrations
# With Docker
sail artisan migrate --seed
# Without Docker
php artisan migrate --seed- Configure storage
# With Docker
sail artisan storage:link
# Without Docker
php artisan storage:link- Compile assets
# Development
npm run dev
# Production
npm run build# Application
APP_NAME="Base Laravel"
APP_ENV=local
APP_DEBUG=true
APP_URL=http://localhost
# Database
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=base_laravel
DB_USERNAME=root
DB_PASSWORD=
# JWT
JWT_SECRET=your-jwt-secret
JWT_TTL=60
# Redis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379The project includes complete Docker configuration with:
- Laravel Sail - Main container
- MySQL 8 - Database
- Redis - Cache and sessions
- Meilisearch - Search
- Mailpit - Email testing
- Selenium - Automated tests
Default credentials:
- Email: programador@base.com
- Password: 12345678
# Development
sail up -d # Start containers
sail artisan serve # Development server
npm run dev # Compile assets (dev)
# Production
npm run build # Compile assets (prod)
php artisan config:cache # Configuration cache
php artisan route:cache # Route cache
# Maintenance
sail artisan migrate # Run migrations
sail artisan db:seed # Run seeders
sail artisan storage:link # Storage symbolic link# Login
POST /api/v1/login
{
"email": "user@example.com",
"password": "password"
}
# Register
POST /api/v1/register
{
"name": "User Name",
"email": "user@example.com",
"password": "password"
}
# Refresh Token
POST /api/v1/refresh
Authorization: Bearer {token}GET /api/v1/admin/users- List usersGET /api/v1/admin/profile- User profilePOST /api/v1/logout- Logout
โโโ app/
โ โโโ Http/Controllers/
โ โ โโโ Admin/ # Administrative controllers
โ โ โ โโโ ACL/ # Access control
โ โ โโโ Api/ # REST APIs
โ โ โโโ Auth/ # Authentication
โ โโโ Models/ # Eloquent models
โ โโโ Providers/ # Service providers
โโโ resources/
โ โโโ views/
โ โ โโโ admin/ # Administrative views
โ โ โโโ auth/ # Authentication views
โ โ โโโ layouts/ # Base layouts
โ โโโ js/ # JavaScript
โ โโโ sass/ # SASS styles
โโโ routes/
โ โโโ web.php # Web routes
โ โโโ api.php # API routes
โโโ database/
โโโ migrations/ # Migrations
โโโ seeders/ # Seeders
- PSR-12 - PHP coding standard
- Laravel Pint - Code style fixer
- PEST - Testing framework
- Conventional Commits - Commit standard
This project is licensed under the MIT License - see the LICENSE file for details.
Developed with โค๏ธ to accelerate the development of robust and secure systems.