Modular monolith sample with Clean Architecture on .NET 10 (ASP.NET Core) and a Blazor WebAssembly PWA with offline-first capabilities.
src/Api/BreakRetailManager.Api: API host for modules, Entra ID JWT auth, and SQL Server persistence.src/Modules/Sales/*: Sample Sales module (Domain/Application/Infrastructure/Contracts).src/Client/BreakRetailManager.Client: Blazor WebAssembly PWA with MSAL and offline cache.
- .NET 10 SDK
- SQL Server LocalDB or Developer Edition (dev override), or access to the shared Azure SQL development database
- Register an API app.
- Expose an API scope (e.g.,
access_as_user). - Note the Tenant ID and Client ID.
- Expose an API scope (e.g.,
- Register a SPA app.
- Add redirect URI:
https://localhost:7270/authentication/login-callback.
- Add redirect URI:
- Update configuration:
- API:
src/Api/BreakRetailManager.Api/appsettings.json(AzureAd+ connection string). - Client:
src/Client/BreakRetailManager.Client/wwwroot/appsettings.json(AzureAd+Api).
- API:
dotnet restore --ignore-failed-sources
dotnet run --project src/Api/BreakRetailManager.Api
dotnet run --project src/Client/BreakRetailManager.Client- The checked-in API development config points to Azure SQL with
Authentication=Active Directory Default. - Before running the API against Azure SQL, sign in with
az loginor Visual Studio/VS Code and make sure your client IP is allowed onbrmsql42014. - To use LocalDB instead, override
ConnectionStrings__DefaultConnectionwith user secrets or an environment variable.
dotnet test BreakRetailManager.slnx --nologo- Orders are cached in IndexedDB and queued offline in an outbox.
- The Sales page can sync queued orders once the client is online again.
- API: https://breakretailmanager-api-50927.azurewebsites.net (health:
/health) - SPA: https://brave-island-07df6c910.1.azurestaticapps.net
- Publish
src/Api/BreakRetailManager.Api. - Configure connection string
DefaultConnection(Azure SQL). - Set
AzureAdsettings as App Service configuration.
- App location:
src/Client/BreakRetailManager.Client - Output location:
wwwroot - The
staticwebapp.config.jsonis already included in the client project.