DEV Community

Remus
Remus

Posted on

Building a Domain Audit Engine using Cloudflare Workers and D1 (for $0/mo)

Hello world! 🚀 After years in the corporate trenches, I decided to see how far I could push the Cloudflare free tier. I ended up building a sub-second domain audit engine for exactly $0.00/mo. I'm excited to join the community and share the workflow that made it possible.

The "Vibe Coding" Story of StackAnchor.
Let’s be honest: the traditional way of building apps—drawing diagrams for weeks, arguing over database schemas, and waiting for CI/CD pipelines that take 20 minutes—is dead.
Last week, I decided to build StackAnchor. I didn't start with a sprint plan. I started with a vibe.
I wanted a tool that could audit a domain’s health (SSL, Security Headers, Email Auth, SEO) in under 10 seconds, email a beautiful report, and cost exactly $0.00 to run at scale.

Here is how I built it using Cloudflare’s "Infinity" stack, Antigravity (my AI pair programmer), and pure vibe coding.


The Stack: Why Cloudflare?

I chose Cloudflare because their Free Tier is essentially a superpower for developers:

  • Cloudflare Workers: 100k requests/day for free. Zero cold starts.
  • D1 (SQL Database): High-performance SQLite at the edge.
  • Service Bindings: This is the "secret sauce." My API Gateway calls my Audit Worker with zero latency—it's like a function call but across separate microservices.
  • Pages: Blazing fast static hosting for the frontend.

High-fidelity architecture of the StackAnchor Edge Engine

The "Vibe Coding" Workflow

I built this project in a single flow state with Antigravity. Instead of writing boilerplate, I focused on the "What" and let the AI handle the "How."

  1. Iterative Architecture: We didn't plan the database on day one. We built the Audit logic first, saw it working in the terminal, and then said: "Hey Antigravity, let’s persist this to D1 for rate limiting."
  2. Zero-Friction UI: The "Terminal" aesthetic on the StackAnchor homepage wasn't a pixel-perfect Figma design. It was a vibe: "Make it feel like a dev's home."
  3. Security-First: Even on the free tier, we implemented Turnstile for bot protection and Honeypots to trap bad actors. Antigravity caught edge cases in the CSP (Content Security Policy) that would have taken me hours to debug manually.

Deep Dive: The Audit Engine

Under the hood, StackAnchor runs 30+ checks in parallel using Promise.all().
When you hit "Audit," a Cloudflare Worker:

  1. Validates the domain (no enterprise sites allowed to prevent abuse).
  2. Checks DNS records (SPF, DKIM, DMARC, MX).
  3. Probes HTTPS (SSL expiry, TLS version, HSTS headers).
  4. Analyzes Security Headers (CSP, X-Frame-Options, etc.).
  5. Builds a Report: We use a deterministic scoring algorithm (0-100).
  6. Emails you via Resend: Using their free tier for beautiful HTML emails.

The Economics of $0/mo

Here is the "Bill of Materials" for StackAnchor:

  • Hosting: Cloudflare Pages ($0)
  • Compute: Cloudflare Workers ($0)
  • Database: Cloudflare D1 ($0)
  • Email: Resend Free Tier ($0)
  • Security: Cloudflare Turnstile ($0)
  • IaC: Terraform + R2 for state ($0) Total Cost: $0.

What’s Next?

"Vibe coding" doesn't mean "done." It means "fast."
The core of StackAnchor is now rock solid. Next, I'm building Pulse—continuous uptime and SSL monitoring from the edge.

If you want to see what happens when you combine AI with the world’s fastest edge network, come run an audit on your site.
Check it out at stackanchor.net

I would love to get some feedback from this community.

Top comments (0)