🛠️ Build Story · June 2026

I Built My Clinic's Patient System on Cloudflare for Almost ₹0

When my clinic needed a way to manage patient records and invoices, the off-the-shelf software quotes made me wince — expensive monthly per-seat pricing for a single clinic, loaded with features we'd never touch. So I did something that sounds reckless but turned out to be one of my best decisions: I built our own system on Cloudflare for almost nothing. This is the honest build story — the decisions, the architecture in plain language, and what I'd do differently.

Before you copy me: Building custom software is the right call only sometimes. If you can't maintain it yourself, a good paid tool is safer and smarter. This is a story of why and how I did it, not a blanket "build your own" recommendation. I'll be clear about when buying is the better choice.

Why I didn't just buy software

Let me be fair to SaaS first: for most businesses, buying ready-made software is the right move. It's supported, maintained, and you don't wake up at 2 AM debugging it. I genuinely recommend it as the default.

But for our specific situation, the maths didn't work. The clinic management products I looked at charged ongoing monthly fees that, for a single-location clinic, felt steep — and most of that price was for modules we'd never use: complex inventory, multi-branch dashboards, integrations with systems we don't have. We needed maybe 10% of what they offered, but we'd pay 100% of the price, forever.

I also had an advantage most clinic owners don't: I can build and maintain a simple web application myself. That changed the equation. When you can do the maintenance, the "build vs buy" calculation tilts.

We needed about 10% of what the software did — but we'd have paid 100% of the price, every month, forever.

Why Cloudflare Workers + D1

Once I decided to build, the question was: build it on what? A traditional server would mean ongoing hosting costs and maintenance — exactly the overhead I was trying to avoid. I'd been using Cloudflare for other projects, and its developer platform was the obvious fit.

Cloudflare Workers

Runs my application code at the edge — fast everywhere, with a generous free tier that easily covers a single clinic's traffic. No server for me to patch or babysit.

Cloudflare D1

A serverless SQL database. I get a real relational database for storing appointments and patient records without managing any database server myself.

The combination meant the running cost at our scale is effectively negligible, the system loads instantly, and there's no infrastructure for me to maintain. For a small internal tool, that's close to ideal.

What I actually built

I want to manage expectations here: this is not some sprawling hospital information system. It's a focused, internal tool that does a few important things reliably. That focus is the whole point.

The system lets the team record and look up patient details, track appointments, and generate clean invoices — all through a simple, PIN-protected interface that works on the clinic's devices. No installs, no per-seat licences, no bloat. Just the handful of things a small clinic genuinely needs, in one fast place.

Crucially, I resisted the urge to add features. Every extra feature is extra code to maintain and extra ways to break. The discipline of keeping it small is what makes it sustainable for a one-person tech operation.

The architecture, in plain words

If you're non-technical, here's the whole thing explained simply — no jargon:

👩‍⚕️The team opens a simple web page on a clinic device and enters a PIN to get in.
⚡Cloudflare Workers receives that request and runs the logic — who can see what, what to save, what to show.
🗄️Cloudflare D1 (the database) stores the patient records, appointments, and invoice data, and hands it back when asked.
🧾The interface shows it all back cleanly — searchable records, today's appointments, and printable invoices.

That's genuinely it. A request comes in, the Worker decides what to do, the database stores or returns the data, and the screen shows the result. The elegance is in how little there is to go wrong.

The hard parts & mistakes

It wasn't all smooth. Here's the honest version.

I scoped too big at first. My initial plan had reports, analytics, fancy dashboards — none of which the clinic needed on day one. I caught myself and ruthlessly cut back to the essentials. The first useful version came together quickly precisely because I shrank the scope.

Security needed real thought. The moment you store patient information, you're responsible for it. I kept access PIN-protected, stored only what's necessary, and was careful about how data is handled. I'll say plainly: if you aren't confident you can secure sensitive data properly, you should use a reputable compliant SaaS instead. This is not the place to wing it.

I had to design for the team, not for me. My first interface made sense to me as the builder but was clumsy for the clinic staff. Watching how they actually used it — and simplifying relentlessly — mattered more than any technical cleverness.

The recurring lesson: every problem I hit came from adding complexity. Every fix came from removing it. "Make it smaller" was the right answer almost every time.

What I'd do differently

If I started again tomorrow, I'd scope even smaller for version one — literally just appointments and patient lookup, nothing else, shipped in a day. I'd add invoicing only once the core was proven in daily use. I spent some early energy on things that felt important but weren't urgent.

I'd also document it better for future-me. When you build something solo, you become the only person who understands it — so a few notes on how it works are worth their weight in gold six months later.

Should you build your own?

Here's my honest decision guide, having actually done it:

Build your own only if: you (or someone reliable on your team) can code and maintain it, your needs are genuinely simple and specific, and the SaaS options are clearly overpriced or overcomplicated for your case.

Buy SaaS if: you can't maintain custom software, you handle highly sensitive data and aren't confident about compliance, or your time is better spent on your actual business than on being an accidental software maintainer. For most people, this is the right answer — and there's no shame in it.

Custom software isn't "better" than SaaS. It was just right for my specific, simple, cost-sensitive case — because I could maintain it.

Frequently asked questions

Should a small business build its own software or buy SaaS?

For most, buy SaaS first — it's faster and supported. I built custom only because off-the-shelf clinic software was expensive and bloated for one clinic, and I could maintain a simple system myself. Build your own only when SaaS cost or limitations genuinely outweigh the maintenance burden.

Why Cloudflare Workers and D1?

Cost, speed, and simplicity. Workers run code at the edge with a generous free tier, D1 is a serverless SQL database with no server to manage, and deployment is fast. For a light-traffic internal tool, it costs almost nothing and loads instantly.

Is it safe to store patient data in a custom system?

Only if you take security seriously — PIN-protected access, storing only what's necessary, and following data-protection practices. For sensitive health data, understand your local obligations. If you're not confident about security, a compliant SaaS is the safer choice. Never cut corners with patient information.

How long did it take to build?

The first usable version came together in a short, focused effort because I kept the scope tiny. The mistake to avoid is building a full hospital system on day one. Start with the minimum that solves a real problem and improve gradually.

Do you need to be a developer?

For a fully custom system, yes — you need some coding ability, though not senior-engineer level. If you can't code, use no-code tools and affordable SaaS instead; they deliver most of the value without the build. I only went custom because I could maintain it myself.

Read the full clinic AI story

This build was one piece of a bigger picture. See how the whole clinic got automated — WhatsApp, marketing, and more.

Read the Full Case Study →

Written by Moyeen Khan, an AI automation entrepreneur based in Bengaluru. I run BizGrowAI and handle the digital and automation operations for Bangalore Dental Hub. This is a real account of my own work; tool names belong to their respective owners. Nothing here is professional, security, or legal advice — handle sensitive data responsibly.