1
0 Comments

Going all-in with Cloudflare for my test reporting SaaS

So I've been building Gaffer (gaffer.sh), it's a test report hosting platform that gives you AI insights on your test runs. Think "Codecov but for test results"? Anyway, I wanted to share our stack because honestly when I started I wasn't sure this would work.

The stack:

  • NuxtHub (Nuxt 4 on Cloudflare Workers, of course gets bought by Vercel and mostly deprecated after I'm fully engrained)

  • D1 for the main database (SQLite at the edge)

  • R2 for storing test report files

  • Cloudflare Queues for async parsing

  • Workers AI for the insights stuff

So far the only outside tool I've spun up is MongoDB Atlas for the heavy analytics stuff (I looked at Clickhouse and others, but would eventually have to get a second mortgage to pay for them). Getting this to work properly inside a worker environment would warrant it's own update, but I digress.

What's actually working well:

Deployments are stupid simple. Push to main, it's live in like 40 seconds. No Docker, no Kubernetes, no "let me SSH into the server real quick." This is wildly refreshing after the tech sprawl of the previous iteration of Gaffer (see previous post). D1 is surprisingly capable? I was skeptical about SQLite for a SaaS but for most of my queries it's fine. I only added MongoDB later when I needed to do aggregations across thousands of test cases. R2 is just... cheap. I'm storing HTML reports, XML files, JSON blobs. Basically free compared to S3.

What's been tricky:

Cron jobs on Workers have tight CPU and time limits. I just spent a day optimizing my analytics job because it was timing out. Had to get creative with MongoDB's $facet to reduce collection scans. The D1 + MongoDB combo feels weird sometimes. Like "why do I have two databases." But honestly D1 for transactional stuff and Mongo for analytics makes sense in practice.

Costs so far:

This is the fun part; I'm on the free tier for most Cloudflare stuff still. MongoDB Atlas has a free tier too, but I pre-emptively upgraded to the ~$5/month cluster. Total hosting cost right now is like... $10? Obviously that'll change with scale (I hope?) but the baseline is nice when you're bootstrapping solo.

Anyone else building on Cloudflare Workers? Curious what your experience has been. Also if you're drowning in test output and want to try Gaffer, it's at gaffer.sh, I would love feedback and beta-testing from other devs.

posted toAvatar for product Gaffer
Gaffer