Skip to content

About

REST API for transaction processing with idempotency, distributed rate limiting, and exact response replay. .NET 7, PostgreSQL, Redis, Docker.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Transaction Gateway API

A production-minded REST API for processing transactions with idempotency, distributed rate limiting, and exact response replay — built with .NET 7, PostgreSQL, and Redis.

.NET PostgreSQL Redis Docker


Why This Exists

Most CRUD APIs break the moment a client retries a request. A dropped network connection during a payment can create a duplicate charge. A misbehaving client can hammer an endpoint with thousands of requests.

This API demonstrates the patterns that prevent those failures:

  • Idempotency — the same request sent twice produces the same result, never a duplicate transaction
  • Rate limiting — a token bucket enforced atomically in Redis protects the API from abuse
  • Exact response replay — retried requests receive the original response, preserving status codes and bodies
  • Distributed correctness — all coordination state lives in Redis, so the behavior holds across multiple API instances

Stack:

  • API: .NET 7, ASP.NET Core Web API, Entity Framework Core
  • Database: PostgreSQL 16 (persistent volume)
  • Cache/Coordination: Redis 7
  • Containerization: Docker, docker-compose

Quick Start

Requires Docker Desktop. No local Postgres, Redis, or .NET SDK needed.

git clone https://github.com/esdrasj71/TransactionGateway.API.git
cd TransactionGateway.API
docker compose up --build

About

REST API for transaction processing with idempotency, distributed rate limiting, and exact response replay. .NET 7, PostgreSQL, Redis, Docker.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages