Baubit 2025.11.2

Additional Details

The package has been broken down to smaller projects with granular concerns. Look for Baubit.* packages on nuget.

There is a newer version of this package available.
See the version list below for details.
dotnet add package Baubit --version 2025.11.2
                    
NuGet\Install-Package Baubit -Version 2025.11.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Baubit" Version="2025.11.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Baubit" Version="2025.11.2" />
                    
Directory.Packages.props
<PackageReference Include="Baubit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Baubit --version 2025.11.2
                    
#r "nuget: Baubit, 2025.11.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Baubit@2025.11.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Baubit&version=2025.11.2
                    
Install as a Cake Addin
#tool nuget:?package=Baubit&version=2025.11.2
                    
Install as a Cake Tool

Baubit

CircleCI

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:

  1. Fork the repository.
  2. Create a new branch (feature/new-feature).
  3. 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

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.23.1 is deprecated because it is no longer maintained.
2025.18.5 398 5/6/2025 2025.18.5 is deprecated because it is no longer maintained.
2025.15.6 365 4/12/2025 2025.15.6 is deprecated because it is no longer maintained.
2025.14.6 539 4/5/2025 2025.14.6 is deprecated because it is no longer maintained.
2025.13.14 377 3/30/2025 2025.13.14 is deprecated because it is no longer maintained.
2025.13.13 355 3/30/2025 2025.13.13 is deprecated because it is no longer maintained.
2025.13.12 350 3/30/2025 2025.13.12 is deprecated because it is no longer maintained.
2025.13.11 357 3/30/2025 2025.13.11 is deprecated because it is no longer maintained.
2025.13.10 354 3/30/2025 2025.13.10 is deprecated because it is no longer maintained.
2025.13.9 436 3/30/2025 2025.13.9 is deprecated because it is no longer maintained.
2025.13.8 464 3/30/2025 2025.13.8 is deprecated because it is no longer maintained.
2025.13.7 662 3/30/2025 2025.13.7 is deprecated because it is no longer maintained.
2025.11.2 428 3/14/2025 2025.11.2 is deprecated because it is no longer maintained.
2025.10.4 552 3/6/2025 2025.10.4 is deprecated because it is no longer maintained.
2025.10.1 541 3/6/2025 2025.10.1 is deprecated because it is no longer maintained.
2025.7.10 467 2/16/2025 2025.7.10 is deprecated because it is no longer maintained.
2025.7.9 428 2/16/2025 2025.7.9 is deprecated because it is no longer maintained.
2025.7.8 423 2/15/2025 2025.7.8 is deprecated because it is no longer maintained.