CleanArchitecture.Blazor.Solution.Template 1.0.0-preview.20

This is a prerelease version of CleanArchitecture.Blazor.Solution.Template.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet new install CleanArchitecture.Blazor.Solution.Template::1.0.0-preview.20
This package contains a .NET Template Package you can call from the shell/command line.

Clean Architecture With Blazor Server

Build CodeQL Nuget Docker Image CI Nuget

This is a repository for creating a Blazor Server application following the principles of Clean Architecture. It has a nice user interface, and an efficient code generator that allows you to quickly build amazing web application with .net Blazor technology.

Live Demo

  • Blazor Server mode:https://architecture.blazorserver.com/

Screenshots and video

Everything Is AWESOME

Development Environment

  • Microsoft Visual Studio Community 2022 (64-bit)
  • Docker
  • .NET 8.0
  • Unit Test

Docker Container

# Docker Pull Command
docker pull dockerksjscn/cleanarchitectureblazorserver:last
# Docker Run
# default container port:8080

# default without database
docker run -p 8080:8080 -e UseInMemoryDatabase=true -e ASPNETCORE_ENVIRONMENT=Development dockerksjscn/cleanarchitectureblazorserver:last

# set database connection
# set SMPT Server
docker run -d -p 8080:8080 -e UseInMemoryDatabase=false \
-e ASPNETCORE_ENVIRONMENT=Development \
-e DatabaseSettings__DBProvider=mssql \
-e DatabaseSettings__ConnectionString=Server=10.33.1.xxx;Database=BlazorDashboardDb;User Id=sa;Password=***;MultipleActiveResultSets=true;Encrypt=false;TrustServerCertificate=false \
-e SmtpClientOptions__User=*** \
-e SmtpClientOptions__Port=25 \
-e SmtpClientOptions__Server=*** \
-e SmtpClientOptions__Password=*** \
dockerksjscn/cleanarchitectureblazorserver:last

image

Supported Databases

  • PostgreSQL (Provider Name: postgresql)
  • Microsoft SQL Server (Provider Name: mssql)
  • SQLite (Provider Name: sqlite)

How to select a specific Database?

  1. Open the appsettings.json file located in the src directory of the Server.UI project.
  2. Change the setting DBProvider to the desired provider name (See Supported Databases).
  3. Change the ConnectionString to a connection string, which works for your selected database provider.

Docker compose https deployment

  • Create self-signed development certificates for the project

    cmd: dotnet dev-certs https -ep $env:USERPROFILE\.aspnet\https\CleanArchitecture.Blazor.Server.UI.pfx -p Password@123
    • cmd: dotnet dev-certs https --trust
  • Manage User secrets to save the password
    • cmd: dotnet user-secrets init
    • cmd: dotnet user-secrets -p Server.UI.csproj set "Kestrel:Certificates:Development:Password" "Password@123"

Code Generator Extension for visual studio.net 2022

<div><video controls src="https://user-images.githubusercontent.com/1549611/197116874-f28414ca-7fc1-463a-b887-0754a5bb3e01.mp4" muted="false"></video></div>

Install CleanArchitecture CodeGenerator For Blazor App

  • Open Manage Extensions Search with CleanArchitecture CodeGenerator For Blaozr App image
  • Download to Install

CleanArchitecture CodeGenerator For Blazor App Repo

How to install solution templates

  • install the project template
    • run CLI: dotnet new install ./
    • run CLI: dotnet new list

<img width="828" alt="image" src="https://github.com/neozhu/CleanArchitectureWithBlazorServer/assets/1549611/f23022e0-3fd6-475a-96ab-84b0d3328e4c">

  • create a solution with the template

    • run CLI: dotnet new ca-blazorserver-sln or dotnet new ca-blazorserver-sln -n NewProjectName(root namesapces)
  • build a project template with nuget.exe

    • run CLI: .\nuget.exe add -Source .\ CleanArchitecture.Blazor.Solution.Template.1.0.0-preview.1.nupkg <img width="1329" alt="image" src="https://github.com/neozhu/CleanArchitectureWithBlazorServer/assets/1549611/7c56dec5-5935-4fc5-ad81-8bcb65e9d0dc">
    • create a new project from Clean Architecture for Blazor Server Solution <img width="769" alt="image" src="https://github.com/neozhu/CleanArchitectureWithBlazorServer/assets/1549611/ed7eb20f-aec2-4f69-95b7-d47c2eb20428">

Why I chose Blazor Server

  • I hate switching between C# and JavaScript at the same time in order to develop a project, which is why I opted for Blazor Server.

Characteristic

  • Avoid repeating work

  • Focus on story implementation

  • Integration Hangfire dashboard

  • Implementation OCR image recognition

    image

  • org chart

    image

About

Coming up.

License

MIT License

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-preview.21 44 4/18/2024
1.0.0-preview.20 786 2/21/2024
1.0.0-preview.19 257 2/13/2024
1.0.0-preview.18 311 2/2/2024
1.0.0-preview.17 1,506 12/6/2023
1.0.0-preview.16 1,374 10/14/2023
1.0.0-preview.15 75 9/22/2023
1.0.0-preview.14 78 8/28/2023
1.0.0-preview.12 75 8/15/2023
1.0.0-preview.11 78 8/10/2023
1.0.0-preview.10 77 8/9/2023
1.0.0-preview.9 86 8/9/2023
1.0.0-preview.8 67 8/8/2023
1.0.0-preview.7 66 8/8/2023
1.0.0-preview.6 101 7/21/2023
1.0.0-preview.5 79 7/16/2023
1.0.0-preview.4 77 7/11/2023
1.0.0-preview.3 81 7/5/2023
1.0.0-preview.2 86 7/5/2023
1.0.0-preview.1 109 7/3/2023

1.0.0-preview.20
           - 🌈 support.net 8
           - ✨ Build Dockerfile