feat(backend): Replace Node.js API with .NET 8

This commit completes the migration of the backend service from a Node.js/Express application to an ASP.NET Core 8 Minimal API.

- Re-implemented all API endpoints in C# for improved performance and type safety.
- Updated the Gitea Actions workflow to use the `setup-dotnet` action, `dotnet publish` for building, and now caches NuGet packages.
- Modified the deployment to create an `appsettings.Production.json` file from Gitea secrets instead of a `.env` file.
- Updated the PM2 ecosystem configuration to run the application using the `dotnet` interpreter.
This commit is contained in:
2025-10-29 19:14:20 -03:00
parent f14e298c46
commit 40fd792be1
30 changed files with 1017 additions and 1077 deletions

View File

@@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>13f24551-c620-43ab-9c94-073e5617c79d</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Controllers\**" />
<Content Remove="Controllers\**" />
<EmbeddedResource Remove="Controllers\**" />
<None Remove="Controllers\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.System" Version="9.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="9.0.0" />
<PackageReference Include="AutoMapper" Version="15.0.1" />
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.1" />
<PackageReference Include="MailKit" Version="4.13.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.23.0-preview.4" />
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\JoaoLoureiro.Portfolio.Application\JoaoLoureiro.Portfolio.Core.csproj" />
<ProjectReference Include="..\JoaoLoureiro.Portfolio.Infrastructure\JoaoLoureiro.Portfolio.Infrastructure.csproj" />
</ItemGroup>
</Project>