PiBox is a service hosting framework
that allows .net devs
to decorate their services with behaviours or functionality (think of plugins) while only using minimal configuration
.
"PiBox" because we want to support unlimited plugins within the api out of the box!
- logs
- metrics
- traces
- minimal api ready
- auto discovered plugins
- with performance in mind
- less memory allocations
- industry best practices applied security
- standard dotnet core patterns & APIs
- many plugins!
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of
.net8 sdk
To start using PiBox components/plugins, you have to:
- Install/add the PluginWebHost via nuget package
PiBox.Hosting.WebHost
- Install/add the source generator plugin via nuget package
PiBox.Hosting.Generator
- Rewrite the Entrypoint
Program.cs
to have following code:
using PiBox.Hosting.WebHost;
PluginWebHostBuilder.RunDefault(PiBox.Generated.PiBoxPluginTypes.All);
- Install/add your plugins via nuget packages prefixed with
PiBox
You can find a comprehensive documentation here
Or check the individual README files in each plugins directory
To build PiBox, follow these steps:
dotnet build ./PiBox.sln
To format and style check the solution run:
dotnet format ./PiBox.sln
We are using these frameworks for unit testing
- AutoBogus
- Bogus
- FluentAssertions
- Microsoft.NET.Test.Sdk
- NaughtyStrings.Bogus
- NSubstitute
- NUnit
- RichardSzalay.MockHttp
- WireMock.Net
To run unit tests for PiBox, follow these steps:
dotnet test ./PiBox.sln
To contribute to PiBox, 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 PiBox/<branch_name>
8. Create the pull request.
- Follow the code style which is configured via
.editorconfig
Code | Reason | Link |
---|---|---|
1701 | Assembly Referencing | 1701 |
1702 | Assembly Referencing | 1702 |
1591 | Disable XML Comments | 1591 |