Edge Intelligence
Cloudflare attaches datacenter metadata to every request at the edge. Zero API calls — it's in request.cf. You're being served from the datacenter below.
Global Counter
Atomic KV increment on every pageview. KV is eventually consistent — reads propagate across 300+ edge locations within ~60 seconds. The KV operation itself at the edge is sub-millisecond.
Database at the Edge
Full SQLite at Cloudflare's edge. 5M reads + 100K writes/day free. Relationships, indexes, aggregate queries — all working. 3-table schema with seed data that survives daily wipe.
Edge Cache Demo
Click once → cache miss, queries D1 (slow). Click again within 60s → cache hit, served from KV (fast). The timing delta proves why caching matters at the edge.
LLM Inference
Llama 3.1 8B running at the edge via an AI binding. No GPU provisioning, no model deployment — just a binding call.
Object Storage — Zero Egress
S3-compatible object storage. Upload is Turnstile-gated and capped at 500KB. User uploads are prefixed upload- and wiped regularly. Demo images (prefixed demo-) persist across wipes.
Drop an image or click to browse
JPEG · PNG · GIF · WebP · max 500KB · wiped nightly
Free Tier Headroom today's usage vs. daily limits
Architecture
Browser ──── Cloudflare Edge Network (300+ global PoPs)
│
├── / ──→ Pages (static assets, global CDN, zero config)
│
├── /api/geo ──→ Workers → request.cf (edge metadata, no DB)
├── /api/counter ──→ Workers → KV (global visit counter)
├── /api/guestbook ──→ Workers → D1 + Turnstile
├── /api/d1/stats ──→ Workers → D1 (GROUP BY, COUNT, AVG)
├── /api/d1/search ──→ Workers → D1 (LIKE full-text search)
├── /api/d1/posts ──→ Workers → D1 (JOIN posts ↔ tags)
├── /api/kv/cache ──→ Workers → KV ──(hit)──→ return cached
│ └─(miss)──→ D1 → KV.put
├── /api/ai/generate ──→ Workers → Workers AI (Llama 3.1 8B Instruct)
├── /api/r2/upload ──→ Workers → R2 + Turnstile
├── /api/r2/list ──→ Workers → R2 (list + metadata)
├── /api/r2/file/:key ──→ Workers → R2 (stream with etag)
├── /api/stats ──→ Workers → D1 + KV + R2 (aggregate dashboard)
└── /api/admin/wipe ──→ Workers → D1 + R2 + KV (wipe + re-seed)
↑
Schedule via standalone Worker cron
or external service (e.g. cron-job.org)
Expression: 0 0 * * * (midnight UTC daily)