A production-ready React Native Expo starter template with authentication flow, navigation, state management, and modern development tools pre-configured.
- π Expo SDK 54 - Latest Expo framework with managed workflow
- π± Expo Router - File-based routing with native navigation
- π¨ Unistyles v3 - Universal styling system with theme support
- ποΈ Zustand - Lightweight state management
- π Axios - HTTP client with interceptors pre-configured
- π Expo Secure Store - Secure storage for sensitive data
- π Dark/Light Theme - Built-in theme switching with context
- β Pre-built authentication flow
- π Protected routes with auth guards
- π Deep linking support
- π― Type-safe navigation with TypeScript
- π ESLint & Prettier - Code quality and formatting
- π TypeScript - Full type safety
- π¨ Custom Fonts - Pre-configured font loading
- π§© VS Code Snippets - Speed up development
- π Toast Notifications - User feedback system
- β¨οΈ Keyboard Controller - Enhanced keyboard handling
- π¬ Reanimated - Smooth animations
- ποΈ EAS Build - Production-ready build profiles
- π§ Development Client - Custom dev builds
- π¦ Prebuild - Native project generation
- Node.js (v18 or newer)
- npm or yarn
- Expo CLI
- For iOS development: macOS with Xcode
- For Android development: Android Studio
# Clone the repository
git clone <repository-url>
cd react-native-managed-template
# Or use as template in GitHubnpm install
# or
yarn installnpm start
# or
expo start# Run on iOS simulator
npm run ios
# Run on Android emulator
npm run android
# Or scan QR code with Expo Go appreact-native-managed-template/
βββ app/ # Expo Router pages
β βββ _layout.tsx # Root layout
β βββ sign-in.tsx # Sign in screen
β βββ (protected)/ # Protected routes group
β βββ _layout.tsx
β βββ index.tsx # Home screen
β βββ profile.tsx # Profile screen
βββ src/
β βββ components/ # Reusable components
β β βββ styled/ # Styled UI components
β β βββ Profile/ # Feature-specific components
β βββ contexts/ # React contexts
β β βββ auth.context.tsx # Authentication context
β β βββ theme.context.tsx # Theme management
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utilities and configs
β β βββ axios.ts # Axios instance & interceptors
β β βββ secure-store.ts # Secure storage wrapper
β β βββ date-time.ts # Date utilities
β βββ store/ # Zustand stores
β βββ unistyles/ # Theme tokens & styles
β βββ constants/ # App constants
βββ assets/ # Static assets
β βββ fonts/
β βββ icons/
β βββ images/
βββ android/ # Android native code
βββ ios/ # iOS native code
βββ app.config.ts # Expo app configuration
The template includes pre-built VS Code snippets to accelerate development. These snippets generate boilerplate code with best practices baked in.
Type rnbc to generate a new React Native component with:
- Proper imports (StyledText, React, View)
- Unistyles setup with theme tokens
- Component structure with default styling
// Generated code structure:
import { StyledText } from '@/components/styled/StyledText';
import React from 'react';
import { View } from 'react-native';
import { StyleSheet } from 'react-native-unistyles';
const MyComponent = () => {
return (
<View style={styles.container}>
<StyledText style={styles.text}>MyComponent</StyledText>
</View>
);
};
const styles = StyleSheet.create(({ spacings }) => ({
container: {
padding: spacings.sm,
},
text: {
textDecorationLine: 'underline'
},
}));
export default MyComponent;Type rnbs to generate a new screen with:
- ScrollView with keyboard handling
- Expo Router integration
- Safe area insets
- Responsive padding using theme tokens
// Generated code structure:
import { StyledText } from '@/components/styled/StyledText';
import { useRouter } from 'expo-router';
import React from 'react';
import { ScrollView } from 'react-native';
import { StyleSheet } from 'react-native-unistyles';
const MyScreen = () => {
const router = useRouter();
return (
<ScrollView
keyboardShouldPersistTaps='handled'
showsVerticalScrollIndicator={false}
contentContainerStyle={styles.contentContainer}>
<StyledText variant='title'>MyScreen</StyledText>
</ScrollView>
);
};
const styles = StyleSheet.create(({ spacings }, rt) => ({
contentContainer: {
flexGrow: 1,
paddingHorizontal: spacings.base,
paddingBottom: spacings.xxxl,
paddingTop: rt.insets.top + spacings.base,
},
}));
export default MyScreen;- Create a new
.tsxfile in your project - Type the snippet prefix (
rnbcorrnbs) - Press
TaborEnterto expand - The component/screen name will be auto-selected - just type your desired name
- Press
Tabto move to the next placeholder (if any)
These snippets ensure consistency across your codebase and save time on repetitive boilerplate code.
The template includes a complete authentication flow:
- Sign In Screen - Entry point for unauthenticated users
- Auth Context - Manages authentication state
- Protected Routes - Automatically guards routes requiring authentication
- Secure Storage - Persists tokens securely
# Development
npm start # Start Expo development server
npm run android # Run on Android
npm run ios # Run on iOS
# Code Quality
npm run lint # Run ESLint with auto-fix
# Build
npm run prebuild # Generate native projects
npm run build:dev # Build development client locally
npm run build:prev # Build preview build locally
npm run build:prod # Build production build locally- Expo - Framework and platform
- Expo Router - File-based routing
- React Native - Mobile framework
- TypeScript - Type safety
- Zustand - State management
- Unistyles - Styling solution
- Axios - HTTP client
- React Native Reanimated - Animations
- React Native Toast Message - Notifications
Update app.config.ts with your app details:
export default {
name: 'Your App Name',
slug: 'your-app-slug',
// ... other configurations
};Create a .env file for environment-specific variables (not included in repo):
API_BASE_URL=https://your-api.comCustomize navigation appearance in src/hooks/useNavigationTheme.ts
-
Configure EAS
eas build:configure
-
Build for Android/iOS
eas build --platform android eas build --platform ios
-
Submit to Stores
eas submit --platform android eas submit --platform ios
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Expo team for the amazing framework
- React Native community for the excellent libraries
- All testers who help improve this template
If you have any questions or run into issues, please open an issue on GitHub.
Made with β€οΈ for the React Native community