Production Patterns for Full Stack AI Apps
Copy-paste recipes to add database persistence, duability, Stripe subscriptions, and more to your Next.js agentic applications.
Purpose-built for
Try the Playground
Experience the AI chat with persistent history. Sign in to start a conversation that picks up right where you left off.
All Recipes
Step-by-step guides to ship faster
Custom Durable Agent
Build a custom durable AI agent with full control over streamText options, provider configs, and tool loops. Compatible with the Workflow Development Kit.
Resumable AI Agent Workflows
Build resumable AI agent workflows with durable execution, tool loops, and automatic stream recovery on client reconnection.
Stripe Subscriptions DB Sync
Complete subscription system with Stripe, Vercel Flags for plan configuration, webhook handling, usage tracking, and billing portal integration.
AI Chat Persistence with Neon
Persist AI SDK messages to Neon PostgreSQL with full support for tools, reasoning, and streaming. Uses UUID v7 for chronological ordering.
Better Auth Setup
Add user authentication to your Next.js app using Better Auth with Drizzle ORM and Neon PostgreSQL. Supports email/password and social providers.
Resend Setup
Set up Resend for transactional emails like password resets and email verification.
Neon + Drizzle Setup
Set up a PostgreSQL database with Neon and Drizzle ORM for type-safe database queries in your Next.js app.
Environment Variable Management
Type-safe environment variable validation using Zod with a modular config pattern for clean, maintainable configuration.
Base App Setup
Complete setup guide for a Next.js app with Shadcn UI, Neon PostgreSQL, Drizzle ORM, and AI SDK.