# {{PROJECT_NAME}} - Laravel

> Genere: {{GENERATION_DATE}} | Claude Craft v{{VERSION}}

## Quoi (Stack & Structure)

**Stack**: Laravel {{LARAVEL_VERSION}} + PHP {{PHP_VERSION}}
**Database**: {{DATABASE_TYPE}}
**Architecture**: {{ARCHITECTURE_PATTERN}}

### Structure du projet
```
app/
├── Domain/           # Logique metier pure
│   ├── Models/       # Eloquent models avec comportement
│   └── ValueObjects/ # Types immuables
├── Application/      # Use cases, Actions, DTOs
│   ├── Actions/      # Actions metier
│   └── DTOs/         # Data Transfer Objects
├── Infrastructure/   # Services externes, Repositories
└── Http/             # Controllers, Requests, Resources
    ├── Controllers/  # Thin controllers
    ├── Requests/     # Form Requests validation
    └── Resources/    # API Resources
```

## Pourquoi (Objectif & Organisation)

### Architecture: {{ARCHITECTURE_PATTERN}}
- **Domain**: Modeles Eloquent avec logique metier
- **Application**: Actions pour orchestration
- **Infrastructure**: Services et repositories
- **Http**: Adaptateur HTTP (thin controllers)

Voir `rules/02-architecture.md` pour les patterns.

### Regles critiques

| Regle | Description |
|-------|-------------|
| Analyse avant code | Consulter `rules/01-workflow-analysis.md` |
| strict_types | Obligatoire dans tous les fichiers |
| PHPStan level 8 | 0 erreurs |
| Controllers thin | Deleguer aux Actions |
| Validation | Toujours via Form Requests |

## Comment (Commandes & Workflows)

### Commandes de developpement
```bash
php artisan serve          # Serveur dev
php artisan queue:work     # Queue worker
sail up                    # Docker via Sail
```

### Pipeline de qualite
```bash
./vendor/bin/pint                      # Format code
./vendor/bin/phpstan analyse           # Analyse statique
php artisan test                       # Tests
php artisan test --coverage            # Coverage
./vendor/bin/pint && ./vendor/bin/phpstan analyse && php artisan test
```

### Base de donnees
```bash
php artisan migrate                    # Migrations
php artisan migrate:fresh --seed       # Reset + seed
php artisan migrate:rollback           # Rollback
```

### Workflow de developpement
1. **Analyser** - `rules/01-workflow-analysis.md`
2. **TDD** - Test first (Pest PHP)
3. **Qualite** - Pint + PHPStan + Tests
4. **Commit** - Conventional Commits

## References

| Contexte | Fichier |
|----------|---------|
| Workflow | `rules/01-workflow-analysis.md` |
| Architecture | `rules/02-architecture.md` |
| Standards | `rules/03-coding-standards.md` |
| SOLID | `rules/04-solid-principles.md` |
| Tests | `rules/07-testing.md` |
| Securite | `rules/11-security.md` |

<!-- PROJECT-SPECIFIC-START -->
## Specificites du projet

<!-- Cette section est preservee lors des mises a jour -->

<!-- PROJECT-SPECIFIC-END -->
