Skip to content

jakartacode/base-app

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

65 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Base Laravel - Professional Template

Laravel PHP Docker License

Laravel 12 template for rapid development of robust administrative systems with focus on security, scalability and user experience.

๐Ÿ“‹ Table of Contents

๐ŸŽฏ About the Project

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)

โœจ Features

๐Ÿ” Security

  • 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

๐ŸŽจ Interface

  • AdminLTE 3 - Modern administrative interface
  • Bootstrap 5 - Responsive CSS framework
  • DataTables Server-side - Optimized tables
  • PWA Ready - Progressive Web App

๐Ÿ“Š Monitoring

  • Laravel Debugbar - Development debugging
  • Visitor Tracking - Visitor analytics
  • Changelog System - Change logging
  • Error Tracking - Error monitoring

๐Ÿš€ Performance

  • Laravel Vite - Optimized build tool
  • Asset Minification - Resource optimization
  • Redis Cache - High-performance cache
  • Meilisearch - Fast search

๐Ÿ› ๏ธ Tech Stack

Backend

  • Laravel 12 - PHP framework
  • PHP 8.2+ - Programming language
  • MySQL 8 - Database
  • Redis - Cache and sessions
  • Docker - Containerization

Frontend

  • Bootstrap 5 - CSS framework
  • AdminLTE 3 - Administrative template
  • Vite - Build tool
  • SASS - CSS preprocessor

Development Tools

  • Laravel Sail - Docker environment
  • Laravel Pint - Code style fixer
  • PEST - Testing framework
  • Laravel Debugbar - Debug toolbar

๐Ÿš€ Installation

Prerequisites

  • Docker and Docker Compose
  • Node.js 18+ (for local development)
  • Composer (for local development)

Step by Step

  1. Clone the repository
git clone <repository-url>
cd base-laravel
  1. Prepare the environment
cp .env.example .env
  1. Configure environment variables
# Edit the .env file with your settings
nano .env
  1. Install dependencies
composer install
npm install
  1. Configure Laravel
php artisan key:generate
php artisan jwt:secret
  1. Configure Docker (optional)
# Alias for Laravel Sail
alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
  1. Run migrations
# With Docker
sail artisan migrate --seed

# Without Docker
php artisan migrate --seed
  1. Configure storage
# With Docker
sail artisan storage:link

# Without Docker
php artisan storage:link
  1. Compile assets
# Development
npm run dev

# Production
npm run build

โš™๏ธ Configuration

Important Environment Variables

# 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=6379

Docker Compose

The 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

๐ŸŽฎ Usage

System Access

Default credentials:

Useful Commands

# 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

๐Ÿ”Œ API

JWT Authentication

# 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}

Available Endpoints

  • GET /api/v1/admin/users - List users
  • GET /api/v1/admin/profile - User profile
  • POST /api/v1/logout - Logout

๐Ÿ“ Project Structure

Main Directories

โ”œโ”€โ”€ 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

๐Ÿค Contributing

Code Standards

  • PSR-12 - PHP coding standard
  • Laravel Pint - Code style fixer
  • PEST - Testing framework
  • Conventional Commits - Commit standard

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments


Developed with โค๏ธ to accelerate the development of robust and secure systems.

About

Base App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • CSS 45.6%
  • PHP 42.2%
  • Blade 11.4%
  • Other 0.8%