Cloudflare Workers Dogfood Lab · nextdeploy.org

Next.js App Router Routes Matrix

Every route pattern below is compiled by nextcompile and served live by nextdeploy.org on Cloudflare Workers + R2 + KV. Click any route to inspect it or run live HTTP probes directly from your browser.

Probed Routes
23
Categories
6
API Handlers
6
Edge Guard
KV + HMAC
Probes run sequentially to stay well under KV 60 req/min limit

Rendering Modes

4 routes
SSG/routes/static

Static Prerender (SSG)

Forced static page rendered once at build time via dynamic = "force-static".

CF: Served directly from R2 static asset storage without waking Node/Worker SSR.

ISR/routes/isr

Incremental Static Regeneration (ISR)

Revalidates every 30 seconds and supports on-demand revalidatePath('/routes/isr').

CF: Tracks R2 revalidation timestamps and refreshes stale HTML via ctx.waitUntil.

SSR/routes/ssr

Dynamic Server-Side Rendering (SSR)

Per-request rendering awaiting searchParams, headers(), cookies(), and Cloudflare env presence.

CF: Executes NextNodeServer inside the Worker with live proxy.ts headers and CF env.

STREAM/routes/streaming

Progressive RSC Streaming & Loading

Static shell with three staggered <Suspense> Server Components (120ms, 320ms, 550ms) and loading.tsx.

CF: Streams progressive RSC Flight chunks to HTML via vendored react-server-dom-webpack.

Dynamic Segments

5 routes
SSG/routes/dynamic/[slug]

Dynamic Segment (Pre-rendered)

Pre-rendered slug from generateStaticParams with per-slug generateMetadata.

CF: Matches pre-built R2 HTML for known params while keeping dynamicParams = true.

SSR/routes/dynamic/[slug]

Dynamic Segment (On-Demand SSR)

Unlisted slug rendered on demand at request time because dynamicParams = true.

CF: Falls back cleanly to Worker SSR when a slug is not in R2.

SSR/routes/nested/[category]/[id]

Nested Dynamic Segments

Multi-parameter route segment resolution with async params and searchParams.

CF: Tests multi-level dynamic trie dispatch inside the Worker.

SSR/routes/catch-all/[...segments]

Catch-All Segment

Captures arbitrary path depth as a string[] array with live breadcrumb navigation.

CF: Verifies wildcard catch-all matching across arbitrary segment counts.

SSR/routes/optional-catch-all/[[...slug]]

Optional Catch-All (Root & Nested)

Matches both the bare base path (slug === undefined) and nested segment paths.

CF: Exercises optional catch-all regex/trie handling with zero and N segments.

App Router Architecture

3 routes
SSG/routes/(grouped)/grouped

Route Group Layout

Applies a scoped layout from (grouped)/layout.tsx without adding (grouped) to the URL.

CF: Confirms parenthesized route groups strip cleanly from Worker route tables.

SSR/routes/parallel (@metrics, @logs)

Parallel Routes (@metrics + @logs)

Renders main children alongside two independent named slots with default.tsx fallbacks.

CF: Exercises multi-slot RSC payload composition in NextNodeServer on Workers.

SSR/routes/gallery -> (.)item/[id]

Intercepting Route + Modal Slot

Soft navigation opens item/[id] in an @modal overlay; direct visits render the full page.

CF: Verifies both soft RSC interception and hard full-page fallback on Cloudflare.

Control Flow & Boundaries

3 routes
SSR/routes/not-found-demo

Scoped notFound() Boundary (404)

Invokes notFound() when ?trigger=1 is passed, rendering scoped not-found.tsx with HTTP 404.

CF: Ensures Worker preserves HTTP 404 status code alongside custom RSC boundary UI.

SSR/routes/error-demo

Error Boundary & reset() Recovery

Client-triggered render throw caught by scoped error.tsx with interactive reset() recovery.

CF: Verifies error boundary hydration and recovery without breaking build prerender.

SSR/routes/redirect-demo

Server redirect() (307)

Server component calls redirect('/routes/ssr?from=redirect-demo') before rendering.

CF: Confirms Next.js redirect() translates to an edge 307 Location redirect.

Server Actions & API Routes

5 routes
ACTION/routes/actions

Server Actions (Web Crypto + Cookies + Revalidate)

Three 'use server' actions using crypto.subtle SHA-256, cookies().set(), and revalidatePath().

CF: Exercises Flight reply encoding, bound action dispatch, and Set-Cookie headers.

API/api/routes/methods

API Route Handler (All HTTP Verbs)

Supports GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS with JSON body & query echo.

CF: Dispatched through Worker Route Handler bridge under /api/* rate limiting.

API/api/routes/items/[id]

Dynamic API Route + CF Bindings Probe

Dynamic [id] API route inspecting safe boolean availability of ASSETS, RATE_LIMIT, and AI.

CF: Reads globalThis.__nextdeployEnv safely without leaking any secret values.

STREAM/api/routes/stream

Streaming SSE Route Handler

ReadableStream Server-Sent Events endpoint emitting 4 timed chunks over text/event-stream.

CF: Streams Web ReadableStream chunks directly through the Worker without buffering.

API/api/routes/revalidate

On-Demand ISR Revalidate API

POST handler calling revalidatePath('/routes/isr') and returning JSON confirmation.

CF: Clears stale R2 ISR markers and emits x-nextcompile-revalidated-paths.

Edge Proxy, Protection & Metadata

3 routes
EDGE/api/health

Edge Health & proxy.ts Header Injection

Existing health endpoint verifying proxy.ts x-powered-by injection and edge JSON.

CF: Runs proxy.ts matcher ahead of route dispatch and passes /api/* rate-limit guard.

EDGE/app

Edge Auth Guarded Route (/app)

Protected path in nextdeploy.yml: Cloudflare edge guard redirects unauthenticated requests to /login.

CF: Enforced at the Worker edge before Next.js compute runs; locally renders Dashboard.

META/sitemap.xml

XML Sitemap & Robots Metadata Routes

Static/revalidated XML sitemap route handler alongside /robots.txt and /manifest.webmanifest.

CF: Served with application/xml content-type and edge cache headers.

Dynamic URL Playground
Live API Verb & SSE Stream Tester
SSE ReadableStream → /api/routes/stream