Skip to content

Commit 5622e87

Browse files
authored
Merge branch 'Develop/Feature/TD-5930-Blazor-Implementation-Integration-LH' into Develop/Feature/TD-6114-Nuget-CICD
2 parents 820c384 + 91078fe commit 5622e87

File tree

95 files changed

+1140
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1140
-84
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,11 @@ obj
6161
/LearningHub.Nhs.WebUI.BlazorClient/LearningHub.Nhs.WebUI.BlazorClient.csproj.user
6262
/LearningHub.Nhs.WebUI.BlazorClient/wwwroot/appsettings.Development.json
6363
/LearningHub.Nhs.WebUI.BlazorClient/Properties/launchSettings.json
64+
/LearningHub.Nhs.WebUI/nuget.config
65+
/LearningHub.Nhs.WebUI.BlazorClient/Properties/launchSettings.json
66+
/LearningHub.Nhs.WebUI.BlazorClient/wwwroot/appsettings.json
67+
/LearningHub.Nhs.WebUI.BlazorClient/wwwroot/appsettings.Development.json
68+
/LearningHub.Nhs.WebUI.BlazorClient/nuget.config
69+
/LearningHub.Nhs.WebUI.BlazorClient/LearningHub.Nhs.WebUI.BlazorClient.csproj.user
70+
/LearningHub.Nhs.WebUI.slnLaunch.user
6471
/.github/workflows/test.yml

AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<PackageReference Include="Azure.Storage.Blobs" Version="12.23.0" />
8484
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.8.0" />
8585
<PackageReference Include="BuildWebCompiler" Version="1.12.405" />
86-
<PackageReference Include="elfhHub.Nhs.Models" Version="3.0.9" />
86+
<PackageReference Include="elfhHub.Nhs.Models" Version="3.0.8" />
8787
<PackageReference Include="FluentValidation" Version="11.11.0" />
8888
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
8989
<PackageReference Include="HtmlSanitizer" Version="6.0.453" />
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
namespace LearningHub.Nhs.Shared.Configuration
2+
{
3+
using LearningHub.Nhs.Shared.Interfaces.Configuration;
4+
/// <summary>
5+
/// Represents a public-facing set of configuration values for Findwise search,
6+
/// intended to be safely exposed to client-side applications or public APIs.
7+
///
8+
/// <para>
9+
/// Contains only non-sensitive data such as page sizes for various search types.
10+
/// </para>
11+
/// </summary>
12+
public class ExposableFindwiseSettings : IExposableFindwiseSettings
13+
{
14+
/// <summary>
15+
/// Gets or sets the ResourceSearchPageSize.
16+
/// </summary>
17+
public int ResourceSearchPageSize { get; set; }
18+
19+
/// <summary>
20+
/// Gets or sets the CatalogueSearchPageSize.
21+
/// </summary>
22+
public int CatalogueSearchPageSize { get; set; }
23+
24+
/// <summary>
25+
/// Gets or sets the AllCatalogueSearchPageSize.
26+
/// </summary>
27+
public int AllCatalogueSearchPageSize { get; set; }
28+
}
29+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
namespace LearningHub.Nhs.Shared.Configuration
2+
{
3+
using LearningHub.Nhs.Shared.Interfaces.Configuration;
4+
/// <summary>
5+
/// Represents configuration values that are safe to expose to clientside frontend applications
6+
/// (such as Blazor WebAssembly) or public-facing APIs.
7+
///
8+
/// <para>
9+
/// Implements <see cref="IExposableSettings"/> and contains only non-sensitive, non-secret
10+
/// values such as public API endpoints and pagination settings. This separation ensures
11+
/// that secure or private configuration data is not inadvertently exposed to clients.
12+
/// </para>
13+
/// </summary>
14+
public class ExposableSettings : IExposableSettings
15+
{
16+
/// <inheritdoc/>
17+
public string LearningHubApiUrl { get; set; }
18+
19+
/// <summary>
20+
/// Gets or sets the UserApiUrl.
21+
/// </summary>
22+
public string UserApiUrl { get; set; }
23+
24+
/// <summary>
25+
/// Gets or sets the OpenApiUrl.
26+
/// </summary>
27+
public string OpenApiUrl { get; set; }
28+
/// <summary>
29+
/// Backend for Frontend (BFF) URL for the Learning Hub API accessed by samesite cookie and uses httpclients with bearers to access external apis.
30+
/// </summary>
31+
public string LearningHubApiBFFUrl { get; set; }
32+
/// <inheritdoc/>
33+
public IExposableFindwiseSettings FindwiseSettings { get; set; }
34+
35+
}
36+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
namespace LearningHub.Nhs.Shared.Interfaces.Configuration
2+
{
3+
/// <summary>
4+
/// Represents configuration values related to Findwise search that are safe to expose
5+
/// to client-side applications or public-facing APIs.
6+
///
7+
/// <para>
8+
/// This includes non-sensitive values such as page sizes for different types of search results.
9+
/// It does not contain any secure credentials or internal service configuration.
10+
/// </para>
11+
/// </summary>
12+
public interface IExposableFindwiseSettings
13+
{
14+
/// <summary>
15+
/// Gets or sets the page size for resource search results.
16+
/// </summary>
17+
public int ResourceSearchPageSize { get; set; }
18+
19+
/// <summary>
20+
/// Gets or sets the CatalogueSearchPageSize.
21+
/// </summary>
22+
public int CatalogueSearchPageSize { get; set; }
23+
24+
/// <summary>
25+
/// Gets or sets the AllCatalogueSearchPageSize.
26+
/// </summary>
27+
public int AllCatalogueSearchPageSize { get; set; }
28+
}
29+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
namespace LearningHub.Nhs.Shared.Interfaces.Configuration
2+
{
3+
/// <summary>
4+
/// Defines a contract for configuration data that is non-sensitive and safe to expose publicly
5+
///
6+
/// <para>
7+
/// This interface exposes only data that is safe to be publicly consumed or shared,
8+
/// such as API endpoint URLs or non-sensitive configuration values.
9+
/// It explicitly excludes any private or sensitive information (e.g., authentication tokens,
10+
/// credentials, or secret keys), which should be handled via separate interfaces or services.
11+
/// </para>
12+
///
13+
/// <para>
14+
/// The data provided by this interface can be safely used in frontend technologies,
15+
/// such as Blazor WebAssembly, JavaScript frameworks, or other client-side applications,
16+
/// without risking exposure of sensitive information.
17+
/// </para>
18+
/// </summary>
19+
public interface IExposableSettings
20+
{
21+
/// <summary>
22+
/// Gets or sets the LearningHubApiUrl.
23+
/// </summary>
24+
public string LearningHubApiUrl { get; set; }
25+
26+
/// <summary>
27+
/// Gets or sets the UserApiUrl.
28+
/// </summary>
29+
public string UserApiUrl { get; set; }
30+
31+
/// <summary>
32+
/// Gets or sets the OpenApiUrl.
33+
/// </summary>
34+
public string OpenApiUrl { get; set; }
35+
/// <summary>
36+
/// Gets or sets the LearningHubApiBFFUrl used to proxy via same domain cookie to the BFF LearningHubAPI calls.
37+
/// </summary>
38+
public string LearningHubApiBFFUrl { get; set; }
39+
40+
public IExposableFindwiseSettings FindwiseSettings { get; set; }
41+
}
42+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace LearningHub.Nhs.Shared.Interfaces.Http
2+
{
3+
/// <summary>
4+
/// Represents an HTTP client for a specific API.
5+
/// </summary>
6+
public interface IAPIHttpClient
7+
{
8+
/// <summary>
9+
/// Gets the configured <see cref="HttpClient"/> for the API.
10+
/// </summary>
11+
Task<HttpClient> GetClientAsync();
12+
13+
/// <summary>
14+
/// Gets the base URL of the API.
15+
/// </summary>
16+
string ApiUrl { get; }
17+
}
18+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
namespace LearningHub.Nhs.Shared.Interfaces.Http
2+
{
3+
/// <summary>
4+
/// Marker interface for the LearningHub API HttpClient.
5+
///
6+
/// <para>
7+
/// Inherits from <see cref="IAPIHttpClient"/> to enable
8+
/// dependency injection of a specific implementation configured with
9+
/// different API endpoints or settings specific to LH API.
10+
/// </para>
11+
///
12+
/// <para>
13+
/// Currently, this interface is empty and used solely to differentiate implementations
14+
/// that connect to different endpoints via configuration, but it may be extended in the future
15+
/// with LearningHub-specific functionality or properties.
16+
/// </para>
17+
/// </summary>
18+
public interface ILearningHubHttpClient : IAPIHttpClient
19+
{
20+
21+
}
22+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace LearningHub.Nhs.Shared.Interfaces.Http
8+
{
9+
/// <summary>
10+
/// Marker interface for the IOpenAPIHttpClient API HttpClient.
11+
///
12+
/// <para>
13+
/// Inherits from <see cref="IAPIHttpClient"/> to enable
14+
/// dependency injection of a specific implementation configured with
15+
/// a openapi-related API endpoint or settings.
16+
/// </para>
17+
///
18+
/// <para>
19+
/// This interface is currently empty and used solely to differentiate
20+
/// implementations that connect to different endpoints via configuration.
21+
/// It may be extended in the future with user-specific functionality or properties.
22+
/// </para>
23+
/// </summary>
24+
public interface IOpenApiHttpClient : IAPIHttpClient
25+
{
26+
27+
}
28+
}

0 commit comments

Comments
 (0)