eadl:bloc3:dev_av:td1

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

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] jcheroneadl:bloc3:dev_av:td1 [2025/09/16 20:22] (Version actuelle) – [Spécifications] jcheron
Ligne 1: Ligne 1:
-====== Séance 1 ====== +====== 1 - Initialisation et structuration de projet ====== 
-Initialisation et structuration de projet+Séance 1 (4h)
  
-===== Sujet ===== +===== API E-commerce - Architecture ===== 
-API E-commerce - Architecture+ 
 +<WRAP round bloc info> 
 +**IA : avec modération** 
 +  * Générative : uniquement pour correction/débogage, amélioration, aucune soumission de TAF 
 +  * Assistant de codage, type copilot : avec contrôle des productions 
 + 
 +</WRAP>
  
 ==== 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 49:
 </sxh> </sxh>
  
 +
 +=== Modèle de données ===
 +<html><div class="imageB"></html>
 +<uml>
 +@startuml
 +
 +package "Domain Models" {
 +    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 "1" *-- "1..*" OrderItem : contains
 +Order "0..*" --> "1" User : belongsTo
 +OrderItem "0..*" --> "1" Product : references
 +User "0..*" --> "0..1" Category : prefers
 +Product "0..*" --> "1" Category : belongsTo
 +
 +@enduml
 +</uml>
 +<html></div></html>
 +
 +=== Données exemple ===
 +
 +== User ==
 +<sxh json;gutter:false>
 +{
 +  "id": "550e8400-e29b-41d4-a716-446655440001",
 +  "name": "Alice Martin",
 +  "email": "alice.martin@example.com",
 +  "preferredCategoryIds": [
 +    "550e8400-e29b-41d4-a716-446655440010",
 +    "550e8400-e29b-41d4-a716-446655440011"
 +  ]
 +}
 +</sxh>
 +== Product ==
 +
 +<sxh json;gutter:false>
 +{
 +  "id": "550e8400-e29b-41d4-a716-446655440020",
 +  "name": "iPhone 15 Pro",
 +  "price": 1199.99,
 +  "stock": 25,
 +  "categoryId": "550e8400-e29b-41d4-a716-446655440010"
 +}
 +</sxh>
 +
 +== Order ==
 +
 +<sxh json;gutter:false>
 +{
 +  "id": "550e8400-e29b-41d4-a716-446655440030",
 +  "userId": "550e8400-e29b-41d4-a716-446655440001",
 +  "items": [
 +    {
 +      "id": "550e8400-e29b-41d4-a716-446655440040",
 +      "productId": "550e8400-e29b-41d4-a716-446655440020",
 +      "quantity": 2,
 +      "unitPrice": 1199.99
 +    }
 +  ],
 +  "totalAmount": 2399.98,
 +  "status": "CONFIRMED",
 +  "createdAt": "2024-01-15T14:30:00Z"
 +}
 +</sxh>
 +
 +== Order item ==
 +
 +<sxh json;gutter:false>
 +{
 +  "id": "550e8400-e29b-41d4-a716-446655440040",
 +  "productId": "550e8400-e29b-41d4-a716-446655440020",
 +  "quantity": 2,
 +  "unitPrice": 1199.99
 +}
 +</sxh>
 +
 +== Category ==
 +
 +<sxh json;gutter:false>
 +{
 +  "id": "550e8400-e29b-41d4-a716-446655440010",
 +  "name": "Electronics",
 +  "description": "Electronic devices and accessories"
 +}
 +</sxh>
 +
 +=== Attendus ===
 +== Architecture ==
 +
 +  * Séparation couche métier/applicative :
 +  * 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'intégration basiques des controllers
 +
 +== 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/intégration
 +  * Pipeline CI/CD fonctionnel
 +
 +</WRAP>
 +
 +<WRAP round bloc info>
 +  * Privilégier la qualité
 +  * Toutes les bonnes initiatives sont les bienvenues
 +</WRAP>
  • eadl/bloc3/dev_av/td1.1758036440.txt.gz
  • Dernière modification : il y a 15 heures
  • de jcheron