How kimei-global-co/react-native-boilerplate works
Project type and purpose
• This is a React Native boilerplate template (mobile full-stack starter kit) designed to accelerate cross-platform iOS/Android development.
• It uses TypeScript, Expo, Redux Toolkit, React Navigation, Ky for API, Jest for testing, and code-quality tools (ESLint, Prettier, Husky).
File structure
• Top-level:
• template/ – the actual boilerplate code
• template/src/
– App.tsx (entry point)
– assets/ (images, fonts)
• README-recommended src layout:
• api/ – HTTP clients, endpoints
• components/ – reusable UI pieces
• navigation/ – React Navigation stacks/tabs
• screens/ – screen containers
• store/ – Redux slices, store config
• theme/ – theming, styling utilities
• utils/ – helper functions
Main components and their relationships
a. Mobile App (React Native):
– Entry point: App.tsx
– UI layer: Screens & Components
– Navigation layer: React Navigation (Stack, Tab)
– Styling/Theming: theme module
b. State Management:
– Redux Toolkit store & slices
– UI dispatches actions → store updates → UI selects state
c. API Service:
– Ky‐based HTTP client
– Services under api/ call external REST endpoints
– API calls triggered by Redux async thunks or direct service calls
d. Authentication Flow:
– Login Screen → dispatch auth action → API service → store token → navigation guard
e. Assets:
– Images, fonts loaded via asset module
f. Build & Tooling:
– Metro bundler (dev server)
– Bun (package manager and scripts)
– Expo CLI (for bundling, deployments)
g. CI/CD & Code Quality:
– GitHub Actions (pipeline for lint, test, build)
– Husky + commitlint + ESLint + Prettier (pre-commit & commit-msg hooks)
External services
– Expo servers (over-the-air updates)
– Third-party REST APIs (your backend)
– Apple/Google build services
Architectural patterns & design principles
– Separation of concerns: UI / Navigation / State / API / Theme / Utils
– Unidirectional data flow: React → Actions → Reducers → State → React
– Modular folder structure for scalability
– CI/CD “shift left” for quality