Cool to see more of these kinds of projects, nice work OP!<p>I'm a huge fan of this general concept, so you're definitely on the right path imo. That said, two things are jumping out at me:<p>- Users would still be writing OpenAPI specs/JSON Schema by hand, an incredibly annoying and tedious process (unless using a nicer DSL)<p>- Generation/build steps are annoying (but likely unavoidable here)<p>As pointed out by many other comments, an unfortunate amount of teams aren't writing OAPI specs. I personally feel this is a major mistake for anyone building an API, but that's a discussion for another day.<p>I've been using <a href="https://www.ts-rest.com" rel="nofollow noreferrer">https://www.ts-rest.com</a>, a similar project, for a few months now. Instead of relying on OpenAPI specs as the source, you define the "contracts" using Zod. These contracts are essentially OpenAPI specs, but Zod makes for a MUCH better DSL. I really like that...<p>- Real-time type checking without generator steps, both server & client-side. XHR clients like `fetch`, `react-query`, etc clients are inferred from the contract.<p>- The Zod contracts _can_ generate/output OpenAPI specs and Mock Service Worker mocks for testing (as needed, not required)<p>- (Optional) Automatic request & response validation based on Zod contract definitions, no additional code needed.<p>- (Node) Backend agnostic (partially, anyway: NextJS, Express, Nest and Fastify supported atm)<p>- Works very well with `react-hook-form` & `ZodResolver`, so e.g an invalid value on client-side shows the same error as the API would have if request were fired.<p>- Zod types can be used as typescript (z.infer), a wonderful way to re-use e.g model types in client-side components.<p>This ts-rest experience has fundamentally solidified a belief in me: One single source of truth, propagating through the system, is _the_ best way to build safely and efficiently.<p>I am almost ashamed to look back on the many, many projects I've worked on where APIs and client-side did not share truth. Duplication of (hand-rolled) types, error messages, etc is horrific in retrospect.<p>I don't want to think about the amount of bugs I've come across due to this dual (at best) truth approach.