.NET10nuget0.1.0-preview.2licenceMIT

PouryaKit

A reusable .NET 10 foundation for modular monoliths, in which Feature code holds only business behaviour.

Each Feature of a Module supplies its command or query, its handler and its endpoint. The Kit runs the Operation with the caller's Operation Context and tenant, owns its one commit in the Unit of Work, writes its Outbox and delivers what it published, in any Host that composes its Capabilities.

Terminal
dotnet new install PouryaKit.Templates@0.1.0-preview.2

A Feature holds only business behaviour

Renaming a product in the Proving Sample: the command names the cache entry it makes stale, and the handler returns a Result. Nothing here saves, commits or sends; the Kit runs the Operation around it. Walk through the Proving Sample.

RenameProductCommand.cs
internal sealed record RenameProductCommand(Guid ProductId, string Name)
    : Command,
        IInvalidatesCache
{
    public IReadOnlyCollection<string> InvalidatedCacheTags =>
        [GetProductQuery.ProductTag(ProductId)];
}
RenameProductCommandHandler.cs
internal sealed class RenameProductCommandHandler(IRepository<Product, ProductId> products)
    : CommandHandler<RenameProductCommand>
{
    public override async Task<Result> Handle(
        RenameProductCommand command,
        CancellationToken cancellationToken
    )
    {
        var product = await products.FindAsync(new ProductId(command.ProductId), cancellationToken);
        return product is null ? ProductErrors.NotFound : product.Rename(command.Name);
    }
}

What the Kit guarantees

Capabilities

Each Capability is one or a few packages, used on their own or together.

The path through the docs

  1. 1Run your first Host

    Install the templates, generate a solution and call it.

  2. 2Learn the Concepts

    Host and Module, Operation and Result, the Unit of Work and its commit.

  3. 3Build with the Guides

    A command, a paged query, an endpoint, an Integration Event, a test.

Install the AI skill

The Kit's skill teaches a coding agent the same rules these pages do. Add it to Claude Code, Codex and other agents:

Terminal
npx skills add PouryaNoufallah96/pouryakit-pub
Every way to install it

Packages on nuget.org

Every package is published on nuget.org at 0.1.0-preview.2 under the MIT licence. The templates' package pins that version in each solution it generates. The Kit's source repository is private.