feat: implement identity authentication, authorization policies, and MAUI platform support with Docker orchestration

This commit is contained in:
2026-04-29 20:37:41 +02:00
parent 10efed0369
commit 0210611edf
55 changed files with 2359 additions and 949 deletions
@@ -21,9 +21,18 @@ public static class DependencyInjection
{
public static IServiceCollection AddInfrastructure(this IServiceCollection services, IConfiguration configuration)
{
var connectionString = configuration.GetConnectionString("SqliteConnection") ?? "Data Source=nexus.db";
services.AddDbContext<AppDbContext>(options =>
options.UseSqlite(connectionString));
var pgConnectionString = configuration.GetConnectionString("PostgresConnection");
if (!string.IsNullOrEmpty(pgConnectionString))
{
services.AddDbContext<AppDbContext>(options =>
options.UseNpgsql(pgConnectionString));
}
else
{
var sqliteConnectionString = configuration.GetConnectionString("SqliteConnection") ?? "Data Source=nexus.db";
services.AddDbContext<AppDbContext>(options =>
options.UseSqlite(sqliteConnectionString));
}
services.Configure<AiSettings>(configuration.GetSection(AiSettings.SectionName));
var aiSettings = configuration.GetSection(AiSettings.SectionName).Get<AiSettings>() ?? new AiSettings();