Skip to content

This repository is a template for creating Clean Architecture Interactive Auto Blazor w/ MudBlazor components and .Net Aspire

License

Notifications You must be signed in to change notification settings

ixAtomic/CleanArchitectureWithInteractiveAutoAndMudBlazor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CleanArchitectureBlazorInteractiveAuto

A modern .NET 9 solution using Aspire, featuring a Blazor WebAssembly client, Blazor Server, API, and automated SQL Server provisioning with clean architecture principles.

Features

  • Blazor WebAssembly Client: Interactive UI with MudBlazor.
  • Blazor Server: Server-side rendering and API gateway.
  • API Project: ASP.NET Core Web API for backend logic.
  • Automated SQL Server: Local SQL Server container with automatic database creation and migrations using DbUp.
  • Service Defaults: Health checks, OpenTelemetry, and service discovery.
  • Clean Architecture: Clear separation of Application, Domain, and Infrastructure.

Project Structure

• Presentation.Client # Blazor WebAssembly UI • Presentation.Server # Blazor Server host & API gateway • Presentation.API # ASP.NET Core Web API • WeatherDbBuilder # Database migrations (DbUp) • Application, Domain, Infrastructure # Core business logic and data access • CleanArchitectureBlazorInteractiveAuto.AppHost # Aspire app host (orchestration)

Getting Started

Prerequisites

Run the Solution

  1. Restore & Build

    dotnet restore
    dotnet build
  2. Start the Aspire App Host

    dotnet run --project CleanArchitectureBlazorInteractiveAuto.AppHost

    This will:

    • Launch the SQL Server container
    • Run database migrations via WeatherDbBuilder
    • Start API, Server, and Client projects
  3. Browse the App

Database

  • SQL Server runs in a Docker container.
  • Migrations are applied automatically at startup via WeatherDbBuilder/scripts/*.sql.

Configuration

  • Connection strings are managed by Aspire and do not need to be set in appsettings.json.
  • For custom settings, use the appropriate appsettings.*.json files.

Development

  • Business logic: Application, Domain, Infrastructure
  • UI: Presentation.Client (Blazor WASM), Presentation.Server (Blazor Server)
  • Database scripts: WeatherDbBuilder/scripts/

Health & Telemetry

  • Health checks and OpenTelemetry are enabled by default.
  • See /health and /alive endpoints.

References

About

This repository is a template for creating Clean Architecture Interactive Auto Blazor w/ MudBlazor components and .Net Aspire

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published