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