I built trpc-docs-generator because I love the zero effort type safety of tRPC, but I found that as soon as a project grows, the source of truth stays locked in the TypeScript files.
Most existing solutions require you to implement trpc-openapi, which is great if you need a REST endpoint, but feels like a lot of boilerplate if you just want a way for team members (or yourself) to visualize the API, check Zod schemas, and see procedure trees.
How it works: It uses tRPC’s internal router introspection to map out your procedures. If you’re using Zod for validation, it pulls those schemas to show exactly what inputs/outputs are expected. The result is a static documentation site that's easy to host or run locally.
Why use this instead of OpenAPI? This is strictly for tRPC users who want to keep their DX pure TypeScript without adding the REST compatibility layer.
Repo: https://github.com/liorcodev/trpc-docs-generator
Thanks for checking it out!
0 comments