Explore projects
JavaScriptintermediatebackend
Multi-tenant API Gateway
Node.js API Gateway with per-tenant routing, JWT authentication, per-plan rate limiting, request/response transformation, and centralized logging.
5 steps
Project steps
- 01
Tenant resolution
Resolves tenant from subdomain or X-Tenant-ID header.
- 02
JWT auth
JWT verification middleware with jwks-rsa for public key per tenant.
- 03
Rate limiting
Redis sliding window per tenant+endpoint; different limits per plan.
- 04
Reverse proxy
Forwards the request to the correct upstream per tenant with injected headers.
- 05
Request/response transform
Per-tenant plugins: add/delete headers, transform JSON body.
Recommended resources
Ready to build this?
Fork the repo on GitHub and start building. A mentor will review your code when you open a PR.
5 steps
Tech stack
Node.jsFastifyRedisjsonwebtokenhttp-proxy-middleware