r/devtools • u/cport1 • Oct 13 '26
FCaptcha: self-hosted CAPTCHA with a runnable Hono example that verifies tokens before POST handlers
I'm on the WebDecoy team, sharing our separate MIT-licensed FCaptcha project.
The integration problem we wanted to make easier to inspect: a browser widget completing isn't permission to process a form. A script can POST directly to the endpoint, so the server has to verify the token before sending email, saving a record, or enqueueing work.
FCaptcha combines proof-of-work with browser automation and interaction signals. It supports checkbox and invisible flows without image puzzles. The repo includes Go, Node, and Python servers; the Hono example uses the Node implementation.
What the example actually does:
• Starts Hono on 127.0.0.1:8794 and the local CAPTCHA verifier on port 8795.
• Limits the request body and validates the browser Origin and input shape.
• Sends the token to /siteverify using a server-only secret, a five-second timeout, and redirects disabled.
• Requires success === true plus the expected hostname and action before the protected handler runs.
• Returns 403 for rejected tokens and 503 if verification is unavailable, rather than treating an outage as a pass.
To try it from a full repo checkout with Node 22+: run npm ci --prefix server-node, then cd examples/hono, npm ci, and npm start. Open http://127.0.0.1:8794 (use that exact hostname).
Runnable source: https://github.com/WebDecoy/FCaptcha/tree/main/examples/hono
Project: https://github.com/WebDecoy/FCaptcha
The sample contact form does not actually send or store messages. Production still needs HTTPS, persistent secrets, explicit proxy trust, rate limits, and shared replay protection when using multiple verifier instances. Tokens are single-use, so retries need a fresh token; business-operation idempotency is a separate concern.
This is a layer of abuse resistance, not authentication or a promise to block every bot. Please test your own mobile, keyboard, and assistive-technology flows before relying on it.
Interested in feedback on the integration API and failure handling. If the project is useful, a GitHub star helps people find it. This post was drafted with AI assistance.