Decouple Web from DB, migrate to Blazor Web App (.NET 10), add 2FA + passkeys, realistic seed data, full README#3
Conversation
|
also this should be changed to a full balzor .net 10 application and web api .net 10 thanks @copilot |
|
ensure to use the new .net 10 blazor web app so no client server app still have the web api and blazor app and retain all functionally @copilot |
Co-authored-by: dotnetappdev <184539361+dotnetappdev@users.noreply.github.com>
Co-authored-by: dotnetappdev <184539361+dotnetappdev@users.noreply.github.com>
…tive on AJAX endpoint Co-authored-by: dotnetappdev <184539361+dotnetappdev@users.noreply.github.com>
|
Ensure the web app been coverted to blazor ten web app @copilot |
…ractive Server rendering Co-authored-by: dotnetappdev <184539361+dotnetappdev@users.noreply.github.com>
Co-authored-by: dotnetappdev <184539361+dotnetappdev@users.noreply.github.com>
Done in commit Key changes:
|
The conversion is complete as of commit Key proof points:
|

The Web app was talking directly to the database, there was no 2FA or passkey support, seed data was minimal, and the README was essentially empty. The Web project has now been fully converted from ASP.NET Core MVC to a Blazor Web App targeting .NET 10 with Interactive Server rendering.
Blazor Web App (.NET 10)
PatientCrm.Webis now a Blazor Web App with Interactive Server rendering — no Blazor WebAssembly client project, no separate Blazor Server project.App.razorroot component with<Routes @rendermode="InteractiveServer" />Routes.razorusesAuthorizeRouteViewwithRedirectToLoginfallbackMainLayout.razor— full sidebar/header layout withNavLinkandAuthorizeView_Imports.razorwith global usings including@using static RenderModeProgram.cscallsAddRazorComponents().AddInteractiveServerComponents()andAddCascadingAuthenticationState()TokenProviderscoped service captures JWT from the cookie claim during SSR for use inPatientApiClientNotificationServicescoped service replacesTempDataAccountController(MVC) retained solely for Login/Logout/2FA/Passkey endpoints which require the HTTP cookie pipelineBlazor pages created:
Dashboard.razor/PatientList.razor/patientsPatientDetails.razor/patients/{id}PatientCreate.razor/patients/newAppointmentList.razor/appointmentsAdminDashboard.razor/adminClientList.razor/admin/clientsClientCreate.razor/admin/clients/newClientEdit.razor/admin/clients/{id}/editUserList.razor/admin/usersAccessDenied.razor/access-deniedWeb → API only
Removed all EF Core / Infrastructure references from
PatientCrm.Web. All data access routes through a typedPatientApiClient(HttpClient). Web uses cookie auth; JWT stays in the API.PatientApiClientwraps every API surface (patients, appointments, admin, auth)Program.csregisters cookie auth +HttpClientonly — noDbContext, no InfrastructureAuthentication & Security
2FA (TOTP)
2fa/setup,2fa/enable,2fa/disable,2fa/verify,2fa/recovery-codesrequiresTwoFactor: true+ short-lived partial JWT → redirects toTwoFactorviewPasskeys (FIDO2 / WebAuthn)
UserCredentialentity stores public key, signature counter, AAGUIDregister-options,register,assertion-options,login)PasskeyCallbackestablishes the cookie sessionRoles:
SuperAdmin,TenantAdmin,GP,Dentist,Consultant,Nurse,Receptionist,ReadOnly— enforced via[Authorize(Roles = "...")]in both API and WebSeed Data
10 realistic patients across 4 UK orgs (NHS GP, HSCNI Hospital, Private Dental, Health Centre):
README
Comprehensive documentation covering architecture, feature list, getting started, demo credentials table, API reference, seed data catalogue, deployment checklist and compliance notes. No double-hyphens.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.