From 9577aa996ae963419f0d7c8f45fde250ca76bfb0 Mon Sep 17 00:00:00 2001 From: gamer147 Date: Fri, 30 Jan 2026 16:33:43 -0500 Subject: [PATCH] [FA-misc] Scaffold ReportingService project Co-Authored-By: Claude Opus 4.5 --- ...ionArchive.Service.ReportingService.csproj | 27 +++++++++++++++++++ .../Program.cs | 12 +++++++++ .../Properties/launchSettings.json | 23 ++++++++++++++++ .../appsettings.json | 27 +++++++++++++++++++ .../subgraph-config.json | 6 +++++ FictionArchive.sln | 8 +++++- 6 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 FictionArchive.Service.ReportingService/FictionArchive.Service.ReportingService.csproj create mode 100644 FictionArchive.Service.ReportingService/Program.cs create mode 100644 FictionArchive.Service.ReportingService/Properties/launchSettings.json create mode 100644 FictionArchive.Service.ReportingService/appsettings.json create mode 100644 FictionArchive.Service.ReportingService/subgraph-config.json diff --git a/FictionArchive.Service.ReportingService/FictionArchive.Service.ReportingService.csproj b/FictionArchive.Service.ReportingService/FictionArchive.Service.ReportingService.csproj new file mode 100644 index 0000000..e486c8c --- /dev/null +++ b/FictionArchive.Service.ReportingService/FictionArchive.Service.ReportingService.csproj @@ -0,0 +1,27 @@ + + + + net8.0 + enable + enable + Linux + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + .dockerignore + + + + + + + + diff --git a/FictionArchive.Service.ReportingService/Program.cs b/FictionArchive.Service.ReportingService/Program.cs new file mode 100644 index 0000000..6d98235 --- /dev/null +++ b/FictionArchive.Service.ReportingService/Program.cs @@ -0,0 +1,12 @@ +namespace FictionArchive.Service.ReportingService; + +public class Program +{ + public static void Main(string[] args) + { + var builder = WebApplication.CreateBuilder(args); + var app = builder.Build(); + app.MapGet("/healthz", () => "ok"); + app.Run(); + } +} diff --git a/FictionArchive.Service.ReportingService/Properties/launchSettings.json b/FictionArchive.Service.ReportingService/Properties/launchSettings.json new file mode 100644 index 0000000..b6c8106 --- /dev/null +++ b/FictionArchive.Service.ReportingService/Properties/launchSettings.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:5140", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7310;http://localhost:5140", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/FictionArchive.Service.ReportingService/appsettings.json b/FictionArchive.Service.ReportingService/appsettings.json new file mode 100644 index 0000000..ebb5510 --- /dev/null +++ b/FictionArchive.Service.ReportingService/appsettings.json @@ -0,0 +1,27 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning", + "Microsoft.EntityFrameworkCore": "Warning" + } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=localhost;Database=FictionArchive_Reporting;Username=postgres;password=postgres" + }, + "RabbitMQ": { + "ConnectionString": "amqp://localhost", + "ClientIdentifier": "ReportingService" + }, + "OIDC": { + "Authority": "https://auth.orfl.xyz/application/o/fiction-archive/", + "ClientId": "ldi5IpEidq2WW0Ka1lehVskb2SOBjnYRaZCpEyBh", + "Audience": "ldi5IpEidq2WW0Ka1lehVskb2SOBjnYRaZCpEyBh", + "ValidIssuer": "https://auth.orfl.xyz/application/o/fiction-archive/", + "ValidateIssuer": true, + "ValidateAudience": true, + "ValidateLifetime": true, + "ValidateIssuerSigningKey": true + }, + "AllowedHosts": "*" +} diff --git a/FictionArchive.Service.ReportingService/subgraph-config.json b/FictionArchive.Service.ReportingService/subgraph-config.json new file mode 100644 index 0000000..529f9a0 --- /dev/null +++ b/FictionArchive.Service.ReportingService/subgraph-config.json @@ -0,0 +1,6 @@ +{ + "subgraph": "Reporting", + "http": { + "baseAddress": "http://localhost:5140/graphql" + } +} diff --git a/FictionArchive.sln b/FictionArchive.sln index 8d09302..3479e0f 100644 --- a/FictionArchive.sln +++ b/FictionArchive.sln @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# +# Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FictionArchive.Common", "FictionArchive.Common\FictionArchive.Common.csproj", "{ABF1BA10-9E76-45BE-9947-E20445A68147}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FictionArchive.API", "FictionArchive.API\FictionArchive.API.csproj", "{420CC1A1-9DBC-40EC-B9E3-D4B25D71B9A9}" @@ -23,6 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FictionArchive.Service.User EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FictionArchive.Service.UserNovelDataService", "FictionArchive.Service.UserNovelDataService\FictionArchive.Service.UserNovelDataService.csproj", "{A278565B-D440-4AB9-B2E2-41BA3B3AD82A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FictionArchive.Service.ReportingService", "FictionArchive.Service.ReportingService\FictionArchive.Service.ReportingService.csproj", "{F29F7969-2B40-4B92-A8F5-9544A4F700DC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -73,5 +75,9 @@ Global {A278565B-D440-4AB9-B2E2-41BA3B3AD82A}.Debug|Any CPU.Build.0 = Debug|Any CPU {A278565B-D440-4AB9-B2E2-41BA3B3AD82A}.Release|Any CPU.ActiveCfg = Release|Any CPU {A278565B-D440-4AB9-B2E2-41BA3B3AD82A}.Release|Any CPU.Build.0 = Release|Any CPU + {F29F7969-2B40-4B92-A8F5-9544A4F700DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F29F7969-2B40-4B92-A8F5-9544A4F700DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F29F7969-2B40-4B92-A8F5-9544A4F700DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F29F7969-2B40-4B92-A8F5-9544A4F700DC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal