# Spring Boot Showcase Project - **ID** : `d8d1c779-7435-4a9a-9d52-ab49c7e58640` - **Date** : 2026-10-09 - **Workspace** : `["file:///home/bleack/projects/spring%20boot"]` --- ### Utilisateur *(2026-10-09 18:52)* fait moi un projet vitrine pour du spring boot --- ### Assistant *(2026-10-09 21:47)* Je prépare l'environnement de développement et je télécharge les dépendances pour notre projet vitrine Spring Boot 3.3 / Java 21. Je poursuis dès que la compilation initiale est validée. --- ### Assistant *(2026-10-09 22:15)* Je lance l'exécution complète de la suite de tests (tests unitaires, tests de tranches JPA/WebMvc et test d'intégration de bout en bout). Je vous informe dès la fin de l'exécution. --- ### Assistant *(2026-10-09 22:15)* Je patiente jusqu'à l'issue des tests. --- ### Assistant *(2026-10-09 22:16)* Je relance la suite de tests avec les ajustements de persistance et de contexte de transaction. Je vous préviens dès validation. --- ### Assistant *(2026-10-09 22:16)* Je reste en attente de la notification de fin des tests. --- ### Assistant *(2026-10-09 22:32)* Je lance la vérification complète des tests suite à la synchronisation des séquences d'identité de base de données. --- ### Assistant *(2026-10-09 22:33)* Je patiente jusqu'à l'issue de l'exécution. --- ### Assistant *(2026-10-09 22:57)* Je valide le packaging complet du projet (`./mvnw clean package`) pour garantir la production du JAR exécutable. --- ### Assistant *(2026-10-09 22:58)* Je reste en attente de la fin de la génération du livrable. --- ### Assistant *(2026-10-09 22:58)* Voici **NovaStore**, un projet vitrine de référence (*Showcase / Portfolio*) conçu pour illustrer l'état de l'art du développement backend moderne avec **Spring Boot 3.3** et **Java 21 LTS**. --- ### 🌟 Ce que ce projet démontre 1. **Architecture en couches découplée & Clean Code** : - Séparation stricte : Contrôleurs REST, Services métier transactionnels, Repositories Spring Data, Entités JPA, Records Java 21 pour les DTOs et Mappers. 2. **Sécurité Moderne Spring Security 6 & JWT** : - Authentification sans état (*Stateless*) avec JSON Web Tokens (HMAC-SHA256 via JJWT 0.12). - Chiffrement des mots de passe avec **BCrypt**. - Contrôle d'accès basé sur les rôles (**RBAC**) : `ROLE_CUSTOMER` et `ROLE_ADMIN` avec `@PreAuthorize`. 3. **Persistance Avancée & Gestion de Concurrence** : - **Spring Data JPA & Hibernate 6**. - **Verrouillage optimiste** ([`@Version`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/common/BaseEntity.java#L27-L29)) sur les stocks produits pour empêcher les *race conditions* lors des commandes simultanées. - Requêtes de recherche dynamiques multicritères avec **Spring Data JPA Specifications** ([`ProductSpecification.java`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/specification/ProductSpecification.java)). - Audit automatique JPA ([`@CreatedDate`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/common/BaseEntity.java#L19-L21), [`@LastModifiedDate`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/common/BaseEntity.java#L23-L25)). 4. **Norme RFC 7807 (Problem Details for HTTP APIs)** : - Gestionnaire d'exceptions global ([`GlobalExceptionHandler.java`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/exception/GlobalExceptionHandler.java)) retournant des objets `ProblemDetail` standardisés avec cartographie précise des erreurs de validation Bean Validation. 5. **Cache Haute Performance Caffeine** : - Mise en cache tés & Métier** : [`User`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/domain/User.java), [`Product`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/domain/Product.java), [`Category`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/domain/Category.java), [`Order`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/domain/Order.java), [`OrderItem`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/domain/OrderItem.java) - **Contrôleurs REST** : [`AuthController`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/controller/AuthController.java), [`ProductController`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/controller/ProductController.java), [`CategoryController`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/controller/CategoryController.java), [`OrderController`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/controller/OrderController.java) - **Services** : [`AuthService`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/service/AuthService.java), [`ProductService`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/service/ProductService.java), [`CategoryService`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/service/CategoryService.java), [`OrderService`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/service/OrderService.java) - **Sécurité** : [`SecurityConfig`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/config/SecurityConfig.java), [`JwtService`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/security/JwtService.java), [`JwtAuthenticationFilter`](file:///home/bleack/projects/spring%20boot/src/main/java/com/novastore/security/JwtAuthenticationFilter.java) - **Documentation complète** : [`README.md`](file:///home/bleack/projects/spring%20boot/README.md) --- ### Utilisateur *(2026-10-09 23:06)* ./mvnw spring-boot:run --- ### Assistant *(2026-10-09 23:06)* L'application Spring Boot est en cours de démarrage en arrière-plan. Je vérifie l'état d'initialisation dans un instant. --- ### Assistant *(2026-10-09 23:11)* L'application Spring Boot **NovaStore** est démarrée et active sur le port **8080** : ```text Status: UP (H2 in-memory, HikariPool, Flyway, Caffeine cache, Security JWT actifs) ``` ### 🔗 Accès Directs - 🌐 **Vitrine Web & Console Interactive** : [http://localhost:8080/](http://localhost:8080/) - 📖 **Documentation Swagger UI (OpenAPI 3)** : [http://localhost:8080/swagger-ui.html](http://localhost:8080/swagger-ui.html) - 🗄️ **Console H2 Database** : [http://localhost:8080/h2-console](http://localhost:8080/h2-console) *(JDBC URL: `jdbc:h2:mem:novastoredb` • User: `sa` • Mot de passe: vide)* - 🩺 **Indicateur de Santé Actuator** : [http://localhost:8080/actuator/health](http://localhost:8080/actuator/health) --- ### 🔑 Identifiants Démo (insérés via Flyway) - **Admin** : `admin@novastore.com` / `Admin123!` - **Client** : `customer@novastore.com` / `Customer123!` ---