Compare commits

..

13 Commits

Author SHA1 Message Date
blyssco
b60c57e19c Reset pour intégrer les bonnes practices 2025-09-02 18:29:22 +02:00
blyssco
8be1a8db92 Delete unnecessary folder 2025-08-17 23:07:33 +02:00
blyssco
a27a1351cf More code 2025-08-16 21:01:14 +02:00
blyssco
2d8d8ed754 Update application part 2025-08-09 18:09:17 +02:00
blyssco
39b8312807 Maj 2025-08-02 18:56:44 +02:00
blyssco
5cd762fc3d Ajout de code, j'en suis à la partie application 2025-07-29 21:00:45 +02:00
659d263ea7 Merge pull request '1 - Setup API Clean Architecture' (#13) from feature/1 into develop
Reviewed-on: #13
2025-07-08 21:15:28 +00:00
blyssco
d1fa49bc6b Nettoyage de la classe vide Class1.cs 2025-07-07 20:02:17 +02:00
blyssco
8f3db0e133 Correction du launch browser à true 2025-07-07 19:59:08 +02:00
blyssco
5f6aa216aa Fix 2025-07-05 15:56:43 +02:00
blyssco
31299e413d Edit config 2025-07-05 14:16:02 +02:00
blyssco
380bb038cb Setup API Clean Architecture 2025-07-05 13:20:54 +02:00
blyssco
b29ebd7805 Cleaning initial project 2025-07-05 12:41:45 +02:00
17 changed files with 128 additions and 96 deletions

View File

@ -0,0 +1,6 @@
@LiberIncantamentum.API_HostAddress = http://localhost:5196
GET {{LiberIncantamentum.API_HostAddress}}/weatherforecast/
Accept: application/json
###

View File

@ -7,7 +7,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.5" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.7" />
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
</ItemGroup>
</Project>

View File

@ -5,7 +5,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://localhost:5225",
"applicationUrl": "http://localhost:5196",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
@ -14,7 +14,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "https://localhost:7239;http://localhost:5225",
"applicationUrl": "https://localhost:7236;http://localhost:5196",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -1,9 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36109.1 d17.14
VisualStudioVersion = 17.14.36109.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum", "Liber_Incantamentum\Liber_Incantamentum.csproj", "{BB761821-A9EC-4EBA-83A2-89F32C50041F}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{93BEE101-D8F6-4622-95B6-E135AA9C066E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.API", "LiberIncantamentum.API\Liber_Incantamentum.API.csproj", "{8B578810-E61F-4C5D-89B0-DE62B85346F7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.Domain", "LiberIncantamentum.Domain\Liber_Incantamentum.Domain.csproj", "{0B68D83C-1751-427D-840D-1285A3DB98D0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.Infrastructure", "LiberIncantamentum.Infrastructure\Liber_Incantamentum.Infrastructure.csproj", "{8D09ADAE-591C-4487-924F-2339D29EE60D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.Application", "LiberIncantamentum.Application\Liber_Incantamentum.Application.csproj", "{20EAEB50-C4FD-4A2D-92CC-8D0241556617}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.UnitTests", "LiberIncantamentum.UnitTests\Liber_Incantamentum.UnitTests.csproj", "{B829A2A1-9366-422B-B372-5DDA33BD2690}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.FunctionalTests", "Liber_Incantamentum.FunctionnalTests\Liber_Incantamentum.FunctionalTests.csproj", "{8F1D203C-1A76-4E76-AFC9-7B7477EB143E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.IntegrationTests", "Liber_Incantamentum.IntegrationTests\Liber_Incantamentum.IntegrationTests.csproj", "{F36ABF3F-5707-463C-BC33-DF8A261E4B5A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -11,14 +27,47 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BB761821-A9EC-4EBA-83A2-89F32C50041F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB761821-A9EC-4EBA-83A2-89F32C50041F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB761821-A9EC-4EBA-83A2-89F32C50041F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BB761821-A9EC-4EBA-83A2-89F32C50041F}.Release|Any CPU.Build.0 = Release|Any CPU
{8B578810-E61F-4C5D-89B0-DE62B85346F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B578810-E61F-4C5D-89B0-DE62B85346F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B578810-E61F-4C5D-89B0-DE62B85346F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B578810-E61F-4C5D-89B0-DE62B85346F7}.Release|Any CPU.Build.0 = Release|Any CPU
{0B68D83C-1751-427D-840D-1285A3DB98D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B68D83C-1751-427D-840D-1285A3DB98D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B68D83C-1751-427D-840D-1285A3DB98D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B68D83C-1751-427D-840D-1285A3DB98D0}.Release|Any CPU.Build.0 = Release|Any CPU
{8D09ADAE-591C-4487-924F-2339D29EE60D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D09ADAE-591C-4487-924F-2339D29EE60D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D09ADAE-591C-4487-924F-2339D29EE60D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D09ADAE-591C-4487-924F-2339D29EE60D}.Release|Any CPU.Build.0 = Release|Any CPU
{20EAEB50-C4FD-4A2D-92CC-8D0241556617}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20EAEB50-C4FD-4A2D-92CC-8D0241556617}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20EAEB50-C4FD-4A2D-92CC-8D0241556617}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20EAEB50-C4FD-4A2D-92CC-8D0241556617}.Release|Any CPU.Build.0 = Release|Any CPU
{B829A2A1-9366-422B-B372-5DDA33BD2690}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B829A2A1-9366-422B-B372-5DDA33BD2690}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B829A2A1-9366-422B-B372-5DDA33BD2690}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B829A2A1-9366-422B-B372-5DDA33BD2690}.Release|Any CPU.Build.0 = Release|Any CPU
{8F1D203C-1A76-4E76-AFC9-7B7477EB143E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F1D203C-1A76-4E76-AFC9-7B7477EB143E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F1D203C-1A76-4E76-AFC9-7B7477EB143E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F1D203C-1A76-4E76-AFC9-7B7477EB143E}.Release|Any CPU.Build.0 = Release|Any CPU
{F36ABF3F-5707-463C-BC33-DF8A261E4B5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F36ABF3F-5707-463C-BC33-DF8A261E4B5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F36ABF3F-5707-463C-BC33-DF8A261E4B5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F36ABF3F-5707-463C-BC33-DF8A261E4B5A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{8B578810-E61F-4C5D-89B0-DE62B85346F7} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{0B68D83C-1751-427D-840D-1285A3DB98D0} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{8D09ADAE-591C-4487-924F-2339D29EE60D} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{20EAEB50-C4FD-4A2D-92CC-8D0241556617} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{B829A2A1-9366-422B-B372-5DDA33BD2690} = {93BEE101-D8F6-4622-95B6-E135AA9C066E}
{8F1D203C-1A76-4E76-AFC9-7B7477EB143E} = {93BEE101-D8F6-4622-95B6-E135AA9C066E}
{F36ABF3F-5707-463C-BC33-DF8A261E4B5A} = {93BEE101-D8F6-4622-95B6-E135AA9C066E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B7CB31CD-9866-48CB-8A83-9F2EB1E9E53B}
EndGlobalSection

View File

@ -1,33 +0,0 @@
using Microsoft.AspNetCore.Mvc;
namespace Liber_Incantamentum.Controllers
{
[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
private readonly ILogger<WeatherForecastController> _logger;
public WeatherForecastController(ILogger<WeatherForecastController> logger)
{
_logger = logger;
}
[HttpGet(Name = "GetWeatherForecast")]
public IEnumerable<WeatherForecast> Get()
{
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
TemperatureC = Random.Shared.Next(-20, 55),
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
})
.ToArray();
}
}
}

