Skip to content

Add cookbook with 50 workflow pattern recipes#1564

Open
johnlindquist wants to merge 17 commits intomainfrom
cookbook
Open

Add cookbook with 50 workflow pattern recipes#1564
johnlindquist wants to merge 17 commits intomainfrom
cookbook

Conversation

@johnlindquist
Copy link
Copy Markdown
Contributor

Summary

  • Adds a Cookbook section to useworkflow.dev docs with an interactive decision tree explorer ("I want to...") that guides users to the right workflow pattern
  • Migrates all 50 workflow patterns from the campaign demos project as MDX recipe pages, each with simplified + full implementation code snippets
  • 8 categories: Payments & Orders, Approvals, Resilience, Notifications, Webhooks & Callbacks, Data Processing, Routing, Observability

Test plan

  • Visit /docs/cookbook and verify the decision tree renders with all 7 top-level branches
  • Click through each branch to confirm sub-questions and results link to correct recipe pages
  • Verify breadcrumb navigation works (click back to previous steps, "Start over")
  • Open a recipe page (e.g. /docs/cookbook/payments/saga) and confirm both simplified and full code blocks render with syntax highlighting
  • Check sidebar nav shows Cookbook section with all 8 category subfolders
  • Verify no build errors with pnpm build in docs/

Migrate the "Workflow API Explorer" decision tree concept from
workflow-campaign-demos into useworkflow.dev docs as a Cookbook.

Infrastructure:
- docs/lib/cookbook-tree.ts: decision tree data, 50 recipe metadata entries, slug-to-category mapping
- docs/components/geistdocs/cookbook-explorer.tsx: interactive "I want to..." decision tree UI with breadcrumb navigation
- docs/content/docs/cookbook/index.mdx: landing page rendering CookbookExplorer component
- docs/content/docs/cookbook/meta.json + 8 category meta.json files for sidebar nav
- docs/content/docs/meta.json: added cookbook to docs nav between foundations and how-it-works
- docs/app/[lang]/docs/[[...slug]]/page.tsx: registered CookbookExplorer component

50 recipe MDX files across 8 categories (payments, approvals, resilience,
notifications, webhooks, data-processing, routing, observability), each with:
- Frontmatter (title, description, type: guide, summary with use-case scenario)
- Simplified code snippet (core pattern only, stripped of demo UI concerns)
- Full implementation code snippet (exact source from campaign demos)
- Key APIs section with links to API reference docs
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 30, 2026

@johnlindquist johnlindquist requested a review from a team as a code owner March 30, 2026 23:03
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 30, 2026

⚠️ No Changeset found

Latest commit: e52b219

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
❌ ▲ Vercel Production 845 1 67 913
✅ 💻 Local Development 818 0 178 996
✅ 📦 Local Production 818 0 178 996
✅ 🐘 Local Postgres 818 0 178 996
✅ 🪟 Windows 75 0 8 83
❌ 🌍 Community Worlds 132 60 24 216
✅ 📋 Other 207 0 42 249
Total 3713 61 675 4449

❌ Failed Tests

▲ Vercel Production (1 failed)

astro (1 failed):

  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KN38N322532ANN86ZM5WS1B9 | 🔍 observability
