Claude SaaS Starter – Next.js Boilerplate for Claude Streaming

Product: bydaewon.gumroad.com/l/claude-saas-starterI built this because every SaaS boilerplate I found was OpenAI-first. Claude's SSE streaming differs from OpenAI's — the Anthropic SDK's messages.stream() returns a different event structure, and you need a custom ReadableStream transform to pipe it as Server-Sent Events on Edge Runtime. The stack: • Next.js 16 (App Router, TypeScript) • Supabase for auth and PostgreSQL (with RLS) • Anthropic SDK for Claude streaming • Stripe for subscription billing (full webhook lifecycle) • Vitest for testing (40 tests) The streaming API route transforms Anthropic SDK events into SSE format and runs on Edge Runtime for low-latency. On the client, a React hook (useClaudeStream) handles SSE parsing, text delta buffering, and error recovery. The non-streaming parts are fairly standard SaaS infrastructure: Supabase Auth with middleware route protection, Stripe webhooks for the subscription lifecycle (checkout, updates, cancellations, failed payments), usage metering that logs token counts non-blocking via the Supabase REST API. I wrote 1,300 lines of documentation across 4 guides — setup, Stripe configuration, OAuth setup, and a quick-start. The guides assume zero prior knowledge of Supabase, Stripe, or the Anthropic API. $149 on Gumroad (or $119 with code LAUNCH20). Happy to answer technical questions about the Claude streaming implementation or any of the architecture decisions.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论