Genius Dynamics Logo
Mobile
156
38
Updated 2y ago

React Native Starter

A feature-rich React Native starter kit with navigation, state management, offline support, and deployment scripts

React Native
TypeScript
Redux Toolkit
React Navigation
AsyncStorage

React Native Starter Kit

A comprehensive React Native starter template that accelerates mobile app development with modern tools and best practices.

๐Ÿ“ฑ Features

  • TypeScript Support: Full TypeScript integration for better development experience
  • Navigation: React Navigation v6 with stack, tab, and drawer navigators
  • State Management: Redux Toolkit for predictable state management
  • Offline Support: AsyncStorage integration with offline-first architecture
  • API Integration: Axios setup with request/response interceptors
  • Authentication: JWT-based authentication flow
  • Push Notifications: Firebase Cloud Messaging integration
  • Code Quality: ESLint, Prettier, and Husky for code quality
  • Testing: Jest and React Native Testing Library setup

๐Ÿ—๏ธ What's Included

Core Architecture

  • Clean Architecture principles
  • Feature-based folder structure
  • Dependency injection
  • Environment configuration
  • Error boundaries

UI Components

  • Custom component library
  • Theme system with dark mode support
  • Responsive design utilities
  • Icon system integration
  • Form components with validation

Development Tools

  • Hot reloading
  • Debug menu
  • Performance monitoring
  • Bundle analyzer
  • Development scripts

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 16+
  • npm or yarn
  • React Native development environment
  • iOS Simulator or Android Emulator

Installation

``bash

Clone the repository

git clone https://github.com/geniusdynamics/react-native-starter.git cd react-native-starter

Install dependencies

npm install

For iOS

cd ios && pod install && cd ..

Start Metro bundler

npm start

Run on iOS

npm run ios

Run on Android

npm run android
`

๐Ÿ“‚ Project Structure

` react-native-starter/ โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ components/ โ”‚ โ”‚ โ”œโ”€โ”€ common/ โ”‚ โ”‚ โ”œโ”€โ”€ forms/ โ”‚ โ”‚ โ””โ”€โ”€ ui/ โ”‚ โ”œโ”€โ”€ screens/ โ”‚ โ”‚ โ”œโ”€โ”€ auth/ โ”‚ โ”‚ โ”œโ”€โ”€ home/ โ”‚ โ”‚ โ””โ”€โ”€ profile/ โ”‚ โ”œโ”€โ”€ navigation/ โ”‚ โ”œโ”€โ”€ store/ โ”‚ โ”‚ โ”œโ”€โ”€ slices/ โ”‚ โ”‚ โ””โ”€โ”€ index.ts โ”‚ โ”œโ”€โ”€ services/ โ”‚ โ”‚ โ”œโ”€โ”€ api/ โ”‚ โ”‚ โ””โ”€โ”€ storage/ โ”‚ โ”œโ”€โ”€ utils/ โ”‚ โ”œโ”€โ”€ hooks/ โ”‚ โ”œโ”€โ”€ constants/ โ”‚ โ””โ”€โ”€ types/ โ”œโ”€โ”€ android/ โ”œโ”€โ”€ ios/ โ”œโ”€โ”€ __tests__/ โ”œโ”€โ”€ e2e/ โ”œโ”€โ”€ .env.example โ”œโ”€โ”€ package.json โ”œโ”€โ”€ app.json โ””โ”€โ”€ README.md `

๐Ÿ”ง Key Configurations

Environment Setup

`javascript // .env API_BASE_URL=https://api.example.com FIREBASE_API_KEY=your-firebase-key ONESIGNAL_APP_ID=your-onesignal-id `

Theme Configuration

`typescript // src/constants/theme.ts export const theme = { colors: { primary: '#3b82f6', secondary: '#64748b', success: '#10b981', error: '#ef4444', background: '#ffffff', surface: '#f8fafc', }, spacing: { xs: 4, sm: 8, md: 16, lg: 24, xl: 32, }, typography: { h1: { fontSize: 32, fontWeight: 'bold' }, h2: { fontSize: 24, fontWeight: 'bold' }, body: { fontSize: 16, fontWeight: 'normal' }, }, }; `

๐Ÿ“ฑ Core Features

Navigation

`typescript // Stack Navigation import { createStackNavigator } from '@react-navigation/stack';

const Stack = createStackNavigator();

function AppNavigator() { return ( ); } `

State Management

