diff --git a/AI_CONTEXT.md b/AI_CONTEXT.md index ecb228b..d654c75 100644 --- a/AI_CONTEXT.md +++ b/AI_CONTEXT.md @@ -4,12 +4,17 @@ This document provides context for AI coding assistants working on projects buil ## Template Overview -This is a **Laravel Docker Development Template** with: -- Docker-based development environment -- Production deployment to Ubuntu 24.04 (no Docker) -- Modular architecture with Filament admin -- Audit trail for all data changes -- Multi-database support (MySQL, PostgreSQL, SQLite) +This is a **ready-to-use Laravel Docker Development Template** with everything pre-installed: +- ✅ Laravel 11 with Breeze authentication (Blade + dark mode) +- ✅ Filament v3.3 admin panel with user management +- ✅ Pest testing framework +- ✅ Laravel Pint code style +- ✅ Docker-based development environment +- ✅ Production deployment to Ubuntu 24.04 (no Docker) +- ✅ Modular architecture +- ✅ Multi-database support (MySQL, PostgreSQL, SQLite) + +**Setup time:** 2 minutes - just run `./setup.sh` and everything is ready! ## Technology Stack @@ -20,7 +25,8 @@ This is a **Laravel Docker Development Template** with: | **Admin** | Filament 3.x | | **Database** | MySQL 8 / PostgreSQL 15 / SQLite | | **Cache/Queue** | Redis | -| **Auth** | Laravel Breeze or Jetstream (Livewire only) | +| **Auth** | Laravel Breeze (Blade + Livewire) - PRE-INSTALLED | +| **Testing** | Pest - PRE-INSTALLED | | **Permissions** | spatie/laravel-permission | | **Audit** | owen-it/laravel-auditing | | **Error Tracking** | spatie/laravel-flare + spatie/laravel-ignition | diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 8d83411..241c1b0 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -1,112 +1,119 @@ # Getting Started -This guide walks you through setting up a new Laravel project using this template. +This guide walks you through setting up your Laravel development environment using this template. ## Prerequisites - Docker & Docker Compose - Git -- Make (optional, but recommended) -## Quick Start (5 minutes) +## Quick Start (2 minutes) + +**Everything is pre-installed!** Just clone and run: ```bash # 1. Clone the template git clone https://github.com/your-repo/Laravel-Docker-Dev-Template.git my-project cd my-project -# 2. Copy environment file -cp .env.example .env +# 2. Run setup (MySQL is default) +./setup.sh # Linux/Mac +setup.bat # Windows -# 3. Choose your database and start -make install DB=mysql # or: pgsql, sqlite +# Or choose a different database: +./setup.sh pgsql # PostgreSQL +./setup.sh sqlite # SQLite -# 4. Run setup scripts (interactive) -make setup-tools # Flare, Pint, error pages -make setup-laravel # Auth, Filament, modules, audit trail - -# 5. Access your app +# 3. Access your app # Laravel: http://localhost:8080 -# Admin: http://localhost:8080/admin +# Admin: http://localhost:8080/admin (admin@example.com / password) # Mail: http://localhost:8025 ``` +**That's it!** You now have a fully working Laravel application with: +- ✅ Authentication (login, register, password reset) +- ✅ Admin panel with user management +- ✅ Testing framework (Pest) +- ✅ Code style (Pint) +- ✅ Email testing (Mailpit) + +## What's Pre-Installed + +This template comes with everything configured and ready to use: + +### Core Framework +- **Laravel 11** - Latest version with all features +- **Laravel Breeze** - Authentication scaffolding (Blade + dark mode) +- **Livewire** - Reactive components without JavaScript + +### Admin & Management +- **Filament v3.3** - Full-featured admin panel +- **User Management** - CRUD interface for users +- **Dashboard** - Admin dashboard with widgets + +### Development Tools +- **Pest** - Modern testing framework with elegant syntax +- **Laravel Pint** - Opinionated code style fixer +- **Mailpit** - Email testing tool + +### Infrastructure +- **Docker** - Containerized development environment +- **MySQL/PostgreSQL/SQLite** - Choose your database +- **Redis** - Caching and queues +- **Queue Workers** - Background job processing (optional) +- **Scheduler** - Task scheduling (optional) + ## Step-by-Step Setup -### 1. Clone and Configure +### 1. Clone the Repository ```bash git clone https://github.com/your-repo/Laravel-Docker-Dev-Template.git my-project cd my-project -# Remove template git history and start fresh +# Optional: Remove template git history and start fresh rm -rf .git git init +git add . +git commit -m "Initial commit" ``` -### 2. Choose Database +### 2. Choose Your Database | Database | Best For | Command | |----------|----------|---------| -| **MySQL** | Most projects, production parity | `make install DB=mysql` | -| **PostgreSQL** | Advanced features, JSON, full-text search | `make install DB=pgsql` | -| **SQLite** | Simple apps, quick prototyping | `make install DB=sqlite` | +| **MySQL** | Most projects, production parity | `./setup.sh mysql` | +| **PostgreSQL** | Advanced features, JSON, full-text search | `./setup.sh pgsql` | +| **SQLite** | Simple apps, quick prototyping | `./setup.sh sqlite` | -### 3. Install Laravel +### 3. Run Setup Script ```bash -# Start containers and create Laravel project -make install DB=mysql - -# This will: -# - Build Docker images -# - Start containers -# - Run composer create-project laravel/laravel -# - Copy appropriate .env file -# - Generate app key -# - Run initial migrations +./setup.sh mysql # Linux/Mac +setup.bat mysql # Windows ``` -### 4. Run Setup Scripts +The script will: +- ✅ Configure environment for chosen database +- ✅ Install composer dependencies +- ✅ Build and start Docker containers +- ✅ Run database migrations +- ✅ Create admin user automatically -#### Post-Install Tools +### 4. Start Developing -```bash -make setup-tools -``` +Your application is now ready! The setup script created an admin user for you: -Installs: -- ✅ Spatie Ignition (dev error pages) -- ✅ Spatie Flare (production error tracking) -- ✅ Laravel Pint (code style) -- ✅ Custom error pages (404, 500, 503) -- ❓ Laravel Telescope (optional debugging) +**Admin Login:** +- Email: `admin@example.com` +- Password: `password` -#### Laravel Base Setup +**Access Points:** +- Public site: http://localhost:8080 +- Admin panel: http://localhost:8080/admin +- Email testing: http://localhost:8025 -```bash -make setup-laravel -``` - -Interactive prompts for: - -1. **Authentication** - Choose one: - - Breeze + Blade (recommended) - - Breeze + Livewire - - Breeze API only - - Jetstream + Livewire - -2. **Filament Admin** - User management dashboard - -3. **Audit Trail** - Track all data changes - -4. **Module System** - Modular architecture - -5. **API (Sanctum)** - Token authentication - -6. **Security Middleware** - HTTPS, headers - -### 5. Create Your First Module +## Common Commands ```bash # Shell into container