Dosaic
Last updated
Last updated
DosaicA plugin-first dotnet framework for rapidly building anything hosted in the web.
For full documentation, visit https://dosaic.gitbook.io/dosaic/.
Offline? Check the individual README files in each plugins directory.
Supports structured logging with Serilog
Exposes Prometheus compatible metrics endpoint
Configurable trace sampling rates with OpenTelemetry
Compatible with ASP.NET Core Minimal APIs & ASP.NET Core Mvc
Uses source-generators to load plugins at runtime
Optimized for high performance
Utilizes Span and Memory for reduced allocations
Implements OWASP security guidelines
Follows .NET Core dependency injection and middleware patterns
Before you begin, ensure you have met the following requirements:
You have installed the latest version of .net9 sdk
To start using Dosaic components/plugins, you have to:
Install/add the PluginWebHost via nuget package Dosaic.Hosting.WebHost
Install/add the source generator plugin via nuget package Dosaic.Hosting.Generator
Rewrite the Entrypoint Program.cs
to have the following code:
Install/add your plugins via nuget packages prefixed with Dosaic
To build Dosaic, follow these steps:
To format and style check the solution run:
We are using these frameworks for unit testing
AutoBogus
Bogus
AwesomeAssertions
Microsoft.NET.Test.Sdk
NaughtyStrings.Bogus
NSubstitute
NUnit
RichardSzalay.MockHttp
WireMockDotNet
To run unit tests for Dosaic, follow these steps:
To contribute to Dosaic, follow these steps:
Check the issues if your idea or problem already exists
Open a new issue if necessary to explain your idea or problem with as much details as possible
To contribute code along your issue please follow the these steps: 2. Clone this repository. 3. Create a branch: git checkout -b <branch_name>
. 4. Check our used tools and frameworks to ensure you are using the same tools which are already in place. 5. Check if your changes are in line with our style settings from .editorconfig and run dotnet format
. 6. Make your changes and commit them: git commit -m '<commit_message>'
7. Push to the original branch: git push origin Dosaic/<branch_name>
8. Create the pull request.
Follow the code style which is configured via .editorconfig
1701
Assembly Referencing
1702
Assembly Referencing
1591
Disable XML Comments
System.Net.Http 4.3.0 -> 4.3.4
4.3.0 has some major security issues
Because of this, we decided to explicitly install a newer version, which does not have the security issues.
Affected projects:
Plugins.Persistence.Abstractions (through QDataQueryHelper.Core)
Plugins.Persistence.MongoDb (through MongoDbMigrations)
Extensions.RestEase.Tests (through WireMock.Net)
System.Text.RegularExpressions 4.3.0 -> 4.3.1
4.3.0 has some major security issues
Because of this, we decided to explicitly install a newer version, which does not have the security issues.
Affected projects:
Plugins.Persistence.Abstractions (through QDataQueryHelper.Core)
Plugins.Persistence.MongoDb (through MongoDbMigrations)
Extensions.RestEase.Tests (through WireMock.Net)
Newtonsoft.Json 9.0.1 -> 13.0.3
9.0.1 has some major security issues
Because of this, we decided to explicitly install a newer version, which does not have the security issues.
Affected projects:
Plugins.Persistence.MongoDb (through MongoDbMigrations)
SSH.NET 2020.0.1 -> 2024.2.0
2020.0.1 has some major security issues
Because of this, we decided to explicitly install a newer version, which does not have the security issues.
Affected projects:
Plugins.Persistence.MongoDb (through MongoDbMigrations)
This framework was based on https://github.com/sia-digital/pibox.
D - Dotnet
O - Orchestration
S - Services
A - Abstraction
I - Integration
C - Configuration
Just kidding, we were looking around and found mosaic, which is already kind of taken. Then we just switched the first letter and everything made sense :D