finds.dev← search

// the find

omar-dulaimi/prisma-trpc-generator

★ 740 · TypeScript · MIT · updated Nov 2025

Prisma 2+ generator to emit fully implemented tRPC routers

A Prisma generator that reads your schema and emits tRPC routers with Zod-validated inputs for every model, covering the full Prisma operation set (findMany, createOne, updateOne, etc.). Targets teams already on the Prisma + tRPC stack who want to skip writing boilerplate CRUD endpoints by hand. Requires Prisma 7 and the new config-file-based setup.

The Zod annotation comments on Prisma fields (`/// @zod.string.email()`) are a genuinely useful escape hatch — you get field-level validation without a separate schema file. The config-file approach in v2 is cleaner than embedding options in the generator block, and the output is readable TypeScript you can actually audit. Test coverage spans auth, middleware, OpenAPI, Postman, and tenancy, which means the generator's own features are actually tested end-to-end, not just the happy path.

Generated routers expose every Prisma operation by default, including raw `deleteMany` and `updateMany` with no filters required — you have to wire up Shield or custom middleware yourself or you're shipping an open API surface. The auth scaffolding is stubs, not working code; the README example JWT verifier is HS256 with a hardcoded secret placeholder, which will bite anyone who copies it without reading carefully. OpenAPI support is explicitly labelled MVP and the path/method mapping (everything is POST) makes the generated spec not actually REST-compatible, so downstream tooling that expects GET for queries will break. At 740 stars the community is small, and the forks-to-stars ratio (34/740) suggests most users are consumers rather than contributors, which is a maintenance risk if the author moves on.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →