OakPeak.Core 10.0.0

dotnet add package OakPeak.Core --version 10.0.0
                    
NuGet\Install-Package OakPeak.Core -Version 10.0.0
                    
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="OakPeak.Core" Version="10.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OakPeak.Core" Version="10.0.0" />
                    
Directory.Packages.props
<PackageReference Include="OakPeak.Core" />
                    
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 OakPeak.Core --version 10.0.0
                    
#r "nuget: OakPeak.Core, 10.0.0"
                    
#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 OakPeak.Core@10.0.0
                    
#: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=OakPeak.Core&version=10.0.0
                    
Install as a Cake Addin
#tool nuget:?package=OakPeak.Core&version=10.0.0
                    
Install as a Cake Tool

OakPeak Core

NuGet Downloads .NET License

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, and concurrency; apply one to endpoints that need throttling.
  • The middleware creates a Files directory 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed

Security and critical updates