🌍 Community Worlds (60 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KN38CJ2JK7CKV1WG1TMHFDHG
  • webhookWorkflow | wrun_01KN38CTMKYR798J28RX3KNKBW
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KN38MFEAWKKX6C9Z9465ZHPW

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KN38CJ2JK7CKV1WG1TMHFDHG
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KN38MFEAWKKX6C9Z9465ZHPW

turso (55 failed):

  • addTenWorkflow | wrun_01KN38BD2J2EKKZRX0E1EV5ME4
  • addTenWorkflow | wrun_01KN38BD2J2EKKZRX0E1EV5ME4
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KN38CV82ED9368VXV1P5D7VR
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KN38BK9MSZ36DD8W8Y3ZH1YX
  • promiseRaceWorkflow | wrun_01KN38BS7H4CY17CQN4HW0DHYE
  • promiseAnyWorkflow | wrun_01KN38BV9A5X95S6DQAK8XA9S9
  • importedStepOnlyWorkflow | wrun_01KN38D6NSXT8EXCKBC10WBSAP
  • hookWorkflow | wrun_01KN38C7DZN86CZF0W0JA1MCS2
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KN38CJ2JK7CKV1WG1TMHFDHG
  • webhookWorkflow | wrun_01KN38CTMKYR798J28RX3KNKBW
  • sleepingWorkflow | wrun_01KN38D0VJQFBZ1XBS15SPX2A0
  • parallelSleepWorkflow | wrun_01KN38DDGBFA4GYJ6A1J1VZMNX
  • nullByteWorkflow | wrun_01KN38DGQ7VYJ8GQVBRFWB1GR6
  • workflowAndStepMetadataWorkflow | wrun_01KN38DJQ9GB0DGQDWFSC66G6P
  • fetchWorkflow | wrun_01KN38GEF3GYHY7ZSXCB5N3GX9
  • promiseRaceStressTestWorkflow | wrun_01KN38GHM83WYV856YE9YAY9PY
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KN38KW3PC41MR3WEKZQYJT4C
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KN38MFEAWKKX6C9Z9465ZHPW
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KN38N322532ANN86ZM5WS1B9
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KN38NPRS9EZESYQFF983T610
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KN38NYVGWP4QD2HBRR0PYXKJ
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KN38P3TC16JAM7C18VXZ6W3J
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KN38P5WWKWS3MFD7ERTP1X77
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KN38PKWDTZ86JN7SW0JSZZ15
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KN38PS06FYBYPHDZ3SHJVQCS
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KN38PZ7JE7ZW90W0E3CPCGE0
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KN38Q58GAFN7A4P2FXXVX4VE
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KN38QBG91564CEJGFNWADSRD
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KN38QHV5R6VCZQHKM2R43AHS
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KN38QR3J71KG9ASDP97FMH5X
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KN38R26Q2SX8EKA7JKPP4V6Y
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KN38RAF9AD0FE7N118J05VMJ
  • cancelRun - cancelling a running workflow | wrun_01KN38RGKG5V692ET1GE5YP4DG
  • cancelRun via CLI - cancelling a running workflow | wrun_01KN38RSD525BY4EEHN397WH16
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KN38S4GHK6AW5F5R9N7B4J6W
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KN38SQHG0T9677ET732V903T
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KN38T2FPDY9YEX71NC73JC2H
  • importMetaUrlWorkflow - import.meta.url is available in step bundles

Details by Category

❌ ▲ Vercel Production
App Passed Failed Skipped
❌ astro 75 1 7
✅ example 76 0 7
✅ express 76 0 7
✅ fastify 76 0 7
✅ hono 76 0 7
✅ nextjs-turbopack 81 0 2
✅ nextjs-webpack 81 0 2
✅ nitro 76 0 7
✅ nuxt 76 0 7
✅ sveltekit 76 0 7
✅ vite 76 0 7
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 69 0 14
✅ express-stable 69 0 14
✅ fastify-stable 69 0 14
✅ hono-stable 69 0 14
✅ nextjs-turbopack-canary 58 0 25
✅ nextjs-turbopack-stable 75 0 8
✅ nextjs-webpack-canary 58 0 25
✅ nextjs-webpack-stable 75 0 8
✅ nitro-stable 69 0 14
✅ nuxt-stable 69 0 14
✅ sveltekit-stable 69 0 14
✅ vite-stable 69 0 14
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 69 0 14
✅ express-stable 69 0 14
✅ fastify-stable 69 0 14
✅ hono-stable 69 0 14
✅ nextjs-turbopack-canary 58 0 25
✅ nextjs-turbopack-stable 75 0 8
✅ nextjs-webpack-canary 58 0 25
✅ nextjs-webpack-stable 75 0 8
✅ nitro-stable 69 0 14
✅ nuxt-stable 69 0 14
✅ sveltekit-stable 69 0 14
✅ vite-stable 69 0 14
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 69 0 14
✅ express-stable 69 0 14
✅ fastify-stable 69 0 14
✅ hono-stable 69 0 14
✅ nextjs-turbopack-canary 58 0 25
✅ nextjs-turbopack-stable 75 0 8
✅ nextjs-webpack-canary 58 0 25
✅ nextjs-webpack-stable 75 0 8
✅ nitro-stable 69 0 14
✅ nuxt-stable 69 0 14
✅ sveltekit-stable 69 0 14
✅ vite-stable 69 0 14
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 75 0 8
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 5 0 0
❌ mongodb 56 3 8
✅ redis-dev 5 0 0
❌ redis 57 2 8
✅ turso-dev 5 0 0
❌ turso 4 55 8
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 69 0 14
✅ e2e-local-postgres-nest-stable 69 0 14
✅ e2e-local-prod-nest-stable 69 0 14

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.043s (-4.1%) 1.005s (~) 0.962s 10 1.00x
💻 Local Express 0.046s (+2.2%) 1.006s (~) 0.960s 10 1.08x
🐘 Postgres Express 0.059s (-14.0% 🟢) 1.011s (~) 0.952s 10 1.39x
🐘 Postgres Nitro 0.062s (-11.2% 🟢) 1.011s (~) 0.949s 10 1.46x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 0.443s (-15.5% 🟢) 2.238s (-18.6% 🟢) 1.795s 10 1.00x
▲ Vercel Next.js (Turbopack) 0.488s (-17.8% 🟢) 2.257s (-8.4% 🟢) 1.769s 10 1.10x
▲ Vercel Express 1.266s (+151.4% 🔺) 3.283s (+21.9% 🔺) 2.017s 10 2.86x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.128s (~) 2.007s (~) 0.879s 10 1.00x
💻 Local Nitro 1.129s (~) 2.006s (~) 0.876s 10 1.00x
🐘 Postgres Nitro 1.147s (~) 2.012s (~) 0.864s 10 1.02x
🐘 Postgres Express 1.153s (~) 2.013s (~) 0.860s 10 1.02x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.208s (-2.5%) 3.905s (-1.3%) 1.697s 10 1.00x
▲ Vercel Nitro 2.394s (+14.9% 🔺) 3.756s (-3.6%) 1.363s 10 1.08x
▲ Vercel Next.js (Turbopack) 3.472s (+66.0% 🔺) 4.699s (+20.4% 🔺) 1.227s 10 1.57x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 10.905s (~) 11.020s (~) 0.114s 3 1.00x
💻 Local Express 10.907s (~) 11.024s (~) 0.117s 3 1.00x
💻 Local Nitro 10.919s (~) 11.023s (~) 0.103s 3 1.00x
🐘 Postgres Nitro 10.940s (~) 11.025s (~) 0.086s 3 1.00x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 16.596s (-2.9%) 17.801s (-7.0% 🟢) 1.205s 2 1.00x
▲ Vercel Nitro 16.681s (-27.6% 🟢) 17.987s (-29.2% 🟢) 1.305s 2 1.01x
▲ Vercel Express 16.877s (-3.8%) 18.304s (-6.9% 🟢) 1.428s 2 1.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 14.482s (-0.9%) 15.026s (~) 0.544s 4 1.00x
🐘 Postgres Express 14.594s (~) 15.023s (~) 0.429s 4 1.01x
💻 Local Nitro 14.877s (-0.7%) 15.028s (~) 0.151s 4 1.03x
💻 Local Express 14.927s (~) 15.028s (~) 0.102s 4 1.03x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 30.760s (-4.3%) 32.455s (-4.9%) 1.695s 2 1.00x
▲ Vercel Express 31.141s (-11.0% 🟢) 32.556s (-11.6% 🟢) 1.415s 2 1.01x
▲ Vercel Next.js (Turbopack) 31.805s (-4.1%) 33.159s (-5.4% 🟢) 1.353s 2 1.03x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 13.943s (-1.1%) 14.310s (-2.9%) 0.367s 7 1.00x
🐘 Postgres Express 14.088s (-2.1%) 14.738s (-1.9%) 0.651s 7 1.01x
💻 Local Nitro 16.465s (-0.5%) 17.029s (~) 0.564s 6 1.18x
💻 Local Express 16.679s (~) 17.031s (~) 0.351s 6 1.20x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 48.328s (-16.0% 🟢) 50.297s (-16.1% 🟢) 1.970s 2 1.00x
▲ Vercel Express 48.490s (-13.7% 🟢) 50.303s (-13.5% 🟢) 1.813s 2 1.00x
▲ Vercel Next.js (Turbopack) 50.827s (-15.1% 🟢) 52.011s (-15.5% 🟢) 1.185s 2 1.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.267s (-0.5%) 2.011s (~) 0.745s 15 1.00x
🐘 Postgres Nitro 1.272s (+0.8%) 2.011s (~) 0.738s 15 1.00x
💻 Local Nitro 1.498s (-2.3%) 2.006s (~) 0.508s 15 1.18x
💻 Local Express 1.537s (~) 2.006s (~) 0.469s 15 1.21x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.828s (+16.0% 🔺) 4.073s (+0.9%) 1.245s 8 1.00x
▲ Vercel Express 2.971s (+14.7% 🔺) 4.561s (+1.7%) 1.590s 7 1.05x
▲ Vercel Next.js (Turbopack) 3.191s (+22.7% 🔺) 4.834s (+19.0% 🔺) 1.642s 7 1.13x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.328s (-0.9%) 3.011s (~) 0.683s 10 1.00x
🐘 Postgres Express 2.348s (-0.8%) 3.010s (~) 0.662s 10 1.01x
💻 Local Nitro 2.813s (-5.1% 🟢) 3.007s (-12.9% 🟢) 0.195s 10 1.21x
💻 Local Express 3.019s (+3.2%) 3.565s (+18.5% 🔺) 0.546s 9 1.30x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.893s (+1.6%) 4.075s (-4.5%) 1.183s 8 1.00x
▲ Vercel Express 2.977s (+13.3% 🔺) 4.502s (+3.2%) 1.525s 7 1.03x
▲ Vercel Next.js (Turbopack) 3.111s (-14.4% 🟢) 4.377s (-14.1% 🟢) 1.265s 7 1.08x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.467s (~) 4.012s (~) 0.545s 8 1.00x
🐘 Postgres Express 3.495s (~) 4.012s (~) 0.517s 8 1.01x
💻 Local Nitro 8.155s (+1.5%) 8.519s (~) 0.364s 4 2.35x
💻 Local Express 8.546s (+4.8%) 9.024s (~) 0.478s 4 2.46x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.208s (+5.6% 🔺) 4.761s (-5.8% 🟢) 1.553s 7 1.00x
▲ Vercel Express 3.467s (-5.2% 🟢) 5.100s (-10.2% 🟢) 1.634s 6 1.08x
▲ Vercel Next.js (Turbopack) 3.753s (-1.8%) 5.071s (-13.3% 🟢) 1.318s 6 1.17x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.242s (-1.0%) 2.009s (~) 0.767s 15 1.00x
🐘 Postgres Nitro 1.265s (~) 2.010s (~) 0.745s 15 1.02x
💻 Local Express 1.558s (~) 2.006s (~) 0.448s 15 1.25x
💻 Local Nitro 1.592s (+1.0%) 2.006s (~) 0.414s 15 1.28x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.286s (-1.5%) 3.714s (-7.3% 🟢) 1.429s 9 1.00x
▲ Vercel Next.js (Turbopack) 2.298s (-3.0%) 3.491s (-12.5% 🟢) 1.193s 9 1.01x
▲ Vercel Nitro 2.335s (-4.6%) 3.551s (-11.1% 🟢) 1.216s 9 1.02x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.315s (~) 3.011s (~) 0.696s 10 1.00x
🐘 Postgres Nitro 2.372s (+0.6%) 3.010s (~) 0.638s 10 1.02x
💻 Local Nitro 2.955s (-3.1%) 3.342s (-14.0% 🟢) 0.387s 9 1.28x
💻 Local Express 3.155s (+1.0%) 3.885s (~) 0.730s 8 1.36x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.459s (-15.1% 🟢) 3.651s (-15.4% 🟢) 1.192s 9 1.00x
▲ Vercel Next.js (Turbopack) 2.925s (-6.1% 🟢) 4.301s (-8.0% 🟢) 1.376s 7 1.19x
▲ Vercel Express 3.077s (+5.2% 🔺) 4.715s (+3.8%) 1.638s 7 1.25x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.462s (-0.6%) 4.012s (~) 0.550s 8 1.00x
🐘 Postgres Nitro 3.486s (~) 4.011s (~) 0.525s 8 1.01x
💻 Local Nitro 8.674s (+0.6%) 9.021s (~) 0.347s 4 2.51x
💻 Local Express 9.240s (+4.4%) 10.023s (+8.1% 🔺) 0.783s 3 2.67x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.987s (+1.3%) 4.388s (-1.6%) 1.401s 7 1.00x
▲ Vercel Nitro 3.122s (-6.3% 🟢) 4.635s (-3.4%) 1.513s 7 1.05x
▲ Vercel Next.js (Turbopack) 3.884s (+2.2%) 5.575s (-2.1%) 1.691s 6 1.30x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.825s (-2.4%) 1.024s (+1.7%) 0.199s 59 1.00x
🐘 Postgres Express 0.834s (-0.9%) 1.024s (+1.6%) 0.190s 59 1.01x
💻 Local Nitro 0.967s (-2.2%) 1.021s (-13.5% 🟢) 0.054s 59 1.17x
💻 Local Express 0.984s (~) 1.229s (+4.1%) 0.246s 49 1.19x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 9.084s (-9.5% 🟢) 10.592s (-12.7% 🟢) 1.508s 6 1.00x
▲ Vercel Next.js (Turbopack) 9.685s (-15.1% 🟢) 11.343s (-15.5% 🟢) 1.658s 6 1.07x
▲ Vercel Nitro 10.037s (-2.2%) 11.409s (-6.8% 🟢) 1.372s 6 1.10x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.921s (-5.4% 🟢) 2.125s (-21.8% 🟢) 0.204s 43 1.00x
🐘 Postgres Express 1.971s (-2.5%) 2.343s (-11.2% 🟢) 0.371s 39 1.03x
💻 Local Nitro 2.993s (-0.8%) 3.453s (-4.3%) 0.460s 27 1.56x
💻 Local Express 3.016s (-0.5%) 3.649s (+1.7%) 0.632s 25 1.57x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 29.478s (-14.0% 🟢) 31.223s (-14.0% 🟢) 1.745s 3 1.00x
▲ Vercel Next.js (Turbopack) 29.565s (-13.9% 🟢) 31.208s (-13.4% 🟢) 1.643s 3 1.00x
▲ Vercel Express 30.059s (-11.5% 🟢) 31.835s (-10.6% 🟢) 1.776s 3 1.02x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.923s (-4.4%) 4.076s (-15.3% 🟢) 0.153s 30 1.00x
🐘 Postgres Express 4.010s (-2.8%) 4.603s (-5.1% 🟢) 0.593s 27 1.02x
💻 Local Express 9.115s (-0.9%) 9.787s (-2.3%) 0.672s 13 2.32x
💻 Local Nitro 9.147s (~) 9.864s (+0.8%) 0.717s 13 2.33x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 71.618s (-18.4% 🟢) 72.859s (-18.8% 🟢) 1.241s 2 1.00x
▲ Vercel Express 75.906s (-12.2% 🟢) 77.695s (-12.2% 🟢) 1.790s 2 1.06x
▲ Vercel Next.js (Turbopack) 76.641s (-16.8% 🟢) 78.063s (-16.8% 🟢) 1.422s 2 1.07x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.282s (-4.5%) 1.008s (~) 0.726s 60 1.00x
🐘 Postgres Express 0.286s (-3.5%) 1.008s (~) 0.722s 60 1.01x
💻 Local Nitro 0.572s (-1.4%) 1.005s (~) 0.433s 60 2.03x
💻 Local Express 0.577s (-5.5% 🟢) 1.004s (-1.7%) 0.428s 60 2.04x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 1.621s (-7.0% 🟢) 3.032s (-8.6% 🟢) 1.411s 20 1.00x
▲ Vercel Next.js (Turbopack) 1.740s (-13.1% 🟢) 3.324s (-9.2% 🟢) 1.583s 19 1.07x
▲ Vercel Nitro 1.971s (+16.7% 🔺) 3.304s (-2.7%) 1.334s 19 1.22x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.502s (-4.2%) 1.008s (~) 0.506s 90 1.00x
🐘 Postgres Nitro 0.505s (-2.2%) 1.008s (~) 0.503s 90 1.01x
💻 Local Express 2.471s (-2.4%) 3.009s (~) 0.538s 30 4.92x
💻 Local Nitro 2.528s (-1.0%) 3.009s (~) 0.481s 30 5.04x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.270s (+4.2%) 4.913s (+0.7%) 1.643s 19 1.00x
▲ Vercel Nitro 3.401s (-16.3% 🟢) 4.781s (-15.4% 🟢) 1.380s 19 1.04x
▲ Vercel Next.js (Turbopack) 4.044s (-92.8% 🟢) 5.699s (-90.1% 🟢) 1.655s 16 1.24x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.783s (-2.4%) 1.008s (~) 0.225s 120 1.00x
🐘 Postgres Express 0.784s (-4.6%) 1.008s (~) 0.225s 119 1.00x
💻 Local Nitro 11.013s (-1.5%) 11.663s (-0.8%) 0.650s 11 14.07x
💻 Local Express 11.058s (-1.8%) 11.755s (-0.8%) 0.696s 11 14.13x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 8.138s (+3.1%) 9.683s (+0.6%) 1.546s 13 1.00x
▲ Vercel Express 8.992s (+15.6% 🔺) 11.010s (+18.1% 🔺) 2.018s 11 1.11x
▲ Vercel Nitro 9.042s (+9.4% 🔺) 10.597s (+4.8%) 1.554s 12 1.11x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.199s (-1.9%) 1.003s (~) 0.011s (+5.5% 🔺) 1.017s (~) 0.818s 10 1.00x
🐘 Postgres Nitro 0.207s (-2.6%) 0.993s (~) 0.002s (+25.0% 🔺) 1.011s (~) 0.804s 10 1.04x
💻 Local Express 0.209s (+1.0%) 1.003s (~) 0.012s (-1.7%) 1.018s (~) 0.808s 10 1.05x
🐘 Postgres Express 0.214s (-2.9%) 0.994s (~) 0.001s (-21.4% 🟢) 1.011s (~) 0.797s 10 1.08x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.620s (-2.4%) 2.777s (-3.3%) 0.453s (-19.1% 🟢) 3.794s (-7.6% 🟢) 2.174s 10 1.00x
▲ Vercel Next.js (Turbopack) 1.668s (~) 2.905s (+2.1%) 0.377s (-39.4% 🟢) 3.835s (-7.9% 🟢) 2.166s 10 1.03x
▲ Vercel Express 1.719s (-1.0%) 2.514s (-19.3% 🟢) 0.748s (+17.0% 🔺) 3.920s (-14.2% 🟢) 2.200s 10 1.06x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.599s (-4.0%) 1.003s (~) 0.004s (-3.3%) 1.023s (~) 0.425s 59 1.00x
🐘 Postgres Express 0.616s (-1.0%) 1.001s (~) 0.004s (-4.7%) 1.028s (~) 0.412s 59 1.03x
💻 Local Nitro 0.720s (-1.0%) 1.009s (~) 0.009s (+6.8% 🔺) 1.022s (~) 0.301s 59 1.20x
💻 Local Express 0.727s (~) 1.010s (~) 0.009s (+3.0%) 1.023s (~) 0.296s 59 1.21x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 4.017s (-4.6%) 5.108s (-7.0% 🟢) 0.233s (-52.8% 🟢) 5.996s (-9.5% 🟢) 1.978s 11 1.00x
▲ Vercel Nitro 4.074s (-1.4%) 5.229s (-1.9%) 0.228s (-3.6%) 6.005s (-4.4%) 1.931s 10 1.01x
▲ Vercel Next.js (Turbopack) 48.290s (+693.4% 🔺) 49.224s (+541.9% 🔺) 0.198s (-13.6% 🟢) 49.992s (+479.8% 🔺) 1.701s 7 12.02x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.953s (-1.6%) 1.168s (-4.5%) 0.000s (+88.2% 🔺) 1.201s (-4.1%) 0.248s 51 1.00x
🐘 Postgres Nitro 0.983s (-1.9%) 1.318s (-2.8%) 0.000s (-52.2% 🟢) 1.335s (-3.2%) 0.352s 46 1.03x
💻 Local Express 1.226s (-1.3%) 2.020s (~) 0.000s (+57.1% 🔺) 2.022s (~) 0.796s 30 1.29x
💻 Local Nitro 1.230s (-1.4%) 2.019s (~) 0.000s (-9.1% 🟢) 2.022s (~) 0.792s 30 1.29x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.790s (-21.2% 🟢) 3.505s (-22.2% 🟢) 0.000s (-89.3% 🟢) 4.186s (-19.6% 🟢) 1.396s 15 1.00x
▲ Vercel Next.js (Turbopack) 3.063s (-3.0%) 4.055s (-5.7% 🟢) 0.000s (-96.1% 🟢) 4.590s (-7.1% 🟢) 1.527s 14 1.10x
▲ Vercel Nitro 3.139s (-6.5% 🟢) 4.079s (-5.0%) 0.002s (+Infinity% 🔺) 4.649s (-7.1% 🟢) 1.510s 13 1.13x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.736s (-3.2%) 2.139s (~) 0.000s (-50.0% 🟢) 2.153s (~) 0.417s 28 1.00x
🐘 Postgres Express 1.757s (-1.1%) 2.210s (+4.2%) 0.000s (+Infinity% 🔺) 2.234s (+3.1%) 0.477s 28 1.01x
💻 Local Nitro 3.445s (-4.6%) 4.033s (-1.7%) 0.001s (+44.4% 🔺) 4.036s (-1.6%) 0.592s 15 1.98x
💻 Local Express 3.544s (+2.3%) 4.034s (~) 0.001s (-20.0% 🟢) 4.038s (~) 0.493s 15 2.04x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.843s (-12.7% 🟢) 4.707s (-14.4% 🟢) 0.004s (+Infinity% 🔺) 5.433s (-11.9% 🟢) 1.590s 12 1.00x
▲ Vercel Next.js (Turbopack) 4.052s (-15.1% 🟢) 4.719s (-20.0% 🟢) 0.000s (+25.0% 🔺) 5.356s (-18.9% 🟢) 1.304s 12 1.05x
▲ Vercel Nitro 4.063s (-11.6% 🟢) 5.006s (-11.0% 🟢) 0.000s (-9.1% 🟢) 5.587s (-11.3% 🟢) 1.524s 11 1.06x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Nitro 15/21
🐘 Postgres Nitro 13/21
▲ Vercel Nitro 10/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 16/21
Next.js (Turbopack) ▲ Vercel 21/21
Nitro 🐘 Postgres 15/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Automated checkpoint commit.

Ploop-Iter: 1
Keep the cookbook surface canonical at /cookbooks so docs navigation, sitemap output, and AI/chat entry points stop leaking the legacy /docs/cookbook paths.

Correct the approval-chain example so the docs teach the intended sequential approval semantics instead of implying the workflow approves after the first successful level. This keeps the cookbook aligned with the docs quality bar and avoids misleading readers with inconsistent behavior.

Ploop-Iter: 2
Align cookbook-facing docs outputs with the new public route so
redirects, sitemap entries, and LLM-facing exports stay consistent.
This keeps the polished cookbook section discoverable at its canonical
location while trimming the last demo-heavy recipe examples toward the
same concise style as the rest of the docs.

Ploop-Iter: 3
Automated checkpoint commit.

Ploop-Iter: 4
Keep cookbook content discoverable after moving it to a first-class /cookbooks surface so navigation, canonical metadata, and markdown consumers resolve the new public URLs consistently.

Avoid serving the legacy /docs/cookbook tree as if it were still part of the docs section, which reduces duplicate navigation paths and prevents stale static output from competing with the new route structure.

Ploop-Iter: 5
The cookbook landing page needs to work for both exploratory users and users who already know the pattern they want. This keeps the guided decision tree while adding shared category metadata and a searchable browse mode so recipe discovery feels faster and more consistent with the rest of the docs experience.

Ploop-Iter: 6
Tighten the simplified cookbook recipes so the examples teach the intended workflow semantics clearly and consistently. The changes keep the documentation focused on the core control-flow patterns reviewers called out, while removing ambiguity around partial arrivals, deadlines, and first-success behavior.

Ploop-Iter: 7
Separate cookbook navigation from the docs page tree so the standalone /cookbooks experience stays stable after the route move and the main docs sidebar no longer leaks cookbook entries.\n\nThis keeps cookbook navigation driven by explicit recipe metadata, which avoids duplicated section titles and makes the docs and cookbook surfaces easier to evolve independently.\n\nPloop-Iter: 8
Keep cookbook pages on their public /cookbooks surface so metadata and copied markdown do not leak legacy /docs/cookbook paths.\n\nSimplify sidebar rendering to trust the injected page tree, which avoids route-specific filtering and keeps cookbook navigation consistent with the active layout tree.\n\nPloop-Iter: 9
Move cookbook rendering off the shared docs route so cookbook pages can behave like a first-class docs surface without leaking cookbook-specific UI into the main docs experience.

Centralizing cookbook tree filtering keeps sidebar behavior consistent in one place and avoids duplicate cookbook navigation state across layouts.

Ploop-Iter: 10
Improve the cookbooks entrypoint so loading and keyboard navigation
are usable without visual cues, and keep guided and browse modes
resilient while the route hydrates.

Ploop-Iter: 11
Restructure the cookbook based on team meeting feedback, toolbar comments,
mux-ai pattern analysis, and Vercel org code search. Consolidates duplicates,
adds missing patterns, ensures all examples have proper directives and
type-check against the real workflow SDK.

New structure:
- common-patterns/ (9): saga, batching, rate-limiting, fan-out,
  scheduling, idempotency, webhooks, content-router, child-workflows
- agent-patterns/ (5): durable-agent, tool-streaming,
  human-in-the-loop, tool-orchestration, stop-workflow
- integrations/ (3): ai-sdk, sandbox, chat-sdk
- advanced/ (6): serializable-steps, durable-objects,
  isomorphic-packages, secure-credentials, custom-serialization,
  publishing-libraries

All 92 code snippets pass docs-typecheck against real workflow SDK types.
Deleted 8 old category folders. Updated cookbook-tree.ts, explorer, nav.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant