An open API service indexing awesome lists of open source software.

https://github.com/taberkkaya/resultkit

Modular and lightweight Result pattern for .NET — strongly-typed, extensible, and API-ready. Includes functional helpers, error and validation contracts, and first-class ASP.NET Core integration for consistent, frontend-friendly responses.
https://github.com/taberkkaya/resultkit

aspnetcore clean-architecture csharp dotnet error-handling functional implicit-api library nuget package result result-pattern reusable strongly-typed validation

Last synced: 3 months ago
JSON representation

Modular and lightweight Result pattern for .NET — strongly-typed, extensible, and API-ready. Includes functional helpers, error and validation contracts, and first-class ASP.NET Core integration for consistent, frontend-friendly responses.

Awesome Lists containing this project

README

          


ResultKit logo

ResultKit


A Modular & Extensible Result Pattern Library for .NET

---

## ✨ Overview

**ResultKit** is a lightweight, strongly-typed result abstraction for .NET projects. It enables safe and explicit handling of operation outcomes—**success**, **failure**, **validation errors**, and **exceptions**—while improving your API and service design. ResultKit provides a unified way to represent operation results, eliminating ambiguous return codes and ad-hoc error handling.

---

## 📦 Installation

Install via NuGet:

```bash
dotnet add package ResultKit
```

## 📁 Folder Structure

```graphql
src/
└── ResultKit # Core result implementation (library source)
samples/
└── ResultKit.SampleApi # Example ASP.NET Core Web API usage
```

## 💡 Motivation

ResultKit was created to enforce clear, consistent outcomes across your application:

- 🔒 Type-Safety for All Result Flows: No more sentinel values or exception-based control flow—return structured Result objects for both success and failure.
- 🔁 Cleaner APIs, Predictable Errors: Service and API methods return a single, explicit result type, making intent and error handling obvious.
- 🧩 Frontend-Friendly: Easily create unified, predictable HTTP responses for API clients and frontend apps.
- 🧪 Seamless Integration: Supports ASP.NET Core with helpers for direct conversion to HTTP responses.

## 📎 Documentation:

See [`src/ResultKit/README.md`](https://github.com/taberkkaya/ResultKit/blob/master/src/ResultKit/README.md) for usage, API details, and integration examples.

## 🤝 Contributing

Contributions and suggestions are welcome!

## 📜 License

MIT © [Ataberk Kaya](https://github.com/taberkkaya)