-
Notifications
You must be signed in to change notification settings - Fork 2
Replace app env management with better-env #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
301161c
3e85869
7fa9bcd
0899718
9d08f6b
bcce330
5af8360
86c1ee6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| --- | ||
| name: ai-agent-workflow | ||
| description: Build resumable multi-agent workflows with durable execution, tool loops, and automatic stream recovery on client reconnection. | ||
| --- | ||
|
|
||
| # Multi-Agent Workflows | ||
|
|
||
| Build resumable multi-agent workflows with durable execution, tool loops, and automatic stream recovery on client reconnection. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Complete these recipes first (in order): | ||
|
|
||
| ### Type-Safe Environment Configuration | ||
|
|
||
| Type-safe environment variable validation using Zod with a Drizzle-like schema API. Supports server/public fields, feature flags, either-or constraints, and client-side protection. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/config-schema-setup | ||
| ``` | ||
|
|
||
| ### Neon + Drizzle Setup | ||
|
|
||
| Connect a Next.js app to Neon Postgres using Drizzle ORM with optimized connection pooling for Vercel serverless functions. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/neon-drizzle-setup | ||
| ``` | ||
|
|
||
| ### Better Auth Setup | ||
|
|
||
| Add user authentication using Better Auth with Drizzle ORM and Neon Postgres. Base setup with email/password authentication. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-setup | ||
| ``` | ||
|
|
||
| ### AI Chat Persistence with Neon | ||
|
|
||
| Persist AI chat conversations to Neon Postgres with full support for AI SDK message parts including tools, reasoning, and streaming. Uses UUID v7 for chronologically-sortable IDs. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/ai-chat-persistence | ||
| ``` | ||
|
|
||
| ### Pino Logging Setup | ||
|
|
||
| Configure structured logging with Pino. Outputs human-readable colorized logs in development and structured JSON in production for log aggregation services. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/pino-logging-setup | ||
| ``` | ||
|
|
||
| ## Cookbook - Complete These Recipes in Order | ||
|
|
||
| ### Workflow Development Kit Setup | ||
|
|
||
| Install and configure the Workflow Development Kit for resumable, durable AI agent workflows with step-level persistence, stream resumption, and agent orchestration. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/workflow-setup | ||
| ``` | ||
|
|
||
| ### Resumable AI Response Streams | ||
|
|
||
| Add automatic stream recovery to AI chat with WorkflowChatTransport, start/resume API endpoints, and the useResumableChat hook. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/resumable-ai-streams | ||
| ``` | ||
|
|
||
| ### 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. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/custom-durable-agent | ||
| ``` | ||
|
|
||
| ### Working with Workflows | ||
|
|
||
| Create and run durable workflows with steps, streaming, and agent execution. Covers starting, resuming, and persisting workflow results. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/using-workflows | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| --- | ||
| name: ai-chat | ||
| description: Build a complete AI chat application with database persistence, chat list management, and automatic title generation. | ||
| --- | ||
|
|
||
| # AI Chat | ||
|
|
||
| Build a complete AI chat application with database persistence, chat list management, and automatic title generation. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Complete these recipes first (in order): | ||
|
|
||
| ### Type-Safe Environment Configuration | ||
|
|
||
| Type-safe environment variable validation using Zod with a Drizzle-like schema API. Supports server/public fields, feature flags, either-or constraints, and client-side protection. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/config-schema-setup | ||
| ``` | ||
|
|
||
| ### Neon + Drizzle Setup | ||
|
|
||
| Connect a Next.js app to Neon Postgres using Drizzle ORM with optimized connection pooling for Vercel serverless functions. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/neon-drizzle-setup | ||
| ``` | ||
|
|
||
| ### Next.js on Vercel | ||
|
|
||
| Create a Next.js app running on Bun, configure the development environment, and deploy to Vercel with automatic deployments on push. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/nextjs-on-vercel | ||
| ``` | ||
|
|
||
| ### Shadcn UI & Theming | ||
|
|
||
| Add Shadcn UI components with dark mode support using next-themes. Includes theme provider and CSS variables configuration. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/shadcn-ui-setup | ||
| ``` | ||
|
|
||
| ### Authentication | ||
|
|
||
| Complete authentication system with Better Auth, email verification, password reset, protected routes, and account management. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/authentication | ||
| ``` | ||
|
|
||
| ### URL State with nuqs | ||
|
|
||
| Sync React state to URL query parameters for shareable filters, search queries, and deep links to modal dialogs. Preserves UI state on browser back/forward navigation. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/nuqs-setup | ||
| ``` | ||
|
|
||
| ### Pino Logging Setup | ||
|
|
||
| Configure structured logging with Pino. Outputs human-readable colorized logs in development and structured JSON in production for log aggregation services. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/pino-logging-setup | ||
| ``` | ||
|
|
||
| ### Workflow Development Kit Setup | ||
|
|
||
| Install and configure the Workflow Development Kit for resumable, durable AI agent workflows with step-level persistence, stream resumption, and agent orchestration. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/workflow-setup | ||
| ``` | ||
|
|
||
| ## Cookbook - Complete These Recipes in Order | ||
|
|
||
| ### AI Chat Persistence with Neon | ||
|
|
||
| Persist AI chat conversations to Neon Postgres with full support for AI SDK message parts including tools, reasoning, and streaming. Uses UUID v7 for chronologically-sortable IDs. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/ai-chat-persistence | ||
| ``` | ||
|
|
||
| ### Chat List & Management | ||
|
|
||
| Build a chat list page with search, rename, and delete functionality. Uses nuqs for URL-synced filters and deep-linkable modal dialogs. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/chat-list | ||
| ``` | ||
|
|
||
| ### Automatic Chat Naming | ||
|
|
||
| Generate descriptive chat titles from the first message using a fast LLM. Runs as a background workflow step after the main response to avoid delaying the experience. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/chat-naming | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| --- | ||
| name: authentication | ||
| description: Complete authentication system with Better Auth, email verification, password reset, protected routes, and account management. | ||
| --- | ||
|
|
||
| # Authentication | ||
|
|
||
| Complete authentication system with Better Auth, email verification, password reset, protected routes, and account management. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Complete these recipes first (in order): | ||
|
|
||
| ### Type-Safe Environment Configuration | ||
|
|
||
| Type-safe environment variable validation using Zod with a Drizzle-like schema API. Supports server/public fields, feature flags, either-or constraints, and client-side protection. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/config-schema-setup | ||
| ``` | ||
|
|
||
| ### Neon + Drizzle Setup | ||
|
|
||
| Connect a Next.js app to Neon Postgres using Drizzle ORM with optimized connection pooling for Vercel serverless functions. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/neon-drizzle-setup | ||
| ``` | ||
|
|
||
| ### Next.js on Vercel | ||
|
|
||
| Create a Next.js app running on Bun, configure the development environment, and deploy to Vercel with automatic deployments on push. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/nextjs-on-vercel | ||
| ``` | ||
|
|
||
| ### Shadcn UI & Theming | ||
|
|
||
| Add Shadcn UI components with dark mode support using next-themes. Includes theme provider and CSS variables configuration. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/shadcn-ui-setup | ||
| ``` | ||
|
|
||
| ## Cookbook - Complete These Recipes in Order | ||
|
|
||
| ### Resend Setup | ||
|
|
||
| Configure Resend for transactional emails like password resets and email verification. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/resend-setup | ||
| ``` | ||
|
|
||
| ### Better Auth Setup | ||
|
|
||
| Add user authentication using Better Auth with Drizzle ORM and Neon Postgres. Base setup with email/password authentication. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-setup | ||
| ``` | ||
|
|
||
| ### Better Auth Emails | ||
|
|
||
| Add email verification, password reset, and account management emails to Better Auth using Resend. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-emails | ||
| ``` | ||
|
|
||
| ### Better Auth Components | ||
|
|
||
| Add UI components and pages for authentication flows including sign in, sign up, forgot password, reset password, and email verification. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: hyphenate ✏️ Proposed fix-Add UI components and pages for authentication flows including sign in, sign up, forgot password, reset password, and email verification.
+Add UI components and pages for authentication flows including sign-in, sign-up, forgot password, reset password, and email verification.-Use Better Auth for client and server-side authentication. Covers session access, protected routes, sign in/out, and fetching user data.
+Use Better Auth for client and server-side authentication. Covers session access, protected routes, sign-in/out, and fetching user data.Also applies to: 98-98 🧰 Tools🪛 LanguageTool[grammar] ~74-~74: Use a hyphen to join words. (QB_NEW_EN_HYPHEN) [grammar] ~74-~74: Use a hyphen to join words. (QB_NEW_EN_HYPHEN) 🤖 Prompt for AI Agents |
||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-components | ||
| ``` | ||
|
|
||
| ### Better Auth Profile & Account | ||
|
|
||
| Add a complete account settings page with profile editing, password changes, email updates, session management, and account deletion. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-profile | ||
| ``` | ||
|
|
||
| ### Better Auth Protected Routes | ||
|
|
||
| Add server-side route protection to enforce authentication on specific pages while keeping others public. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-protected-routes | ||
| ``` | ||
|
|
||
| ### Working with Authentication | ||
|
|
||
| Use Better Auth for client and server-side authentication. Covers session access, protected routes, sign in/out, and fetching user data. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/using-authentication | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| --- | ||
| name: base-app-setup | ||
| description: Complete setup guide for a Next.js app with Shadcn UI, Neon Postgres, Drizzle ORM, and AI SDK. | ||
| --- | ||
|
|
||
| # Base App Setup | ||
|
|
||
| Complete setup guide for a Next.js app with Shadcn UI, Neon Postgres, Drizzle ORM, and AI SDK. | ||
|
|
||
| ## Cookbook - Complete These Recipes in Order | ||
|
|
||
| ### Next.js on Vercel | ||
|
|
||
| Create a Next.js app running on Bun, configure the development environment, and deploy to Vercel with automatic deployments on push. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/nextjs-on-vercel | ||
| ``` | ||
|
|
||
| ### Editor and Linting Setup | ||
|
|
||
| Configure Prettier for code formatting and TypeScript for typechecking. Includes VSCode settings and EditorConfig for consistent code style. Skips ESLint/Biome to avoid config complexity. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/code-style-setup | ||
| ``` | ||
|
|
||
| ### AI Coding Agent Configuration | ||
|
|
||
| Configure AI coding agents like Cursor, GitHub Copilot, or Claude Code with project-specific patterns, coding guidelines, and MCP servers for consistent AI-assisted development. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/agent-setup | ||
| ``` | ||
|
|
||
| ### Shadcn UI & Theming | ||
|
|
||
| Add Shadcn UI components with dark mode support using next-themes. Includes theme provider and CSS variables configuration. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/shadcn-ui-setup | ||
| ``` | ||
|
|
||
| ### Assertion Helper | ||
|
|
||
| TypeScript assertion function for runtime type narrowing with descriptive error messages. Based on tiny-invariant. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/assert | ||
| ``` | ||
|
|
||
| ### Type-Safe Environment Configuration | ||
|
|
||
| Type-safe environment variable validation using Zod with a Drizzle-like schema API. Supports server/public fields, feature flags, either-or constraints, and client-side protection. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/config-schema-setup | ||
| ``` | ||
|
|
||
| ### Build-Time Environment Variable Validation | ||
|
|
||
| Validate environment variables on server start and before builds. Catch missing or invalid variables early with clear error messages. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/env-validation | ||
| ``` | ||
|
|
||
| ### Neon + Drizzle Setup | ||
|
|
||
| Connect a Next.js app to Neon Postgres using Drizzle ORM with optimized connection pooling for Vercel serverless functions. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/neon-drizzle-setup | ||
| ``` | ||
|
|
||
| ### AI SDK & Simple Chat | ||
|
|
||
| Install the Vercel AI SDK with AI Elements components. Build a streaming chat interface with the useChat hook. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/ai-sdk-setup | ||
| ``` | ||
|
|
||
| ### Working with Drizzle | ||
|
|
||
| Write type-safe database queries with Drizzle ORM. Covers select, insert, update, delete, relational queries, and adding new tables. | ||
|
|
||
| ```bash | ||
| curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/using-drizzle-queries | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prerequisite description still references Zod — update to reflect better-env migration.
Line 16 describes this prerequisite as "using Zod with a Drizzle-like schema API", but the entire purpose of this PR is to replace the Zod-based env parser with
better-env/config-schema. The "Drizzle-like schema API" description is characteristic of better-env, not Zod. Ifconfig-schema-setupis meant to point to the better-env recipe, the inline blurb is misleading for any AI agent consuming this skill.📝 Suggested correction
🤖 Prompt for AI Agents