๐ก๐ผ๐๐ฒ๐ ๐ผ๐ป ๐ง๐ฎ๐ป๐ฆ๐๐ฎ๐ฐ๐ธ ๐ฆ๐๐ฎ๐ฟ๐ ๐ฎ๐ป๐ฑ ๐๐น๐ผ๐๐ฑ๐ณ๐น๐ฎ๐ฟ๐ฒ ๐ช๐ผ๐ฟ๐ธ๐ฒ๐ฟ๐
I like frameworks. They keep boring parts boring.
For an AI image site, the frontend is one piece. You need landing pages, account flows, and admin screens.
TanStack Start on Cloudflare Workers simplifies this. It gives you Vite development, full-stack routing, and an edge runtime in one deployment.
I value config over features. Clear config tells your team where the app runs. Messy config makes releases scary.
Start new projects with: pnpm create cloudflare@latest my-app --framework=tanstack-start
For existing projects, add the Cloudflare Vite plugin. This wires your SSR environment to Cloudflare. It stops your app from relying on Node.js assumptions.
Your wrangler.jsonc needs these points:
- Set the main entry to the server-entry.
- Set an explicit compatibility date.
- Use nodejs_compat for package support.
- Enable observability for debugging.
Keep your package.json scripts simple:
- dev for local work.
- build to check compilation.
- preview to inspect results.
- deploy to release the app.
- cf-typegen for typed bindings.
Add Cloudflare bindings only when needed. Use R2 for media or D1 for data. Do not add them for the sake of it. Add them when you need a clear boundary.
Prerender routes for marketing and docs. Avoid prerendering for account pages or payment status. These depend on the user.
Make staging and production explicit. Use separate Worker names and routes. Use the tail command to find runtime mistakes fast.
Config is product infrastructure. Vite config handles the build. Wrangler config handles the run. Scripts handle the workflow.
Keep it small. Keep it readable.