
Request / Response shape, near-identical code. Worker env bindings became process.env vars. The bulk of index.js routing reduced to app/api/audit/route.ts.parse(html) call, root.querySelectorAll(...). Same output shape.fetch() and gets server-rendered HTML only. For most schema-audit targets this is fine (CMS plugins and SSR frameworks emit JSON-LD server-side). For pure-SPA targets it misses anything injected after hydration. Documented limitation; case-study material in itself.@supabase/ssr for App Router cookie handling, and a Next 16 proxy.ts (formerly middleware.ts) that refreshes expired tokens on every request. Cleaner UX, less code I have to maintain.customer_email, attach client_reference_id: user.id, set per-session metadata, and stamp Stripe events with my user ID. Webhook handler runs in a Node.js Route Handler using req.text() to preserve the raw body for signature verification — same security profile as the Worker version, but using the official stripe Node SDK throughout.async Server Component for the marketing page (server-side fetch of the signed-in user via Supabase) and a Client Component ('use client') for the audit form and results. The split was the only piece of App Router that took real adjusting — once you internalize that hooks and event handlers force a 'use client' boundary, the model clicks.ephemeral cache_control breakpoint on the system prompt. The structured analysis is passed as the user message; the model returns JSON matching a fixed shape. The Next.js port uses @anthropic-ai/sdk directly (vs the Worker's raw fetch to the API). Same prompt, same model, same output shape.bree-sharp.com/tools/schema-generator/ and matches the rest of my services site.#FAF7F2), Fraunces variable serif for display type with its softness axis dialed up on accent words, Inter for body, JetBrains Mono for navigation labels and code, single terracotta accent (#C44536). Numbered findings, pull-quote summaries, italic CMS tab labels, mono section markers (§ 01, § 02), and a soft cream shimmer that sweeps diagonally across the dark Analyzing button during requests. Reads more like a small-print magazine than a typical SaaS tool.
middleware.ts to proxy.ts while I was building this. The migration warning appeared in dev mode. One rename + one function-name change and it was done. Worth pinning Next versions for production stability.client_reference_id, so credits land in the right account automatically. Better flow for authenticated buyers.fetch (no JS execution)fetch to Anthropic → @anthropic-ai/sdkPosted May 12, 2026
Ported my Cloudflare Workers schema audit tool to Next.js App Router + Supabase + Stripe + Vercel. Same product, two stacks, deliberately distinct design.