SQL Server implementation with Clean Architecture refactors #13
Replies: 5 comments
-
|
Hi @Ans-Maliktech , I was curious, so I checked the biggest commit in your repo. If you’re interested, I have a couple of suggestions that might help make the structure more production-ready:
Thanks again for contributing and for taking the time to explore this project! Best regards. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Gramli, Thank you for the detailed feedback! I really appreciate you taking the time to review the code structure. Your points regarding the Program.cs cleanliness and the architectural boundaries (keeping Infrastructure internal) are excellent. I also agree about the Result pattern redundancy; I will switch to using the library's native types to avoid confusion. I am going to refactor the solution to address these five points (especially tightening the visibility of the Infrastructure layer and cleaning up the comments/warnings). Thanks again for the mentorship. I'll update the repo with these improvements shortly. Best regards, Ans Abdullah Malik |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Gramli, I'm happy to report that I've completed the full refactor based on your code review. Summary of Changes: Strict Architecture: Changed UserContext and all Repositories to internal. The API layer now relies exclusively on Interfaces and cannot bypass the abstraction layer. Clean Startup: Refactored Program.cs by moving SQL and Migration logic into dedicated Infrastructure extension methods. It is now purely a high-level orchestration file. Standardization: Removed the custom Result class and fully migrated to FluentResults. Housekeeping: Resolved all compiler warnings (0 Errors, 0 Warnings). You can review the updated implementation here: https://github.com/Ans-Maliktech/UserAuthentication.net The codebase feels much more robust now. Thanks again for the mentorship, it was a great exercise in architectural boundaries! Best, Ans Abdullah Malik |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Ans-Maliktech, ASP.NET Core belongs in the presentation layer (the Auth.API project), and keeping that separation helps preserve clear architectural boundaries. Best |
Beta Was this translation helpful? Give feedback.
-
|
Move this to Discussions |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @Gramli,
I referenced this repository as a baseline for a project I was working on and wanted to share the extended implementation.
While your repository provides a streamlined Minimal API example, I have refactored the concept into a production-focused solution. I migrated the data layer to persistent storage using SQL Server 2022 with Entity Framework Core 9 and restructured the backend into a decoupled Clean Architecture (Core, Infrastructure, API layers).
I also expanded the RBAC implementation to fully integrate with the Angular client for granular permission management.
If anyone checking the issues is looking for a version of this auth flow that uses a persistent SQL database and layered architecture, the implementation is available here: https://github.com/Ans-Maliktech/UserAuthentication.net
Thanks for the solid starting point.
Best, Ans Abdullah Malik
Beta Was this translation helpful? Give feedback.
All reactions