Clean Architecture Solution For Razor Pages

This solution template facilitates the creation of ASP.NET Core Razor Pages applications that adhere to Clean Architecture principles. You can initiate a new project using this template by selecting the “Use this template” button on GitHub or by installing and utilizing the associated NuGet package (refer to the “Getting Started” section below for comprehensive instructions).
Technologies
- Core Framework: ASP.NET Core 9 and Entity Framework Core 9.
- UI: Razor Pages.
- Frontend Styling: Integration with SmartAdmin - Responsive WebApp (Commercial Theme) and jQuery EasyUI for UI components.
- Application Design:
- MediatR for implementing the mediator pattern.
- AutoMapper for object-to-object mapping.
- FluentValidation for strongly-typed validation rules.
- Testing: NUnit, FluentAssertions, Moq, and Respawn for comprehensive testing.
- Deployment: Docker for containerization support.
Getting Started
The most straightforward way to begin is by installing the Clean.Architecture.Solution.Template NuGet package and using the dotnet new
command:
- Ensure you have the latest .NET 9 SDK installed.
- Install the project template by running the command:
dotnet new --install Clean.Architecture.Solution.Template
. - Create a new directory for your solution and navigate into it using the command line. The template will use this directory’s name for your project.
mkdir YourSolutionName cd YourSolutionName
- Create the new project by running:
dotnet new ca-sln
. - Navigate to the main web project directory, typically
src/WebUI
.cd src/WebUI
- Build the project to restore dependencies and compile the code:
dotnet build
. - Run the application:
dotnet run
. Your Razor Pages application should now be running. Access it via the URL displayed in the console (usuallyhttps://localhost:XXXX
orhttp://localhost:XXXX
).
License
This project is licensed under the MIT License, a permissive open-source license. You are free to use, modify, and distribute the code for personal or commercial purposes, provided the original license and copyright notice are included.