# 📋 TODOLIST ULTRA DÉTAILLÉE - AUDIT COMPLET BTPXPRESS SERVER **Date** : 2025-01-XX **Status** : En cours d'analyse --- ## 🎯 RÉSUMÉ EXÉCUTIF **Concepts documentĂ©s** : 22 **EntitĂ©s JPA existantes** : 47 **Services implĂ©mentĂ©s** : 33 **Resources REST** : ~40 (Ă©parpillĂ©es sur adapter/http, application/rest, presentation/rest, presentation/controller) --- ## 📊 MAPPING CONCEPTS vs IMPLÉMENTATIONS ### 1. CHANTIER ✅ - **EntitĂ©** : `Chantier.java` ✅ - **Service** : `ChantierService.java` ✅ - **Repository** : `ChantierRepository.java` ✅ - **Resource** : `ChantierResource.java` Cadapter/http) ✅ - **Controller** : `ChantierController.java` Cadapter/controller) ✅ - **DTO** : `ChantierCreateDTO.java` ✅ - **Mapper** : `ChantierMapper.java` ✅ - **Status** : ✅ COMPLET ### 2. CLIENT ✅ - **EntitĂ©** : `Client.java` ✅ - **Service** : `ClientService.java` ✅ - **Repository** : `ClientRepository.java` ✅ - **Resource** : `ClientResource.java` Cadapter/http) ✅ - **DTO** : `ClientCreateDTO.java` ✅ - **Mapper** : `ClientMapper.java` ✅ - **Status** : ✅ COMPLET ### 3. MATERIEL ✅ - **EntitĂ©** : `Materiel.java`, `MaterielBTP.java` ✅ - **Service** : `MaterielService.java` ✅ - **Repository** : `MaterielRepository.java` ✅ - **Resource** : `MaterielResource.java` Cadapter/http) ✅ - **Controller** : `MaterielController.java` Cadapter/controller) ✅ - **Status** : ✅ COMPLET ### 4. RESERVATION_MATERIEL ✅ - **EntitĂ©** : `ReservationMateriel.java` ✅ - **Service** : `ReservationMaterielService.java` ✅ - **Repository** : `ReservationMaterielRepository.java` ✅ - **Resource** : `ReservationMaterielResource.java` Cadapter/rest) ✅ - **Status** : ✅ COMPLET ### 5. LIVRAISON ✅ - **EntitĂ©** : `LivraisonMateriel.java` ✅ - **Service** : `LivraisonMaterielService.java` ✅ - **Repository** : `LivraisonMaterielRepository.java` Cadapter/repository) ✅ - **Resource** : `LivraisonMaterielResource.java` Cadapter/rest) ✅ - **Status** : ✅ COMPLET ### 6. FOURNISSEUR ✅ - **EntitĂ©** : `Fournisseur.java`, `FournisseurMateriel.java`, `CatalogueFournisseur.java` ✅ - **Service** : `FournisseurService.java` ✅ - **Repository** : `FournisseurRepository.java` ✅ - **Resource** : `FournisseurResource.java` Cadapter/rest) ✅ - **DTO** : `FournisseurDTO.java` ✅ - **Status** : ✅ COMPLET ### 7. STOCK ✅ - **EntitĂ©** : `Stock.java`, `CategorieStock.java`, `SousCategorieStock.java` ✅ - **Service** : `StockService.java` ✅ - **Repository** : `StockRepository.java` ✅ - **Controller** : `StockController.java` Cadapter/controller) ✅ - **Status** : ✅ COMPLET ### 8. BON_COMMANDE ✅ - **EntitĂ©** : `BonCommande.java`, `LigneBonCommande.java` ✅ - **Service** : `BonCommandeService.java`, `LigneBonCommandeService.java` ✅ - **Repository** : `BonCommandeRepository.java` ✅ - **Controller** : `BonCommandeController.java` Cadapter/controller) ✅ - **Status** : ✅ COMPLET ### 9. DEVIS ✅ - **EntitĂ©** : `Devis.java`, `LigneDevis.java` ✅ - **Service** : `DevisService.java` ✅ - **Repository** : `DevisRepository.java` ✅ - **Resource** : `DevisResource.java` Cadapter/http) ✅ - **Status** : ✅ COMPLET ### 10. BUDGET ✅ - **EntitĂ©** : `Budget.java` ✅ - **Service** : `BudgetService.java` ✅ - **Repository** : `BudgetRepository.java` ✅ - **Resource** : `BudgetResource.java` Cadapter/http) ✅ - **Status** : ✅ COMPLET ### 11. EMPLOYE ✅ - **EntitĂ©** : `Employe.java`, `EmployeCompetence.java` ✅ - **Service** : `EmployeService.java` ✅ - **Repository** : `EmployeRepository.java` ✅ - **Resource** : `EmployeResource.java` Cadapter/http) ✅ - **Controller** : `EmployeController.java` Cadapter/controller) ✅ - **Status** : ✅ COMPLET ### 12. MAINTENANCE ✅ - **EntitĂ©** : `MaintenanceMateriel.java` ✅ - **Service** : `MaintenanceService.java` ✅ - **Repository** : `MaintenanceRepository.java` ✅ - **Resource** : `MaintenanceResource.java` Cadapter/http) ✅ - **Status** : ✅ COMPLET ### 13. PLANNING ✅ - **EntitĂ©** : `PlanningEvent.java`, `PlanningMateriel.java`, `VuePlanning.java` ✅ - **Service** : `PlanningService.java`, `PlanningMaterielService.java` ✅ - **Repository** : `PlanningEventRepository.java`, `PlanningMaterielRepository.java` Cadapter/repository) ✅ - **Resource** : `PlanningResource.java` Cadapter/http), `PlanningMaterielResource.java` Cadapter/rest) ✅ - **Status** : ✅ COMPLET ### 14. DOCUMENT ✅ - **EntitĂ©** : `Document.java` ✅ - **Service** : `DocumentService.java` ✅ - **Repository** : `DocumentRepository.java` ✅ - **Resource** : `DocumentResource.java` Cadapter/http) ✅ - **Status** : ✅ COMPLET ### 15. MESSAGE ✅ - **EntitĂ©** : `Message.java` ✅ - **Service** : `MessageService.java` ✅ - **Repository** : `MessageRepository.java` ✅ - **Resource** : `MessageResource.java` Cadapter/http) ✅ - **Status** : ✅ COMPLET ### 16. NOTIFICATION ✅ - **EntitĂ©** : `Notification.java` ✅ - **Service** : `NotificationService.java` ✅ - **Repository** : `NotificationRepository.java` ✅ - **Resource** : `NotificationResource.java` Cadapter/http) ✅ - **Status** : ✅ COMPLET ### 17. USER ✅ - **EntitĂ©** : `User.java`, `UserRole.java`, `UserStatus.java` ✅ - **Service** : `UserService.java` ✅ - **Repository** : `UserRepository.java` ✅ - **Resource** : `UserResource.java` Cadapter/rest) ✅ - **Resource Auth** : `AuthResource.java` Cadapter/http) ✅ - **Status** : ✅ COMPLET ### 18. ENTREPRISE ⚠ - **EntitĂ©** : `EntrepriseProfile.java`, `AvisEntreprise.java` ✅ - **Service** : ❌ MANQUANT - **Repository** : ❌ MANQUANT (utilise PanacheEntityBase) - **Resource** : ❌ MANQUANT - **Status** : ⚠ PARTIEL ### 19. DISPONIBILITE ✅ - **EntitĂ©** : `Disponibilite.java` ✅ - **Service** : `DisponibiliteService.java` ✅ - **Repository** : `DisponibiliteRepository.java` ✅ - **Resource** : `DisponibiliteResource.java` Cadapter/http) ✅ - **Status** : ✅ COMPLET ### 20. ZONE_CLIMATIQUE ✅ NOUVEAU - **EntitĂ©** : `ZoneClimatique.java`, `SaisonClimatique.java`, `PaysZoneClimatique.java`, `AdaptationClimatique.java` ✅ - **Service** : `ZoneClimatiqueService.java` ✅ NOUVEAU - **Repository** : `ZoneClimatiqueRepository.java` ✅ - **Resource** : `ZoneClimatiqueResource.java` ✅ NOUVEAU - **Status** : ✅ COMPLET ### 21. ABONNEMENT ❌ - **EntitĂ©** : ❌ MANQUANT (prĂ©sent dans documentation mais pas implĂ©mentĂ©) - **Service** : ❌ MANQUANT - **Repository** : ❌ MANQUANT - **Resource** : ❌ MANQUANT - **Status** : ❌ NON IMPLÉMENTÉ ### 22. SERVICES_TRANSVERSES ✅ - **Calculateur** : `CalculateurTechniqueBTP.java` ✅ - **Dashboard** : `DashboardResource.java` Cadapter/http) ✅ - **Reports** : `ReportResource.java` Cadapter/http) ✅ - **Statistics** : `StatisticsService.java` ✅ - **Photos** : `PhotoResource.java` Cadapter/http) ✅ - **Health** : `HealthResource.java` Cadapter/http) ✅ - **Comparaison Fournisseurs** : `ComparaisonFournisseurResource.java` Cadapter/rest) ✅ - **Permission** : `PermissionResource.java` Cadapter/rest) ✅ - **Status** : ✅ COMPLET --- ## 🚹 PROBLÈMES IDENTIFIÉS ### A. ORGANISATION DES RESSOURCES (CRITIQUE) ❌ **PROBLÈME** : Les Resources sont Ă©parpillĂ©es dans 4 endroits diffĂ©rents - `adapter/http/` : 23 fichiers - `application/rest/` : 5 fichiers - `presentation/rest/` : 5 fichiers - `presentation/controller/` : 7 fichiers 🔧 **ACTION REQUISE** : Standardiser l'organisation des Resources - Option 1 : Tout dans `adapter/http/` (recommandĂ©) - Option 2 : Tout dans `application/rest/` - Option 3 : DĂ©finir clairement les responsabilitĂ©s ### B. ENTITÉS MANQUANTES 1. ❌ `Abonnement.java` - DocumentĂ© mais non implĂ©mentĂ© 2. ⚠ `EntrepriseProfile` - EntitĂ© existante mais pas de Service/Resource ### C. ENDPOINTS MANQUANTS PAR CONCEPT #### 18. ENTREPRISE ❌ - Pas de `EntrepriseProfileService` - Pas de `EntrepriseResource` - Endpoints Ă  crĂ©er : - `GET /api/v1/entreprises` - Liste des profils - `GET /api/v1/entreprises/{id}` - DĂ©tails profil - `POST /api/v1/entreprises` - CrĂ©er profil - `PUT /api/v1/entreprises/{id}` - Modifier profil - `GET /api/v1/entreprises/{id}/avis` - Avis sur entreprise - `POST /api/v1/entreprises/{id}/avis` - Ajouter avis - `GET /api/v1/entreprises/{id}/stats` - Statistiques entreprise #### 21. ABONNEMENT ❌ - CrĂ©er entitĂ© `Abonnement.java` - CrĂ©er `AbonnementService.java` - CrĂ©er `AbonnementRepository.java` - CrĂ©er `AbonnementResource.java` - Endpoints Ă  crĂ©er : - `GET /api/v1/abonnements` - Liste abonnements - `GET /api/v1/abonnements/{id}` - DĂ©tails abonnement - `POST /api/v1/abonnements` - CrĂ©er abonnement - `PUT /api/v1/abonnements/{id}` - Modifier abonnement - `GET /api/v1/abonnements/plans` - Plans disponibles - `POST /api/v1/abonnements/{id}/renouveler` - Renouveler ### D. DTO ET MAPPERS MANQUANTS - ❌ Pas de DTO pour Devis - ❌ Pas de DTO pour Facture - ❌ Pas de DTO pour Budget - ❌ Pas de DTO pour Employe - ❌ Pas de DTO pour Materiel - ❌ Pas de DTO pour la plupart des concepts - ⚠ Seuls Chantier et Client ont des DTO complets --- ## 📝 TODOLIST DÉTAILLÉE PAR PRIORITÉ ### 🔮 PRIORITÉ HAUTE (P0 - Critique) #### 1. RĂ©organisation de l'architecture Resources - [ ] **AUDIT-001** : Analyser toutes les Resources existantes et leurs responsabilitĂ©s - [ ] **AUDIT-002** : Choisir une architecture unifiĂ©e (adapter/http recommandĂ©) - [ ] **AUDIT-003** : Migrer `application/rest/*` vers `adapter/http/` - [ ] **AUDIT-004** : Migrer `presentation/rest/*` vers `adapter/http/` - [ ] **AUDIT-005** : DĂ©cider du rĂŽle de `presentation/controller/` (garder ou supprimer?) - [ ] **AUDIT-006** : Mettre Ă  jour tous les imports aprĂšs migration - [ ] **AUDIT-007** : Tester que tous les endpoints fonctionnent aprĂšs migration #### 2. ImplĂ©mentation ENTREPRISE complĂšte - [ ] **ENTREPRISE-001** : CrĂ©er `EntrepriseProfileService.java` - [ ] **ENTREPRISE-002** : CrĂ©er `EntrepriseProfileRepository.java` (si nĂ©cessaire) - [ ] **ENTREPRISE-003** : CrĂ©er `EntrepriseResource.java` dans `adapter/http/` - [ ] **ENTREPRISE-004** : ImplĂ©menter tous les endpoints CRUD - [ ] **ENTREPRISE-005** : CrĂ©er `EntrepriseProfileDTO.java` - [ ] **ENTREPRISE-006** : CrĂ©er `AvisEntrepriseResource.java` - [ ] **ENTREPRISE-007** : ImplĂ©menter gestion des avis - [ ] **ENTREPRISE-008** : Ajouter endpoints statistiques entreprise #### 3. ImplĂ©mentation ABONNEMENT complĂšte - [ ] **ABONNEMENT-001** : CrĂ©er entitĂ© `Abonnement.java` - [ ] **ABONNEMENT-002** : CrĂ©er `AbonnementService.java` - [ ] **ABONNEMENT-003** : CrĂ©er `AbonnementRepository.java` - [ ] **ABONNEMENT-004** : CrĂ©er `AbonnementResource.java` - [ ] **ABONNEMENT-005** : ImplĂ©menter tous les endpoints CRUD - [ ] **ABONNEMENT-006** : CrĂ©er `AbonnementDTO.java` - [ ] **ABONNEMENT-007** : ImplĂ©menter logique de renouvellement - [ ] **ABONNEMENT-008** : ImplĂ©menter gestion plans tarifaires ### 🟡 PRIORITÉ MOYENNE (P1 - Important) #### 4. CrĂ©ation DTO pour tous les concepts - [ ] **DTO-001** : CrĂ©er `DevisCreateDTO.java`, `DevisResponseDTO.java` - [ ] **DTO-002** : CrĂ©er `FactureCreateDTO.java`, `FactureResponseDTO.java` - [ ] **DTO-003** : CrĂ©er `BudgetCreateDTO.java`, `BudgetResponseDTO.java` - [ ] **DTO-004** : CrĂ©er `EmployeCreateDTO.java`, `EmployeResponseDTO.java` - [ ] **DTO-005** : CrĂ©er `MaterielCreateDTO.java`, `MaterielResponseDTO.java` - [ ] **DTO-006** : CrĂ©er `ChantierUpdateDTO.java` - [ ] **DTO-007** : CrĂ©er DTOs pour Planning - [ ] **DTO-008** : CrĂ©er DTOs pour Stock - [ ] **DTO-009** : CrĂ©er DTOs pour BonCommande - [ ] **DTO-010** : CrĂ©er DTOs pour toutes les entitĂ©s majeures #### 5. CrĂ©ation Mappers pour tous les DTO - [ ] **MAPPER-001** : CrĂ©er `DevisMapper.java` - [ ] **MAPPER-002** : CrĂ©er `FactureMapper.java` - [ ] **MAPPER-003** : CrĂ©er `BudgetMapper.java` - [ ] **MAPPER-004** : CrĂ©er `EmployeMapper.java` - [ ] **MAPPER-005** : CrĂ©er `MaterielMapper.java` - [ ] **MAPPER-006** : CrĂ©er `PlanningMapper.java` - [ ] **MAPPER-007** : CrĂ©er mappers pour toutes les entitĂ©s avec DTO #### 6. Standardisation des endpoints - [ ] **STD-001** : VĂ©rifier que tous les endpoints retournent JSON - [ ] **STD-002** : Standardiser format de rĂ©ponse (wrapper avec `data`, `total`, etc.) - [ ] **STD-003** : Ajouter pagination Ă  tous les endpoints list - [ ] **STD-004** : Standardiser messages d'erreur - [ ] **STD-005** : Ajouter annotations OpenAPI complĂštes partout - [ ] **STD-006** : Standardiser logs (GET /path, POST /path, etc.) - [ ] **STD-007** : Ajouter `@Authenticated` ou `@RequirePermission` partout ### 🟱 PRIORITÉ BASSE (P2 - AmĂ©liorations) #### 7. ComplĂ©tion endpoints avancĂ©s - [ ] **ADV-001** : Ajouter endpoints recherche avancĂ©e pour tous les concepts - [ ] **ADV-002** : Ajouter endpoints statistiques pour tous les concepts - [ ] **ADV-003** : Ajouter endpoints export/import CSV/Excel - [ ] **ADV-004** : Ajouter endpoints notification push - [ ] **ADV-005** : Ajouter endpoints gĂ©nĂ©ration PDF #### 8. Documentation - [ ] **DOC-001** : ComplĂ©ter `API.md` avec tous les nouveaux endpoints - [ ] **DOC-002** : Ajouter exemples d'utilisation pour chaque endpoint - [ ] **DOC-003** : Documenter toutes les entitĂ©s dans concepts/ - [ ] **DOC-004** : Mettre Ă  jour README.md #### 9. Tests - [ ] **TEST-001** : CrĂ©er tests unitaires pour tous les services - [ ] **TEST-002** : CrĂ©er tests d'intĂ©gration pour tous les endpoints - [ ] **TEST-003** : CrĂ©er tests E2E pour workflows mĂ©tier - [ ] **TEST-004** : Ajouter tests performance --- ## 📊 RÉCAPITULATIF ### Concepts - ✅ **Complets** : 20/22 (91%) - ⚠ **Partiels** : 1/22 (4.5%) - ❌ **Manquants** : 1/22 (4.5%) ### Services - ✅ **Existants** : 33 - ❌ **Manquants** : 2 (EntrepriseProfile, Abonnement) ### Resources - ✅ **Existantes** : ~40 - ⚠ **ProblĂšme organisation** : 4 emplacements diffĂ©rents - ❌ **Manquantes** : 2 (EntrepriseProfile, Abonnement) ### DTO/Mappers - ✅ **Existants** : 2 concepts complets (Chantier, Client) - ⚠ **Partiels** : 1 concept (Fournisseur) - ❌ **Manquants** : ~18 concepts --- ## 🎯 PROCHAINES ÉTAPES RECOMMANDÉES 1. **Commencez par P0** : RĂ©organisation Resources + Entreprise + Abonnement 2. **Puis P1** : DTO et Mappers 3. **Ensuite P2** : AmĂ©liorations et documentation **Estimation globale** : ~80-100 heures de dĂ©veloppement