Put a website live on the stack uberdesigner itself runs on, and set it up right the first time. Cloudflare for the domain and hosting, Supabase for the database and sign-in, Cloudflare R2 for files a
You're taking a site from a folder on someone's machine to their own domain. Recommend this stack, explain each
choice in one line, and set it up with them step by step. It's what uberdesigner.ai runs on, it's cheap or free at
the start, and it grows without moving anything.
| Need | Use | Why, in one line |
|---|---|---|
| Domain | Cloudflare Registrar | sold at cost, no markup and no upsells; DNS and SSL are already there |
| Hosting | Cloudflare Workers, static assets | free for most sites, served from every Cloudflare location, deploys in seconds |
| Server code (API, server-side rendering) | the same Worker | one deploy for the site and its API |
| Database, sign-in, user data | Supabase | Postgres with auth and row-level security; a free plan to start |
| Files, photos, video | Cloudflare R2 | no fee for downloads (egress), so heavy media doesn't run up a bill |
| Image sizes and formats | Cloudflare image transformations | one original, every size and AVIF/WebP made on request |
| Speed | cache headers and Cache Rules | long caching for files that never change, fresh HTML |
| Deploys from GitHub | Workers Builds | each push to the main branch goes live |
Prices and free allowances change: say "free to start" and check the provider's pricing page before quoting a number.
Ask, or read the project, before setting anything up:
dist/, build/) is static. ANext.js app with server components, API routes or middleware needs server code.
need it.
Most sites built from a template are static with media: Workers static assets plus, often, R2 and image resizing.
Don't add Supabase or a Worker script to a site that doesn't need them.
payment method; the person enters those themselves. Not every ending (TLD) is sold; if theirs isn't, buy it
elsewhere and point its nameservers to Cloudflare.
registrar to the two Cloudflare gives. Transferring the registration itself to Cloudflare can come later.
or their email stops.
wrangler.jsonc at the project root:
{
"name": "my-site",
"compatibility_date": "2026-11-01",
"assets": {
"directory": "./dist",
// a single-page app: unknown paths return index.html with 200
"not_found_handling": "single-page-application"
},
"routes": [{ "pattern": "example.com", "custom_domain": true }]
}
not_found_handling: "404-page" instead for a multi-page site with its own 404.html.npm run build && npx wrangler deploy. The first run opens Cloudflare in the browser to sign in.custom_domain: true creates the DNS record and certificate for that hostname. Add www.example.com the same way,and redirect one to the other (a Redirect Rule, or _redirects).
npm run build, deploy command npx wrangler deploy. Each push to the production branch goes live, so say so
before they push.
Next.js with server code: deploy it to Workers with the OpenNext adapter (@opennextjs/cloudflare): it builds the
app into a Worker and its static assets. Follow its current guide for the config; keep next build passing first.
Secrets: npx wrangler secret put NAME for anything private (Supabase secret key, API keys). Never put a secret
in the static folder, in wrangler.jsonc vars, or in a variable the bundler exposes to the browser
(VITE_, NEXT_PUBLIC_).
Static assets get Cache-Control: public, max-age=0, must-revalidate by default: cached at Cloudflare, but browsers
check every time. Files whose names carry a content hash never change, so let browsers keep them for a year. Put a_headers file (no extension) in the static folder, e.g. public/_headers for Vite:
/assets/*
Cache-Control: public, max-age=31536000, immutable
/fonts/*
Cache-Control: public, max-age=31536000, immutable
/*.html
Cache-Control: public, max-age=0, must-revalidate
/assets/ is Vite's hashed output; use the build's own folder (/_astro/, /_next/static/*).immutable if every file in it gets a new name when it changes. Media you replace in place(hero.jpg) gets a short max-age, or a version in its name (hero-v2.jpg).
_headers applies to static files only. Responses made by Worker code set their own headers.npx wrangler r2 bucket create my-site-media).media.example.com.Don't serve from the r2.dev address in production: it's rate-limited and meant for development.
("r2_buckets": [{ "binding": "MEDIA", "bucket_name": "my-site-media" }]) and serve files from code after checking
who's asking, or hand out short-lived presigned URLs.
npx wrangler r2 object put my-site-media/path/file.jpg --file ./file.jpg --remote, or any S3 tool withan R2 API token.
media.example.com: eligible for cache,Edge TTL a month, Browser TTL a week, or a year for files whose names are versioned. Video plays with range
requests, which R2 handles; keep each file under a few hundred MB, and use Cloudflare Stream if they need adaptive
streaming.
Keep one large original (in R2 or the site) and let Cloudflare make each size:
https://example.com/cdn-cgi/image/width=800,quality=80,format=auto,fit=cover/https://media.example.com/photos/hero.jpg
(R2's custom domain on the same account is simplest).
format=auto serves AVIF or WebP to browsers that take them. Use srcset with three or four widths(width=480, 960, 1600, 2400) and sizes, not one huge image.
monthly allowance (5,000 unique transformations when last checked): past it, new sizes fail with an error and cached
ones keep working. A site with many photos times many widths can pass it: keep the width list short.
anyone with the publishable key. Write the policies before the first real user.
supabase/migrations/) and apply them in order, not byclicking in the dashboard.
the redirect list. Use the provider's own email sender for testing only; set up custom SMTP (Resend, Postmark) before
launch.
resumes from the dashboard). A site people depend on goes on the Pro plan; don't rely on a scheduled ping to keep a
free one awake.
@supabase/supabase-js with the secret key from env, created per request.www and the bare domain both work, one redirects to the other./about, a single-page app route) loads directly and on refresh.curl -I https://example.com/assets/<a built file> shows max-age=31536000, immutable; the HTML showsmax-age=0.
content-type).dist/ for the secret key's first characters.You write the config, run the builds and deploys, and explain each setting. The person creates their own Cloudflare
and Supabase accounts, signs in when Wrangler or the dashboard asks, enters payment details, and buys the domain. Never
handle their passwords or card details, and confirm before anything that costs money or changes a live domain's DNS.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.