Baubit 2025.11.2
The package has been broken down to smaller projects with granular concerns. Look for Baubit.* packages on nuget.
See the version list below for details.
dotnet add package Baubit --version 2025.11.2
NuGet\Install-Package Baubit -Version 2025.11.2
<PackageReference Include="Baubit" Version="2025.11.2" />
<PackageVersion Include="Baubit" Version="2025.11.2" />
<PackageReference Include="Baubit" />
paket add Baubit --version 2025.11.2
#r "nuget: Baubit, 2025.11.2"
#:package Baubit@2025.11.2
#addin nuget:?package=Baubit&version=2025.11.2
#tool nuget:?package=Baubit&version=2025.11.2
Baubit
Introduction
Baubit is a modular framework for .NET applications that allows developers to build structured and scalable applications using independent modules. It simplifies dependency management and promotes reusability by enforcing a modular architecture.
Why Use Baubit?
- 🚀 Modular Architecture: Define independent modules with their own configurations.
- 🔧 Configuration Management: Each module can have its own configuration, making applications more flexible.
- 🔗 Seamless Integration: Supports dependency injection using
IServiceCollection. - 📏 Scalability & Maintainability: Encourages a clean and structured application design.
🚀 Getting Started
1️⃣ Installation
dotnet add package Baubit
📌 How Baubit Works
Baubit is based on modules and configuration.
📦 Defining a Module
A Baubit module is a self-contained unit that adds one or more services to the application's IoC container.
public class MyConfiguration : AConfiguration
{
public string MyStringProperty { get; set; }
}
public class MyModule : AModule<MyConfiguration>
{
public MyModule(ConfigurationSource configurationSource) : base(configurationSource) { }
public MyModule(IConfiguration configuration) : base(configuration) { }
public MyModule(MyConfiguration configuration, List<AModule> nestedModules) : base(configuration, nestedModules) { }
public override void Load(IServiceCollection services)
{
var myStrProp = Configuration.MyStringProperty;
services.AddSingleton(new MyService(myStrProp));
//register other services as needed
base.Load(services);
}
}
Configuration for each registered service can be passed via the Module's specific configuration
📁 Configuration Management
Baubit supports various ways to manage module configurations.
var configSource = new ConfigurationSource { JsonUriStrings = ["myConfig.json"] };
var myModule = new MyModule(configSource);
- File-based: Load configurations from JSON, XML, or environment variables.
- Code-based: Manually define configurations in C#.
🏗 Dependency Injection & Services
Modules can register services with IServiceCollection:
public override void Load(IServiceCollection services)
{
services.AddTransient<IMyService, MyService>();
}
This enables modularized service registration, making dependency management cleaner.
🔍 Example Usage
Bootstrapping the Application
Using HostApplicationBuilder
var hostApplicationBuilder = new HostApplicationBuilder();
hostApplicationBuilder.Configuration.AddJsonFile("myConfig.json");
new ServiceProviderFactoryRegistrar().UseDefaultServiceProviderFactory(hostApplicationBuilder);
var host = hostApplicationBuilder.Build();
host.Run();
Using WebApplicationBuilder
var webAppBuilder = WebApplication.CreateBuilder();
webAppBuilder.Configuration.AddJsonFile("myConfig.json");
new ServiceProviderFactoryRegistrar().UseDefaultServiceProviderFactory(webAppBuilder.Host);
var webApp = webAppBuilder.Build()
webApp.Run();
myConfig.json
{
"modules": [
{
"type": "MyProject.MyModule, MyProject",
"configuration": {
"myStringProperty" : "some string value"
}
}
]
}
📜 Roadmap
Future enhancements for Baubit:
- ✅ Configuration Extensions: Support for more configuration sources.
- ✅ Middleware Support: Integrate modules with ASP.NET middleware.
- 🚧 Logging & Monitoring: Improve logging support within modules.
- 🚧 Community Contributions: Open-source enhancements and community-driven improvements.
🤝 Contributing
Contributions are welcome! If you’d like to improve Baubit:
- Fork the repository.
- Create a new branch (
feature/new-feature). - Submit a pull request with detailed changes.
For major contributions, open an issue first to discuss the change.
🛠 Troubleshooting & FAQs
Q: How do I use multiple modules together?
A: You can initialize multiple modules and inject them into your service container.
Q: Can I override module configurations?
A: Yes! You can extend configurations by passing custom settings to ConfigurationSource.
For more support, open an issue on GitHub.
📄 License
Baubit is licensed under the Apache-2.0 License. See the LICENSE file for details.
🔗 Resources
- Official Documentation (Coming Soon)
- Issue Tracker: GitHub Issues
- Discussions: GitHub Discussions
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- FluentResults (>= 3.16.0)
- FluentValidation (>= 11.11.0)
- Microsoft.Extensions.Configuration (>= 9.0.2)
- Microsoft.Extensions.Configuration.Json (>= 9.0.2)
- Microsoft.Extensions.Hosting (>= 9.0.2)
- OpenTelemetry.Exporter.Console (>= 1.11.2)
- OpenTelemetry.Extensions.Hosting (>= 1.11.2)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Baubit:
| Package | Downloads |
|---|---|
|
Baubit.Aggregation
Package Description |
|
|
Baubit.xUnit
Package Description |
|
|
Baubit.Autofac
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 2025.23.1 | 459 | 6/4/2025 | |
| 2025.18.5 | 398 | 5/6/2025 | |
| 2025.15.6 | 365 | 4/12/2025 | |
| 2025.14.6 | 539 | 4/5/2025 | |
| 2025.13.14 | 377 | 3/30/2025 | |
| 2025.13.13 | 355 | 3/30/2025 | |
| 2025.13.12 | 350 | 3/30/2025 | |
| 2025.13.11 | 357 | 3/30/2025 | |
| 2025.13.10 | 354 | 3/30/2025 | |
| 2025.13.9 | 436 | 3/30/2025 | |
| 2025.13.8 | 464 | 3/30/2025 | |
| 2025.13.7 | 662 | 3/30/2025 | |
| 2025.11.2 | 428 | 3/14/2025 | |
| 2025.10.4 | 552 | 3/6/2025 | |
| 2025.10.1 | 541 | 3/6/2025 | |
| 2025.7.10 | 467 | 2/16/2025 | |
| 2025.7.9 | 428 | 2/16/2025 | |
| 2025.7.8 | 423 | 2/15/2025 |