Apricot Framework

Documentation

Every Apricot Framework library and what it gives you.

Apricot Framework is a set of independent .NET libraries. Each one ships on its own schedule and is Apache-2.0. Nothing here is a framework you adopt wholesale — take the one library you need and ignore the rest.

Pick a library from the switcher at the top of the sidebar, or browse them all below.

Foundations

Contracts and primitives the other libraries build on.

Error Definitions

One error contract for a fleet of services: a canonical classification, RFC 9457 problem documents, and a reader for consuming another service's failures.

Core Utility

Zero-dependency utilities extending the .NET base class library: URL-safe hashing, cryptographically strong random strings, and small URL helpers.

Id Generation

Prefixed string identifiers for what you hand to a client, and time-ordered UUIDv7 for the keys your database orders rows by.

Intl

Message localization for .NET: locale-aware lookup with named placeholder substitution over pluggable translation sources and stores.

Services

How a service finds, authenticates and talks to its peers.

Discovery Client

Static service discovery: one declarative catalogue resolved to URLs per hosting environment, with ASP.NET Core and YAML integration.

Self Definition

Lets a service state its own external base address, bound from configuration and validated at startup, so code building absolute links never guesses the public origin.

Authentication

Both directions of a service's authentication from one settings section: the tokens it accepts, and the client credentials tokens it presents to the services it calls.

gRPC

A gRPC hop that keeps the error: the kind, code and payload a service threw are the ones its caller catches.

ASP.NET Core

Extensions that only make sense inside a web host.

ASP.NET Core Extensions

General-purpose ASP.NET Core extensions: non-buffering streaming uploads, query parameters required at the routing layer, CORS, forwarded headers and cookie policy.

Captcha

reCAPTCHA, hCaptcha and Turnstile behind one interface, with each provider's answer normalised and judged against what an endpoint declared it needs.

Razor Engine

Renders a Razor view to a string outside the MVC result pipeline, for e-mail bodies and other templated output with no request in flight.

Data

Storage, queries and the secrets that protect them.

Data Operations

SQL declared in XML and executed with Dapper: operations addressed by group and name, written per database engine, with transactions that span several of them.

Data Protection

Relational storage for the ASP.NET Core Data Protection key ring, using plain ADO.NET, with dialects for MySQL, PostgreSQL, SQL Server and SQLite.

Password Hasher

PBKDF2-HMAC password hashing with per-hash salt and iteration metadata, constant-time verification, and rehash-on-verify signalling.