Astro 7 · Cloudflare Workers · Hybrid Rendering

One codebase, two rendering rendering strategies.

A live simulation showcasing Astro 7's hybrid capabilities. The Website half is static-optimized — served instantly from Cloudflare Edge. The Webapp half opts in to the Worker with prerender = false, streaming dynamic data on demand.

WEBSITE · STATIC (SSG)→

Static-Friendly Pages

Content collections, static route generation, and optimized markup. Served directly from Cloudflare's edge cache with zero server runtime cost per hit.

WEBAPP · ON-DEMAND (SSR)→

Native Webapp Routes

Encrypted KV Sessions, Astro Actions, route caching, server islands, and client Preact islands — streamed instantly to browser and mobile devices.

Data-Fetch Hierarchy on this Page

SSR Mode
1

On-demand session evaluation

This page evaluates user session cookies dynamically on Cloudflare Workers, rendering personalized CTA states.

export const prerender = false;
const user = Astro.locals.user;
2

Content Collections (Content Layer API)

Blog posts originate from src/content/blog via the Content Layer API with typed frontmatter schemas.

const posts = await getCollection('blog');
3

Prestige Splash Intro

Navigating to /app displays a prestige splash intro before loading the webapp dashboard.

<a href="/app">Launch Webapp Shell →</a>
Request URL: https://astrov7.sandikodev.workers.dev/Session Status: Unauthenticated