DFE-Digital / DFE-Digital/check-performance-data
Investigate our Hollow Domain
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 0
- Forks
- 1
- Avg merge
- 19h 21m
- Merged PRs (30d)
- 54
Description
"The solution structure for CYPMD suggests the code is following a clean architectural pattern, but looking into how the projects reference each other, it feels like its not following the approach in the expected way. I also spotted that the domain is limited to enums, but not the wider domain entities the service is handling."
"that's fair and both observations are accurate. The dependency map today is: Domain → nothing; Application → Domain; Persistence & Infrastructure → Application + Domain; Web → Application + Infrastructure + Persistence.
Two deviations from a strict onion / clean arch:
- The entities live in Persistence, not Domain. We've effectively used the EF entities as the domain model, so Domain is only left with enums. That was a pragmatic call rather than an accident, but you're right that it leaves the core layer hollow and blurs where the domain actually is.
- Web references Persistence directly. Most of that is dev/admin/seeding/migration tooling rather than the core journey, but there's at least one user-facing view model binding a Persistence entity, which is a leak I wasn't aware of and will be looking to get sorted shortly.
I'm more than happy to spike a refactor back out to domain models if that's what's required.
As for tech debt, we currently have two tickets in ADO that are set to be dealt with this sprint (started today)."
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the solution structure and the dependency map described in the issue. Inspect where the domain entities currently live in Persistence and identify the user-facing Web view model that binds to a Persistence entity. Done requires an agreed refactor scope for moving domain models and addressing the Web-to-Persistence leak.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100