How saigontechnology/rn-base-project-expo works
Project type and purpose
• This is a full-featured Expo React Native mobile-app template.
• Purpose: Provide a boilerplate for building cross-platform iOS/Android apps with built-in state management (Redux Toolkit + Saga), networking (axios), persistence (AsyncStorage), localization (i18n-js), theming, navigation and CI/CD (Expo, Fastlane, GitHub/Azure/Bitbucket pipelines).
File structure
• Top-level folders:
• app/ (Next-style layout & routes for Expo Router)
• src/ (core React Native code: assets, components, screens, services, stores, themes, utilities)
• scripts/ (build, deploy, env tasks)
• docs/, .github/, pipelines (CI/CD configs)
• Key patterns:
• “app/” for entry-point and routing (Expo Router).
• “src/components” for reusable UI.
• “src/screens” for feature screens grouped by domain (auth, home).
• “src/services” for API/networking layer.
• “src/stores” for Redux Toolkit slices, sagas, selectors.
• Theming under “src/themes”.
• Utilities & custom hooks.
README for insights
• Tech stack: Expo SDK, React Native, Redux Toolkit, Redux Saga, axios, Async-Storage, i18n-js, Jest, Husky
• CI/CD: fastlane, Expo builds, GitHub/Azure/Bitbucket pipelines
• Features: multi-env, in-app debug menu, debug scripts
Main components & interactions
a. Components
• Mobile Device (Expo Go / custom client)
• Expo Runtime & Router
• UI Layer
• Screens (AuthFlow, HomeFlow)
• Reusable Components
• Theming & Localization
• State Management
• Redux Store (Toolkit slices)
• Redux Saga (side-effects)
• Services Layer
• HTTP Client (axios)
• API modules
• Networking wrapper
• AsyncStorage persistence
• Configuration & Environment
• .env variables
• app.config.ts (Expo config)
• CI/CD & Deployment
• Scripts (build-app.sh, upload-app.sh)
• Fastlane
• GitHub/Azure/Bitbucket pipelines
b. Relationships & Data Flows
1. User taps UI → Action dispatched to Redux Store
2. Saga intercepts action → calls Services (axios → remote API)
3. Service returns data → Saga dispatches success/failure actions
4. Reducers update Store → UI subscribed via selectors re-renders
5. Persistence: certain state written/read from AsyncStorage
6. Navigation: Expo Router transitions between Screens
8. CI/CD pipelines trigger scripts → build via Expo / fastlane → deploy to stores
c. Architectural patterns & principles
• Modular folder structure by concern (UI, state, services, assets)
• Unidirectional data flow (Redux + Saga)
• Separation of concerns: UI vs business logic vs networking vs persistence
• Configuration-driven (multiple envs via .env & eas.json)
d. Key technologies/frameworks
• Expo SDK & Router
• React Native & React
• Redux Toolkit & Redux Saga
• axios & AsyncStorage
• i18n-js
• Fastlane, GitHub Actions, Azure Pipelines, Bitbucket Pipelines
Elements
• UI → Store → Saga → API → Saga → Store → UI
• Store ↔ AsyncStorage (persistence)
• CI/CD pipeline → build scripts → Expo / Fastlane → App Store / Play Store
• Blue rectangles for UI components
• Green circles for state (Store, Sagas)
• Purple hexagons for CI/CD elements
Final advice
• Cross-cutting concerns (themes, localization, env config).
• Both runtime data flows (user actions, API calls) and deployment flows (build → deploy).