`typescript // Redux Toolkit Slice import { createSlice, PayloadAction } from '@reduxjs/toolkit';

const authSlice = createSlice({ name: 'auth', initialState: { user: null, token: null }, reducers: { setUser: (state, action: PayloadAction) => { state.user = action.payload; }, setToken: (state, action: PayloadAction) => { state.token = action.payload; }, }, });

export const { setUser, setToken } = authSlice.actions; `

API Integration

`typescript // API Service import axios from 'axios';

const api = axios.create({ baseURL: process.env.API_BASE_URL, timeout: 10000, });

// Request interceptor api.interceptors.request.use( (config) => { const token = store.getState().auth.token; if (token) { config.headers.Authorization = Bearer ${token}; } return config; }, (error) => Promise.reject(error) );

// Response interceptor api.interceptors.response.use( (response) => response, (error) => { if (error.response?.status === 401) { // Handle token refresh or logout } return Promise.reject(error); } ); `

๐ŸŽจ UI Components

Button Component

`typescript // src/components/ui/Button.tsx import React from 'react'; import { TouchableOpacity, Text, StyleSheet } from 'react-native';

interface ButtonProps { title: string; onPress: () => void; variant?: 'primary' | 'secondary' | 'outline'; disabled?: boolean; }

export const Button: React.FC = ({ title, onPress, variant = 'primary', disabled = false, }) => { return ( ${variant}Text]]}>{title} ); }; `

Form Components

`typescript // src/components/forms/Input.tsx import React from 'react'; import { TextInput, View, Text, StyleSheet } from 'react-native';

interface InputProps { label: string; value: string; onChangeText: (text: string) => void; error?: string; placeholder?: string; secureTextEntry?: boolean; }

export const Input: React.FC = ({ label, value, onChangeText, error, placeholder, secureTextEntry = false, }) => { return ( {label} {error && {error}} ); }; `

๐Ÿงช Testing

`bash

Run unit tests

npm test

Run tests in watch mode

npm run test:watch

Run tests with coverage

npm run test:coverage

Run E2E tests

npm run e2e
`

๐Ÿš€ Deployment

iOS Deployment

`bash

Build for TestFlight

npm run build:ios

Build for App Store

npm run build:ios:release
`

Android Deployment

`bash

Build APK

npm run build:android

Build AAB (for Google Play)

npm run build:android:bundle
`

๐Ÿ“Š Performance Optimization

  • Code Splitting: Automatic code splitting for better performance
  • Image Optimization: Automatic image compression and optimization
  • Bundle Analysis: Bundle analyzer to identify large dependencies
  • Memory Management: Proper cleanup and memory management
  • Caching: Intelligent caching strategies for better UX

๐Ÿ”’ Security Features

  • Certificate Pinning: SSL certificate pinning for API calls
  • Biometric Authentication: Fingerprint/Face ID support
  • Secure Storage: Encrypted storage for sensitive data
  • Jailbreak Detection: Basic jailbreak/root detection
  • Code Obfuscation: JavaScript code obfuscation for release builds

๐Ÿ“ˆ Analytics & Monitoring

  • Firebase Analytics: User behavior tracking
  • Crash Reporting: Automatic crash reporting and analysis
  • Performance Monitoring: App performance metrics
  • User Feedback: In-app feedback collection

๐Ÿค Contributing

We welcome contributions! Please follow these steps:

  • Fork the repository
  • Create a feature branch (git checkout -b feature/amazing-feature`)
  • Make your changes
  • Add tests for new features
  • Ensure all tests pass
  • Update documentation if needed
  • Submit a pull request
  • ๐Ÿ“„ License

    This project is licensed under the MIT License - see the LICENSE file for details.

    ๐Ÿ™ Acknowledgments

    • React Native team for the amazing framework
    • Redux team for state management
    • All contributors and the React Native community

    ๐Ÿ“ž Support

    ---

    _Built with ๐Ÿ“ฑ by Genius Dynamics_

    Tags:
    React Native
    TypeScript
    Redux Toolkit
    React Navigation
    AsyncStorage

    Contribute to This Project

    Help us improve this project and make it even better. Your contributions are welcome!

    Genius Dynamics Logo

    Enabling Growth by improving efficiency with our innovative technology solutions.

    Get In Touch
    Stay Updated

    Subscribe to our newsletter for the latest insights on technology and cost reduction strategies.

    ISO 27001 Certified
    65+ Enterprise Clients
    Kenya-Based
    24/7 Support

    ยฉ 2026 GENIUS DYNAMICS LTD. All Rights Reserved.

    Efficiency and Growth