A free and open-source web framework that enables developers to create web apps using C# and HTML, developed by Microsoft.
Blazor WebApp .Net8 + API
This is the third part of my query. The previous part can be found here.
I've made yet another change to my plans. I developed a new version of my solution that includes the new Blazor WebApp .Net 8 project (WebApp + WebApp & WebApp.client) design pattern. I've configured it with Identity Authentication and plan to utilize the DbContext from this project. It's the basic pattern built by VS when you create a Blazor WebApp with individual accounts. My business layer is in this project. However, this solution seems inadequate for quickly launching an MVP live app (I'm still undecided about using a local IIS machine or Azure cloud services).
However, I'm not satisfied with having the business logic in the WebApp. I would prefer to have an API.
When I tried to achieve this, I encountered security issues. Both individual account mechanisms and the business layer were in the API. I still wish to have an API for reasons of responsibility separation and reusability for the next versions of my app (if I decide to change the frontend or for other reasons, perhaps using some form of automated app).
I am unsure how to proceed. I prefer not to use a service like Duende (as I cannot afford such a service). Should I keep my Authentication processes in the Web App and move the business logic to the API (which is not currently secured)? Will this entail two EF Core applications accessing the database? Is this a good practice?
Moreover, a part of my app is used to seed the DB. I am contemplating whether I should create a separate project for this. All aspects of my app will go live through the CI/CD pipeline (Azure DevOps pipelines) with unit tests and integration tests. Parameters like ConnectionString are set in the env-variable. My Integration platform is designed to be a "build-test-destroy" process (to have a clean DB each time).
Who can assist me? I'm willing to share my code on GitHub with a private access token if needed.