A production-ready React Native boilerplate with authentication, navigation, state management, and modern UI components pre-configured. This boilerplate provides a solid foundation for building scalable React Native applications with best practices and commonly needed features already implemented.
This boilerplate saves weeks of development time by providing:
- Pre-built Authentication Flow: Skip the tedious auth setup with ready-to-use screens
- Production-Ready Architecture: Scalable folder structure following best practices
- Modern State Management: Redux Toolkit setup with persistence out of the box
- Type Safety: Full TypeScript configuration with strict type checking
- Performance Optimized: FlashList, Reanimated, and MMKV for blazing fast performance
- Developer Experience: ESLint, Prettier, and Husky pre-configured
- Cross-Platform Ready: Tested on both iOS and Android devices
- Authentication Flow: Ready-to-use SignIn/SignUp screens with form validation
- Navigation: Tab navigation with nested stack navigators using React Navigation
- State Management: Redux Toolkit with Redux Persist for offline storage
- Internationalization: i18next integration for multi-language support
- Storage: MMKV for high-performance local storage
- UI Components:
- Reusable templates (ListTemplate, HeaderTemplate)
- Theme support with light/dark mode
- Keyboard-aware scroll views
- High-performance lists with FlashList
- Developer Experience:
- TypeScript configured
- ESLint and Prettier setup
- Husky git hooks for code quality
- Import sorting automation
- React Native 0.81.4
- React Navigation v7
- Redux Toolkit & Redux Persist
- React Native Reanimated v4
- React Native Skia for graphics
- MMKV for storage
- i18next for internationalization
- TypeScript
- SignIn Screen: Email/password authentication with validation
- SignUp Screen: User registration with form validation
- Tab Screens (4): Example screens demonstrating different UI patterns
- Tab1: Basic content screen
- Tab2: List with pull-to-refresh using FlashList
- Tab3: Form inputs and keyboard handling
- Tab4: Settings and preferences
- Atoms: Button, Text, TextInput, Icon, Spacer
- Molecules: Card, Header, ListItem, LoadingIndicator
- Templates: HeaderTemplate, ListTemplate for consistent layouts
- Navigation: Tab navigation with nested stacks
- State Management: Redux slices for auth, user, and app state
- Storage: MMKV for encrypted local storage
- Animations: Reanimated for smooth 60fps animations
- Graphics: Skia for advanced graphics rendering
- Forms: Keyboard-aware scroll view for better UX
- Lists: FlashList for high-performance lists
src/
βββ components/ # Reusable UI components
β βββ atoms/ # Basic building blocks
β βββ molecules/ # Composite components
β βββ templates/ # Page templates
βββ config/ # App configuration
β βββ api.config.ts # API endpoints
β βββ app.config.ts # App settings
βββ constants/ # App constants
βββ hooks/ # Custom React hooks
β βββ useTheme.ts # Theme hook
β βββ useStorage.ts # Storage hook
βββ i18n/ # Internationalization
β βββ locales/ # Translation files
βββ navigation/ # Navigation configuration
β βββ navigators/ # Stack, Tab, Auth navigators
β βββ types.ts # Navigation types
βββ screens/ # Screen components
β βββ auth/ # Authentication screens
β βββ main/ # Main app screens
βββ services/ # API and external services
β βββ api/ # API client setup
βββ store/ # Redux store configuration
β βββ slices/ # Redux slices
β βββ index.ts # Store configuration
βββ themes/ # Theme definitions
β βββ colors.ts # Color palette
β βββ fonts.ts # Typography
β βββ spacing.ts # Spacing system
βββ types/ # TypeScript type definitions
βββ utils/ # Utility functions
βββ storage.ts # Storage utilities
βββ validation.ts # Form validation
- Clone and rename your project:
git clone <repository-url> MyAwesomeApp
cd MyAwesomeApp- Update project name:
- Change
nameinpackage.json - Update app name in
app.json - For iOS: Update display name in
ios/BaseApp/Info.plist - For Android: Update app name in
android/app/src/main/res/values/strings.xml
- Install and run:
npm install
cd ios && pod install && cd ..
npm run ios # or npm run android- Node.js 18+ and npm/yarn
- Xcode 15+ (for iOS development)
- Android Studio (for Android development)
- CocoaPods (for iOS dependencies)
- Clone the repository:
git clone <repository-url>
cd BaseApp- Install dependencies:
npm install
# or
yarn install- Install iOS dependencies (macOS only):
cd ios
bundle install
bundle exec pod install
cd ..npm start
# or
yarn startnpm run ios
# or
yarn iosnpm run android
# or
yarn androidnpm run start # Start Metro bundler
npm run ios # Run on iOS simulator
npm run android # Run on Android emulator
npm run lint # Run ESLint
npm run format # Format code with Prettier
npm run test # Run tests
npm run sort-imports # Sort imports in TypeScript files- Create your screen component in
src/screens/ - Add navigation types in
src/navigation/types.ts - Register screen in appropriate navigator
The app uses Redux Toolkit with the following structure:
- Store configuration in
src/store/ - Create slices for different features
- Use Redux Persist for data persistence
- Theme definitions in
src/themes/ - Light and dark mode support
- Access theme via
useTheme()hook
- Translation files in
src/i18n/locales/ - Use
useTranslation()hook for translations - Language switching support built-in
The project follows Atomic Design principles:
- Atoms: Basic building blocks (Button, Text, Input)
- Molecules: Composite components (Card, ListItem)
- Templates: Page layouts (ListTemplate, HeaderTemplate)
- Screens: Complete application screens
The boilerplate includes helpful scripts in the scripts/ directory:
- sort-imports.cjs: Automatically organizes imports
- init.sh: Initial setup script for new projects
The project uses Husky to run checks before commits:
- Linting with ESLint
- Code formatting with Prettier
- Import sorting
- iOS Build Fails: Make sure you've run
pod installin theiosdirectory - Metro Bundler Issues: Clear cache with
npx react-native start --reset-cache - Android Build Issues: Clean build with
cd android && ./gradlew clean - Module Resolution: Delete
node_modulesand reinstall
- Use Fast Refresh for instant updates (enabled by default)
- Press
Rtwice on Android orCmd+Ron iOS simulator to reload - Use React Native Debugger for advanced debugging
For more detailed troubleshooting, see the React Native Troubleshooting page.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Edit src/themes/colors.ts to customize your app's color palette:
export const colors = {
primary: '#007AFF',
secondary: '#5856D6',
// Add your custom colors
};- Create screen in
src/screens/your-feature/ - Add to navigation in
src/navigation/navigators/ - Update types in
src/navigation/types.ts
Update src/config/api.config.ts:
export const API_CONFIG = {
BASE_URL: 'https://your-api.com',
TIMEOUT: 10000,
};- Create slice in
src/store/slices/ - Add to root reducer in
src/store/index.ts - Use with
useSelectoranduseDispatchhooks
- Use
FlashListinstead ofFlatListfor large lists - Implement lazy loading for heavy screens
- Use
React.memofor expensive components - Enable Hermes for Android (already configured)
- Use MMKV for storage instead of AsyncStorage
- React Native Documentation
- React Navigation
- Redux Toolkit
- React Native MMKV
- FlashList
- React Native Reanimated
- React Native Skia
This boilerplate is actively maintained. To update to the latest versions:
npm update
cd ios && pod update && cd ..For issues and feature requests, please use the GitHub issue tracker.
Built with β€οΈ using React Native and the amazing open-source community.