Renommage : TrajetKmTracker -> SchotzIadKmTracker (backend, specs, frontend)

- Backend : projets, solution, namespaces et références
  TrajetKmTracker.Api/.Tests -> SchotzIadKmTracker.Api/.Tests
  (dossiers, .csproj, .sln, .http, namespaces C#). GUID UserSecretsId préservé.
- Specs : dossier .kiro/specs/trajet-km-tracker -> schotziad-km-tracker
  et mise à jour des références internes (chemins, tags de propriétés).
- Frontend : projet Angular trajet-km-tracker -> schotziad-km-tracker
  (package.json, angular.json, chemin dist, Dockerfile), titre applicatif
  'SchotzIAD KM Tracker'.
- Docker et scripts (backend/Dockerfile, frontend/Dockerfile, run-dev.sh) mis à jour.
- Suppression du fichier résiduel package.json.bak.

Backend (solution) et frontend (build production) compilent sans erreur.
This commit is contained in:
2026-09-14 07:50:26 +02:00
parent e3f946f7d4
commit 0e6a97ca61
133 changed files with 462 additions and 503 deletions
@@ -417,7 +417,7 @@ export function dateJjMmAAAAValidator(): ValidatorFn {
#### Structure du projet
```
TrajetKmTracker.Api/
SchotzIadKmTracker.Api/
├── Controllers/
│ ├── TrajetsController.cs
│ ├── ResumesMensuelsController.cs
@@ -1356,10 +1356,10 @@ graph LR
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY *.sln ./
COPY TrajetKmTracker.Api/*.csproj TrajetKmTracker.Api/
RUN dotnet restore TrajetKmTracker.Api/TrajetKmTracker.Api.csproj
COPY SchotzIadKmTracker.Api/*.csproj SchotzIadKmTracker.Api/
RUN dotnet restore SchotzIadKmTracker.Api/SchotzIadKmTracker.Api.csproj
COPY . .
RUN dotnet publish TrajetKmTracker.Api/TrajetKmTracker.Api.csproj -c Release -o /app/publish
RUN dotnet publish SchotzIadKmTracker.Api/SchotzIadKmTracker.Api.csproj -c Release -o /app/publish
# ---- Étape runtime (ASP.NET) ----
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
@@ -1375,7 +1375,7 @@ ENV ConnectionStrings__Default="Data Source=/data/trajets.db"
ENV ASPNETCORE_URLS="http://+:8080"
EXPOSE 8080
ENTRYPOINT ["dotnet", "TrajetKmTracker.Api.dll"]
ENTRYPOINT ["dotnet", "SchotzIadKmTracker.Api.dll"]
```
### Frontend `Dockerfile` (multi-stage)
@@ -1394,7 +1394,7 @@ FROM nginx:1.27-alpine AS serve
# Configuration nginx (SPA + reverse-proxy /api)
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Artefacts Angular compilés
COPY --from=build /app/dist/trajet-km-tracker /usr/share/nginx/html
COPY --from=build /app/dist/schotziad-km-tracker /usr/share/nginx/html
EXPOSE 80
```
@@ -1860,7 +1860,7 @@ Configuration minimale : 100 itérations (valeur par défaut FsCheck ≥ 100).
Chaque propriété de correction est couverte par un test FsCheck unique. La clé ORS est mockée dans tous les tests PBT pour éviter des appels réseau réels.
```csharp
// Tag : Feature: trajet-km-tracker, Property 1: Cohérence du total mensuel
// Tag : Feature: schotziad-km-tracker, Property 1: Cohérence du total mensuel
[Property(MaxTest = 200)]
public Property TotalMensuelEgaleSommeDistances()
{
@@ -1873,52 +1873,52 @@ public Property TotalMensuelEgaleSommeDistances()
});
}
// Tag : Feature: trajet-km-tracker, Property 2: Cohérence du total annuel
// Tag : Feature: schotziad-km-tracker, Property 2: Cohérence du total annuel
[Property(MaxTest = 200)]
public Property TotalAnnuelEgaleSommeMensuels() { ... }
// Tag : Feature: trajet-km-tracker, Property 3: Précision de stockage des distances
// Tag : Feature: schotziad-km-tracker, Property 3: Précision de stockage des distances
[Property(MaxTest = 200)]
public Property DistanceArrondieDeuxDecimales() { ... }
// Tag : Feature: trajet-km-tracker, Property 4: Rejet systématique des données d'entrée invalides
// Tag : Feature: schotziad-km-tracker, Property 4: Rejet systématique des données d'entrée invalides
[Property(MaxTest = 500)]
public Property EntreeInvalideRetourne400SansPersistance() { ... }
// Génère des CreateTrajetDto avec dates invalides (mauvais format, date inexistante)
// ET/OU adresses vides/null/> 255 caractères → vérifie HTTP 400 + aucune entrée créée en base
// Tag : Feature: trajet-km-tracker, Property 5: Invariant de suppression
// Tag : Feature: schotziad-km-tracker, Property 5: Invariant de suppression
[Property(MaxTest = 200)]
public Property TrajetSupprimePasInResume() { ... }
// Tag : Feature: trajet-km-tracker, Property 6: Recalcul conditionnel de la distance
// Tag : Feature: schotziad-km-tracker, Property 6: Recalcul conditionnel de la distance
[Property(MaxTest = 200)]
public Property ModificationSansAdressePreserveDistance() { ... }
// Tag : Feature: trajet-km-tracker, Property 7: Mois toujours présents dans le résumé annuel
// Tag : Feature: schotziad-km-tracker, Property 7: Mois toujours présents dans le résumé annuel
[Property(MaxTest = 200)]
public Property ResumeAnnuelContient12Mois() { ... }
// Tag : Feature: trajet-km-tracker, Property 8: Rejet des paramètres de résumé hors plage
// Tag : Feature: schotziad-km-tracker, Property 8: Rejet des paramètres de résumé hors plage
[Property(MaxTest = 300)]
public Property ParamsHorsPlageRetourne400() { ... }
// Génère des mois hors [1,12] et des années hors [2000,2100]
// Tag : Feature: trajet-km-tracker, Property 9: Nommage des fichiers PDF exportés
// Tag : Feature: schotziad-km-tracker, Property 9: Nommage des fichiers PDF exportés
[Property(MaxTest = 200)]
public Property NomFichierPdfConforme() { ... }
// Génère des couples (mois 1-12, année 2000-2100) et des années valides,
// vérifie que Content-Disposition correspond au format attendu
// Tag : Feature: trajet-km-tracker, Property 10: Cohérence du cache après géocodage
// Tag : Feature: schotziad-km-tracker, Property 10: Cohérence du cache après géocodage
[Property(MaxTest = 200)]
public Property AdresseGecoodeePresenteDansCache() { ... }
// Tag : Feature: trajet-km-tracker, Property 11: Politique LRU
// Tag : Feature: schotziad-km-tracker, Property 11: Politique LRU
[Property(MaxTest = 200)]
public Property CacheNExcedePas1000Entrees() { ... }
// Tag : Feature: trajet-km-tracker, Property 12: Cohérence profil domicile
// Tag : Feature: schotziad-km-tracker, Property 12: Cohérence profil domicile
[Property(MaxTest = 200)]
public Property ProfilDomicileCoherent() { ... }
@@ -1995,26 +1995,26 @@ public Property MontantRegleUniqueParPeriode() { ... }
[Property(MaxTest = 300)]
public Property TrancheSelectionneeParTotalAnnuel() { ... }
// Tag : Feature: trajet-km-tracker, Property 28: Unicité normalisée de la dénomination
// Tag : Feature: schotziad-km-tracker, Property 28: Unicité normalisée de la dénomination
[Property(MaxTest = 300)]
public Property DenominationUniqueApresNormalisation() { ... }
// Génère des dénominations variant en casse/accents/espaces de bord ;
// vérifie qu'une seconde dénomination normalisée identique est rejetée (HTTP 400, aucune persistance)
// Tag : Feature: trajet-km-tracker, Property 29: Préservation des trajets à la suppression
// Tag : Feature: schotziad-km-tracker, Property 29: Préservation des trajets à la suppression
[Property(MaxTest = 200)]
public Property SuppressionAdresseNommeePreserveTrajets() { ... }
// Génère des trajets + des adresses nommées, supprime une adresse nommée,
// vérifie que les textes d'adresse et coordonnées des trajets sont inchangés
// Tag : Feature: trajet-km-tracker, Property 30: Réutilisation du cache et cohérence du géocodage
// Tag : Feature: schotziad-km-tracker, Property 30: Réutilisation du cache et cohérence du géocodage
[Property(MaxTest = 200)]
public Property AdresseNommeeReutiliseCacheOuGeocode() { ... }
// Adresse en cache (après normalisation) → coords réutilisées, BAN non appelé (mock BAN vérifié) ;
// adresse valide absente du cache → couple présent en cache après opération ;
// BAN indisponible/timeout → coordonnées null + GeocodageReussi = false
// Tag : Feature: trajet-km-tracker, Property 31: Détermination de l'état de configuration du profil
// Tag : Feature: schotziad-km-tracker, Property 31: Détermination de l'état de configuration du profil
[Property(MaxTest = 300)]
public Property EtatProfilConfigureIffNomPrenomEtVehicule() { ... }
// Génère des états variés (Profil absent/présent, Nom/Prénom vides ou remplis, 0..N véhicules) ;
@@ -9,8 +9,8 @@ Langage backend : **C# (ASP.NET Core, .NET 8)**. Langage frontend : **TypeScript
## Tasks
- [x] 1. Initialiser la solution et le socle backend
- Créer la solution .NET et le projet `TrajetKmTracker.Api` (ASP.NET Core Web API, .NET 8)
- Créer le projet de tests `TrajetKmTracker.Tests` (xUnit) avec les dépendances FsCheck, FluentAssertions, Moq, Microsoft.AspNetCore.Mvc.Testing
- Créer la solution .NET et le projet `SchotzIadKmTracker.Api` (ASP.NET Core Web API, .NET 8)
- Créer le projet de tests `SchotzIadKmTracker.Tests` (xUnit) avec les dépendances FsCheck, FluentAssertions, Moq, Microsoft.AspNetCore.Mvc.Testing
- Ajouter les packages : EF Core + provider SQLite, FluentValidation.AspNetCore, QuestPDF
- Configurer `Program.cs` : services de base, Swagger, middleware `ProblemDetails`, CORS pour le frontend Angular
- _Requirements: 6.1_