Skip to content

Commit 27b0bd0

Browse files
Merge pull request #17 from allthingsweb-dev/codex/better-env-migration
Replace app env management with better-env
2 parents f54ea20 + 86c1ee6 commit 27b0bd0

33 files changed

Lines changed: 6662 additions & 1164 deletions

File tree

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
name: ai-agent-workflow
3+
description: Build resumable multi-agent workflows with durable execution, tool loops, and automatic stream recovery on client reconnection.
4+
---
5+
6+
# Multi-Agent Workflows
7+
8+
Build resumable multi-agent workflows with durable execution, tool loops, and automatic stream recovery on client reconnection.
9+
10+
## Prerequisites
11+
12+
Complete these recipes first (in order):
13+
14+
### Type-Safe Environment Configuration
15+
16+
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.
17+
18+
```bash
19+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/config-schema-setup
20+
```
21+
22+
### Neon + Drizzle Setup
23+
24+
Connect a Next.js app to Neon Postgres using Drizzle ORM with optimized connection pooling for Vercel serverless functions.
25+
26+
```bash
27+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/neon-drizzle-setup
28+
```
29+
30+
### Better Auth Setup
31+
32+
Add user authentication using Better Auth with Drizzle ORM and Neon Postgres. Base setup with email/password authentication.
33+
34+
```bash
35+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-setup
36+
```
37+
38+
### AI Chat Persistence with Neon
39+
40+
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.
41+
42+
```bash
43+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/ai-chat-persistence
44+
```
45+
46+
### Pino Logging Setup
47+
48+
Configure structured logging with Pino. Outputs human-readable colorized logs in development and structured JSON in production for log aggregation services.
49+
50+
```bash
51+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/pino-logging-setup
52+
```
53+
54+
## Cookbook - Complete These Recipes in Order
55+
56+
### Workflow Development Kit Setup
57+
58+
Install and configure the Workflow Development Kit for resumable, durable AI agent workflows with step-level persistence, stream resumption, and agent orchestration.
59+
60+
```bash
61+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/workflow-setup
62+
```
63+
64+
### Resumable AI Response Streams
65+
66+
Add automatic stream recovery to AI chat with WorkflowChatTransport, start/resume API endpoints, and the useResumableChat hook.
67+
68+
```bash
69+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/resumable-ai-streams
70+
```
71+
72+
### Custom Durable Agent
73+
74+
Build a custom durable AI agent with full control over streamText options, provider configs, and tool loops. Compatible with the Workflow Development Kit.
75+
76+
```bash
77+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/custom-durable-agent
78+
```
79+
80+
### Working with Workflows
81+
82+
Create and run durable workflows with steps, streaming, and agent execution. Covers starting, resuming, and persisting workflow results.
83+
84+
```bash
85+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/using-workflows
86+
```

