OakPeak.Core
10.0.0
dotnet add package OakPeak.Core --version 10.0.0
NuGet\Install-Package OakPeak.Core -Version 10.0.0
<PackageReference Include="OakPeak.Core" Version="10.0.0" />
<PackageVersion Include="OakPeak.Core" Version="10.0.0" />
<PackageReference Include="OakPeak.Core" />
paket add OakPeak.Core --version 10.0.0
#r "nuget: OakPeak.Core, 10.0.0"
#:package OakPeak.Core@10.0.0
#addin nuget:?package=OakPeak.Core&version=10.0.0
#tool nuget:?package=OakPeak.Core&version=10.0.0
OakPeak Core
A batteries-included foundation for ASP.NET Core microservices and web APIs maintained by Brighten Consulting.
OakPeak Core brings common application infrastructure into one package: authentication, data providers, scheduling, notifications, structured logging, health checks, OpenAPI, middleware, and reusable web API services.
Supported frameworks
| Package line | Target framework |
|---|---|
9.x |
.NET 9 (net9.0) |
10.x |
.NET 10 (net10.0) |
Choose the package major that matches your application's .NET major. Older package lines are not maintained by the current codebase.
Install
.NET CLI:
dotnet add package OakPeak.Core
Package Manager Console:
Install-Package OakPeak.Core
To pin the .NET 9 package line:
dotnet add package OakPeak.Core --version 9.*
What is included
- JWT, Basic, API-key, Microsoft, Google, and Facebook authentication support
- SQL Server, SQLite, and PostgreSQL data providers with Entity Framework Core integration
- Cron-based hosted scheduling
- SMTP, SendGrid, and cloud notification services
- Serilog and Azure Monitor OpenTelemetry integration
- Health checks, response compression, CORS, and rate limiting
- Swagger/OpenAPI generation and annotations
- Application context, error handling, static files, and web API utilities
Quick start
Register OakPeak Core in Program.cs:
using OakPeak.Config;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddOakPeakCore(builder.Configuration);
var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();
app.UseOakPeak();
app.MapControllers();
app.Run();
UseAuthentication() must run before UseOakPeak() so authenticated identities are available to the OakPeak middleware.
Minimum configuration
AddOakPeakCore configures JWT authentication and a database provider. Supply those values through appsettings.json, environment variables, user secrets, or your preferred configuration provider.
{
"JwtIssuerOptions": {
"Issuer": "https://issuer.example",
"Audience": "your-api",
"Key": "replace-with-a-long-random-secret"
},
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=app;Trusted_Connection=True;TrustServerCertificate=True"
},
"DataProvider": {
"DataProvider": "SqlServer",
"ConnectionStringName": "DefaultConnection"
}
}
Supported DataProvider values are SqlServer, Sqlite, and PostgreSql. ConnectionStringName identifies an entry under ConnectionStrings. Keep secrets outside committed configuration files.
Scheduled tasks
Create a task by extending BaseSchedulerTask, then register it through dependency injection:
using OakPeak.Core.Scheduling;
public sealed class CleanupTask : BaseSchedulerTask
{
public override string Schedule => "0 */12 * * *";
public override Task DoWork()
{
// Perform scheduled work.
return Task.CompletedTask;
}
}
builder.Services.AddSingleton<IScheduledTask, CleanupTask>();
AddOakPeakCore registers the scheduler host. A task runs only when its matching scheduler record exists and is enabled.
Important behaviour
UseOakPeak()enables CORS, response compression, domain and general error handling, API-key and Basic authentication middleware, rate limiting, and static-file handling.- The built-in rate-limit policies are named
fixed,sliding,token, andconcurrency; apply one to endpoints that need throttling. - The middleware creates a
Filesdirectory in the application's working directory when it does not exist. - OakPeak Core is an application framework, not a passive utility library. Review its registrations and middleware order before adopting it in an existing service.
Package and support
Licensed under the MIT License. © 2026 Brighten Consulting.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- AspNetCore.HealthChecks.UI (>= 9.0.0)
- AspNetCore.HealthChecks.Uris (>= 9.0.0)
- AutoMapper (>= 16.2.0)
- Azure.Monitor.OpenTelemetry.AspNetCore (>= 1.6.0)
- HtmlAgilityPack (>= 1.13.1)
- KubernetesClient (>= 21.0.8)
- MailKit (>= 4.18.2)
- Microsoft.AspNetCore.Authentication.Facebook (>= 10.0.14)
- Microsoft.AspNetCore.Authentication.Google (>= 10.0.14)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 10.0.14)
- Microsoft.AspNetCore.Authentication.MicrosoftAccount (>= 10.0.14)
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 10.0.14)
- Microsoft.Data.SqlClient (>= 7.1.1)
- Microsoft.EntityFrameworkCore.Sqlite (>= 10.0.14)
- Microsoft.EntityFrameworkCore.SqlServer (>= 10.0.14)
- Microsoft.Extensions.FileProviders.Physical (>= 10.0.14)
- Microsoft.Extensions.Identity.Core (>= 10.0.14)
- Microsoft.Extensions.Identity.Stores (>= 10.0.14)
- Microsoft.Identity.Web (>= 4.16.1)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.3)
- ObjectsComparer (>= 1.4.1)
- SendGrid (>= 9.29.3)
- Serilog.AspNetCore (>= 10.0.0)
- Serilog.Extensions.Hosting (>= 10.0.0)
- Serilog.Sinks.Console (>= 6.1.1)
- Swashbuckle.AspNetCore (>= 10.3.1)
- Swashbuckle.AspNetCore.Annotations (>= 10.3.1)
- Swashbuckle.AspNetCore.Filters (>= 10.0.1)
- System.Security.Cryptography.Pkcs (>= 10.0.14)
- System.Security.Cryptography.Xml (>= 10.0.14)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on OakPeak.Core:
| Package | Downloads |
|---|---|
|
Brighten.Plab.Models
Provides the component model for Brighten's AppMyWork |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0 | 92 | 11/4/2026 |
| 9.0.28 | 43 | 11/11/2026 |
| 9.0.27 | 61 | 11/11/2026 |
| 9.0.26 | 92 | 11/9/2026 |
| 9.0.25 | 93 | 11/3/2026 |
| 9.0.24 | 65 | 11/3/2026 |
| 9.0.23 | 172 | 5/1/2026 |
| 9.0.22 | 94 | 4/30/2026 |
| 9.0.21 | 170 | 1/23/2026 |
| 9.0.20 | 130 | 1/23/2026 |
| 9.0.19 | 132 | 1/22/2026 |
| 9.0.18 | 514 | 11/19/2025 |
| 9.0.17 | 468 | 11/18/2025 |
| 9.0.16 | 457 | 11/18/2025 |
| 9.0.15 | 400 | 11/17/2025 |
| 9.0.14 | 323 | 11/10/2025 |
| 9.0.13 | 309 | 11/10/2025 |
| 9.0.12 | 310 | 11/10/2025 |
| 9.0.11 | 308 | 11/10/2025 |
| 9.0.10 | 242 | 11/7/2025 |
Security and critical updates