Welcome to the Jose Madrid Salsa developer docs — explore features, APIs, and deployment guides.
Jose Madrid SalsaJMS Docs

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:

FormRouteApp
Contact form (Contact page and the Picante chat widget)POST /api/send-email/contactstorefront, fundraising
Customer account sign-up (/auth/signup)POST /api/auth/registerstorefront, fundraising
Fundraiser account sign-upPOST /api/auth/fundraiser-registerfundraising
Fundraiser applicationPOST /api/fundraiser/signupfundraising
Gift certificate purchasePOST /api/gift-certificates/purchasestorefront

Each one is screened by lib/spam-guard.ts in packages/core, cheapest check first.

The checks

  1. 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.
  2. Honeypot and fill time. useSpamTrap() (components/forms/spam-trap.tsx) adds a hidden website field and how long the form was open, measured in the browser so a wrong device clock can't skew it. A filled-in website field, or a form sent less than 3 seconds after it opened, is a bot.
  3. 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.
  4. Vercel BotID. Each app's instrumentation-client.ts lists the protected routes, and next.config.mjs is wrapped in withBotId. 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.

CheckContact formAccount and fundraiser sign-ups
Honeypot or fill timeDroppedDropped
Content patternSaved as a closed [Spam] conversation, no email sentDropped
BotIDSaved as a closed [Spam] conversation, no email sentRejected 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

  1. Call isBotRequest(), isSpamTrapTripped() and, where it fits, looksLikeSpamContent() in the route, and spread spamTrapFields into its Zod schema.
  2. Add the route's path to initBotId in the app's instrumentation-client.ts.
  3. Render <SpamTrapInput ref={trapRef} /> in the form and spread spamTrapValues() into the body.

For stronger detection, turn on BotID Deep Analysis in the Vercel project's Firewall settings.

How is this guide?

Edit on GitHub

Last updated on

On this page