Jez | Jeremy Dawes
Back to blog

The Full Flare Stack: Building on Cloudflare

Why I moved everything to Cloudflare Workers and how to build full-stack apps that run at the edge.

CloudflareReactFull-Stack

The Full Flare Stack: Building on Cloudflare

I’ve built on AWS, Vercel, Firebase, and half a dozen other platforms. Now I build almost everything on Cloudflare. Here’s why.

The Problem with Traditional Hosting

Traditional hosting means:

  • Servers in one region (latency for everyone else)
  • Cold starts (serverless functions that take seconds to wake up)
  • Separate services for compute, storage, database
  • Complex deployment pipelines

Cloudflare Workers run in 300+ data centers worldwide. Your code runs within milliseconds of your users, everywhere.

The Stack

Here’s what I use for every new project:

LayerTechnology
FrontendReact 19 + Vite
StylingTailwind v4 + shadcn/ui
APIHono (on Workers)
DatabaseD1 (SQLite at the edge)
ORMDrizzle
StorageR2 (S3-compatible)
CacheKV
Build@cloudflare/vite-plugin

One platform. One bill. One deployment command.

Why It Works

1. Speed

Workers start in under 5ms. Not 500ms, not 50ms - 5ms. Cold starts are essentially gone.

2. Simplicity

npm run deploy

That’s it. Your frontend, API, and database migrations all deploy together.

3. Cost

For most projects, Cloudflare’s free tier is enough. When you do pay, it’s fractions of a cent per request.

The Development Experience

The @cloudflare/vite-plugin is the key. It runs your Worker alongside Vite during development, so:

  • API calls use relative paths (no CORS configuration)
  • Hot reload works for frontend and backend
  • Local D1 database for development
  • Production-identical environment
// vite.config.ts
import { cloudflare } from "@cloudflare/vite-plugin";

export default defineConfig({
  plugins: [react(), cloudflare()],
});

What I’ve Built

Using this stack, I’ve built:

  • L2Stack - A complete CRM with contacts, companies, cases, projects
  • This website - The site you’re reading right now
  • Multiple client projects - E-commerce, dashboards, internal tools

All running at the edge, all deployed with one command.

Migration Path

If you’re on Vercel or AWS, you don’t have to move everything at once. Start with one new project. Learn the platform. Then migrate existing projects as it makes sense.

The Limitations

It’s not perfect. D1 is SQLite, so:

  • No MySQL/Postgres features
  • 10GB database limit (plenty for most apps)
  • Some ORMs don’t support it yet

And Workers have constraints:

  • 128MB memory limit
  • 30s CPU time limit (plenty for web requests)
  • No filesystem access

But for 90% of web applications, these aren’t real limitations.

Getting Started

npm create cloudflare@latest my-app

Choose “React” and you get the full stack ready to go.

The future of web development is at the edge. Cloudflare makes it accessible today.