ProvenPin Install

Stacks

Zod recipes

30 tested Zod integration recipes with @anthropic-ai/sdk, better-sqlite3, cheerio, commander. Exact pinned versions and a last-passed receipt, last run 2026-10-15.

passed2/2typescript

Anthropic TypeScript SDK tool use loop, tested with a mocked fetch

Run a Claude tool_use loop with the official Anthropic SDK and Zod-validated tool inputs, tested offline with an injected fetch.

@anthropic-ai/sdk@0.134.0zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:27 UTC
passed5/5typescript

better-sqlite3 transactions with Zod-validated inputs

A small ledger on better-sqlite3 using db.transaction for atomic transfers, nested transactions as savepoints for all-or-nothing batches, and Zod 4 to validate inputs and rows, tested on in-memory SQLite.

better-sqlite3@13.0.3zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:27 UTC
passed5/5typescript

Cheerio HTML scraping with Zod-validated records and saved fixtures

Scrape a product listing and a spec table with Cheerio, normalise prices and relative URLs, and validate every record with Zod 4 so broken cards are reported, tested offline against saved HTML fixtures.

cheerio@1.2.0zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:27 UTC
passed5/5typescript

Commander CLI with Zod option validation, tested in-process

A Commander subcommand CLI with variadic arguments, repeatable options, choices and Zod-backed argument parsers, made testable with exitOverride and configureOutput so node:test runs it in-process without spawning.

commander@15.0.0zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:27 UTC
passed6/6typescript

Croner cron jobs from a Zod-validated config, with timezone previews

Validate a job config with Zod 4 (cron pattern checked by croner, IANA timezone, unique names), preview upcoming runs across DST and month ends with croner nextRuns, and start protected jobs with maxRuns, tested offline.

croner@10.0.1zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:27 UTC
passed3/3typescript

CSV import with PapaParse + Zod row validation

Parse CSV uploads with PapaParse (headers, BOM, quoted fields), validate each row with Zod and report row-numbered errors instead of failing the whole file.

papaparse@5.7.0zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:32 UTC
passed2/2typescript

Drizzle ORM + drizzle-zod validated inserts on SQLite

Generate Zod insert and select schemas from Drizzle tables with drizzle-zod, refine them, and validate input before inserting into SQLite.

drizzle-orm@0.45.4drizzle-zod@0.8.3zod@4.6.7
last passed 2026-10-15 13:28 UTC
passed3/3typescript

Express 5 + Zod 4 request validation

Validate JSON bodies in Express 5 with a reusable Zod middleware that returns 400 with field errors.

express@5.3.0zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:29 UTC
passed3/3typescript

Fastify 5 + Zod 4 type provider for typed routes

Use fastify-type-provider-zod so Zod 4 schemas validate requests, serialize responses and type handlers in Fastify 5.

fastify@5.12.7zod@4.6.7fastify-type-provider-zod@7.0.0
last passed 2026-10-15 13:29 UTC
passed2/2typescript

Hono + @hono/zod-openapi typed routes with generated OpenAPI docs

Define Hono routes with createRoute and Zod schemas so requests are validated, handlers are typed and an OpenAPI 3.1 document is generated at /doc.

hono@4.13.13@hono/zod-openapi@1.6.3zod@4.6.7
last passed 2026-10-15 13:30 UTC
passed3/3typescript

Hono + Drizzle ORM + SQLite REST API (Vitest)

CRUD REST API in Hono backed by Drizzle ORM on better-sqlite3, with Zod validation, tested with Vitest and app.request().

hono@4.13.13drizzle-orm@0.45.4better-sqlite3@13.0.3
last passed 2026-10-15 13:30 UTC
passed4/4typescript

Hono + hono/jwt bearer auth with Zod login

Issue HS256 JWTs from a Zod-validated login route in Hono and guard routes with the built-in jwt middleware.

hono@4.13.13zod@4.6.7@hono/zod-validator@0.9.1
last passed 2026-10-15 13:30 UTC
passed3/3typescript

Hono + Zod validator API

Hono routes with @hono/zod-validator for JSON and query validation, tested with app.request().

hono@4.13.13zod@4.6.7@hono/zod-validator@0.9.1
last passed 2026-10-15 13:30 UTC
passed5/5typescript

Koa 3 REST API with @koa/router, Zod validation and supertest

A Koa 3 JSON API using @koa/router and @koa/bodyparser with Zod 4 body and param validation mapped to 400 responses by a central error middleware, tested offline with supertest.

koa@3.2.1@koa/router@15.7.0@koa/bodyparser@6.1.0
last passed 2026-10-15 13:30 UTC
passed4/4typescript

LangChain.js prompt + model + parser chain tested with a fake chat model

Compose a ChatPromptTemplate, chat model and output parser with LCEL in @langchain/core, tested offline with FakeListChatModel.

@langchain/core@1.2.17zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:31 UTC
passed3/3typescript

LangChain.js tools with Zod schemas and a manual tool-calling loop

Define LangChain.js tools with tool() and Zod schemas, run model tool_calls through them, and feed ToolMessages back, tested with a scripted fake chat model.

@langchain/core@1.2.17zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:31 UTC
passed3/3typescript

