finds.dev

omar-dulaimi/prisma-trpc-generator

Prisma 2+ generator to emit fully implemented tRPC routers

View on GitHub

★ 740TypeScriptMITupdated Nov 2025

// the take

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.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
740
Forks
34
Language
TypeScript
License
MIT
Last commit
22 Nov 2025

// nearby

If prisma-trpc-generator isn't quite it.

All repos →