Project structure
Layer architecture
Screens
Feature-level views. Each screen is a self-contained folder under
src/screens/. Screens consume components, call API hooks, and read from Zustand stores.Components
Three tiers: core primitives (
Box, Text, Button, Input), common composites (BottomSheetModal, ScreenWrapper), and ScreenComp for screen-specific parts.Services
The
api-config/ folder holds the Axios instance. The api-hooks/ folder exposes TanStack Query wrappers (useGetMethod, usePostMethod, etc.) that all data-fetching flows use.Store
Zustand manages client state (
useAuthStore, useWallet). AsyncStorage (via storage.js) persists the auth token and FCM token between sessions.Utils
Pure helper functions (
formatTransactionDate, truncateText, capitalizeText, etc.), route name enums, and dimension scaling utilities.Themes
Centralised color palette (
colors.js, pallete) and screen transition options consumed by the navigators.Module resolution alias
All imports insidesrc/ use the ~ alias instead of relative paths. This is configured in both the Babel transform and TypeScript compiler.
../../services/api-hooks/useGetMethod, any file can write:
Key dependencies
| Package | Version | Role |
|---|---|---|
react-native | 0.73.6 | Core framework |
@react-navigation/native | ^6.1.16 | Navigation container |
@react-navigation/native-stack | ^6.9.25 | Native stack navigator |
@react-navigation/bottom-tabs | ^6.5.20 | Bottom tab navigator |
@tanstack/react-query | ^5.28.4 | Server state and caching |
axios | ^1.6.8 | HTTP client |
zustand | ^4.5.2 | Client state management |
react-hook-form | ^7.51.1 | Form state |
zod | ^3.22.4 | Schema validation |
@react-native-async-storage/async-storage | ^1.22.3 | Persistent key-value store |
@react-native-firebase/messaging | ^19.1.2 | FCM push notifications |
@notifee/react-native | ^7.8.2 | Local notification display |
@react-native-community/netinfo | ^11.3.1 | Network connectivity detection |
react-native-toast-message | ^2.2.0 | In-app toast notifications |
react-native-image-picker | ^7.1.2 | Camera and gallery access |
react-native-document-picker | ^9.1.1 | File picker |
react-native-blob-util | ^0.19.9 | Binary file operations |
react-native-pdf | ^6.7.5 | PDF rendering |
react-native-qrcode-svg | ^6.3.0 | QR code generation |
react-native-camera-kit | ^13.0.0 | Camera scanning |
react-native-geolocation-service | ^5.3.1 | Location services |
react-native-svg | ^15.1.0 | SVG rendering |
moment | ^2.30.1 | Date formatting |
babel-plugin-module-resolver | ^5.0.0 | ~ alias resolution |
Component hierarchy
Core components
These are thin, typed wrappers over React Native primitives. They accept style props directly and form the base of every screen layout.| Component | File | Role |
|---|---|---|
Box | core/Box.tsx | Generic View wrapper |
Text | core/Text.tsx | Typed text with preset styles |
HStack | core/HStack.tsx | Horizontal flex container |
VStack | core/VStack.tsx | Vertical flex container |
Stack | core/Stack.tsx | Flex stack |
Center | core/Center.tsx | Centered flex container |
FlexCenter | core/FlexCenter.tsx | Full-flex centred container |
Button | core/Button.tsx | Primary action button |
OutlineButton | core/OutlineButton.tsx | Secondary outlined button |
Input | core/Input.tsx | Text input |
OTPInput | core/OTPInput.tsx | PIN / OTP entry |
Image | core/Image.tsx | Image with fallback |
Flatlist | core/Flatlist.tsx | Typed FlatList |
ScrollView | core/ScrollView.tsx | Typed ScrollView |
Pressable | core/Pressable.tsx | Touchable area |
Divider | core/Divider.tsx | Horizontal rule |
DashDivider | core/DashDivider.tsx | Dashed divider |
Loader | core/Loader.jsx | Full-screen loading indicator |
CountryPicker | core/CountryPicker.jsx | Country selection |
PhoneInput | core/PhoneInput.jsx | Phone number input with flag |
Common components
| Component | File | Role |
|---|---|---|
BottomSheetModal | common/BottomSheetModal.jsx | Reusable bottom sheet |
ControlInput | common/ControlInput.jsx | React Hook Form–controlled input |
ScreenWrapper | common/ScreenWrapper.tsx | Safe-area aware screen container |
KeyBoardAvoidWrapper | common/KeyBoardAvoidWrapper.js | Keyboard-aware scroll wrapper |
HtmlRender | common/HtmlRender.jsx | Inline HTML renderer |
NumberPicker | common/NumberPicker.jsx | Numeric stepper |
Build targets
- Android
- iOS
release-build script:- Bundles JS with Metro
- Copies the bundle to
android/app/src/main/assets/ - Runs
./gradlew assembleRelease
TypeScript configuration
The project extends@react-native/typescript-config/tsconfig.json and adds the ~ path alias. TypeScript is used for all new files; legacy files use .jsx.
The project runs React Native 0.73 with the New Architecture disabled. Node.js 18 or later is required (
"engines": { "node": ">=18" }).