Form Spam Protection
How the contact form and account sign-up forms keep out bot submissions — BotID, a honeypot, a fill-time check, a content check and rate limits.
Form Spam Protection
Four public forms take submissions from anyone:
| Form | Route | App |
|---|---|---|
| Contact form (Contact page and the Picante chat widget) | POST /api/send-email/contact | storefront, fundraising |
Customer account sign-up (/auth/signup) | POST /api/auth/register | storefront, fundraising |
| Fundraiser account sign-up | POST /api/auth/fundraiser-register | fundraising |
| Fundraiser application | POST /api/fundraiser/signup | fundraising |
| Gift certificate purchase | POST /api/gift-certificates/purchase | storefront |
Each one is screened by lib/spam-guard.ts in packages/core, cheapest check first.
The checks
- Rate limit. At most 5 submissions per IP: per 10 minutes for the contact form, per hour
for the sign-ups. Uses the shared limiter in
lib/rate-limiter.ts, which keeps one count across server instances when Vercel KV is configured. - Honeypot and fill time.
useSpamTrap()(components/forms/spam-trap.tsx) adds a hiddenwebsitefield and how long the form was open, measured in the browser so a wrong device clock can't skew it. A filled-inwebsitefield, or a form sent less than 3 seconds after it opened, is a bot. - Content. The bot that hit these forms in October 2026 sends a single 12+ letter word that
keeps switching case (
lfvgsUEjUvkQjiAvuZ) as the message or name, often from a Gmail address padded with dots (e.x.i.lo.s.u.l694@gmail.com). The sign-up routes check only the person's name and message, never the organization name. - Vercel BotID. Each app's
instrumentation-client.tslists the protected routes, andnext.config.mjsis wrapped inwithBotId. A post that didn't come from a page that ran the invisible check is flagged. If the BotID check itself errors, the submission is let through.
What happens to spam
Bots get the same success reply a person would, so they have nothing to adjust to.
| Check | Contact form | Account and fundraiser sign-ups |
|---|---|---|
| Honeypot or fill time | Dropped | Dropped |
| Content pattern | Saved as a closed [Spam] conversation, no email sent | Dropped |
| BotID | Saved as a closed [Spam] conversation, no email sent | Rejected with a "refresh and try again" error |
The gift certificate purchase is handled differently because it takes a card. Card testers use it to try stolen cards, so a visitor gets 5 attempts per hour, and a request caught by any check is rejected with a generic error before an order or Stripe PaymentIntent exists. The content check looks at the purchaser name, recipient name and message, never the email.
Closed [Spam] conversations stay in Communications → Contact Form Messages history, so a real message that was flagged by mistake can still be found and answered.
Adding a protected form
- Call
isBotRequest(),isSpamTrapTripped()and, where it fits,looksLikeSpamContent()in the route, and spreadspamTrapFieldsinto its Zod schema. - Add the route's path to
initBotIdin the app'sinstrumentation-client.ts. - Render
<SpamTrapInput ref={trapRef} />in the form and spreadspamTrapValues()into the body.
For stronger detection, turn on BotID Deep Analysis in the Vercel project's Firewall settings.
How is this guide?
Last updated on