π°οΈ tRPC
Runtime Type Checking
For more info, see the official Valibot docs (opens in a new tab).
Given that the majority of API endpoints are accessible through the Internet, it is imperative to implement a zero trust security approach and diligently examine request data prior to proceeding with further processing.
Valibot + Drizzle
Valibot is used for light & fast runtime type checking.
Drizzle makes a library called drizzle-valibot (opens in a new tab) that generates Valibot schemas from TypeScript types.
This ensures there is no mismatch between the TypeScript types and the Valibot schema and is also useful for validating data to be inserted into the database.