ardalis / CleanArchitecture

Clean Architecture Solution Template: A starting point for Clean Architecture with ASP.NET Core
MIT License
16.12k stars 2.78k forks source link

Include Blazor in template #344

Closed mlenart1010 closed 2 years ago

mlenart1010 commented 2 years ago

I would like to see how the Blazor WebAssembly project would fit into this template.

ardalis commented 2 years ago

You can see an example today of one way to set it up here: https://github.com/dotnet-architecture/eShopOnWeb

I'll consider adding something to this template but I don't think most users of the template would necessarily need a Blazor client to go with it. Need to find a way to make such things modular, I guess.

mlenart1010 commented 2 years ago

I did look at that also. I am trying to follow the paradigm that is in eShopOnWeb along with your course on Inroduction to DDD with Julie. In eShopOnWeb, what would be equivalent to SharedKernel and Web?

ardalis commented 2 years ago

There is no SharedKernel. Web is the main ASPNET Core front end. Just like the front end in ClinicManagement or FrontDesk in the DDD course sample.

mlenart1010 commented 2 years ago

So shouldnt there be a SharedKernel in eShopOnWeb??

So Web is equivalent to the FrontDesk.Api project? If so then why are the endpoints in PublicApi?

ardalis commented 2 years ago

In a word: Auth. The Pluralsight app didn't have logins or auth. The eShop web app uses cookie-based auth which doesn't always play nicely with token-based with. Using a separate project made it easier to have auth work correctly for both pages and API endpoints.