Fronts.co
Subscription media platform with paywall, auth, CMS, video, search, and commerce running on Cloudflare.
Fronts.co is a subscription publication focused on modern conflicts, defense, and geopolitical strategy. It's also where I test a full media stack on Cloudflare primitives: content, auth, payments, media delivery, search, and analytics.
Architecture
How it's wired.
How It's Built
Implementation notes.
Astro SSR on Workers
Astro 5 SSR runs on Cloudflare Workers for every request. UI uses Svelte 5 and Tailwind 4. No origin server.
Content in D1, not files
Articles, videos, and podcasts live in D1 as relational data. Includes revisions, tags, and a clear lifecycle: draft -> scheduled -> published -> archived.
Three-method auth on one session system
Magic link, OAuth (Google/GitHub), and email/password all issue KV-backed sessions with HTTP-only cookies (30-day TTL). Magic links include a cookie confirmation step to reduce bot abuse.
Webhook-driven subscription commerce
LemonSqueezy webhooks run through a Queue consumer with HMAC-SHA256 validation and idempotency records. Gift subscriptions are supported. A 30-minute reconciliation sync catches drift.
Video + AI transcription pipeline
Cloudflare Stream handles video hosting. A Queue consumer extracts audio, runs Whisper for transcription, and writes VTT captions. Exponential backoff handles rate limits.
Publisher CMS with AI assistance
The /admin interface handles content workflows. Anthropic assists with suggestions, proofreading, and SEO edits. Media uploads go to Cloudflare Images and Stream.
Primitives Used
Cloudflare primitives in this project.
Why This Design
Why I built it this way.
"Fronts is useful as an end-to-end example: one product with subscriptions, media, search, and editorial workflows, all inside one platform model. It shows where the Cloudflare primitives simplify operations and where you still need deliberate application design."