Skip to content

chiptoma/awesome-zod

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome Zod Awesome

Contents

About this List

This is a collection of awesome resources about Zod

Zod is a TypeScript-first schema declaration and validation library. It is designed to be as developer-friendly as possible. The goal is to eliminate duplicate type declarations. With Zod, you declare a validator once and Zod will automatically infer the static TypeScript type. It's easy to compose simpler types into complex data structures.

Docs

APIs and Servers

  • tRPC - Build end-to-end type-safe APIs without GraphQL.
  • express-zod-api - Build Express-based APIs with I/O schema validation and custom middlewares.
  • zod-endpoints - Contract-first strictly typed endpoints with Zod. OpenAPI compatible.
  • @anatine/zod-nestjs - Helper methods for using Zod in a NestJS project.
  • fastify-type-provider-zod - Create Fastify type providers from Zod schemas.
  • zod-http-schemas - Uses zod to define well typed API, generate a router that enforces and validates the api at runtime, & generate a well-typed client.
  • fastify-zod - Zod integration with Fastify.
  • zod-json-rpc - Lets you rapidly build typesafe JSON-RPC servers and clients in TypeScript. Not only that, it is self-describing via its advanced introspection API, which can output JSON Schema or source code in multiple languages.
  • zod-express-middleware - Middleware for express that uses zod to make requests type-safe.
  • ts-rest - RPC-like client, contract, and server implementation for a pure REST API.
  • zodios - A typescript api client with auto-completion features backed by axios and zod.
  • @lambda-func/zod - A middleware to use zod for type parsing.
  • zod-express-guard - Small package intended to use zod to make express request type-safe.

Convertors and Generators

  • prisma-zod-generator - Prisma 2+ generator to emit Zod schemas from your Prisma schema.
  • ts-to-zod - Convert TypeScript definitions into Zod schemas.
  • zod-to-ts - Generate TypeScript definitions from Zod schemas.
  • @anatine/zod-mock - Generate mock data from a Zod schema. Powered by faker.js.
  • zod-mocking - Generate mock data from your Zod schemas.
  • zod-fast-check - Generate fast-check arbitraries from Zod schemas.
  • zod-to-json-schema - Convert your Zod schemas into JSON Schemas.
  • json-schema-to-zod - Convert your JSON Schemas into Zod schemas.
  • json-to-zod - Convert JSON objects into Zod schemas.
  • zod-prisma - Generate Zod schemas from your Prisma schema.
  • Supervillain - Generate Zod schemas from your Go structs.
  • @anatine/zod-openapi - Converts a Zod schema to an OpenAPI v3.x SchemaObject.
  • zod-dto - Generate Nest.js DTOs from a Zod schema.
  • graphql-codegen-typescript-validation-schema - GraphQL Code Generator plugin to generate form validation schema from your GraphQL schema.
  • graphql-codegen-zod - GraphQL codegen schema to Zod schema.
  • zod-to-openapi - Generate full OpenAPI (Swagger) docs from Zod, including schemas, endpoints & parameters.
  • pgzod - Transform PostgreSQL schemas into Zod validators and types.
  • atlas2ts - Generates typescript interfaces or zod typespecs from atlas DDL specification.
  • kanel-zod - Generates Zod schemas from a live Postgres database.
  • zenko - Generates Zod schemas and helper functions from an OpenAPI v3.x spec

CLIs

  • soly - Create CLI applications with zod.

Other

  • zod-match - Adds a resultify method to ZodTypes so you can match Without Exceptions™️!.
  • zod-joda - JS-Joda integration for Zod validation library.
  • zod-localstorage - A Typescript library to allow typesafe access to localstorage using schema validation from Zod.
  • zod-formik-adapter - Formik adapter for Zod.
  • @felte/validator-zod - Handle validation with Zod in Felte.
  • zcn - A set of ready-made schemas extended for Zod. (z.otp, z.username, z.port, z.nodeEnv and more...)

Projects Using Zod

  • prisma-trpc-generator - Prisma 2+ generator to emit fully implemented tRPC routers.
  • @danprince/zhttp - A small library that brings zod, express, and static-path together to create type safe HTTP endpoints for clients and servers.
  • @renke/vod - Immutable, type-safe, validated, nominal value objects in TypeScript based on @renke/vo and zod.
  • react-zorm - Type-safe for React using Zod!.
  • daruk - A Node.js web framework based on typescript.
  • shrub - A framework for building modular Node.js apps and front-end components.
  • react-hook-form - React Hooks for form state management and validation (Web + React Native).
  • YAMLResume - A resume compiler/transpiler that allow people to write resumes in YAML and provide clang-style validations.

Tutorials

Tutorials with tRPC

Contribute

Contributions welcome! Read the contribution guidelines first.

About

A collection of awesome Zod resources .

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors