Backend data APIs, DTOs, and infrastructure definitions that power the XtremeIdiots Portal across multiple API versions.
Versioned REST APIs, DTO abstractions, EF Core data access, and Terraform infrastructure keep the XtremeIdiots Portal synchronized with in-game telemetry. API hosts share mapping extensions, ApiResponse envelopes, and Azure App Configuration defaults, while Terraform standardizes App Service, API Management, SQL, Key Vault, and monitoring assets across every environment.
- .NET 9.0 – API hosts, DTO libraries, clients, and automated tests
- EF Core DataLib for SQL Server/Azure SQL – Generated data layer packaged for the APIs
- Terraform 1.14+ with AzureRM 4.54.0 – Infrastructure as code for Azure resources
- Azure App Service, Azure API Management, Azure Front Door – Production hosting surface
- docs/api-backend-mapping.md – APIM backend mapping strategy for routing versioned APIs.
- docs/api-backend-migration.md – Steps for migrating legacy APIs into the modern backend layout.
- docs/api-design-v2.md – V2 contract, DTO envelopes, and error handling principles.
- docs/api-versioning.md – Implementation details for API host and APIM versioning.
- docs/efcore-data-lib.md – Regeneration walkthrough for the EF Core DataLib from the DACPAC.
Highlights
- Legacy, V1, and V2 API hosts reuse DTOs, mapping helpers, and telemetry defaults for consistent responses.
- Automated Swagger generation feeds API Management and Terraform so inbound/outbound policies always match the code.
- Terraform provisions App Service, API Management, SQL, Key Vault, and dashboards via OIDC-only deployments.
Sample Usage (optional)
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddApplicationInsightsTelemetry();
builder.Services.AddControllers();
var app = builder.Build();
app.MapGroup("/api/v2/players")
.MapGet("/", async (IPlayersService service, CancellationToken ct) =>
{
var apiResponse = await service.GetPlayersAsync(expand: true, cancellationToken: ct);
return apiResponse.ToHttpResult();
});
app.Run();git clone https://github.com/frasermolyneux/portal-repository.git
cd portal-repository
dotnet tool restore
dotnet build src/XtremeIdiots.Portal.Repository.sln
dotnet test src/XtremeIdiots.Portal.Repository.sln --filter FullyQualifiedName!~IntegrationTests
dotnet run --project src/XtremeIdiots.Portal.Repository.Api.V2/XtremeIdiots.Portal.Repository.Api.V2.csprojPlease read the contributing guidance; this is a learning and development project.
Please read the security guidance; I am always open to security feedback through email or opening an issue.
Distributed under the GNU General Public License v3.0.