← Back to Projects

Threshold

#cloudflare-workers·#hono·#api-security·#typescript·#cloudflare-turnstile·#rate-limiting·#edge-computing

A standalone submission gateway built on Cloudflare Workers that handles authentication, bot protection, rate limiting, and request forwarding between any frontend and backend.

Threshold started as a way to securely submit contact form data from my static Astro site to my CMS without exposing API keys in client-side code. It grew into a generalized, config-driven gateway that any frontend can use to communicate with any backend through a secure middleware layer.

Submissions are defined by a simple configuration that specifies allowed origins, authentication, Turnstile requirements, and a destination. Adding a new frontend-to-backend connection is as simple as adding a config entry.

Tech Stack

  • Cloudflare Workers - Edge runtime
  • Hono - Lightweight web framework
  • Cloudflare Turnstile - Bot protection
  • Workers Rate Limiting API - Native rate limiting
  • @noble/hashes - HMAC-SHA256 authentication
  • Biome - Linting and formatting

See Also