Next.js 16 App Router route handler + Zod validation

Validate JSON bodies and search params in a Next.js App Router route handler with Zod, returning typed 400s; tested by calling the handler with NextRequest.

next@16.4.1zod@4.6.7react@19.3.1
last passed 2026-10-15 13:31 UTC
passed3/3typescript

Next.js 16 server actions + Zod with useActionState-shaped results

A 'use server' form action that validates FormData with Zod and returns field errors in the shape useActionState expects, tested by calling the action directly.

next@16.4.1zod@4.6.7react@19.3.1
last passed 2026-10-15 13:31 UTC
passed2/2typescript

OpenAI Node SDK tool calling + Zod, tested with a mocked fetch

Run an OpenAI chat tool-calling loop with Zod-validated tool arguments, tested offline by injecting a fake fetch into the official SDK.

openai@7.34.0zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:32 UTC
passed4/4typescript

React Hook Form + Zod 4 resolver schemas (no DOM)

Share one Zod schema between React Hook Form (via @hookform/resolvers) and the server, with cross-field refinements, tested by calling the resolver directly.

react-hook-form@7.90.0@hookform/resolvers@5.9.1zod@4.6.7
last passed 2026-10-15 13:33 UTC
passed3/3typescript

React Router 8 data loaders and actions tested with createStaticHandler

Route loaders and actions with redirects, validation errors and 404 responses in React Router's data APIs, tested offline with createStaticHandler and plain Requests.

react-router@8.4.0react@19.3.1react-dom@19.3.1
last passed 2026-10-15 13:33 UTC
passed3/3typescript

SvelteKit form actions with fail() and Zod, unit-tested (Vitest)

SvelteKit +page.server.ts form actions that validate with Zod, return fail(400) with field errors, and redirect on success, tested by calling the actions with a fake RequestEvent.

@sveltejs/kit@3.1.0svelte@5.57.2zod@4.6.7
last passed 2026-10-15 13:34 UTC
passed3/3typescript

tRPC 11 + Zod router with server-side caller

A typed tRPC router with Zod inputs, an auth middleware, and tests through createCaller.

@trpc/server@11.19.0zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:34 UTC
passed3/3typescript

tRPC 11 client + server over fetch with superjson (Vitest)

End-to-end typed tRPC 11: fetch adapter server, createTRPCClient with httpBatchLink and superjson transformer for Dates and Maps, tested in-process with Vitest.

@trpc/server@11.19.0@trpc/client@11.19.0superjson@2.2.6
last passed 2026-10-15 13:34 UTC
passed4/4typescript

tRPC 11 context, auth middleware and createCaller tests

tRPC 11 router with a request context, a protectedProcedure built from middleware, Zod inputs and TRPCError codes, tested with createCaller (no HTTP).

@trpc/server@11.19.0zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:34 UTC
passed4/4typescript

Typed fetch API client tested with MSW + Zod

A typed fetch client that parses responses with Zod, tested offline by intercepting requests with MSW's Node server.

zod@4.6.7tsx@4.23.15msw@3.0.3
last passed 2026-10-15 13:31 UTC
passed4/4typescript

Vercel AI SDK tool loops, structured output and streaming with a mock model

AI SDK generateText with a Zod-typed tool and a stopWhen step cap, Output.object structured results validated by Zod, and streamText deltas, all tested offline with MockLanguageModelV4 and simulateReadableStream from ai/test.

ai@7.0.141zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:34 UTC
passed4/4typescript

ws WebSocket server with a Zod-validated message protocol

A room chat server on the ws library with token auth on the upgrade URL, a Zod 4 discriminated union for every inbound frame and typed error replies, tested offline with real ws clients on an ephemeral localhost port.

ws@8.22.0zod@4.6.7tsx@4.23.15
last passed 2026-10-15 13:34 UTC
passed3/3typescript

Zod 4 + dotenv typed environment config

Load .env files with dotenv and validate process.env with Zod 4 at startup: coercion, defaults, enums, URLs and readable errors.

zod@4.6.7dotenv@18.0.8tsx@4.23.15
last passed 2026-10-15 13:34 UTC
passed5/5typescript

Zod 4 schemas to an OpenAPI 3.1 document with zod-to-openapi

Register Zod 4 schemas, path and query parameters, security schemes and routes in an OpenAPIRegistry and generate an OpenAPI 3.1 document (JSON and YAML) from the same schemas used for runtime validation, tested offline.

zod@4.6.7@asteasolutions/zod-to-openapi@9.1.0yaml@2.9.1
last passed 2026-10-15 13:34 UTC

Used together with Zod

@anthropic-ai/sdkbetter-sqlite3cheeriocommandercronerpapaparseDrizzle ORMdrizzle-zodExpressFastifyfastify-type-provider-zodHono@hono/zod-openapi@hono/zod-validatorvitestkoa@koa/router@koa/bodyparsersupertest@langchain/corenextreactopenaireact-hook-form@hookform/resolversreact-router@sveltejs/kitsveltetRPC@trpc/server@trpc/clientsuperjsonMSWaiwsdotenv@asteasolutions/zod-to-openapiyaml