PouryaKit.Web 0.1.0-preview.2

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

PouryaKit.Web

NuGet .NET 10 License: MIT

PouryaKit.Web

The Kit's HTTP boundary. Each Feature has its own endpoint, a small IEndpoint class beside its command or query, which a Module's Composition Root maps under its route prefix. The Kit authenticates each request and begins its Operation with an Operation Context built from the verified claims, and the endpoint turns the Result into a response with ToHttpResult().

Install

dotnet add package PouryaKit.Web --prerelease

When to use it

  • You are writing an endpoint, or composing the Host's HTTP pipeline.
  • You choose a response's shape, or bind page, sort and filter parameters from the query string.
  • An endpoint must be public, or a repeatable write must require an idempotency key.
  • You read the verified claims into the Operation Context, or call another Host with it.
  • You configure CORS policies, response compression or the rate limit per Actor.

It pairs with PouryaKit.Security.JwtBearer for bearer tokens, PouryaKit.Web.OpenApi for versions and documents, and PouryaKit.Modularity for the Gateway its endpoints call.

Quick start

Compose the Host's pipeline:

builder.Services.AddPouryaKitWeb();
app.UseExceptionHandler();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.MapPouryaKitModuleEndpoints();

CORS and the rate limit each take a middleware of their own: UseCors between UseRouting and UseAuthentication, and UseRateLimiter after UseAuthorization. Compression needs no call.

Find the Module's endpoints in its Composition Root:

module.AddPouryaKitEndpoints("/inventory");

Map one endpoint per Feature, as the Proving Sample does:

internal sealed class GetStockItemEndpoint : IEndpoint
{
    public void Map(IEndpointRouteBuilder routes) =>
        routes.MapGet(
            "/stock-items/{productId}",
            async (
                Guid productId,
                OperationContext context,
                IGatewayProcessor<InventoryModule> inventory,
                CancellationToken cancellationToken
            ) =>
                (
                    await inventory.QueryAsync(
                        new GetStockItemQuery(productId),
                        context,
                        cancellationToken
                    )
                ).ToHttpResult()
        );
}

What you get

  • Authenticated access by default: a public endpoint says so, and names the system Actor it runs as.
  • One problem response for every failure, chosen by the Errors' kinds.
  • An OperationContext built from the verified claims.
  • Outgoing HTTP that carries the Operation Context, with the standard retry for safe methods.
  • A Page bound from the query string, and an idempotency key required on a repeatable write.

Every endpoint is authenticated unless it says otherwise, and a tenant-scoped Module maps no public endpoint, since an anonymous request has no tenant.

Learn more

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 (4)

Showing the top 4 NuGet packages that depend on PouryaKit.Web:

Package Downloads
PouryaKit.Reporting.Module

The Kit's report Module: report jobs generated in the background, stored through the Host's file storage and served to their requester by a time-limited link.

PouryaKit.Web.OpenApi

API versions a Module declares, served by URL segment and by header, with a configured sunset, one ASP.NET Core OpenAPI document per version and the Scalar reference.

PouryaKit.Grpc

gRPC services and clients on the Kit's Web conventions: each call runs through a Module's Gateway, and a failed Result answers a gRPC status with every Error in a trailer.

PouryaKit.Realtime

Server-sent events pushed from Notification Handlers, carried between a Host's instances by PostgreSQL notifications, only within the delivery's tenant.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.2 85 11/1/2026
0.1.0-preview.1 84 10/31/2026
0.1.0-preview.0.28 94 10/26/2026