Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 2 min read

Why I Refused to Store User Text When Building an AI Detector (and How I Built It on Cloudflare Workers)

When I started building a bilingual Japanese/English AI text checker, the first thing a friend told me when testing an early prototype wasn't about accuracy. It was: "Waitβ€”are you saving the thesis draft I just pasted

When I started building a bilingual Japanese/English AI text checker, the first thing a friend told me when testing an early prototype wasn't about accuracy. It was:

"Waitβ€”are you saving the thesis draft I just pasted in here?"

That stuck with me. Students, researchers, and copywriters paste unpublished work into text tools every day, and most of them have no idea whether that text is sitting in a database somewhere or being logged in plain text for debugging.

So when I shipped GPTCheck, I made one hard rule early on: never persist user input.

What "zero retention" actually meant in practice

It sounds simple until you realize how many places text accidentally leaks:

  • Request logs: If you log request payloads on error, congratulationsβ€”you're storing user drafts. We only log status codes, latency, and character counts.
  • Database tables: There is no submissions or history table. Analysis runs in memory during the request lifecycle and disappears the moment the JSON response returns.
  • Rate limiting without accounts: Since the free checker works with zero signup, we still needed basic abuse protection. Instead of tracking users with heavy sessions, we hash minimal request metadata with short-lived counters.

Why Cloudflare Workers + KV fit this well

Running Next.js on Cloudflare Workers meant I didn't have to babysit a container or pay for an always-on server while validating the idea. The whole app stays stateless at the edge.

The only persistent state I actually needed was a tiny waitlist for the Pro tier while payment onboarding was still in progress. For that, a single Cloudflare KV namespace (WAITLIST_KV) took about ten minutes to wire upβ€”store the email, timestamp, and locale, then return a clear confirmation. No ORM, no migrations, no cold-start headache.

One honest tradeoff

Not storing text means I can't silently mine real user submissions to tune heuristics later. If a user hits a weird false positive, I don't have a copy of their essay unless they explicitly send me an example.

Honestly? I'm fine with that tradeoff. Building a tool people actually feel safe pasting a real draft into is worth way more than a pile of scraped logs.

If you're building any text-processing side project, try designing it without a user_inputs table from day oneβ€”you'll be surprised how much simpler both your stack and your privacy policy become.

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.