Skip to content
reaatechREAATECH

reaatech/idempotency-middleware

0Last commit: May 5, 2026GitHub →

These packages provide a framework-agnostic system for ensuring that duplicate `POST`, `PUT`, and `PATCH` requests return cached responses instead of re-executing side effects. You would adopt them to prevent inconsistent state caused by network retries or client-side double-submissions. The collection uses a modular architecture that separates the core idempotency logic from specific framework adapters and pluggable storage backends like Redis, DynamoDB, and Firestore.

Packages

6 packages

@reaatech/idempotency-middleware

pending npm
Prevents duplicate execution of side-effecting operations by caching results and enforcing distributed locking based on an idempotency key. It provides a core `IdempotencyMiddleware` class that requires a `StorageAdapter` implementation to persist state across requests.
status
awaiting publish

@reaatech/idempotency-middleware-adapter-dynamodb

pending npm
Provides a DynamoDB storage adapter for `@reaatech/idempotency-middleware` that uses conditional writes for distributed locking and native TTL for automatic record expiration. It exports a `DynamoDBAdapter` class that accepts an AWS SDK v3 `DynamoDBClient` instance.
status
awaiting publish

@reaatech/idempotency-middleware-adapter-firestore

pending npm
Provides a Firestore storage adapter for `@reaatech/idempotency-middleware` that uses atomic transactions to manage distributed locks and cached responses. It exports a `FirestoreAdapter` class that requires an initialized Google Cloud Firestore client instance.
status
awaiting publish

@reaatech/idempotency-middleware-adapter-redis

pending npm
Provides a Redis-backed storage adapter for `@reaatech/idempotency-middleware` to enable distributed idempotency caching and token-guarded locking. It exports a `RedisAdapter` class that requires an `ioredis` client instance to manage state across multiple application processes.
status
awaiting publish

@reaatech/idempotency-middleware-express

pending npm
Enables idempotency for Express route handlers by caching responses keyed by an `Idempotency-Key` header. It provides an Express middleware function that requires a storage adapter from the `@reaatech/idempotency-middleware` package to persist response data.
status
awaiting publish

@reaatech/idempotency-middleware-koa

pending npm
Provides a Koa middleware that caches and replays responses based on an `Idempotency-Key` header. It requires a storage adapter from `@reaatech/idempotency-middleware` and a configured body parser to function.
status
awaiting publish

Comments

Sign in with GitHub to comment and vote.

Loading comments…