Public write and tracking endpoints are protected with in-app Postgres-backed atomic counters. Edge WAF can still be layered for additional protection.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/KingPsychopath/oooc-fete-finder/llms.txt
Use this file to discover all available pages before exploring further.
Protected endpoints
The following API endpoints have rate limiting enabled:POST /api/auth/verify- User authenticationPOST /api/event-submissions- Event submissionPOST /api/track- Analytics trackingPOST /api/track/discovery- Discovery event trackingPOST /api/user/preference- User preference updates
Rate limit policies
Authentication endpoint
POST /api/auth/verify
Per-IP address rate limit for authentication attempts
Combined email and IP address limit to prevent targeted attacks
Returns HTTP 429 with
Retry-After headerWhen the rate limiter is unavailable, authentication requests fail-open (allowed) to maintain service availability.
Event submission endpoint
POST /api/event-submissions
Per-IP address limit for event submissions
Combined email and IP address limit
Content-based fingerprint limit to prevent duplicate submissions
Returns HTTP 429 with
Retry-After headerTracking endpoints
POST /api/track
Per-IP address limit for general tracking events
Per-session limit for tracking events
On limiter failure or block, the endpoint returns 202 Accepted without recording the event.
POST /api/track/discovery
Per-IP address limit for discovery tracking
Per-session limit for discovery tracking
On limiter failure or block, the endpoint returns 202 Accepted without recording the event.
User preference endpoint
POST /api/user/preference
Per-IP address limit for preference updates
Invalid or unauthenticated requests are accepted as no-ops with 202 status.
Implementation details
Counter storage
Rate limit counters are stored in theapp_rate_limit_counters table with atomic increment operations to ensure accuracy under concurrent load.
IP extraction
Client IP addresses are extracted from request headers in the following order:x-forwarded-for(first IP in the list)x-real-ip- Falls back to “unknown” if neither header is present
extractClientIpFromHeaders in features/security/rate-limiter.ts:56.
Privacy protection
Limiter keys are HMAC-hashed using
AUTH_SECRET before storage. Raw IP addresses and email addresses are never persisted in the rate limit counter table.buildRateLimitKeyHash in features/security/rate-limiter.ts:75.
Cleanup
Expired rate limit counters are automatically cleaned up via a scheduled cron job:Cron endpoint for cleaning up expired counters
Requires CRON_SECRET environment variable for authentication
Removes counters that have expired beyond a 24-hour grace period
Failover behavior
Different endpoints have different failover strategies when the rate limiter is unavailable:| Endpoint | Behavior |
|---|---|
/api/auth/verify | Fail-open (allow request) |
/api/event-submissions | Fail-closed (return 503) |
/api/track | Accept with 202 (don’t record) |
/api/track/discovery | Accept with 202 (don’t record) |
/api/user/preference | Allow request |