Struggling to Choose a Type-Safe Backend for a Podcast Streaming Service Without a Monorepo

I’m building a podcast streaming service using Next.js for the web and a React Native app for mobile. I’m not sure what to do about the backend. I really want to use tRPC for both, but tRPC feels a bit complex since I don’t want to use a monorepo (it’s an extra headache). I want to keep them in separate repositories.

Here’s my current idea:

  • Use raw Next.js API routes (without tRPC) and consume that API in the React Native app.
  • Alternatively, use Hono.js as a serverless framework, host it on Cloudflare Workers, and consume it in both Next.js and React Native.
The problem is that neither approach will be type-safe, and I think that will cause more headaches in the long run. You might suggest using GraphQL with a type generation tool, but I’ve tried writing GraphQL backends before and found the experience horrible.

What should I do? I’d love to hear your thoughts.
Was this page helpful?