Summary
Protect public API endpoints from accidental overload and basic abuse by adding configurable rate limiting.
Current Behaviour
The API exposes public routes for membership lookup, profile lookup, access checks, and member listing without visible request throttling.
Expected Behaviour
The API should limit repeated requests by IP address or configured client identifier while preserving normal SDK and frontend usage.
Suggested Implementation
Add Fastify-compatible rate limiting with configurable limits per route group. Use stricter limits for expensive endpoints such as community member listing and more permissive limits for lightweight health checks. Make Redis-backed storage optional if the project already runs Redis in deployment.
Files or Areas Likely Affected
apps/access-api/src/app.ts
apps/access-api/src/index.ts
apps/access-api/src/routes.ts
apps/access-api/src/config.ts
.env.example
README.md
Acceptance Criteria
Additional Notes
Avoid hard-coding production limits. Defaults should be safe for local development and easy to override.
Summary
Protect public API endpoints from accidental overload and basic abuse by adding configurable rate limiting.
Current Behaviour
The API exposes public routes for membership lookup, profile lookup, access checks, and member listing without visible request throttling.
Expected Behaviour
The API should limit repeated requests by IP address or configured client identifier while preserving normal SDK and frontend usage.
Suggested Implementation
Add Fastify-compatible rate limiting with configurable limits per route group. Use stricter limits for expensive endpoints such as community member listing and more permissive limits for lightweight health checks. Make Redis-backed storage optional if the project already runs Redis in deployment.
Files or Areas Likely Affected
apps/access-api/src/app.tsapps/access-api/src/index.tsapps/access-api/src/routes.tsapps/access-api/src/config.ts.env.exampleREADME.mdAcceptance Criteria
Additional Notes
Avoid hard-coding production limits. Defaults should be safe for local development and easy to override.