API SaaS de gestion nutritionnelle — backend ASP.NET Core 10.
cd src/NutritionApi.Api
dotnet run --launch-profile httpAccès : http://localhost:5089 Swagger : http://localhost:5089/swagger
# Générer le certificat de développement (une seule fois)
dotnet dev-certs https --trust
cd src/NutritionApi.Api
dotnet run --launch-profile httpsAccès : https://localhost:7181 Swagger : https://localhost:7181/swagger
docker build -f src/NutritionApi.Api/Dockerfile -t nutrition-api .
docker run -p 8080:8080 -p 8081:8081 nutrition-api| Service | URL |
|---|---|
| API HTTP | http://localhost:8080 |
| API HTTPS | https://localhost:8081 |
| Swagger | http://localhost:8080/swagger |
dotnet testdotnet test --settings tests/coverage.runsettings --collect:"XPlat Code Coverage" --results-directory ./coverage
dotnet test --collect:"XPlat Code Coverage"# Installer ReportGenerator (une seule fois, outil global)
dotnet tool install -g dotnet-reportgenerator-globaltool
# Générer le rapport
reportgenerator -reports:"coverage/**/coverage.cobertura.xml" -targetdir:"coverage/report" -reporttypes:Html -classfilters:"-NutritionApi.Application.DTOS.*"Le rapport est généré dans coverage/report/index.html.
Seuils minimum par couche :
| Couche | Seuil |
|---|---|
| Domain | 90 % |
| Application | 80 % |
| Infrastructure | 70 % |
| API | 70 % |
Ce projet suit un workflow feature/* → dev → prod → main.
dev— intégration, toutes les features y sont mergées via squash PRprod— production, alimentée depuisdev, déclenche le déploiement VPSmain— releases stables taguées (vX.Y.Z)
Voir CONTRIBUTING.md pour le workflow complet, les conventions de commit et les règles de protection de branches.
Voir CHANGELOG.md — géré automatiquement par Release Please.