For the longest time, whenever I needed a simple "Contact Us" or "Waitlist" form in a Next.js app, my workflow looked like this:
- Create a
route.tsAPI endpoint. - Install
zodfor validation. - Install
resendornodemailerto actually get the email. - Set up an API key, write the HTML email template, handle rate limiting, and write a bunch of boilerplate JSX.
It took hours for what should have been a 5-minute task. Worse, when I started getting spam, I had to figure out how to integrate Google reCAPTCHA, which completely ruined the UX of my site.
The Cloudflare Workers Pivot
I realized that form handling doesn't belong in my edge computing frameworkโit belongs on the absolute edge network itself.
I built FormGuard, an AI-native form backend that runs entirely on Cloudflare Workers.
Here is how you use it:
<form action="https://api.formguard.strivio.world/submit/YOUR_ID" method="POST">
<input name="email" type="email" required />
<button type="submit">Join</button>
</form>
That's it. No Next.js API routes, no nodemailer, no React Email templates.
How it stops Spam
Instead of forcing users to click traffic lights, FormGuard uses serverless AI to analyze the payload before it ever hits your inbox. If the payload contains typical spam vectors or bot-like submission patterns, it's silently dropped.
The stack
- Edge: Cloudflare Workers & Hono
- Database: Drizzle ORM & Postgres
- Frontend: Next.js App Router & Tailwind CSS
If you're tired of writing backend code for frontend forms, I'd love for you to check it out. I just launched on Product Hunt today and would appreciate your feedback!
Top comments (0)