A production-ready React Native starter template with comprehensive authentication, user profile management, and modern UI/UX - built with Expo, Clerk, and NativeWind.
This starter provides a complete authentication and user management system that you can use as a foundation for your React Native apps. Everything is type-safe, thoroughly tested, and follows modern best practices.
- Unified "Continue with..." Flow - Modern single-page auth (like lu.ma)
- Email/Password Authentication with proper validation
- Social OAuth - Google & Apple (with proper error handling)
- Email Verification with resend functionality
- Password Reset flow
- Type-safe Forms with React Hook Form + Zod validation
- Profile Settings with image upload
- Username Editing with validation
- Email Management - Add, verify, delete multiple emails
- Phone Number Management - Add, verify, delete phone numbers
- Connected Accounts - Link/unlink Google, Apple accounts
- Security Settings - Password change, 2FA setup, passkey support
- Passkey Support (when available in Clerk SDK)
- Two-Factor Authentication setup (TOTP)
- Secure Token Storage with expo-secure-store
- Proper Error Handling with user-friendly messages
- OAuth Security - Proper cleanup on cancellation/failure
- NativeWind - Tailwind CSS for React Native
- Reusable Components - DRY principle, no code duplication
- Responsive Design - Works on all screen sizes
- Loading States - Proper UI feedback for all actions
- Platform-specific Components - iOS and Web optimizations
- 100% TypeScript - No
any
types in production code - Clerk Type Integration - Proper typing for all Clerk resources
- Form Validation - Runtime + compile-time type checking
- Error Type Guards - Safe error handling patterns
- Node.js 18+
- Expo CLI
- Clerk Account (free tier available)
git clone <your-repo>
cd mobile-app
npm install
Create a .env
file:
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_your-key-here
- Create a new Clerk application
- Enable Email and OAuth providers (Google, Apple)
- Configure OAuth redirect URLs:
- Development:
exp://127.0.0.1:19000/--/oauth-callback
- Production: Your app's deep link scheme
- Development:
npx expo start
Modern single-page authentication similar to lu.ma:
- Email Entry - User enters email
- Smart Routing - Automatically detects existing users
- Sign In - Existing users enter password
- Sign Up - New users complete profile (name + password)
- Verification - Email verification when needed
- Sign In (
/sign-in
) - Traditional email/password - Sign Up (
/sign-up
) - Traditional registration - Verification (
/verify
) - Email verification - Forgot Password (
/forgot-password
) - Password reset
Complete user profile system accessible after authentication:
- Profile Details - Name, username, profile image
- Email Management - Multiple emails, verification
- Phone Management - Add/remove phone numbers
- Connected Accounts - OAuth account linking
- Security Settings - Password, 2FA, passkeys
mobile-app/
βββ app/
β βββ (auth)/ # Authentication screens
β β βββ _components/ # Shared auth components
β β β βββ AuthContainer.tsx # Layout wrapper
β β βββ continue.tsx # Unified auth flow β
β β βββ sign-in.tsx # Classic sign in
β β βββ sign-up.tsx # Classic sign up
β β βββ verify.tsx # Email verification
β β βββ forgot-password.tsx # Password reset
β βββ (tabs)/ # Main app (protected)
β β βββ index.tsx # Home tab
β β βββ explore.tsx # Explore tab
β β βββ profile/ # Profile management
β β βββ index.tsx # Profile overview
β β βββ settings.tsx # Profile settings
β βββ index.tsx # Welcome/landing screen
β βββ _layout.tsx # Root layout + Clerk provider
βββ components/
β βββ auth/
β β βββ SignInWith.tsx # Social auth buttons
β β βββ SignOutButton.tsx # Sign out functionality
β β βββ UserProfileSettings/ # Complete profile system
β β βββ ProfileSection.tsx # Main profile component
β β βββ SecuritySection.tsx # Security settings
β β βββ components/ # Sub-components
β β βββ ProfileHeader.tsx # Profile image/name
β β βββ EmailManagement.tsx # Email management
β β βββ PhoneManagement.tsx # Phone management
β β βββ ConnectedAccounts.tsx # OAuth accounts
β βββ FormInput.tsx # Type-safe form input
β βββ ui/ # UI components
βββ constants/
β βββ Colors.ts # Theme colors
β βββ Config.ts # App configuration
βββ hooks/
βββ useColorScheme.ts # Theme detection
βββ useThemeColor.ts # Color theming
All forms use React Hook Form + Zod for validation:
const signInSchema = z.object({
identifier: z.string().email('Please enter a valid email address'),
password: z.string().min(8, 'Password should be at least 8 characters long'),
})
Consistent error handling across all components:
catch (error: unknown) {
if (isClerkAPIResponseError(error)) {
const message = error.errors?.[0]?.longMessage || 'Default message'
Alert.alert('Error', message)
} else {
Alert.alert('Error', 'Something went wrong')
}
}
Proper OAuth implementation with cleanup:
// Dynamic redirect URI generation
const redirectUri = AuthSession.makeRedirectUri()
// Proper cleanup on cancellation
if (result.type === 'cancel') {
await externalAccount.destroy() // Clean up pending connection
}
DRY principle with reusable, type-safe components:
<FormInput
control={form.control}
name="email"
label="Email Address"
placeholder="Enter your email"
keyboardType="email-address"
autoComplete="email"
/>
The app uses NativeWind (Tailwind CSS for React Native):
- No custom StyleSheets needed
- Consistent spacing and colors
- Easy to customize with Tailwind classes
Update branding in:
constants/Config.ts
- App configurationconstants/Colors.ts
- Theme colorsapp.json
- App metadata
Configure in Clerk dashboard:
- Enable/disable OAuth providers
- Customize email templates
- Set up custom domains
- Configure session settings
# Development
npm start # Start Expo development server
npm run ios # Run on iOS simulator
npm run android # Run on Android emulator
npm run web # Run in web browser
# Code Quality
npm run lint # ESLint check
npm run type-check # TypeScript check
npm test # Run tests (if configured)
# Build
npm run build # Build for production
This starter follows security best practices:
- β No hardcoded secrets - Environment variables only
- β Secure token storage - Using expo-secure-store
- β Input validation - Client + server-side validation
- β Error handling - No sensitive data in error messages
- β OAuth security - Proper redirect URI handling
- β Type safety - Prevents runtime errors
Update for production:
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_your-production-key
Configure production URLs in Clerk:
- iOS:
your-app-scheme://oauth-callback
- Android:
your-app-scheme://oauth-callback
- Web:
https://your-domain.com/oauth-callback
- Test all OAuth flows on device
- Verify email deliverability
- Test password reset flows
- Ensure accessibility compliance
This is a starter template, but contributions are welcome:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - feel free to use this starter for any project.
- Clerk Documentation: https://clerk.com/docs
- Expo Documentation: https://docs.expo.dev
- NativeWind Documentation: https://www.nativewind.dev
Built with β€οΈ by Zoldytech
This starter saves you weeks of development time by providing a complete, production-ready authentication system with proper TypeScript integration and modern UI/UX patterns.