.agents/skills/ai-chat/SKILL.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
name: ai-chat
3+
description: Build a complete AI chat application with database persistence, chat list management, and automatic title generation.
4+
---
5+
6+
# AI Chat
7+
8+
Build a complete AI chat application with database persistence, chat list management, and automatic title generation.
9+
10+
## Prerequisites
11+
12+
Complete these recipes first (in order):
13+
14+
### Type-Safe Environment Configuration
15+
16+
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.
17+
18+
```bash
19+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/config-schema-setup
20+
```
21+
22+
### Neon + Drizzle Setup
23+
24+
Connect a Next.js app to Neon Postgres using Drizzle ORM with optimized connection pooling for Vercel serverless functions.
25+
26+
```bash
27+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/neon-drizzle-setup
28+
```
29+
30+
### Next.js on Vercel
31+
32+
Create a Next.js app running on Bun, configure the development environment, and deploy to Vercel with automatic deployments on push.
33+
34+
```bash
35+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/nextjs-on-vercel
36+
```
37+
38+
### Shadcn UI & Theming
39+
40+
Add Shadcn UI components with dark mode support using next-themes. Includes theme provider and CSS variables configuration.
41+
42+
```bash
43+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/shadcn-ui-setup
44+
```
45+
46+
### Authentication
47+
48+
Complete authentication system with Better Auth, email verification, password reset, protected routes, and account management.
49+
50+
```bash
51+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/authentication
52+
```
53+
54+
### URL State with nuqs
55+
56+
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.
57+
58+
```bash
59+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/nuqs-setup
60+
```
61+
62+
### Pino Logging Setup
63+
64+
Configure structured logging with Pino. Outputs human-readable colorized logs in development and structured JSON in production for log aggregation services.
65+
66+
```bash
67+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/pino-logging-setup
68+
```
69+
70+
### Workflow Development Kit Setup
71+
72+
Install and configure the Workflow Development Kit for resumable, durable AI agent workflows with step-level persistence, stream resumption, and agent orchestration.
73+
74+
```bash
75+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/workflow-setup
76+
```
77+
78+
## Cookbook - Complete These Recipes in Order
79+
80+
### AI Chat Persistence with Neon
81+
82+
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.
83+
84+
```bash
85+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/ai-chat-persistence
86+
```
87+
88+
### Chat List & Management
89+
90+
Build a chat list page with search, rename, and delete functionality. Uses nuqs for URL-synced filters and deep-linkable modal dialogs.
91+
92+
```bash
93+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/chat-list
94+
```
95+
96+
### Automatic Chat Naming
97+
98+
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.
99+
100+
```bash
101+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/chat-naming
102+
```
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
name: authentication
3+
description: Complete authentication system with Better Auth, email verification, password reset, protected routes, and account management.
4+
---
5+
6+
# Authentication
7+
8+
Complete authentication system with Better Auth, email verification, password reset, protected routes, and account management.
9+
10+
## Prerequisites
11+
12+
Complete these recipes first (in order):
13+
14+
### Type-Safe Environment Configuration
15+
16+
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.
17+
18+
```bash
19+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/config-schema-setup
20+
```
21+
22+
### Neon + Drizzle Setup
23+
24+
Connect a Next.js app to Neon Postgres using Drizzle ORM with optimized connection pooling for Vercel serverless functions.
25+
26+
```bash
27+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/neon-drizzle-setup
28+
```
29+
30+
### Next.js on Vercel
31+
32+
Create a Next.js app running on Bun, configure the development environment, and deploy to Vercel with automatic deployments on push.
33+
34+
```bash
35+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/nextjs-on-vercel
36+
```
37+
38+
### Shadcn UI & Theming
39+
40+
Add Shadcn UI components with dark mode support using next-themes. Includes theme provider and CSS variables configuration.
41+
42+
```bash
43+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/shadcn-ui-setup
44+
```
45+
46+
## Cookbook - Complete These Recipes in Order
47+
48+
### Resend Setup
49+
50+
Configure Resend for transactional emails like password resets and email verification.
51+
52+
```bash
53+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/resend-setup
54+
```
55+
56+
### Better Auth Setup
57+
58+
Add user authentication using Better Auth with Drizzle ORM and Neon Postgres. Base setup with email/password authentication.
59+
60+
```bash
61+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-setup
62+
```
63+
64+
### Better Auth Emails
65+
66+
Add email verification, password reset, and account management emails to Better Auth using Resend.
67+
68+
```bash
69+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-emails
70+
```
71+
72+
### Better Auth Components
73+
74+
Add UI components and pages for authentication flows including sign in, sign up, forgot password, reset password, and email verification.
75+
76+
```bash
77+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-components
78+
```
79+
80+
### Better Auth Profile & Account
81+
82+
Add a complete account settings page with profile editing, password changes, email updates, session management, and account deletion.
83+
84+
```bash
85+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-profile
86+
```
87+
88+
### Better Auth Protected Routes
89+
90+
Add server-side route protection to enforce authentication on specific pages while keeping others public.
91+
92+
```bash
93+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-protected-routes
94+
```
95+
96+
### Working with Authentication
97+
98+
Use Better Auth for client and server-side authentication. Covers session access, protected routes, sign in/out, and fetching user data.
99+
100+
```bash
101+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/using-authentication
102+
```
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
name: base-app-setup
3+
description: Complete setup guide for a Next.js app with Shadcn UI, Neon Postgres, Drizzle ORM, and AI SDK.
4+
---
5+
6+
# Base App Setup
7+
8+
Complete setup guide for a Next.js app with Shadcn UI, Neon Postgres, Drizzle ORM, and AI SDK.
9+
10+
## Cookbook - Complete These Recipes in Order
11+
12+
### Next.js on Vercel
13+
14+
Create a Next.js app running on Bun, configure the development environment, and deploy to Vercel with automatic deployments on push.
15+
16+
```bash
17+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/nextjs-on-vercel
18+
```
19+
20+
### Editor and Linting Setup
21+
22+
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.
23+
24+
```bash
25+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/code-style-setup
26+
```
27+
28+
### AI Coding Agent Configuration
29+
30+
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.
31+
32+
```bash
33+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/agent-setup
34+
```
35+
36+
### Shadcn UI & Theming
37+
38+
Add Shadcn UI components with dark mode support using next-themes. Includes theme provider and CSS variables configuration.
39+
40+
```bash
41+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/shadcn-ui-setup
42+
```
43+
44+
### Assertion Helper
45+
46+
TypeScript assertion function for runtime type narrowing with descriptive error messages. Based on tiny-invariant.
47+
48+
```bash
49+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/assert
50+
```
51+
52+
### Type-Safe Environment Configuration
53+
54+
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.
55+
56+
```bash
57+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/config-schema-setup
58+
```
59+
60+
### Build-Time Environment Variable Validation
61+
62+
Validate environment variables on server start and before builds. Catch missing or invalid variables early with clear error messages.
63+
64+
```bash
65+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/env-validation
66+
```
67+
68+
### Neon + Drizzle Setup
69+
70+
Connect a Next.js app to Neon Postgres using Drizzle ORM with optimized connection pooling for Vercel serverless functions.
71+
72+
```bash
73+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/neon-drizzle-setup
74+
```
75+
76+
### AI SDK & Simple Chat
77+
78+
Install the Vercel AI SDK with AI Elements components. Build a streaming chat interface with the useChat hook.
79+
80+
```bash
81+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/ai-sdk-setup
82+
```
83+
84+
### Working with Drizzle
85+
86+
Write type-safe database queries with Drizzle ORM. Covers select, insert, update, delete, relational queries, and adding new tables.
87+
88+
```bash
89+
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/using-drizzle-queries
90+
```

0 commit comments

Comments
 (0)