Skip to main content

Introduction

Packages Total Downloads Codecov GitHub last commit GitHub issues Publish NuGet GitHub license

RA.Utilities provides a set of reusable, opinionated building blocks primarily aimed at solving common problems in web API development. The high-level purpose is to reduce boilerplate code, enforce consistency, promote a clean architecture (specifically Vertical Slice Architecture using the CQRS pattern), and improve the overall developer experience.

Start with RA.Utilities.Core.Results

The Result monad, exception hierarchy, and HTTP constants are the foundation every other package builds on. Master these in 5 minutes — then everything else clicks into place.

Get Started

No sign-up. No dependency chain. Just install the package and go.


🚀 Getting Started​

New to RA.Utilities? Here is the recommended reading order — each layer builds on the one before it.

StepLayerStart hereWhat you will learn
1. FoundationCoreCore OverviewThe Result monad, exception hierarchy, and HTTP constants — these underpin everything else
2. Business LogicApplicationFeature MediatorCQRS handlers, the custom mediator, and pipeline behaviors
3. API LayerApiApi PackageEndpoint registration, exception handling, validation filters, and standardized responses

Each package is opt-in — adopt only the layers your project needs.

Quick Install​

# Start with the foundation
dotnet add package RA.Utilities.Core.Results
dotnet add package RA.Utilities.Core.Exceptions

# Add the mediator and CQRS support
dotnet add package RA.Utilities.Feature

# Wire up your API
dotnet add package RA.Utilities.Api

🔑 Key Benefits​

RA.Utilities is a suite of NuGet packages designed to accelerate and standardize .NET web API development. Each package encapsulates best practices and reusable components that help developers build robust, maintainable, and scalable applications with minimal boilerplate.

  • 🧱 Modular Architecture: Plug-and-play components for logging, authentication, error handling, and more.
  • 📦 NuGet-Ready: Easily integrate into your projects via NuGet for fast setup and consistent behavior.
  • 🧭 Clean Design Patterns: Built around CQRS and vertical slice architecture to promote separation of concerns and testability.
  • 📈 Developer Productivity: Reduce repetitive code and focus on business logic.
  • 📚 Built-in Documentation: Seamless OpenAPI integration for clear and interactive API docs.

Whether you are starting a new project or refactoring an existing one, RA.Utilities helps you build better APIs — faster.


🗺️ Solution Structure​

The tree below shows how every RA.Utilities package depends on the others. Each node's children are the packages it depends on — every branch points inward, toward the Core layer, per the Dependency Rule. Solid edges are runtime package references; dashed edges are compile-time analyzers shipped inside the package (RA.Utilities.Api.Generators inside RA.Utilities.Api, RA.Utilities.Feature.Generators inside RA.Utilities.Feature, RA.Utilities.Integrations.Generators inside RA.Utilities.Integrations). RA.Utilities.Authentication.JwtBearer, RA.Utilities.Authorization, RA.Utilities.Logging.Core, and RA.Utilities.Core.Results are standalone packages with no RA.Utilities dependencies.

RA.Utilities
RA.sln
.editorconfig
Directory.Build.props
Directory.Build.targets
Directory.Packages.props
Api
RA.Utilities.Api
RA.Utilities.Api.Response
RA.Utilities.Api.Middlewares
RA.Utilities.Authentication.JwtBearer
RA.Utilities.Authorization
RA.Utilities.OpenApi
Application
RA.Utilities.Feature
Core
RA.Utilities.Core.Results
RA.Utilities.Core.Constants
RA.Utilities.Core.Exceptions
Data
RA.Utilities.Data.Abstractions
RA.Utilities.Data.Entities
RA.Utilities.Data.EntityFramework
Infrastructure
RA.Utilities.Integrations
Logging
RA.Utilities.Logging.Core
RA.Utilities.Logging.Shared
documentation
Layer/ConcernRA.Utilities Package(s)Purpose
API & WebRA.Utilities.Api, RA.Utilities.Api.Response, RA.Utilities.Api.Middlewares, RA.Utilities.OpenApi, RA.Utilities.Authentication.JwtBearer, RA.Utilities.AuthorizationProvides helpers for standardized API responses (SuccessResponse), middleware for logging and header validation, automates OpenAPI/Swagger documentation, and simplifies access to authenticated user data.
Application LogicRA.Utilities.FeatureThis is the heart of the CQRS implementation. It provides base classes for your feature "handlers" and a validation pipeline to automatically validate incoming requests.
Core Building BlocksRA.Utilities.Core.Constants, RA.Utilities.Core.ExceptionsOffers shared constants (like HTTP status codes) and a set of standardized exceptions (NotFoundException, ConflictException) to create clear, semantic error handling.
Data AccessRA.Utilities.Data.Abstractions, RA.Utilities.Data.EntityFrameworkProvides abstractions and implementations for talking to the database.
IntegrationsRA.Utilities.IntegrationsSimplifies and standardizes HTTP client calls to external APIs, with built-in support for configuration, logging, and resilience policies.
LoggingRA.Utilities.Logging.Core, RA.Utilities.Logging.SharedProvides a one-line setup for production-ready structured logging with Serilog.

📦 Package Index​

This table provides a quick overview of all packages available in the RA.Utilities ecosystem, along with their current versions and download statistics from NuGet.

PackageVersionDownloads
Core
RA.Utilities.Core.ResultsRA.Utilities.Core.Results version badgeRA.Utilities.Core.Results downloads badge
RA.Utilities.Core.ConstantsRA.Utilities.Core.Constants version badgeRA.Utilities.Core.Constants downloads badge
RA.Utilities.Core.ExceptionsRA.Utilities.Core.Exceptions version badgeRA.Utilities.Core.Exceptions downloads badge
Api
RA.Utilities.ApiRA.Utilities.Api version badgeRA.Utilities.Api downloads badge
RA.Utilities.Api.ResponseRA.Utilities.Api.Response version badgeRA.Utilities.Api.Response downloads badge
RA.Utilities.Api.MiddlewaresRA.Utilities.Api.Middlewares version badgeRA.Utilities.Api.Middlewares downloads badge
RA.Utilities.Authentication.JwtBearerRA.Utilities.Authentication.JwtBearer version badgeRA.Utilities.Authentication.JwtBearer downloads badge
RA.Utilities.AuthorizationRA.Utilities.Authorization version badgeRA.Utilities.Authorization downloads badge
RA.Utilities.OpenApiRA.Utilities.OpenApi version badgeRA.Utilities.OpenApi downloads badge
Application
RA.Utilities.Application.ValidationRA.Utilities.Application.Validation version badgeRA.Utilities.Application.Validation downloads badge
RA.Utilities.DispatcherRA.Utilities.Dispatcher version badgeRA.Utilities.Dispatcher downloads badge
RA.Utilities.FeatureRA.Utilities.Feature version badgeRA.Utilities.Feature downloads badge
Data
RA.Utilities.Data.AbstractionsRA.Utilities.Data.Abstractions version badgeRA.Utilities.Data.Abstractions downloads badge
RA.Utilities.Data.EntitiesRA.Utilities.Data.Entities version badgeRA.Utilities.Data.Entities downloads badge
RA.Utilities.Data.EntityFrameworkRA.Utilities.Data.EntityFramework version badgeRA.Utilities.Data.EntityFramework downloads badge
Infrastructure
RA.Utilities.IntegrationsRA.Utilities.Integrations version badgeRA.Utilities.Integrations downloads badge
Logging
RA.Utilities.Logging.CoreRA.Utilities.Logging.Core version badgeRA.Utilities.Logging.Core downloads badge
RA.Utilities.Logging.SharedRA.Utilities.Logging.Shared version badgeRA.Utilities.Logging.Shared downloads badge

📚 Browse by Category​