Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| eadl:bloc3:dev_av:td1 [2025/09/16 17:27] – jcheron | eadl:bloc3:dev_av:td1 [2025/09/17 13:49] (Version actuelle) – [1 - Initialisation et structuration de projet] jcheron | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ====== | + | ====== 1 - Initialisation et structuration de projet |
| - | Initialisation et structuration de projet | + | Séance 1 (4h) |
| - | ===== Sujet ===== | + | [[https:// |
| - | API E-commerce - Architecture | + | |
| + | ===== API E-commerce - Architecture | ||
| + | |||
| + | <WRAP round bloc info> | ||
| + | **IA : avec modération** | ||
| + | * Générative : uniquement pour correction/ | ||
| + | * Assistant de codage, type copilot : avec contrôle des productions | ||
| + | |||
| + | </ | ||
| ==== Stack technique ==== | ==== Stack technique ==== | ||
| * Spring Boot 3+ | * Spring Boot 3+ | ||
| - | * Base de données : H2 | + | * Base de données : H2 (fichier) |
| + | * JPA (Hibernate) | ||
| * Build : Maven | * Build : Maven | ||
| * Tests : JUnit 5 | * Tests : JUnit 5 | ||
| Ligne 42: | Ligne 51: | ||
| </ | </ | ||
| + | |||
| + | === Modèle de données === | ||
| + | < | ||
| + | <uml> | ||
| + | @startuml | ||
| + | |||
| + | package " | ||
| + | class User { | ||
| + | - UUID id | ||
| + | - String name | ||
| + | - String email | ||
| + | } | ||
| + | |||
| + | class Product { | ||
| + | - UUID id | ||
| + | - String name | ||
| + | - BigDecimal price | ||
| + | - Integer stock | ||
| + | } | ||
| + | |||
| + | class Category { | ||
| + | - UUID id | ||
| + | - String name | ||
| + | - String description | ||
| + | } | ||
| + | |||
| + | class Order { | ||
| + | - UUID id | ||
| + | - BigDecimal totalAmount | ||
| + | - OrderStatus status | ||
| + | - LocalDateTime createdAt | ||
| + | } | ||
| + | |||
| + | class OrderItem { | ||
| + | - UUID id | ||
| + | - Integer quantity | ||
| + | - BigDecimal unitPrice | ||
| + | } | ||
| + | |||
| + | enum OrderStatus { | ||
| + | PENDING | ||
| + | CONFIRMED | ||
| + | SHIPPED | ||
| + | DELIVERED | ||
| + | CANCELLED | ||
| + | } | ||
| + | } | ||
| + | |||
| + | ' Relations avec cardinalités | ||
| + | Order " | ||
| + | Order " | ||
| + | OrderItem " | ||
| + | User " | ||
| + | Product " | ||
| + | |||
| + | @enduml | ||
| + | </ | ||
| + | < | ||
| + | |||
| + | === Données exemple === | ||
| + | |||
| + | == User == | ||
| + | <sxh json; | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | } | ||
| + | </ | ||
| + | == Product == | ||
| + | |||
| + | <sxh json; | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | == Order == | ||
| + | |||
| + | <sxh json; | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ], | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | == Order item == | ||
| + | |||
| + | <sxh json; | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | == Category == | ||
| + | |||
| + | <sxh json; | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | === Attendus === | ||
| + | == Architecture == | ||
| + | |||
| + | * Séparation couche métier/ | ||
| + | * Controllers (API REST) | ||
| + | * Services (logique métier) | ||
| + | * Repositories (accès données) | ||
| + | * DTOs pour les échanges API | ||
| + | * Entities pour le domaine métier | ||
| + | |||
| + | == Tests == | ||
| + | |||
| + | * Tests unitaires sur les services principaux | ||
| + | * Tests d' | ||
| + | |||
| + | == CI/CD == | ||
| + | |||
| + | * GitHub Actions : exécution tests sur push/PR | ||
| + | * Pas de déploiement (tests uniquement) | ||
| + | |||
| + | |||
| + | <WRAP round bloc todo> | ||
| + | == Priorités (4h) == | ||
| + | |||
| + | * Entities : User, Product, Category | ||
| + | * CRUD Product + tests unitaires/ | ||
| + | * Pipeline CI/CD fonctionnel | ||
| + | |||
| + | </ | ||
| + | |||
| + | <WRAP round bloc info> | ||
| + | * Privilégier la qualité | ||
| + | * Toutes les bonnes initiatives sont les bienvenues | ||
| + | </ | ||