Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
270dc35
Include prerequisites and container access instructions in README
samgibsonmoj Nov 28, 2025
1d54ebb
Add badges and include API access instructions
samgibsonmoj Nov 28, 2025
3e76b7e
Include architecture description
samgibsonmoj Nov 28, 2025
d80bd17
Include credentials in tabular format
samgibsonmoj Nov 28, 2025
60995ce
Add MIT license badge
samgibsonmoj Nov 28, 2025
7d51519
Undo unneeded port change for minio
samgibsonmoj Nov 28, 2025
717938d
Include swagger endpoint in README for API
samgibsonmoj Nov 28, 2025
ff16029
Include API and Visualiser clarification in README architecture section
samgibsonmoj Nov 28, 2025
31e7482
Merge pull request #40 from ministryofjustice/feature/update-readme
carlsixsmith-moj Nov 28, 2025
058756a
Throw error if ICurrentUserService isn't registered before database c…
samgibsonmoj Dec 1, 2025
0b226af
Remove environment file (#47)
samgibsonmoj Dec 1, 2025
c33346b
Refactor messaging services (#48)
samgibsonmoj Dec 1, 2025
1220bc3
Clarifies RabbitMQ connection configuration (#49)
samgibsonmoj Dec 1, 2025
34a3e66
Adds Sentry Serilog sink
samgibsonmoj Dec 2, 2025
8ac42d1
Adds Sentry Serilog sink
carlsixsmith-moj Dec 2, 2025
ead1072
Use preferred 'SENTRY_DSN' configuration key (#51)
samgibsonmoj Dec 2, 2025
0a06c7c
Configures default app settings (#52)
samgibsonmoj Dec 2, 2025
d98d01b
Updates package versions (#54)
samgibsonmoj Dec 2, 2025
311bcce
Sentry logging fixes (#55)
samgibsonmoj Dec 2, 2025
258a1d1
Remove default values for API configuration (#56)
samgibsonmoj Dec 2, 2025
b68b5d6
Adds Aspire VS Code extension support (#58)
samgibsonmoj Dec 4, 2025
87a847a
Feature/tweak seed scripts (#57)
samgibsonmoj Dec 4, 2025
f1eec19
Standardises Program.cs service registration (#59)
samgibsonmoj Dec 4, 2025
5850d8c
Adds message/process flow to README (#60)
samgibsonmoj Dec 4, 2025
4cf8a08
Removes contact information from README (#61)
ryankearsley-moj Dec 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .aspire/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"appHostPath": "../src/Aspire/Aspire.AppHost/Aspire.AppHost.csproj"
}
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"version": "0.2.0",
"configurations": [
{
"name": "C#: Aspire.AppHost [Default Configuration]",
"type": "dotnet",
"type": "aspire",
"request": "launch",
"projectPath": "${workspaceFolder}/src/Aspire/Aspire.AppHost/Aspire.AppHost.csproj"
"name": "Aspire: Launch AppHost",
"program": "" // Uses the default AppHost defined in .aspire/settings.json
}
]
}
8 changes: 0 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
<Project>
<PropertyGroup Condition="'$(Configuration)' != 'Release'">
<EnvFile>$(MSBuildThisFileDirectory)development.local.env</EnvFile>
</PropertyGroup>

<Target Name="CopyEnvFile" AfterTargets="Build" Condition="'$(Configuration)' != 'Release'">
<Copy SourceFiles="$(EnvFile)" DestinationFolder="$(OutputPath).." />
</Target>

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
Expand Down
17 changes: 9 additions & 8 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Aspire.Hosting.AppHost" Version="13.0.0" />
<PackageVersion Include="Aspire.Hosting.RabbitMQ" Version="13.0.0" />
<PackageVersion Include="Aspire.Hosting.Redis" Version="13.0.0" />
<PackageVersion Include="Aspire.Hosting.SqlServer" Version="13.0.0" />
<PackageVersion Include="Aspire.RabbitMQ.Client" Version="13.0.0" />
<PackageVersion Include="Aspire.Hosting.AppHost" Version="13.0.1" />
<PackageVersion Include="Aspire.Hosting.RabbitMQ" Version="13.0.1" />
<PackageVersion Include="Aspire.Hosting.Redis" Version="13.0.1" />
<PackageVersion Include="Aspire.Hosting.SqlServer" Version="13.0.1" />
<PackageVersion Include="Aspire.RabbitMQ.Client" Version="13.0.1" />
<PackageVersion Include="AWSSDK.Extensions.NETCore.Setup" Version="4.0.3.14" />
<PackageVersion Include="AWSSDK.SecurityToken" Version="4.0.5.1" />
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.Minio" Version="13.0.0" />
Expand All @@ -22,7 +22,6 @@
</PackageVersion>
<PackageVersion Include="Dapper" Version="2.1.66" />
<PackageVersion Include="DocumentFormat.OpenXml" Version="3.3.0" />
<PackageVersion Include="DotNetEnv" Version="3.1.1" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="10.0.0" />
Expand Down Expand Up @@ -61,12 +60,14 @@
<PackageVersion Include="Rebus.RabbitMq" Version="10.1.0" />
<PackageVersion Include="Rebus.ServiceProvider" Version="10.7.0" />
<PackageVersion Include="Sentry.Serilog" Version="6.0.0-preview.2-prerelease" />
<PackageVersion Include="Serilog.Extensions.Hosting" Version="9.0.1-dev-02307" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="9.0.1-dev-02319" />
<PackageVersion Include="Serilog.Extensions.Hosting" Version="10.0.0" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="10.0.0" />
<PackageVersion Include="Serilog.Sinks.Console" Version="6.1.1" />
<PackageVersion Include="Serilog.Sinks.File" Version="7.0.0" />
<PackageVersion Include="SimMetrics.Net" Version="1.0.5" />
<PackageVersion Include="System.Data.SqlClient" Version="4.9.0" />
<PackageVersion Include="Testcontainers.RabbitMq" Version="4.9.0" />
<PackageVersion Include="Testcontainers.Xunit" Version="4.9.0" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
Expand Down
277 changes: 273 additions & 4 deletions README.md

Large diffs are not rendered by default.

54 changes: 0 additions & 54 deletions development.local.env

This file was deleted.

21 changes: 16 additions & 5 deletions dms.sln
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.0.11116.177
MinimumVisualStudioVersion = 15.0.26124.0
Expand Down Expand Up @@ -38,9 +37,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D3DAF78A-03D7-42EC-8B73-4B4622E61EF8}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
base.development.env = base.development.env
development.docker.env = development.docker.env
development.local.env = development.local.env
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
NuGet.config = NuGet.config
Expand Down Expand Up @@ -100,6 +96,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Offloc.Cleaner.Tests", "tes
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Delius.Parser.Tests", "tests\Delius.Parser.Tests\Delius.Parser.Tests.csproj", "{841B9B78-5596-46EF-B38D-0E1C18321CDF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messaging.Tests", "tests\Messaging.Tests\Messaging.Tests.csproj", "{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -548,6 +546,18 @@ Global
{841B9B78-5596-46EF-B38D-0E1C18321CDF}.Release|x64.Build.0 = Release|Any CPU
{841B9B78-5596-46EF-B38D-0E1C18321CDF}.Release|x86.ActiveCfg = Release|Any CPU
{841B9B78-5596-46EF-B38D-0E1C18321CDF}.Release|x86.Build.0 = Release|Any CPU
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}.Debug|x64.ActiveCfg = Debug|Any CPU
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}.Debug|x64.Build.0 = Debug|Any CPU
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}.Debug|x86.ActiveCfg = Debug|Any CPU
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}.Debug|x86.Build.0 = Debug|Any CPU
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}.Release|Any CPU.Build.0 = Release|Any CPU
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}.Release|x64.ActiveCfg = Release|Any CPU
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}.Release|x64.Build.0 = Release|Any CPU
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}.Release|x86.ActiveCfg = Release|Any CPU
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -593,6 +603,7 @@ Global
{10A645A2-039D-4906-BCB7-DBE12B0EF34D} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
{199066EA-192B-4126-A1BC-85900CDCA1DD} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
{841B9B78-5596-46EF-B38D-0E1C18321CDF} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
{16431464-ACDD-4DE0-8AFF-D8926CF8C14E} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {39E62751-A441-4DEF-AD24-20CDC6D59FF3}
Expand Down
4 changes: 4 additions & 0 deletions src/API/API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
<PackageReference Include="Microsoft.AspNetCore.OpenApi" />
<PackageReference Include="Microsoft.Identity.Web" />
<PackageReference Include="NSwag.AspNetCore" />
<PackageReference Include="Serilog.Extensions.Hosting" />
<PackageReference Include="Serilog.Settings.Configuration" />
<PackageReference Include="Serilog.Sinks.Console" />
<PackageReference Include="Serilog.Sinks.File" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 2 additions & 4 deletions src/API/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
using Infrastructure.Middlewares;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.Identity.Web;
using Namotion.Reflection;
using OpenApiContact = NSwag.OpenApiContact;
using OpenApiInfo = NSwag.OpenApiInfo;
using OpenApiSecurityScheme = NSwag.OpenApiSecurityScheme;


var builder = WebApplication.CreateBuilder(args);

IConfiguration configuration = builder.Configuration;
builder.UseDmsSerilog();

// Add service defaults & Aspire components.
builder.AddServiceDefaults();
Expand Down Expand Up @@ -96,7 +94,7 @@
// Configure the HTTP request pipeline.
app.UseExceptionHandler();

if (configuration["IsDevelopment"] is not null && configuration.GetValue<bool>("IsDevelopment"))
if (builder.Configuration["IsDevelopment"] is not null && builder.Configuration.GetValue<bool>("IsDevelopment"))
{
app.RegisterDevelopmentEndpoints();

Expand Down
6 changes: 5 additions & 1 deletion src/API/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"Microsoft.AspNetCore": "Warning"
}
},
"Auhentication": {
"ApiKey": "password"
},
"AzureAd": {
"ClientId": "916ace49-a3db-4b11-84c5-6c4bd20260ef"
}
},
"IsDevelopment": "True"
}
66 changes: 24 additions & 42 deletions src/API/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,42 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"Authentication": {
"ApiKey": "3A27A442D05942689AF3800E0FE8B242"
},
"AzureAd": {
"TenantId": "c6874728-71e6-41fe-a9e1-2e8c36776ad8",
"Instance": "https://login.microsoftonline.com/",
"ClientId": "",
"Scopes": {
"Read": "dms.read",
"Write": "dms.write"
}
},
"ConnectionStrings": {
"AuditDb": "Data Source=localhost;Initial Catalog=AuditDb;User Id=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=true",
"ClusterDb": "Data Source=localhost;Initial Catalog=ClusterDb;User Id=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=true",
"DeliusRunningPictureDb": "Data Source=localhost;Initial Catalog=DeliusRunningPictureDb;User Id=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=true",
"OfflocRunningPictureDb": "Data Source=localhost;Initial Catalog=OfflocRunningPictureDb;User Id=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=true"
"AuditDb": "",
"DeliusRunningPictureDb": "",
"OfflocRunningPictureDb": "",
"ClusterDb": ""
},
"Serilog": {
"Using": [
"Serilog.Sinks.Console"
],
"MinimumLevel": {
"Default": "Debug",
"Default": "Information",
"Override": {
"Microsoft.AspNetCore": "Warning",
"Microsoft": "Information",
"System": "Information"
"System": "Warning"
}
},
"WriteTo": [
{
"Name": "Console"
},
{
{ "Name": "Console" },
{
"Name": "File",
"Args": {
"path": "../../logs/log-.txt",
"rollingInterval": "Day",
"restrictedToMinimumLevel": "Debug"
"path": "../logs/API-.txt",
"rollingInterval": "Day"
}
}
],
"Enrich": [
"FromLogContext",
"WithMachineName",
"WithThreadId"
],
"Properties": {
"Application": "DMS"
"Enrich": ["FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId"]
},
"AllowedHosts": "*",
"Authentication": {
"ApiKey": ""
},
"AzureAd": {
"TenantId": "c6874728-71e6-41fe-a9e1-2e8c36776ad8",
"Instance": "https://login.microsoftonline.com/",
"ClientId": "",
"Scopes": {
"Read": "dms.read",
"Write": "dms.write"
}
},
"IsDevelopment": "False"
Expand Down
7 changes: 3 additions & 4 deletions src/Aspire/Aspire.AppHost/Extensions/AppExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static IResourceBuilder<ProjectResource> AddDmsApi(
IResourceBuilder<ParameterResource> apiKey,
IResourceBuilder<ParameterResource> isDevelopment)
{
return builder.AddProject<API>("api")
return builder.AddProject<API>("Api")
.WithDmsDatabaseReference(databases.OfflocRunningPicture)
.WithDmsDatabaseReference(databases.DeliusRunningPicture)
.WithDmsDatabaseReference(databases.Cluster)
Expand All @@ -23,7 +23,7 @@ public static IResourceBuilder<ProjectResource> AddDmsVisualiser(
this IDistributedApplicationBuilder builder,
IResourceBuilder<ProjectResource> apiService)
{
return builder.AddProject<Visualiser>("visualiser")
return builder.AddProject<Visualiser>("Visualiser")
.WithReference(apiService).WaitFor(apiService);
}

Expand All @@ -48,10 +48,9 @@ public static IDistributedApplicationBuilder AddDmsServices(
builder.AddDmsService<Meow>("Meow", rabbit, databases, hostMount).WithExplicitStart();
builder.AddDmsService<Offloc_Cleaner>("Offloc-Cleaner", rabbit, databases, hostMount);
builder.AddDmsService<Offloc_Parser>("Offloc-Parser", rabbit, databases, hostMount);

builder.AddDmsService<FileSync>("FileSync", rabbit, databases, hostMount)
.WithReference(minio).WaitFor(minio)
.WithExplicitStart()
.WithEnvironment("MinIO:BucketName", "cfo-dms-files");

return builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ public static IResourceBuilder<SqlServerServerResource> AddDmsSqlServer(
this IDistributedApplicationBuilder builder,
IResourceBuilder<ParameterResource> password)
{
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);

#pragma warning disable ASPIREPROXYENDPOINTS001
return builder.AddSqlServer("sql", password, 61749)
.WithDataVolume("dms-data")
Expand Down Expand Up @@ -79,9 +77,7 @@ public static DmsDatabaseResources AddDmsDatabases(
{
builder.AddProject<FakeDataSeeder>("FakeDataSeeder")
.WithReference(cluster)
.WaitForCompletion(clusterSqlProj)
.WaitForCompletion(offlocRunningPictureSqlProj)
.WaitForCompletion(deliusRunningPictureSqlProj);
.WaitForCompletion(clusterSqlProj);
}

return new DmsDatabaseResources(
Expand Down
Loading
Loading