@kitstack/rate-limitter
v1.0.0
Published
A flexible, production-ready rate-limiting package for NestJS with multiple algorithms and Redis support.
Maintainers
Readme
NestJS Rate Limiter
A flexible, production-ready rate-limiting package for NestJS with multiple algorithms and Redis support.
Packages
packages/nestjs-rate-limit- The main NestJS rate limiting packagedocs- React documentation applicationmock-server- Mock API server for testing and demonstrating rate limiting
Getting Started
Package Development
cd packages/nestjs-rate-limit
npm install
npm run buildDocumentation Development
cd docs
npm install
npm run devMock Server
cd mock-server
npm install
npm run devThe mock server runs on http://localhost:3001 and provides example endpoints demonstrating different rate limiting strategies.
Features
- 🎯 Multiple rate limiting algorithms (Sliding Window, Leaky Bucket, Token Bucket)
- 🔧 Flexible configuration (Global, Controller, Route level)
- 🚀 Priority system (Route > Controller > Global)
- 💾 Storage options (In-memory, Redis)
- 📝 Fully typed with TypeScript
- 🎨 Simple decorator-based API
License
MIT
