Skip to main content

tRPC and Zod design patterns

· One min read
Jason Walsh

tRPC

In an earlier article, I went over a very rudimentary data fetch example using tRPC and Zod, two of my favorite new Node.js libraries.

Today I pushed up a simple demo to Github showcasing how to handle tRPC Mutations (including how you can easily Upsert data) as well as some simple Design Patterns to cut down on boilerplate code.

The demo can be ran locally, but if you prefer to just look at the code, the README has some callouts about the main files worth looking at.

I hope this helps make development easier, faster, and less brittle for you if you're doing development with Node.js.

Cheers 🍻