For technical teams, 6 minute read,
One codebase for web and mobile: how we structure the monorepo
Sharing types, API clients and design tokens between Next.js, Hydrogen and Expo apps without coupling them.
Sharing code between web and mobile is valuable, but only if it doesn't turn every app into a dependency of every other. Our rule: share contracts and primitives, not screens.
The layout
Each deployable app lives under apps/, and anything shared lives under packages/. Apps depend on packages; packages never depend on apps.
- apps/web: the Next.js website
- apps/store: the Hydrogen storefront
- apps/mobile: the Expo app
- packages/types: shared TypeScript types generated from CMS and API schemas
- packages/api: typed API clients and validation
- packages/tokens: design tokens consumed by Tailwind and React Native styles
What we share, and what we don't
Types, validation schemas, API clients, formatting helpers and design tokens are shared. UI components mostly aren't: web and native have different primitives and accessibility models, and forcing one component library across both usually produces worse versions of each.
Why it matters to clients
When the content model changes, the type change flows through every app and the compiler flags what needs updating, before anything ships. Features that touch data are built once. That's where the time and cost savings of the one-platform approach actually come from.

