Write React components once, run them on web, iOS, and Android. A Turborepo + NativeWind template with shared UI out of the box.
New to monorepos? Follow the step-by-step guide that built this template.
Apps: Next.js 16 or Vite (web), Expo SDK 54 (mobile) UI: React Native + NativeWind (Tailwind for RN) Build: Turborepo, pnpm workspaces, TypeScript
├── apps/
│ ├── mobile/ # Expo React Native app
│ ├── web/ # Next.js web app
│ └── web-vite/ # Vite web app (alternative)
├── packages/
│ └── ui/ # Shared component library
└── turbo.json # Turborepo config
Both web (Next.js) and web-vite (Vite + TanStack Router) are included. Remove the one you don't need:
Keep Next.js only:
rm -rf apps/web-vite
pnpm installKeep Vite only:
rm -rf apps/web
mv apps/web-vite apps/web
# Update "name" in apps/web/package.json from "web-vite" to "web"
pnpm installPrerequisites: Node.js 18+, pnpm 10+, and optionally Xcode/Android Studio for mobile development.
# Clone and install
git clone https://github.com/gurselcakar/universal-react-monorepo.git
cd universal-react-monorepo
pnpm install
# Start all apps
pnpm dev
# Or run individually
pnpm --filter web dev # Next.js at localhost:3000
pnpm --filter web-vite dev # Vite at localhost:5173
pnpm --filter mobile dev # Expo Metro bundler| Command | Description |
|---|---|
pnpm dev |
Start all apps |
pnpm build |
Build all apps |
pnpm lint |
Lint all workspaces |
pnpm typecheck |
TypeScript type checking |
- Shared Components:
packages/ui/contains React Native components styled with NativeWind - Web: Next.js uses react-native-web to render React Native components as HTML
- Mobile: Expo renders components natively on iOS/Android
- Build guide — step-by-step walkthrough
- Turborepo docs
- NativeWind docs
- Expo docs
- Next.js docs
Built by Gürsel Çakar — also the creator of Hukora, a logic-based puzzle game.
MIT
