This is a translation of my original article in Japanese: Zenn

I build and run a service as a solo developer that ships both a web app (Next.js) and an iOS app (Expo / React Native). The one thing I wanted to avoid most in this setup was maintaining API type definitions in two places. Hand-editing the app-side types every time a server response changes is a workflow that reliably falls apart when you are a one-person team.

Combine tRPC v11 with a monorepo and the API types you write on the Next.js side flow straight into Expo's autocomplete. Add a field to a server procedure and the app code immediately shows a type error. This post walks through the actual setup of my service (a sports club management app).

The big picture

It is a Turborepo monorepo laid out like this: