CFES
CFES Boxfish Logo

CFES (Cloudflare Edge Stack)

A complete serverless edge computing stack powered by Cloudflare's global network

Pronounced: β€œSEA-fess” 🐟

Architecture Flow

How the CFES components work together

Architecture Diagram

Users
↓
Cloudflare Pages (Next.js)
↓
API Worker
↓
D1 (SQL)
R2 (Storage)
Workers AI

Components

Building blocks of the CFES architecture

Frontend

Next.js 14, deployed to Cloudflare Pages

  • React Server Components
  • Static & Dynamic Rendering
  • Edge-optimized deployments

API Layer

Cloudflare Workers (TypeScript)

  • V8 Isolates architecture
  • Fast cold starts (<5ms)
  • Global edge deployment

Database

D1 (SQLite-compatible, serverless)

  • SQL interface
  • Distributed & Replicated
  • Zero configuration

File Storage

R2 object store

  • S3-compatible API
  • No egress fees
  • Native Workers integration

AI Processing

Workers AI for NLP tasks

  • Text generation & embedding
  • Image generation & analysis
  • Zero-config inference

Authentication

Cloudflare Access (Zero Trust)

  • Identity provider integration
  • SSO & MFA support
  • Application-level policies

Quick Start Guide

Get your CFES application running in minutes

Prerequisites

  • Node.js 18+ and npm
  • A Cloudflare account
  • Cloudflare CLI (Wrangler) installed: npm install -g wrangler

Step 1: Login to Cloudflare

wrangler login

Step 2: Create Core Resources

# Create D1 Database
wrangler d1 create my-app-db

# Create R2 Bucket
wrangler r2 bucket create my-app-files

Step 3: Configure wrangler.toml

name = "my-cfes-app"
main = "src/index.ts"

# D1 Database binding
[[d1_databases]]
name = "DB"
database_name = "my-app-db"
database_id = "<your-d1-id>"

# R2 bucket binding
[[r2_buckets]]
name = "FILES"
bucket_name = "my-app-files"

# Workers AI binding
[ai]
binding = "AI"

Step 4: Deploy Your Application

# Deploy API Worker
wrangler deploy

# Deploy Frontend
npx @cloudflare/next-on-pages

Example Application

Production-ready reference implementation

Baby Names

Analysis of US baby names dataset

  • Data quality and validation
  • Natural language querying
  • Interactive visualizations
View Demo β†’

Technical Resources

Templates and code examples to accelerate development

Schema Migrations

Manage D1 database schema changes safely

View Example β†’

API Worker Boilerplate

Production-ready API worker template

View Example β†’

Authentication Integration

Zero Trust access patterns for applications

View Example β†’

AI Processing Examples

NLP and computer vision examples

View Example β†’

Benefits

Why choose CFES for your next project

Zero Infrastructure Management

No servers, containers, or Kubernetes to manage. Deploy and scale without infrastructure concerns.

Global Edge Deployment

Applications run close to your users on Cloudflare's network spanning 300+ cities worldwide.

Integrated Security

Built-in DDoS protection, WAF, bot management, and Zero Trust access controls.

Scalable with Pay-as-you-go Pricing

Scale to millions of users without pre-provisioning. Only pay for what you use.

AI Capabilities Built-in

Easily integrate AI capabilities with Workers AI - no separate infrastructure required.

Developer Experience

Fast deployments, easy local development, and comprehensive debugging tools.

Ready to Build with CFES?

Get started with the Cloudflare Edge Stack today and build globally-distributed applications without infrastructure complexity.