Skip to content

Step 10 - Zod validation

Course: Blogging website - chapter 10

If you’ve gone through the video Cohort 1 - Deploying npm packages, Intro to Monorepos, you’ll notice we introduced type inference in Zod

https://zod.dev/?id=type-inference

This let’s you get types from runtime zod variables that you can use on your frontend

We will divide our project into 3 parts

  1. Backend
  2. Frontend
  3. common common will contain all the things that frontend and backend want to share. We will make common an independent npm module for now. Eventually, we will see how monorepos make it easier to have multiple packages sharing code in the same repo