Floodgate

Floodgate

Declarative, type-safe rate limiting for Next.js, Edge, and serverless.

Visit Floodgate

About Floodgate

Floodgate is a zero-dependency rate limiting library for Next.js applications, supporting Edge Runtime, Node.js, and serverless deployments. It offers declarative, type-safe APIs, flexible rule definitions, and pluggable stores (in-memory, Redis, Vercel KV). Developers can protect Next.js API routes and endpoints with a choice of algorithms (fixed window, sliding window, token bucket), custom key resolvers, and standard rate limit headers. It also offers React hooks and components for building rate-limit-aware UIs and is designed for seamless middleware/global application integration.

Resources

Product Website

Visit Floodgate's official website for product details and getting started.

Visit website →

Documentation

Comprehensive API reference and usage examples for Floodgate.

View docs →

Example Usage

Sample projects and real-world examples demonstrating how to implement Floodgate in Next.js applications.

See examples →