feat: Setup projet Classeo avec infrastructure Docker et architecture DDD

Configure l'environnement de développement complet avec Docker Compose,
structure DDD 4 Bounded Contexts, et pipeline CI/CD GitHub Actions.

Corrections compatibilité CI:
- Symfony 8 nécessite monolog-bundle ^4.0 (la v3.x ne supporte que jusqu'à Symfony 7)
- ESLint v9 nécessite flat config (eslint.config.js) - le format .eslintrc.cjs est obsolète
This commit is contained in:
2026-01-30 09:55:58 +01:00
parent ddefa927c7
commit 6da5996340
125 changed files with 10032 additions and 0 deletions

140
README.md Normal file
View File

@@ -0,0 +1,140 @@
# Classeo
Application de gestion scolaire moderne - Backend Symfony 8 + Frontend SvelteKit 2.
## Quick Start
### Prerequis
- Docker Desktop 24+ avec Docker Compose 2.20+
- Git
### Lancement
```bash
# Cloner le repo
git clone https://github.com/ClasseoEdu/classeo.git
cd classeo
# Lancer tous les services
docker compose up -d
# Verifier le statut
docker compose ps
```
### URLs
| Service | URL | Description |
|---------|-----|-------------|
| Frontend | http://localhost:5174 | Application SvelteKit |
| Backend API | http://localhost:18000/api | API REST (API Platform) |
| API Docs | http://localhost:18000/api/docs | Documentation OpenAPI |
| RabbitMQ | http://localhost:15672 | Admin (guest/guest) |
| Meilisearch | http://localhost:7700 | Dashboard recherche |
| Mailpit | http://localhost:8025 | Emails de test |
| Mercure | http://localhost:3000/.well-known/mercure | SSE Hub |
## Stack Technique
### Backend
- **PHP 8.5** avec property hooks et asymmetric visibility
- **Symfony 8.0** - Framework DDD-friendly
- **API Platform 4.x** - API REST auto-generee
- **Doctrine ORM 3.x** - Persistence avec mappings separes
- **PHPStan level 9** - Analyse statique stricte
### Frontend
- **SvelteKit 2.x** - SSR, routing, PWA
- **Svelte 5** - Runes (`$state`, `$derived`, `$effect`)
- **TypeScript strict** - Typage fort
- **TanStack Query 5** - Server state management
- **Tailwind CSS 3** - Utility-first CSS
### Infrastructure
- **PostgreSQL 18.1** - Base de donnees
- **Redis 7.4** - Cache + Sessions
- **RabbitMQ 4.2** - Message queue
- **Mercure** - Real-time SSE
- **Meilisearch 1.12** - Full-text search
- **Mailpit** - Email testing
## Architecture
### Bounded Contexts
```
backend/src/
├── Administration/ # Gestion etablissement, utilisateurs
├── Scolarite/ # Notes, classes, emploi du temps
├── VieScolaire/ # Absences, retards, sanctions
├── Communication/ # Messages, notifications
└── Shared/ # Kernel partage (EntityId, DomainEvent, etc.)
```
### Structure DDD
Chaque Bounded Context suit la meme structure :
```
{BC}/
├── Domain/ # Pure PHP - ZERO dependance framework
│ ├── Model/ # Aggregates, Entities, Value Objects
│ ├── Event/ # Domain Events
│ ├── Repository/ # Interfaces repository
│ └── Service/ # Domain Services
├── Application/ # Use cases
│ ├── Command/ # Write operations
│ ├── Query/ # Read operations
│ └── EventHandler/ # Domain event handlers
└── Infrastructure/ # Implementations framework
├── Persistence/ # Doctrine repositories
├── Api/ # API Platform resources
└── Messaging/ # RabbitMQ handlers
```
## Developpement
### Commandes utiles
```bash
# Backend
docker compose exec php composer phpstan # Analyse statique
docker compose exec php composer test # Tests PHPUnit
docker compose exec php composer cs-fix # Correction code style
# Frontend
docker compose exec frontend pnpm run lint # ESLint
docker compose exec frontend pnpm run check # TypeScript check
docker compose exec frontend pnpm run test # Vitest
docker compose exec frontend pnpm run test:e2e # Playwright
```
### Makefile (raccourcis)
```bash
make up # docker compose up -d
make down # docker compose down
make logs # docker compose logs -f
make test # Run all tests
make lint # Run all linters
```
## Tests
- **PHPUnit** - Tests unitaires et integration backend
- **Vitest** - Tests unitaires frontend
- **Playwright** - Tests E2E
## Documentation
- [Architecture Decision Records](./docs/adr/)
- [Contributing Guide](./CONTRIBUTING.md)
- [API Documentation](http://localhost:8000/api/docs)
## Licence
Proprietary - ClasseoEdu