LowCodeHub.MinimalEndpoints 0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package LowCodeHub.MinimalEndpoints --version 0.0.1
                    
NuGet\Install-Package LowCodeHub.MinimalEndpoints -Version 0.0.1
                    
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="LowCodeHub.MinimalEndpoints" Version="0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LowCodeHub.MinimalEndpoints" Version="0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="LowCodeHub.MinimalEndpoints" />
                    
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 LowCodeHub.MinimalEndpoints --version 0.0.1
                    
#r "nuget: LowCodeHub.MinimalEndpoints, 0.0.1"
                    
#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 LowCodeHub.MinimalEndpoints@0.0.1
                    
#: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=LowCodeHub.MinimalEndpoints&version=0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=LowCodeHub.MinimalEndpoints&version=0.0.1
                    
Install as a Cake Tool

LowCodeHub.MinimalEndpoints

LowCodeHub.MinimalEndpoints is a utility library for ASP.NET Core Minimal APIs that gives you:

  • modular endpoint registration
  • endpoint logging and validation filters
  • language and timezone awareness middleware
  • JSON-based localization (IStringLocalizer)
  • lightweight event bus (in-memory or Redis-backed)
  • mapping and result helpers

Installation

dotnet add package LowCodeHub.MinimalEndpoints

Features

1) Modular endpoint mapping

Define modules implementing IModule and map them automatically.

app.MapModules<Program>();
// or:
app.MapModules(typeof(Program).Assembly);

2) Endpoint filters

  • AddLogging<TEndpoint>() for request timing/logging
  • AddValidator<TRequest>() for sync/async request validation
app.MapPost("/orders", (CreateOrderRequest req) => Results.Ok())
   .AddValidator<CreateOrderRequest>();

3) Language awareness

Reads language from headers (Language, Accept-Language, X-Culture) and sets request language context.

builder.Services.AddLanguageAwareness(defaultLanguage: "en");
app.UseLanguageAwareness();

4) Timezone awareness

Reads timezone from configured headers and stores it in request context.

builder.Services.AddTimeZoneAwareness("TimeZone", "X-TimeZone");
app.UseTimeZoneAwareness();

5) JSON localization

Uses JSON resource files through native IStringLocalizer.

builder.Services.AddJsonLocalization(options =>
{
    options.ResourcesPath = "Resources";
});

app.UseJsonLocalization("en", "ar");

Example resource files:

  • Resources/en.json
  • Resources/ar.json

Supports nested keys with dot notation:

{
  "Errors": {
    "USER_NOT_FOUND": "User not found"
  }
}

Access key: Errors.USER_NOT_FOUND

6) Event bus (in-memory)

builder.Services.AddEventBus<Program>();
  • bounded channel for backpressure
  • hosted background processor
  • handler auto-registration from scanned assemblies

7) Event bus (Redis-backed)

builder.Services.AddRedisEventBus(options =>
{
    options.ConnectionString = "localhost:6379";
    options.QueueKey = "domain-events";
    options.ProcessingQueueKey = "domain-events:processing";
    options.PopTimeoutSeconds = 5;
}, typeof(Program).Assembly);

Redis mode includes:

  • reliable processing queue (BRPOPLPUSH)
  • ack on success
  • nack + requeue on failure

Domain events

public record OrderCreated(Guid OrderId) : IDomainEvent;

public sealed class OrderCreatedHandler : IDomainEventHandler<OrderCreated>
{
    public ValueTask Handle(OrderCreated domainEvent, CancellationToken cancellationToken)
    {
        // handle event
        return ValueTask.CompletedTask;
    }
}

Publish event:

await eventBus.Publish(new OrderCreated(orderId), cancellationToken);

Best practices

  1. Use MapModules to keep endpoint registration organized by feature.
  2. Add AddValidator<TRequest>() to write-side endpoints.
  3. Prefer Redis event bus for multi-instance deployments.
  4. Keep event handlers idempotent.
  5. Use short, stable event contract names and avoid breaking schema changes.
  6. Keep localization JSON keys stable across languages.

Notes

  • Request language/timezone contexts are cleaned after each request.
  • Redis event bus requires StackExchange.Redis connectivity.
  • If no event handlers are registered for an event, processing still completes safely.
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 LowCodeHub.MinimalEndpoints:

Package Downloads
LowCodeHub.MinimalEndpoints.Mcp

Model Context Protocol integration for LowCodeHub.MinimalEndpoints, exposing opt-in API contracts as MCP tools over ASP.NET Core Streamable HTTP.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.6 130 5/18/2026
0.0.5 100 5/13/2026
0.0.4 104 5/12/2026
0.0.3 155 4/23/2026
0.0.2 1,705 3/27/2026
0.0.1 110 3/26/2026