Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We use drizzle + Hono + client with zod. So the entire chain from ui to client to server to DB follow same validation and shape.


How do you use the same validation for drizzle and zod? I have been writing duplicate schemas and hoping they match...


Drizzle has a zod addon, to generate zod schema from table defn. So table defn is source of truth, we mix generated zod schemas to get hono request validators. Same zod schema are also used on client to validate forms.


I've heard of this stack, glad to hear it works, still hate that you need three separate external dependencies to do it




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: