Let’s just jump right in.
For example lamppost (madebydanny.uk/lamppost) when you enter your prompt and send it your actually filling out a form and submitting it, once the form is submitted (when you click generate) the backend Cloudflare worker (the thing that generates the image) gets that prompt loads stable diffusion LLM via Cloudflare Workers AI and gives it the prompt once the image is done generating the image is uploaded to MBD CDN (which essentially is an Cloudflare R2 bucket with a custom domain liked) then the url of the image is GET (public-cdn.madebydanny.uk/ai-content/yyyy-mm-dd/xxx.png) then another Cloudflare worker is used, the worker that generated the image (lamppost api) returns this image url:
imrs.madebydanny.uk/?url=https://public-cdn.madebydanny.uk/ai-content/yyyy-mm-dd/xxx.png.
That first part (imrs.madebydanny.uk) is yet another Cloudflare worker that transforms the .png image to .avif that reduces the image size and speeds up loading times and also cashes the image on Cloudflare’s global network. But wait we’re not done.
Once the Cloudflare Worker (the api) returns the image url it then interacts with a KV Namespace object to increase its value by +1 so the “Generated Images: “ counter updates.
All of that happens in seconds, and didn’t cost me a penny (yet).
So what does this have to with Cloudflare?
All these “Workers”, “R2s” and “Namespaces” are all connected but not using complicated apis and Libraries it’s like magic, well more like a Binding, where I can link Cloudflare services to talk to each other magically, in fact I don’t need to copy and paste api keys.
I can spin up a new R2 bucket in seconds, deploy full on websites in under 1 minute form then hit of “commit changes” to the refresh of madebydanny.uk.
I’m not like google i don’t use googleusercontent.com, ytimg.com,googleapis.com, etc.
Everything is hosted on madebydanny.uk with 30+ DNS records and with MBD Buckets coming out soon that might be 40 or 100 + depending on how many people use it.
Just thought of a new service called “Buckets” your own personal cloud storage platform built on Cloudflare R2 and Cloudflare Workers Probably going to call it “Buckets” Where I handle all the backend stuff (which is super easy btw) and the user just needs to fill out a form
So basically Cloudflare is amazing and you should use it.