SaveApis.Framework
SaveApis.Framework is a modular application framework for .NET. It provides a consistent Installer-based approach to bootstrapping services, middleware, and infrastructure — across web APIs, background workers, command-line tools, and more.
Architecture
Every application type is built on the same foundation:
SaveApis.Framework ← Core: Installer, InstallerContext, ApplicationContext, DependencyGraph
├── SaveApis.Framework.Web ← ASP.NET Core web API
├── SaveApis.Framework.Console ← Generic Host background worker
├── SaveApis.Framework.CLI ← Spectre.Console command-line tool
└── SaveApis.Utils.CritterStack ← Marten + Wolverine (add-on for any framework)
The Base Framework defines the IInstaller interface, the dependency graph, and the two context types (InstallerContext, ApplicationContext). All framework-specific packages build on top of it.
Quick Start
Pick the application type that matches your use case:
| I want to build… | Package | Entry point |
|---|---|---|
| An HTTP API | SaveApis.Framework.Web |
SaveApisApplication.AsWeb() |
| A background worker / hosted service | SaveApis.Framework.Console |
SaveApisApplication.AsConsole() |
| A CLI tool | SaveApis.Framework.CLI |
SaveApisApplication.AsCli() |
All three follow the same pattern:
await SaveApisApplication
.As[Web|Console|Cli](
args,
(app, installer) =>
{
app.Name = "My.Service";
app.Namespace = "My.Org";
installer.SetSoftwareAssembly();
}
)
.AddInstaller<MyInstaller>()
.Build()
.RunAsync()
.ConfigureAwait(false);
Documentation
Core
- Base Framework — Installer lifecycle, InstallerContext, ApplicationContext, dependency resolution
Application Frameworks
- Web Framework — HTTP API with logging, OpenTelemetry, Zitadel auth, controllers, OpenAPI, Scalar
- Console Framework — Background workers and hosted services with logging and OpenTelemetry
- CLI Framework — Command-line tools with Spectre.Console, DI, and branch/sub-command support
Utilities
- CritterStack — Marten event store + Wolverine messaging (PostgreSQL-backed)