View File

@ -1,6 +0,0 @@
@Liber_Incantamentum_HostAddress = http://localhost:5225
GET {{Liber_Incantamentum_HostAddress}}/weatherforecast/
Accept: application/json
###

View File

@ -1,13 +0,0 @@
namespace Liber_Incantamentum
{
public class WeatherForecast
{
public DateOnly Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
public string? Summary { get; set; }
}
}

View File

@ -38,14 +38,14 @@ Développer une API professionnelle respectant les bonnes pratiques modernes :
Liber_Incantamentum/
├── src/
│ ├── Liber_Incantamentum.Api/ → API (controllers, middlewares)
│ ├── Liber_Incantamentum.Application/ → Use cases (logique métier)
│ ├── Liber_Incantamentum.Domain/ → Entités, Enums, Interfaces
│ └── Liber_Incantamentum.Infrastructure/ → Persistance (ex: EF Core)
│ ├── Liber_Incantamentum.Api/
│ ├── Liber_Incantamentum.Application/
│ ├── Liber_Incantamentum.Domain/
│ └── Liber_Incantamentum.Infrastructure/
└── tests/
├── Liber_Incantamentum.Tests.Unit/ → Tests unitaires
└── Liber_Incantamentum.Tests.Integration/→ Tests dintégration & sécurité
├── Liber_Incantamentum.Tests.Unit/
└── Liber_Incantamentum.Tests.Integration/
```
---
@ -118,35 +118,6 @@ Toutes les routes sont protégées par une clé API :
---
## ▶️ Lancer le projet
```bash
# Compilation
dotnet build
# Lancer lAPI
dotnet run --project src/Liber_Incantamentum.Api
```
---
## 🧪 Lancer les tests
```bash
dotnet test
```
---
## ✅ Fichiers présents à la racine
- `Liber_Incantamentum.sln` — Solution .NET
- `.editorconfig` — Convention de code
- `.gitignore` — Fichiers à ignorer
- `README.md` — Documentation du projet
---
## ✨ Technologies utilisées
- C# / .NET 9