Skip to content

Commit 4f82be3

Browse files
committed
Replace API project with MVC and upgrade NuGet packages and delete integration tests
1 parent 1e7e5c4 commit 4f82be3

109 files changed

Lines changed: 83020 additions & 623 deletions

File tree

Some content is hidden

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

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"dotnet-reportgenerator-globaltool": {
6-
"version": "5.5.10",
6+
"version": "5.5.11",
77
"commands": [
88
"reportgenerator"
99
],

.dockerignore

Lines changed: 0 additions & 25 deletions
This file was deleted.

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<PackageVersion Include="xunit.v3.mtp-v2" Version="3.2.2" />
3232
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.9.0" />
3333
<!-- Experimental (alpha): GitHub Actions job summaries and PR annotations for test runs -->
34-
<PackageVersion Include="Microsoft.Testing.Extensions.GitHubActionsReport" Version="1.0.0-alpha.26363.8" />
35-
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="2.3.2" />
34+
<PackageVersion Include="Microsoft.Testing.Extensions.GitHubActionsReport" Version="1.0.0-alpha.26377.5" />
35+
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="2.3.3" />
3636
</ItemGroup>
3737
</Project>

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Introduction
22

3-
SchoolAccount-ApiTemplate is a template for building ASP.NET Core Web APIs for the DfE School Account service. It
4-
provides a minimal clean architecture solution, with CQRS abstractions, structured logging, error handling, and
5-
architecture tests already wired up, so new backend services can start from a consistent, proven baseline rather than
6-
from scratch.
3+
SchoolAccount-Web is an MVC presentation application for the DfE School Account service built on .NET 10. It
4+
uses a minimal clean architecture solution, with CQRS abstractions, structured logging, error handling, and
5+
architecture tests.
76

87
## Documentation
98

@@ -149,5 +148,5 @@ is available at http://localhost:8081.
149148
## Contributing
150149

151150
1. Branch from `main` using the convention `task/<short-description>` or `feature/<short-description>`.
152-
2. Open a [pull request](https://github.com/DFE-Digital/SchoolAccount-ApiTemplate/pulls) against `main`.
151+
2. Open a [pull request](https://github.com/DFE-Digital/SchoolAccount-Web/pulls) against `main`.
153152
3. The [build workflow](.github/workflows/build.yml) must pass before merging.

SchoolAccount.Web.slnx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
<File Path="README.md" />
2323
</Folder>
2424
<Folder Name="/src/">
25+
<Project Path="src/SchoolAccount.Web.Mvc/SchoolAccount.Web.Mvc.csproj" />
2526
<Project Path="src\SchoolAccount.Application\SchoolAccount.Application.csproj" />
2627
<Project Path="src\SchoolAccount.Domain\SchoolAccount.Domain.csproj" />
2728
<Project Path="src\SchoolAccount.Infrastructure\SchoolAccount.Infrastructure.csproj" />
2829
<Project Path="src\SchoolAccount.SharedKernel\SchoolAccount.SharedKernel.csproj" />
29-
<Project Path="src\SchoolAccount.Web.Api\SchoolAccount.Web.Api.csproj" />
3030
</Folder>
3131
<Folder Name="/tests/">
3232
<Project Path="tests\SchoolAccount.ApplicationTests\SchoolAccount.ApplicationTests.csproj" />

docs/clean-architecture.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ Infrastructure depends on both Domain and Application but is never referenced by
8383

8484
### 4. Presentation
8585

86-
The entry point to the system - the Web API project. In this solution that is `Web.Api`.
86+
The entry point to the system - the presentation project. In this solution that is `Web.Mvc`.
8787

8888
Contains:
89-
- **Endpoints** - thin wrappers implementing `IEndpoint` that dispatch Commands and Queries
89+
- **Controllers** - typical MVC controller patterns
9090
- **Middleware** - request pipeline concerns
9191
- **Error handling** - exception handling and mapping `Result` failures to HTTP problem details
9292
- **Authentication configuration**
@@ -105,24 +105,24 @@ Domain ← Application ← Infrastructure
105105

106106
The arrows show the direction of **allowed** dependencies. No arrow ever points toward Infrastructure from the inner layers.
107107

108-
These rules are enforced by the tests in `tests/ArchitectureTests`.
108+
These rules are enforced by the tests in `tests/SchoolAccount.ArchitectureTests`.
109109

110110
---
111111

112112
## How This Solution Applies Clean Architecture
113113

114-
| Layer | Project |
115-
|----------------|------------------|
116-
| Domain | `Domain` |
117-
| Application | `Application` |
118-
| Infrastructure | `Infrastructure` |
119-
| Presentation | `Web.Api` |
120-
| Shared kernel | `SharedKernel` |
114+
| Layer | Project |
115+
|----------------|--------------------------------|
116+
| Domain | `SchoolAccount.Domain` |
117+
| Application | `SchoolAccount.Application` |
118+
| Infrastructure | `SchoolAccount.Infrastructure` |
119+
| Presentation | `SchoolAccount.Web.Mvc` |
120+
| Shared kernel | `SchoolAccount.SharedKernel` |
121121

122-
`SharedKernel` contains primitives used across all layers (`Result<T>`, `Error`, `ValidationError`, `IDateTimeProvider`)
122+
`SchoolAccount.SharedKernel` contains primitives used across all layers (`Result<T>`, `Error`, `ValidationError`, `IDateTimeProvider`)
123123
and sits outside the ring model - it has no dependencies itself and can be referenced by any layer.
124124

125-
The Application layer organises features using **package by feature** under `src/Application/`, with each use case in
125+
The Application layer organises features using **package by feature** under `src/SchoolAccount.Application/`, with each use case in
126126
its own folder.
127127

128128
---

src/SchoolAccount.Web.Api/DependencyInjection.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/SchoolAccount.Web.Api/Dockerfile

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/SchoolAccount.Web.Api/Endpoints/IEndpoint.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/SchoolAccount.Web.Api/Endpoints/Organisations/GetByLaestab/GetByLaestabEndpoint.cs

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)