Clean Architecture With Blazor Server
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/
- (IP accelerate): http://106.52.105.140:6101/
Screenshots and video
Development Environment
- Microsoft Visual Studio Community 2022 (64-bit)
- Docker
- .NET 7.0
- Unit Test
Supported Databases
- PostgreSQL (Provider Name:
postgresql
) - Microsoft SQL Server (Provider Name:
mssql
) - SQLite (Provider Name:
sqlite
)
How to select a specific Database?
- Open the
appsettings.json
file located in the src directory of theBlazor.Server.UI
project. - Change the setting
DBProvider
to the desired provider name (See Supported Databases). - 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\Blazor.Server.UI.pfx -p Password@123
- cmd:
dotnet dev-certs https --trust
- cmd:
- Manage User secrets to save the password
- cmd:
dotnet user-secrets init
- cmd:
dotnet user-secrets -p Blazor.Server.UI.csproj set "Kestrel:Certificates:Development:Password" "Password@123"
- cmd:
Code Generator Extension for visual studio.net 2022
2022.mp4
Install CleanArchitecture CodeGenerator For Blazor App
- Open Manage Extensions Search with
CleanArchitecture CodeGenerator For Blaozr App
- Download to Install
CleanArchitecture CodeGenerator For Blazor App Repo
- https://github.com/neozhu/CleanArchitectureCodeGenerator
- The code generator can automatically generate the standard code
How to install solution templates
- install the project template
- run CLI:
dotnet new install ./
- run CLI:
dotnet new list
- run CLI:
![image](https://private-user-images.githubusercontent.com/1549611/250538364-f23022e0-3fd6-475a-96ab-84b0d3328e4c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDgwMTc0NDYsIm5iZiI6MTcwODAxNzE0NiwicGF0aCI6Ii8xNTQ5NjExLzI1MDUzODM2NC1mMjMwMjJlMC0zZmQ2LTQ3NWEtOTZhYi04NGIwZDMzMjhlNGMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDIxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDAyMTVUMTcxMjI2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTZlZjZlZWUxNTk1ZGQ5ZDVmNmE1MmQ1OTdiYzJhODc1MjljNmQxNTIxNDhhMDVhNTY2MjhjOGZkMzc2YjI5MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.FAcw2Qk9Zs1fWvlr9Qnk8ZcIalyOjmZ7sCwIfDBF1qg)
-
create a solution with the template
- run CLI:
dotnet new ca-blazorserver-sln
ordotnet new ca-blazorserver-sln -n NewProjectName(root namesapces)
- run CLI:
-
build a project template with nuget.exe
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
-
org chart
About
Coming up.
License
MIT License