XivoBlue.CleanArchitecture.MechanicalEngineering.Template
2.1.2
See the version list below for details.
dotnet new install XivoBlue.CleanArchitecture.MechanicalEngineering.Template::2.1.2
A Clean Architecture .NET Mechanical Engineering Template
The goal of this template is to provide a straightforward and efficient approach for application development in the area of mechanical engineering, leveraging the power of Clean Architecture. Using this template, you can easily create a multi platform app for communicating with multiple hardware devices, while adhering to the core principles of Clean Architecture.
Getting Started
The easiest way to get started with this template is to install the NuGet package
Prerequisites
- Install the latest .NET 8.x SDK & Tools
- Install the latest version of Visual Studio IDE
- Install the latest .NET MAUI package
- Install / have access to a PostgreSQL database (optional, see below)
- Enable Developer Mode on your device (required for debugging .NET MAUI applications)
Installation
[1] Open the command prompt and run:
dotnet new install XivoBlue.CleanArchitecture.MechanicalEngineering.Template
[2] Once installed, create a new solution in your project folder or from Visual Studio :
dotnet new xt-came-sln -n <YourProjectName>
Because .NET MAUI is packaged by default, dotnet run
won't work.
Instead, open your solution in Visual Studio directly and run it from there.
You may need to run dotnet workload update
via the command line or a rebuild action in Visual Studio if build errors occur.
Database
The template is configured to use PostgreSQL as a database provider by default. If you want to use another provider, you need to exchange .RegisterPostgreSqlPortServices()
in the Presentation
project MauiProgram.cs
file and the Infrastructure.PostgreSQLPort
project itself with a corresponding implementation.
The database connection string is set in the appsettings.json
file in the Presentation
project.
To start the database with default settings, run:
docker run -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -p 5432:5432 postgres:latest
Once you run the application, the database will be automatically created (if necessary) and the latest migrations will be applied.
License
This project is licensed with the MIT license.
Support
If you have any problem, please let us know by raising a new issue.
If you have suggestions on how to improve or extend the template, let us know via email.
Our homepage is linked in the banners at the top.
Known Error
If an error with the message, that a specified AndroidManifest file can not be found, occurs, copy the file AndroidManifest.xml from the location \src\<YourProjectName>.Presentation.Maui\Platforms\Android\
to the location \src\<YourProjectName>.Presentation.Maui\
. You can remove the copied file after building.
Technologies Used
Main technologies:
- .NET MAUI
- CommunityToolkit.Maui
- CommunityToolkit.Mvvm
- Entity Framework Core
- MediatR
- AutoMapper
- FluentValidation
Unit Tests:
Learn More
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.
Initial Mechanical Engineering Release Version