A production-ready monorepo template for building full-stack applications with React Native, Next.js, and Express. This template provides everything you need to build and ship mobile apps (iOS/Android) and web applications with a shared API and authentication system.
- Mobile App: React Native with Expo SDK 52 development builds
- Web App: Next.js 15 with App Router and React Server Components
- API Server: Express server with tRPC endpoints and Prisma ORM
- Type Safety: End-to-end type safety with TypeScript and tRPC
- Monorepo Management: Turborepo with pnpm workspaces for optimized builds
- Better Auth: Complete authentication system with:
- Email/password authentication
- Phone number authentication via Twilio OTP
- Google OAuth integration
- Email verification
- Password reset flows
- Firebase Integration: Push notifications and App Check
- Mobile: NativeWind v4
- Web: Tailwind CSS v4 with Shadcn/ui
- Database: Prisma ORM with PostgreSQL/Supabase
- Server State: TanStack Query (React Query) via tRPC
- Client State: Zustand for local state management
- Payments: Stripe integration with Better Auth
- Mobile Subscriptions: RevenueCat for iOS/Android
- Analytics: PostHog for product analytics
- Error Tracking: Sentry for monitoring
- Type Safety: Shared TypeScript configurations
- Code Quality: ESLint, Prettier, Husky pre-commit hooks
- Push Notifications: Firebase Cloud Messaging
- Permissions: Camera, notifications, location handling
- Device Info: Platform-specific utilities
- App Store Ready: EAS Build & Submit configured
.
βββ apps/
β βββ native/ # Expo React Native app
β β βββ app/ # App screens and navigation
β β βββ assets/ # Images and static files
β β βββ eas.json # EAS Build configuration
β βββ server/ # Express API server
β β βββ src/ # Server source code
β βββ web/ # Next.js web app
β βββ app/ # App Router pages
β βββ components/ # React components
βββ packages/
β βββ api/ # tRPC router definitions
β βββ auth/ # Better Auth configuration
β βββ db/ # Prisma schema and client
β βββ shared/ # Shared utilities and types
βββ tooling/
β βββ eslint/ # Shared ESLint configs
β βββ prettier/ # Shared Prettier config
β βββ typescript/ # Shared TypeScript configs
βββ .env.example # Environment variables template
βββ CLAUDE.md # AI assistant instructions
βββ package.json # Root workspace configuration
βββ pnpm-workspace.yaml # pnpm workspace definition
βββ turbo.json # Turborepo pipeline config
# Clone the repository
gh repo clone ayush-goyal/universal-template
cd universal-template
# Install dependencies
pnpm install# Copy environment variables template
cp .env.example .env
# Configure your .env file- Create iOS app in Firebase Console
- Download
GoogleService-Info.plist - Place in
apps/native/directory
- Create Android app in Firebase Console
- Download
google-services.json - Place in
apps/native/directory
- Go to Project Settings β Service accounts
- Generate new private key
- Save as
google-service-account-file.jsoninpackages/api/
# Run migrations
pnpm --filter @acme/db db:migrate
# Open Prisma Studio (optional)
pnpm --filter @acme/db db:studio# Run all apps in development mode
pnpm dev
# Or run specific apps
pnpm --filter @acme/native dev # Mobile app
pnpm --filter @acme/web dev # Web app
pnpm --filter @acme/server dev # API server
# For Android physical device
pnpm --filter @acme/native adb# Install dependencies
pnpm install
# Type checking
pnpm typecheck
# Linting
pnpm lint
# Format code
pnpm format
# Clean all build artifacts
pnpm clean# Run migrations
cd packages/db && pnpm db:migrate
# Deploy migrations (production)
cd packages/db && pnpm db:migrate:prodAll packages use the @acme/ namespace. To rename:
- Find and replace
@acme/with@your-company/ - Update all
package.jsonfiles - Update import statements
- Turborepo Documentation
- Expo Documentation
- Next.js Documentation
- Better Auth Documentation
- Prisma Documentation
- tRPC Documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by create-t3-turbo
- Built with tools from the JavaScript ecosystem