<aside>
💡 Zod is a TypeScript-first schema declaration and validation library. The term "schema" to broadly refer to any data type, from a simple string
 to a complex nested object.
</aside>
Zod is designed to be as developer-friendly as possible. The goal is to eliminate duplicative 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.
Some other great aspects:
.optional()
) return a new instanceZod is a JavaScript library that can be used to define, validate, and transform complex data structures. It can be used to validate a wide variety of data types and validation rules, such as strings, numbers, booleans, arrays, and objects. Zod can also help with format constraints, such as defining rules for the format of data, like valid email addresses, phone numbers, and dates
High Level architecture diagram of our project
<aside> 💡 In this short tutorial we are going to implement a RESTful API using TypeScript & Express for backend and Zod for data validations.
</aside>
We are going to use Zod in our REST API project, for proper validation of data and define complex data structures.