Skip to content

Repository files navigation

React Native Boilerplate

🚀 A production-ready React Native boilerplate with TypeScript, Redux Toolkit, React Navigation, and enterprise-level architecture.

✨ Features

  • React Native 0.73 with TypeScript
  • 🎯 Feature-based architecture for scalability
  • 🔐 Authentication with JWT and biometric support
  • 📱 Navigation with React Navigation 6
  • 🗄️ State Management with Redux Toolkit
  • 🌐 API Integration with Axios and React Query
  • 🎨 Theming support (light/dark mode)
  • 🧪 Testing with Jest and React Native Testing Library
  • 📊 Analytics integration ready
  • 🔒 Security best practices

📁 Project Structure

src/
├── app/                  # App configuration
│   ├── index.tsx        # Root component
│   └── navigation/      # Navigation setup
├── features/            # Feature modules 
│   └── auth/           # Authentication feature
├── shared/             # Shared components & utilities
├── core/               # Core infrastructure
└── assets/             # Images, fonts, animations

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • React Native development environment set up
  • iOS: Xcode 14+ and CocoaPods
  • Android: Android Studio and JDK 11+

Installation

# Clone the repository
git clone <your-repo>
cd react-native-boilerplate

# Install dependencies
npm install

# iOS: Install pods
cd ios && pod install && cd ..

# Copy environment file
cp .env.example .env.development

# Run on iOS
npm run ios

# Run on Android
npm run android

📚 Documentation

🛠️ Available Scripts

npm run ios              # Run on iOS simulator
npm run android          # Run on Android emulator
npm test                 # Run unit tests
npm run test:coverage    # Run tests with coverage
npm run lint             # Lint code
npm run format           # Format code with Prettier
npm run type-check       # TypeScript type checking

🏗️ Architecture

This boilerplate follows Clean Architecture principles with:

  • Presentation Layer: UI components and screens
  • Domain Layer: Business logic and use cases
  • Data Layer: API calls and data management

Key Patterns

  • Feature-based folder structure
  • Repository pattern for data access
  • Custom hooks for business logic
  • Service layer for API calls
  • Redux slices for feature state

📦 Tech Stack

Category Technology
Framework React Native 0.73
Language TypeScript 5.3
State Redux Toolkit
Navigation React Navigation 6
API Axios + React Query
Forms React Hook Form + Zod
Testing Jest + RNTL
E2E Detox

🔐 Security

  • Secure token storage with Keychain/Keystore
  • Biometric authentication support
  • Certificate pinning ready
  • Code obfuscation with ProGuard/Hermes

📊 Performance

  • Hermes engine enabled
  • Lazy loading and code splitting
  • Image optimization
  • Memoization strategies
  • FlatList optimizations

🧪 Testing

# Unit tests
npm test

# Watch mode
npm run test:watch

# Coverage
npm run test:coverage

# E2E tests
npm run test:e2e:ios
npm run test:e2e:android

🚢 Deployment

iOS

  1. Configure signing in Xcode
  2. Build: npm run build:ios
  3. Upload to App Store Connect

Android

  1. Generate keystore
  2. Build: npm run build:android
  3. Upload to Google Play Console

🤝 Contributing

See CONTRIBUTING.md for guidelines.

📄 License

MIT License - see LICENSE file.

👥 Maintainers

Smashtechhub Team


Built with ❤️ for enterprise applications

About

react-native-boilerplate

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages