create-du-app 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (455) hide show
  1. package/README.md +15 -9
  2. package/package.json +6 -5
  3. package/src/generate.js +15 -2
  4. package/src/index.js +15 -9
  5. package/src/prompts.js +1 -1
  6. package/templates/mobile/expo/.env.example +5 -0
  7. package/templates/mobile/expo/.eslintrc.js +7 -0
  8. package/templates/mobile/expo/.prettierrc.js +7 -0
  9. package/templates/mobile/expo/.svgrrc.js +9 -0
  10. package/templates/mobile/expo/README.md +70 -7
  11. package/templates/mobile/expo/_gitignore +20 -0
  12. package/templates/mobile/expo/_package.json +60 -1
  13. package/templates/mobile/expo/app.json +26 -0
  14. package/templates/mobile/expo/babel.config.js +21 -0
  15. package/templates/mobile/expo/index.js +7 -0
  16. package/templates/mobile/expo/metro.config.js +31 -0
  17. package/templates/mobile/expo/src/app/App.tsx +24 -0
  18. package/templates/mobile/expo/src/app/app-provider.tsx +40 -0
  19. package/templates/mobile/expo/src/app/config/translation.ts +30 -0
  20. package/templates/mobile/expo/src/app/index.ts +1 -0
  21. package/templates/mobile/expo/src/app/navigation/app-route-type.ts +27 -0
  22. package/templates/mobile/expo/src/app/navigation/bottom-tabs.tsx +34 -0
  23. package/templates/mobile/expo/src/app/navigation/index.tsx +14 -0
  24. package/templates/mobile/expo/src/app/stores/auth.store.ts +33 -0
  25. package/templates/mobile/expo/src/app/stores/common.store.ts +19 -0
  26. package/templates/mobile/expo/src/app/stores/index.ts +3 -0
  27. package/templates/mobile/expo/src/app/stores/loading.store.ts +22 -0
  28. package/templates/mobile/expo/src/assets/Images/empty-list.png +0 -0
  29. package/templates/mobile/expo/src/assets/Images/index.ts +5 -0
  30. package/templates/mobile/expo/src/assets/Images/screen-bg-gradian.png +0 -0
  31. package/templates/mobile/expo/src/assets/i18n/en.json +28 -0
  32. package/templates/mobile/expo/src/assets/i18n/fr.json +28 -0
  33. package/templates/mobile/expo/src/assets/lotties/index.ts +3 -0
  34. package/templates/mobile/expo/src/assets/lotties/loading.json +1 -0
  35. package/templates/mobile/expo/src/assets/svgs/arrow-left.svg +3 -0
  36. package/templates/mobile/expo/src/assets/svgs/arrow-right.svg +3 -0
  37. package/templates/mobile/expo/src/assets/svgs/calendar.svg +12 -0
  38. package/templates/mobile/expo/src/assets/svgs/check.svg +3 -0
  39. package/templates/mobile/expo/src/assets/svgs/close.svg +3 -0
  40. package/templates/mobile/expo/src/assets/svgs/eye-hide.svg +3 -0
  41. package/templates/mobile/expo/src/assets/svgs/eye.svg +4 -0
  42. package/templates/mobile/expo/src/assets/svgs/index.ts +29 -0
  43. package/templates/mobile/expo/src/assets/svgs/minus.svg +3 -0
  44. package/templates/mobile/expo/src/assets/svgs/plus.svg +3 -0
  45. package/templates/mobile/expo/src/assets/svgs/search.svg +3 -0
  46. package/templates/mobile/expo/src/assets/svgs/toast-error.svg +5 -0
  47. package/templates/mobile/expo/src/assets/svgs/toast-success.svg +4 -0
  48. package/templates/mobile/expo/src/core/api/endpoints.ts +8 -0
  49. package/templates/mobile/expo/src/core/api/example.api.ts +53 -0
  50. package/templates/mobile/expo/src/core/api/index.ts +4 -0
  51. package/templates/mobile/expo/src/core/components/common/index.ts +1 -0
  52. package/templates/mobile/expo/src/core/components/common/list-empty/index.ts +2 -0
  53. package/templates/mobile/expo/src/core/components/common/list-empty/list-empty.tsx +30 -0
  54. package/templates/mobile/expo/src/core/components/common/list-empty/list-empty.type.ts +5 -0
  55. package/templates/mobile/expo/src/core/components/forms/date-time-picker.modal.tsx +116 -0
  56. package/templates/mobile/expo/src/core/components/forms/hf-date-time.tsx +293 -0
  57. package/templates/mobile/expo/src/core/components/forms/hf-password-input.tsx +153 -0
  58. package/templates/mobile/expo/src/core/components/forms/hf-text-input.tsx +59 -0
  59. package/templates/mobile/expo/src/core/components/forms/hf-time-picker.tsx +116 -0
  60. package/templates/mobile/expo/src/core/components/forms/index.ts +4 -0
  61. package/templates/mobile/expo/src/core/components/index.ts +5 -0
  62. package/templates/mobile/expo/src/core/components/loading/index.ts +1 -0
  63. package/templates/mobile/expo/src/core/components/loading/loading-app/index.ts +1 -0
  64. package/templates/mobile/expo/src/core/components/loading/loading-app/loading-app.tsx +50 -0
  65. package/templates/mobile/expo/src/core/components/offline/index.ts +1 -0
  66. package/templates/mobile/expo/src/core/components/offline/offline-banner.tsx +186 -0
  67. package/templates/mobile/expo/src/core/components/screen/index.ts +1 -0
  68. package/templates/mobile/expo/src/core/components/screen/screen-container/index.ts +1 -0
  69. package/templates/mobile/expo/src/core/components/screen/screen-container/screen-container.tsx +248 -0
  70. package/templates/mobile/expo/src/core/components/splash/index.ts +1 -0
  71. package/templates/mobile/expo/src/core/components/splash/splash-overlay/index.ts +1 -0
  72. package/templates/mobile/expo/src/core/components/splash/splash-overlay/splash-overlay.tsx +93 -0
  73. package/templates/mobile/expo/src/core/components/ui/animated-list-item/animated-list-item.tsx +48 -0
  74. package/templates/mobile/expo/src/core/components/ui/animated-list-item/animated-list-item.type.ts +10 -0
  75. package/templates/mobile/expo/src/core/components/ui/animated-list-item/index.ts +2 -0
  76. package/templates/mobile/expo/src/core/components/ui/app-image/app-image.tsx +101 -0
  77. package/templates/mobile/expo/src/core/components/ui/app-image/app-image.type.ts +19 -0
  78. package/templates/mobile/expo/src/core/components/ui/app-image/index.ts +2 -0
  79. package/templates/mobile/expo/src/core/components/ui/asset-placeholder/asset-placeholder.tsx +76 -0
  80. package/templates/mobile/expo/src/core/components/ui/asset-placeholder/index.ts +1 -0
  81. package/templates/mobile/expo/src/core/components/ui/avatar-image/avatar-image.tsx +90 -0
  82. package/templates/mobile/expo/src/core/components/ui/avatar-image/index.ts +1 -0
  83. package/templates/mobile/expo/src/core/components/ui/bottom-sheet/bottom-sheet.tsx +145 -0
  84. package/templates/mobile/expo/src/core/components/ui/bottom-sheet/bottom-sheet.type.ts +10 -0
  85. package/templates/mobile/expo/src/core/components/ui/bottom-sheet/index.ts +2 -0
  86. package/templates/mobile/expo/src/core/components/ui/button/button.style.ts +146 -0
  87. package/templates/mobile/expo/src/core/components/ui/button/button.tsx +97 -0
  88. package/templates/mobile/expo/src/core/components/ui/button/button.type.ts +47 -0
  89. package/templates/mobile/expo/src/core/components/ui/button/index.ts +4 -0
  90. package/templates/mobile/expo/src/core/components/ui/checkbox/checkbox.tsx +127 -0
  91. package/templates/mobile/expo/src/core/components/ui/checkbox/checkbox.type.ts +24 -0
  92. package/templates/mobile/expo/src/core/components/ui/checkbox/index.ts +2 -0
  93. package/templates/mobile/expo/src/core/components/ui/collapsible-section/collapsible-section.tsx +141 -0
  94. package/templates/mobile/expo/src/core/components/ui/collapsible-section/collapsible-section.type.ts +10 -0
  95. package/templates/mobile/expo/src/core/components/ui/collapsible-section/index.ts +2 -0
  96. package/templates/mobile/expo/src/core/components/ui/components.registry.json +313 -0
  97. package/templates/mobile/expo/src/core/components/ui/field/field-frame.tsx +62 -0
  98. package/templates/mobile/expo/src/core/components/ui/field/field.shared.ts +31 -0
  99. package/templates/mobile/expo/src/core/components/ui/header/header.tsx +196 -0
  100. package/templates/mobile/expo/src/core/components/ui/header/header.type.ts +30 -0
  101. package/templates/mobile/expo/src/core/components/ui/header/index.ts +2 -0
  102. package/templates/mobile/expo/src/core/components/ui/icon-button/icon-button.style.ts +23 -0
  103. package/templates/mobile/expo/src/core/components/ui/icon-button/icon-button.tsx +66 -0
  104. package/templates/mobile/expo/src/core/components/ui/icon-button/icon-button.type.ts +25 -0
  105. package/templates/mobile/expo/src/core/components/ui/icon-button/index.ts +2 -0
  106. package/templates/mobile/expo/src/core/components/ui/image-slider/image-slider.tsx +107 -0
  107. package/templates/mobile/expo/src/core/components/ui/image-slider/image-slider.type.ts +10 -0
  108. package/templates/mobile/expo/src/core/components/ui/image-slider/index.ts +2 -0
  109. package/templates/mobile/expo/src/core/components/ui/index.ts +25 -0
  110. package/templates/mobile/expo/src/core/components/ui/label/index.ts +2 -0
  111. package/templates/mobile/expo/src/core/components/ui/label/label.tsx +36 -0
  112. package/templates/mobile/expo/src/core/components/ui/label/label.type.ts +12 -0
  113. package/templates/mobile/expo/src/core/components/ui/modal/index.ts +2 -0
  114. package/templates/mobile/expo/src/core/components/ui/modal/modal.tsx +62 -0
  115. package/templates/mobile/expo/src/core/components/ui/modal/modal.type.ts +11 -0
  116. package/templates/mobile/expo/src/core/components/ui/otp-input/index.ts +2 -0
  117. package/templates/mobile/expo/src/core/components/ui/otp-input/otp-input.tsx +129 -0
  118. package/templates/mobile/expo/src/core/components/ui/otp-input/otp-input.type.ts +20 -0
  119. package/templates/mobile/expo/src/core/components/ui/page-dots/index.ts +1 -0
  120. package/templates/mobile/expo/src/core/components/ui/page-dots/page-dots.tsx +60 -0
  121. package/templates/mobile/expo/src/core/components/ui/radio/index.ts +2 -0
  122. package/templates/mobile/expo/src/core/components/ui/radio/radio.tsx +121 -0
  123. package/templates/mobile/expo/src/core/components/ui/radio/radio.type.ts +20 -0
  124. package/templates/mobile/expo/src/core/components/ui/screen/index.ts +1 -0
  125. package/templates/mobile/expo/src/core/components/ui/screen/screen-gradient.tsx +33 -0
  126. package/templates/mobile/expo/src/core/components/ui/search-box/index.ts +2 -0
  127. package/templates/mobile/expo/src/core/components/ui/search-box/search-box.tsx +162 -0
  128. package/templates/mobile/expo/src/core/components/ui/search-box/search-box.type.ts +26 -0
  129. package/templates/mobile/expo/src/core/components/ui/segmented-control/index.ts +2 -0
  130. package/templates/mobile/expo/src/core/components/ui/segmented-control/segmented-control.tsx +86 -0
  131. package/templates/mobile/expo/src/core/components/ui/segmented-control/segmented-control.type.ts +22 -0
  132. package/templates/mobile/expo/src/core/components/ui/skeleton/index.ts +2 -0
  133. package/templates/mobile/expo/src/core/components/ui/skeleton/skeleton.tsx +106 -0
  134. package/templates/mobile/expo/src/core/components/ui/skeleton/skeleton.type.ts +8 -0
  135. package/templates/mobile/expo/src/core/components/ui/success-state/index.ts +1 -0
  136. package/templates/mobile/expo/src/core/components/ui/success-state/success-state.tsx +68 -0
  137. package/templates/mobile/expo/src/core/components/ui/tabs/index.ts +2 -0
  138. package/templates/mobile/expo/src/core/components/ui/tabs/tabs.tsx +273 -0
  139. package/templates/mobile/expo/src/core/components/ui/tabs/tabs.type.ts +21 -0
  140. package/templates/mobile/expo/src/core/components/ui/tag-input/index.ts +2 -0
  141. package/templates/mobile/expo/src/core/components/ui/tag-input/tag-input.tsx +146 -0
  142. package/templates/mobile/expo/src/core/components/ui/tag-input/tag-input.type.ts +22 -0
  143. package/templates/mobile/expo/src/core/components/ui/text-area/index.ts +2 -0
  144. package/templates/mobile/expo/src/core/components/ui/text-area/text-area.tsx +90 -0
  145. package/templates/mobile/expo/src/core/components/ui/text-area/text-area.type.ts +20 -0
  146. package/templates/mobile/expo/src/core/components/ui/text-field/index.ts +2 -0
  147. package/templates/mobile/expo/src/core/components/ui/text-field/text-field.tsx +116 -0
  148. package/templates/mobile/expo/src/core/components/ui/text-field/text-field.type.ts +21 -0
  149. package/templates/mobile/expo/src/core/components/ui/toggle/index.ts +2 -0
  150. package/templates/mobile/expo/src/core/components/ui/toggle/toggle.tsx +110 -0
  151. package/templates/mobile/expo/src/core/components/ui/toggle/toggle.type.ts +19 -0
  152. package/templates/mobile/expo/src/core/constants/external-urls.constant.ts +5 -0
  153. package/templates/mobile/expo/src/core/constants/hard-data.constant.ts +0 -0
  154. package/templates/mobile/expo/src/core/constants/index.ts +2 -0
  155. package/templates/mobile/expo/src/core/constants/type.constant.ts +3 -0
  156. package/templates/mobile/expo/src/core/context/index.ts +1 -0
  157. package/templates/mobile/expo/src/core/context/shared-transition-context.tsx +35 -0
  158. package/templates/mobile/expo/src/core/hook/index.ts +8 -0
  159. package/templates/mobile/expo/src/core/hook/useActiveRouteName.ts +63 -0
  160. package/templates/mobile/expo/src/core/hook/useAppNavigation.tsx +7 -0
  161. package/templates/mobile/expo/src/core/hook/useBottomInset.tsx +26 -0
  162. package/templates/mobile/expo/src/core/hook/useDebounce.tsx +16 -0
  163. package/templates/mobile/expo/src/core/hook/useEndReached.tsx +46 -0
  164. package/templates/mobile/expo/src/core/hook/useManualRefetch.ts +56 -0
  165. package/templates/mobile/expo/src/core/hook/useNetworkStatus.ts +68 -0
  166. package/templates/mobile/expo/src/core/hook/useTimeout.tsx +30 -0
  167. package/templates/mobile/expo/src/core/index.ts +7 -0
  168. package/templates/mobile/expo/src/core/services/api.service.ts +230 -0
  169. package/templates/mobile/expo/src/core/services/device-id.service.ts +37 -0
  170. package/templates/mobile/expo/src/core/services/index.ts +3 -0
  171. package/templates/mobile/expo/src/core/services/session-end.bridge.ts +26 -0
  172. package/templates/mobile/expo/src/core/theme/dark.theme.ts +10 -0
  173. package/templates/mobile/expo/src/core/theme/index.ts +5 -0
  174. package/templates/mobile/expo/src/core/theme/light.theme.ts +44 -0
  175. package/templates/mobile/expo/src/core/theme/theme-context.tsx +82 -0
  176. package/templates/mobile/expo/src/core/theme/theme.types.ts +26 -0
  177. package/templates/mobile/expo/src/core/theme/use-themed-styles.ts +25 -0
  178. package/templates/mobile/expo/src/core/utils/color.util.tsx +198 -0
  179. package/templates/mobile/expo/src/core/utils/date.util.ts +97 -0
  180. package/templates/mobile/expo/src/core/utils/device-locale.util.ts +24 -0
  181. package/templates/mobile/expo/src/core/utils/emitter/index.ts +161 -0
  182. package/templates/mobile/expo/src/core/utils/emitter/type.ts +40 -0
  183. package/templates/mobile/expo/src/core/utils/enum.util.tsx +15 -0
  184. package/templates/mobile/expo/src/core/utils/font.util.tsx +42 -0
  185. package/templates/mobile/expo/src/core/utils/func.util.ts +48 -0
  186. package/templates/mobile/expo/src/core/utils/greeting.util.ts +20 -0
  187. package/templates/mobile/expo/src/core/utils/image-format.util.ts +117 -0
  188. package/templates/mobile/expo/src/core/utils/image-picker.util.ts +63 -0
  189. package/templates/mobile/expo/src/core/utils/index.ts +18 -0
  190. package/templates/mobile/expo/src/core/utils/linking.util.ts +16 -0
  191. package/templates/mobile/expo/src/core/utils/navigation.util.tsx +100 -0
  192. package/templates/mobile/expo/src/core/utils/number-format.ts +28 -0
  193. package/templates/mobile/expo/src/core/utils/query-client.util.ts +35 -0
  194. package/templates/mobile/expo/src/core/utils/query-persister.util.ts +31 -0
  195. package/templates/mobile/expo/src/core/utils/schema.util.tsx +2713 -0
  196. package/templates/mobile/expo/src/core/utils/size.util.tsx +74 -0
  197. package/templates/mobile/expo/src/core/utils/storage.util.tsx +53 -0
  198. package/templates/mobile/expo/src/core/utils/toast.util.tsx +151 -0
  199. package/templates/mobile/expo/src/core/utils/translator.util.tsx +23 -0
  200. package/templates/mobile/expo/src/core/utils/typography.util.tsx +69 -0
  201. package/templates/mobile/expo/src/core/utils/validate.util.tsx +13 -0
  202. package/templates/mobile/expo/src/declarations.d.ts +54 -0
  203. package/templates/mobile/expo/src/modules/home/home.screen.tsx +110 -0
  204. package/templates/mobile/expo/src/modules/profile/profile.screen.tsx +29 -0
  205. package/templates/mobile/expo/src/scripts/link-fonts.js +60 -0
  206. package/templates/mobile/expo/src/scripts/sync-images.js +56 -0
  207. package/templates/mobile/expo/src/scripts/sync-svgs.js +50 -0
  208. package/templates/mobile/expo/src/types/models.d.ts +24 -0
  209. package/templates/mobile/expo/tsconfig.json +19 -0
  210. package/templates/mobile/rn/.bundle/config +2 -0
  211. package/templates/mobile/rn/.env.example +5 -0
  212. package/templates/mobile/rn/.eslintrc.js +7 -0
  213. package/templates/mobile/rn/.prettierrc.js +7 -0
  214. package/templates/mobile/rn/.svgrrc.js +9 -0
  215. package/templates/mobile/rn/.watchmanconfig +1 -0
  216. package/templates/mobile/rn/Gemfile +17 -0
  217. package/templates/mobile/rn/README.md +72 -7
  218. package/templates/mobile/rn/_gitignore +24 -0
  219. package/templates/mobile/rn/_package.json +69 -1
  220. package/templates/mobile/rn/android/app/build.gradle +126 -0
  221. package/templates/mobile/rn/android/app/debug.keystore +0 -0
  222. package/templates/mobile/rn/android/app/proguard-rules.pro +10 -0
  223. package/templates/mobile/rn/android/app/src/main/AndroidManifest.xml +27 -0
  224. package/templates/mobile/rn/android/app/src/main/java/com/dumobile/MainActivity.kt +22 -0
  225. package/templates/mobile/rn/android/app/src/main/java/com/dumobile/MainApplication.kt +27 -0
  226. package/templates/mobile/rn/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  227. package/templates/mobile/rn/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  228. package/templates/mobile/rn/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  229. package/templates/mobile/rn/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  230. package/templates/mobile/rn/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  231. package/templates/mobile/rn/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  232. package/templates/mobile/rn/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  233. package/templates/mobile/rn/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  234. package/templates/mobile/rn/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  235. package/templates/mobile/rn/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  236. package/templates/mobile/rn/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  237. package/templates/mobile/rn/android/app/src/main/res/values/strings.xml +3 -0
  238. package/templates/mobile/rn/android/app/src/main/res/values/styles.xml +9 -0
  239. package/templates/mobile/rn/android/build.gradle +21 -0
  240. package/templates/mobile/rn/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  241. package/templates/mobile/rn/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  242. package/templates/mobile/rn/android/gradle.properties +44 -0
  243. package/templates/mobile/rn/android/gradlew +248 -0
  244. package/templates/mobile/rn/android/gradlew.bat +98 -0
  245. package/templates/mobile/rn/android/settings.gradle +21 -0
  246. package/templates/mobile/rn/app.json +4 -0
  247. package/templates/mobile/rn/babel.config.js +18 -0
  248. package/templates/mobile/rn/index.js +10 -0
  249. package/templates/mobile/rn/ios/.xcode.env +11 -0
  250. package/templates/mobile/rn/ios/DuMobile/AppDelegate.swift +48 -0
  251. package/templates/mobile/rn/ios/DuMobile/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  252. package/templates/mobile/rn/ios/DuMobile/Images.xcassets/Contents.json +6 -0
  253. package/templates/mobile/rn/ios/DuMobile/Info.plist +59 -0
  254. package/templates/mobile/rn/ios/DuMobile/LaunchScreen.storyboard +47 -0
  255. package/templates/mobile/rn/ios/DuMobile/PrivacyInfo.xcprivacy +37 -0
  256. package/templates/mobile/rn/ios/DuMobile.xcodeproj/project.pbxproj +475 -0
  257. package/templates/mobile/rn/ios/DuMobile.xcodeproj/xcshareddata/xcschemes/DuMobile.xcscheme +88 -0
  258. package/templates/mobile/rn/ios/Podfile +34 -0
  259. package/templates/mobile/rn/metro.config.js +33 -0
  260. package/templates/mobile/rn/src/app/App.tsx +24 -0
  261. package/templates/mobile/rn/src/app/app-provider.tsx +41 -0
  262. package/templates/mobile/rn/src/app/config/translation.ts +29 -0
  263. package/templates/mobile/rn/src/app/index.ts +1 -0
  264. package/templates/mobile/rn/src/app/navigation/app-route-type.ts +27 -0
  265. package/templates/mobile/rn/src/app/navigation/bottom-tabs.tsx +34 -0
  266. package/templates/mobile/rn/src/app/navigation/index.tsx +14 -0
  267. package/templates/mobile/rn/src/app/stores/auth.store.ts +33 -0
  268. package/templates/mobile/rn/src/app/stores/common.store.ts +19 -0
  269. package/templates/mobile/rn/src/app/stores/index.ts +3 -0
  270. package/templates/mobile/rn/src/app/stores/loading.store.ts +22 -0
  271. package/templates/mobile/rn/src/assets/Images/empty-list.png +0 -0
  272. package/templates/mobile/rn/src/assets/Images/index.ts +5 -0
  273. package/templates/mobile/rn/src/assets/Images/screen-bg-gradian.png +0 -0
  274. package/templates/mobile/rn/src/assets/i18n/en.json +22 -0
  275. package/templates/mobile/rn/src/assets/i18n/fr.json +22 -0
  276. package/templates/mobile/rn/src/assets/lotties/index.ts +3 -0
  277. package/templates/mobile/rn/src/assets/lotties/loading.json +1 -0
  278. package/templates/mobile/rn/src/assets/svgs/arrow-left.svg +3 -0
  279. package/templates/mobile/rn/src/assets/svgs/arrow-right.svg +3 -0
  280. package/templates/mobile/rn/src/assets/svgs/calendar.svg +12 -0
  281. package/templates/mobile/rn/src/assets/svgs/check.svg +3 -0
  282. package/templates/mobile/rn/src/assets/svgs/close.svg +3 -0
  283. package/templates/mobile/rn/src/assets/svgs/eye-hide.svg +3 -0
  284. package/templates/mobile/rn/src/assets/svgs/eye.svg +4 -0
  285. package/templates/mobile/rn/src/assets/svgs/index.ts +29 -0
  286. package/templates/mobile/rn/src/assets/svgs/minus.svg +3 -0
  287. package/templates/mobile/rn/src/assets/svgs/plus.svg +3 -0
  288. package/templates/mobile/rn/src/assets/svgs/search.svg +3 -0
  289. package/templates/mobile/rn/src/assets/svgs/toast-error.svg +5 -0
  290. package/templates/mobile/rn/src/assets/svgs/toast-success.svg +4 -0
  291. package/templates/mobile/rn/src/core/api/endpoints.ts +8 -0
  292. package/templates/mobile/rn/src/core/api/example.api.ts +53 -0
  293. package/templates/mobile/rn/src/core/api/index.ts +4 -0
  294. package/templates/mobile/rn/src/core/components/common/index.ts +1 -0
  295. package/templates/mobile/rn/src/core/components/common/list-empty/index.ts +2 -0
  296. package/templates/mobile/rn/src/core/components/common/list-empty/list-empty.tsx +30 -0
  297. package/templates/mobile/rn/src/core/components/common/list-empty/list-empty.type.ts +5 -0
  298. package/templates/mobile/rn/src/core/components/forms/hf-date-time.tsx +301 -0
  299. package/templates/mobile/rn/src/core/components/forms/hf-password-input.tsx +153 -0
  300. package/templates/mobile/rn/src/core/components/forms/hf-text-input.tsx +59 -0
  301. package/templates/mobile/rn/src/core/components/forms/hf-time-picker.tsx +117 -0
  302. package/templates/mobile/rn/src/core/components/forms/index.ts +4 -0
  303. package/templates/mobile/rn/src/core/components/index.ts +5 -0
  304. package/templates/mobile/rn/src/core/components/loading/index.ts +1 -0
  305. package/templates/mobile/rn/src/core/components/loading/loading-app/index.ts +1 -0
  306. package/templates/mobile/rn/src/core/components/loading/loading-app/loading-app.tsx +50 -0
  307. package/templates/mobile/rn/src/core/components/offline/index.ts +1 -0
  308. package/templates/mobile/rn/src/core/components/offline/offline-banner.tsx +186 -0
  309. package/templates/mobile/rn/src/core/components/screen/index.ts +1 -0
  310. package/templates/mobile/rn/src/core/components/screen/screen-container/index.ts +1 -0
  311. package/templates/mobile/rn/src/core/components/screen/screen-container/screen-container.tsx +252 -0
  312. package/templates/mobile/rn/src/core/components/splash/index.ts +1 -0
  313. package/templates/mobile/rn/src/core/components/splash/splash-overlay/index.ts +1 -0
  314. package/templates/mobile/rn/src/core/components/splash/splash-overlay/splash-overlay.tsx +93 -0
  315. package/templates/mobile/rn/src/core/components/ui/animated-list-item/animated-list-item.tsx +48 -0
  316. package/templates/mobile/rn/src/core/components/ui/animated-list-item/animated-list-item.type.ts +10 -0
  317. package/templates/mobile/rn/src/core/components/ui/animated-list-item/index.ts +2 -0
  318. package/templates/mobile/rn/src/core/components/ui/app-image/app-image.tsx +104 -0
  319. package/templates/mobile/rn/src/core/components/ui/app-image/app-image.type.ts +19 -0
  320. package/templates/mobile/rn/src/core/components/ui/app-image/index.ts +2 -0
  321. package/templates/mobile/rn/src/core/components/ui/asset-placeholder/asset-placeholder.tsx +76 -0
  322. package/templates/mobile/rn/src/core/components/ui/asset-placeholder/index.ts +1 -0
  323. package/templates/mobile/rn/src/core/components/ui/avatar-image/avatar-image.tsx +90 -0
  324. package/templates/mobile/rn/src/core/components/ui/avatar-image/index.ts +1 -0
  325. package/templates/mobile/rn/src/core/components/ui/bottom-sheet/bottom-sheet.tsx +145 -0
  326. package/templates/mobile/rn/src/core/components/ui/bottom-sheet/bottom-sheet.type.ts +10 -0
  327. package/templates/mobile/rn/src/core/components/ui/bottom-sheet/index.ts +2 -0
  328. package/templates/mobile/rn/src/core/components/ui/button/button.style.ts +146 -0
  329. package/templates/mobile/rn/src/core/components/ui/button/button.tsx +97 -0
  330. package/templates/mobile/rn/src/core/components/ui/button/button.type.ts +47 -0
  331. package/templates/mobile/rn/src/core/components/ui/button/index.ts +4 -0
  332. package/templates/mobile/rn/src/core/components/ui/checkbox/checkbox.tsx +127 -0
  333. package/templates/mobile/rn/src/core/components/ui/checkbox/checkbox.type.ts +24 -0
  334. package/templates/mobile/rn/src/core/components/ui/checkbox/index.ts +2 -0
  335. package/templates/mobile/rn/src/core/components/ui/collapsible-section/collapsible-section.tsx +141 -0
  336. package/templates/mobile/rn/src/core/components/ui/collapsible-section/collapsible-section.type.ts +10 -0
  337. package/templates/mobile/rn/src/core/components/ui/collapsible-section/index.ts +2 -0
  338. package/templates/mobile/rn/src/core/components/ui/components.registry.json +313 -0
  339. package/templates/mobile/rn/src/core/components/ui/field/field-frame.tsx +62 -0
  340. package/templates/mobile/rn/src/core/components/ui/field/field.shared.ts +31 -0
  341. package/templates/mobile/rn/src/core/components/ui/header/header.tsx +196 -0
  342. package/templates/mobile/rn/src/core/components/ui/header/header.type.ts +30 -0
  343. package/templates/mobile/rn/src/core/components/ui/header/index.ts +2 -0
  344. package/templates/mobile/rn/src/core/components/ui/icon-button/icon-button.style.ts +23 -0
  345. package/templates/mobile/rn/src/core/components/ui/icon-button/icon-button.tsx +66 -0
  346. package/templates/mobile/rn/src/core/components/ui/icon-button/icon-button.type.ts +25 -0
  347. package/templates/mobile/rn/src/core/components/ui/icon-button/index.ts +2 -0
  348. package/templates/mobile/rn/src/core/components/ui/image-slider/image-slider.tsx +107 -0
  349. package/templates/mobile/rn/src/core/components/ui/image-slider/image-slider.type.ts +10 -0
  350. package/templates/mobile/rn/src/core/components/ui/image-slider/index.ts +2 -0
  351. package/templates/mobile/rn/src/core/components/ui/index.ts +25 -0
  352. package/templates/mobile/rn/src/core/components/ui/label/index.ts +2 -0
  353. package/templates/mobile/rn/src/core/components/ui/label/label.tsx +36 -0
  354. package/templates/mobile/rn/src/core/components/ui/label/label.type.ts +12 -0
  355. package/templates/mobile/rn/src/core/components/ui/modal/index.ts +2 -0
  356. package/templates/mobile/rn/src/core/components/ui/modal/modal.tsx +62 -0
  357. package/templates/mobile/rn/src/core/components/ui/modal/modal.type.ts +11 -0
  358. package/templates/mobile/rn/src/core/components/ui/otp-input/index.ts +2 -0
  359. package/templates/mobile/rn/src/core/components/ui/otp-input/otp-input.tsx +129 -0
  360. package/templates/mobile/rn/src/core/components/ui/otp-input/otp-input.type.ts +20 -0
  361. package/templates/mobile/rn/src/core/components/ui/page-dots/index.ts +1 -0
  362. package/templates/mobile/rn/src/core/components/ui/page-dots/page-dots.tsx +60 -0
  363. package/templates/mobile/rn/src/core/components/ui/radio/index.ts +2 -0
  364. package/templates/mobile/rn/src/core/components/ui/radio/radio.tsx +121 -0
  365. package/templates/mobile/rn/src/core/components/ui/radio/radio.type.ts +20 -0
  366. package/templates/mobile/rn/src/core/components/ui/screen/index.ts +1 -0
  367. package/templates/mobile/rn/src/core/components/ui/screen/screen-gradient.tsx +33 -0
  368. package/templates/mobile/rn/src/core/components/ui/search-box/index.ts +2 -0
  369. package/templates/mobile/rn/src/core/components/ui/search-box/search-box.tsx +162 -0
  370. package/templates/mobile/rn/src/core/components/ui/search-box/search-box.type.ts +26 -0
  371. package/templates/mobile/rn/src/core/components/ui/segmented-control/index.ts +2 -0
  372. package/templates/mobile/rn/src/core/components/ui/segmented-control/segmented-control.tsx +86 -0
  373. package/templates/mobile/rn/src/core/components/ui/segmented-control/segmented-control.type.ts +22 -0
  374. package/templates/mobile/rn/src/core/components/ui/skeleton/index.ts +2 -0
  375. package/templates/mobile/rn/src/core/components/ui/skeleton/skeleton.tsx +106 -0
  376. package/templates/mobile/rn/src/core/components/ui/skeleton/skeleton.type.ts +8 -0
  377. package/templates/mobile/rn/src/core/components/ui/success-state/index.ts +1 -0
  378. package/templates/mobile/rn/src/core/components/ui/success-state/success-state.tsx +68 -0
  379. package/templates/mobile/rn/src/core/components/ui/tabs/index.ts +2 -0
  380. package/templates/mobile/rn/src/core/components/ui/tabs/tabs.tsx +273 -0
  381. package/templates/mobile/rn/src/core/components/ui/tabs/tabs.type.ts +21 -0
  382. package/templates/mobile/rn/src/core/components/ui/tag-input/index.ts +2 -0
  383. package/templates/mobile/rn/src/core/components/ui/tag-input/tag-input.tsx +146 -0
  384. package/templates/mobile/rn/src/core/components/ui/tag-input/tag-input.type.ts +22 -0
  385. package/templates/mobile/rn/src/core/components/ui/text-area/index.ts +2 -0
  386. package/templates/mobile/rn/src/core/components/ui/text-area/text-area.tsx +90 -0
  387. package/templates/mobile/rn/src/core/components/ui/text-area/text-area.type.ts +20 -0
  388. package/templates/mobile/rn/src/core/components/ui/text-field/index.ts +2 -0
  389. package/templates/mobile/rn/src/core/components/ui/text-field/text-field.tsx +116 -0
  390. package/templates/mobile/rn/src/core/components/ui/text-field/text-field.type.ts +21 -0
  391. package/templates/mobile/rn/src/core/components/ui/toggle/index.ts +2 -0
  392. package/templates/mobile/rn/src/core/components/ui/toggle/toggle.tsx +110 -0
  393. package/templates/mobile/rn/src/core/components/ui/toggle/toggle.type.ts +19 -0
  394. package/templates/mobile/rn/src/core/constants/external-urls.constant.ts +5 -0
  395. package/templates/mobile/rn/src/core/constants/hard-data.constant.ts +0 -0
  396. package/templates/mobile/rn/src/core/constants/index.ts +2 -0
  397. package/templates/mobile/rn/src/core/constants/type.constant.ts +3 -0
  398. package/templates/mobile/rn/src/core/context/index.ts +1 -0
  399. package/templates/mobile/rn/src/core/context/shared-transition-context.tsx +35 -0
  400. package/templates/mobile/rn/src/core/hook/index.ts +8 -0
  401. package/templates/mobile/rn/src/core/hook/useActiveRouteName.ts +63 -0
  402. package/templates/mobile/rn/src/core/hook/useAppNavigation.tsx +7 -0
  403. package/templates/mobile/rn/src/core/hook/useBottomInset.tsx +26 -0
  404. package/templates/mobile/rn/src/core/hook/useDebounce.tsx +16 -0
  405. package/templates/mobile/rn/src/core/hook/useEndReached.tsx +46 -0
  406. package/templates/mobile/rn/src/core/hook/useManualRefetch.ts +56 -0
  407. package/templates/mobile/rn/src/core/hook/useNetworkStatus.ts +68 -0
  408. package/templates/mobile/rn/src/core/hook/useTimeout.tsx +30 -0
  409. package/templates/mobile/rn/src/core/index.ts +7 -0
  410. package/templates/mobile/rn/src/core/services/api.service.ts +230 -0
  411. package/templates/mobile/rn/src/core/services/device-id.service.ts +23 -0
  412. package/templates/mobile/rn/src/core/services/index.ts +3 -0
  413. package/templates/mobile/rn/src/core/services/session-end.bridge.ts +26 -0
  414. package/templates/mobile/rn/src/core/theme/dark.theme.ts +10 -0
  415. package/templates/mobile/rn/src/core/theme/index.ts +5 -0
  416. package/templates/mobile/rn/src/core/theme/light.theme.ts +44 -0
  417. package/templates/mobile/rn/src/core/theme/theme-context.tsx +82 -0
  418. package/templates/mobile/rn/src/core/theme/theme.types.ts +26 -0
  419. package/templates/mobile/rn/src/core/theme/use-themed-styles.ts +25 -0
  420. package/templates/mobile/rn/src/core/utils/color.util.tsx +198 -0
  421. package/templates/mobile/rn/src/core/utils/date.util.ts +97 -0
  422. package/templates/mobile/rn/src/core/utils/device-locale.util.ts +22 -0
  423. package/templates/mobile/rn/src/core/utils/emitter/index.ts +161 -0
  424. package/templates/mobile/rn/src/core/utils/emitter/type.ts +40 -0
  425. package/templates/mobile/rn/src/core/utils/enum.util.tsx +15 -0
  426. package/templates/mobile/rn/src/core/utils/font.util.tsx +42 -0
  427. package/templates/mobile/rn/src/core/utils/func.util.ts +48 -0
  428. package/templates/mobile/rn/src/core/utils/greeting.util.ts +20 -0
  429. package/templates/mobile/rn/src/core/utils/image-format.util.ts +117 -0
  430. package/templates/mobile/rn/src/core/utils/image-picker.util.ts +84 -0
  431. package/templates/mobile/rn/src/core/utils/index.ts +18 -0
  432. package/templates/mobile/rn/src/core/utils/linking.util.ts +16 -0
  433. package/templates/mobile/rn/src/core/utils/navigation.util.tsx +100 -0
  434. package/templates/mobile/rn/src/core/utils/number-format.ts +28 -0
  435. package/templates/mobile/rn/src/core/utils/query-client.util.ts +35 -0
  436. package/templates/mobile/rn/src/core/utils/query-persister.util.ts +36 -0
  437. package/templates/mobile/rn/src/core/utils/schema.util.tsx +2713 -0
  438. package/templates/mobile/rn/src/core/utils/size.util.tsx +74 -0
  439. package/templates/mobile/rn/src/core/utils/storage.util.tsx +53 -0
  440. package/templates/mobile/rn/src/core/utils/toast.util.tsx +151 -0
  441. package/templates/mobile/rn/src/core/utils/translator.util.tsx +23 -0
  442. package/templates/mobile/rn/src/core/utils/typography.util.tsx +69 -0
  443. package/templates/mobile/rn/src/core/utils/validate.util.tsx +13 -0
  444. package/templates/mobile/rn/src/declarations.d.ts +54 -0
  445. package/templates/mobile/rn/src/modules/home/home.screen.tsx +67 -0
  446. package/templates/mobile/rn/src/modules/profile/profile.screen.tsx +29 -0
  447. package/templates/mobile/rn/src/scripts/link-fonts.js +60 -0
  448. package/templates/mobile/rn/src/scripts/sync-images.js +56 -0
  449. package/templates/mobile/rn/src/scripts/sync-svgs.js +50 -0
  450. package/templates/mobile/rn/src/types/models.d.ts +24 -0
  451. package/templates/mobile/rn/tsconfig.json +21 -0
  452. package/templates/shared/src/api-endpoints.ts +8 -0
  453. package/templates/shared/src/enums.ts +34 -0
  454. package/templates/shared/src/external-urls.ts +5 -0
  455. package/templates/shared/src/index.ts +6 -3
@@ -0,0 +1,56 @@
1
+ const fs = require('fs')
2
+ const path = require('path')
3
+
4
+ function sync(dir) {
5
+ console.log('*** Sync images ***')
6
+
7
+ const imageDirs = fs
8
+ .readdirSync(dir, {withFileTypes: true})
9
+ .filter(f => f.name.includes('.png') || f.name.includes('.jpg'))
10
+ .map(f => {
11
+ const [fileName, type] = f.name.split('.')
12
+ const [name] = fileName.split('@')
13
+ return `${name}.${type}`
14
+ })
15
+
16
+ const imageDirsUnique = [...new Set(imageDirs)]
17
+
18
+ const images = imageDirsUnique.map(imageDir => {
19
+ const parts = imageDir.split('-')
20
+ let name = ''
21
+ for (let i = 0; i < parts.length; i++) {
22
+ name +=
23
+ parts[i][0].toUpperCase() +
24
+ parts[i].substring(1, parts[i].length)
25
+ }
26
+ return 'Img' + name
27
+ })
28
+
29
+ const imports = imageDirsUnique.reduce((ret, imageDir, idx) => {
30
+ const [image] = images[idx].split('.')
31
+ return (
32
+ ret +
33
+ `import ${image} from './${imageDir}'` +
34
+ (idx !== imageDirsUnique.length - 1 ? '\n' : '')
35
+ )
36
+ }, '')
37
+
38
+ const exports = images.reduce((ret, img, idx) => {
39
+ const [name] = img.split('.')
40
+ return ret + ` ${name},\n` + (idx === images.length - 1 ? '}\n' : '')
41
+ }, 'export {\n')
42
+
43
+ if (images.length === 0) {
44
+ return '\n// Export\nexport {}'
45
+ }
46
+
47
+ return `// Image\n${imports}\n\n// Export\n${exports}`
48
+ }
49
+
50
+ const imagesPath = path.join(__dirname, '../assets/Images')
51
+
52
+ let output = sync(imagesPath)
53
+
54
+ fs.writeFile(path.join(__dirname, '../assets/Images/index.ts'), output, err =>
55
+ console.log(`Sync images ${err ? 'failed: ' + err : 'succeeded'}`),
56
+ )
@@ -0,0 +1,50 @@
1
+ const fs = require('fs')
2
+ const path = require('path')
3
+
4
+ function sync(dir) {
5
+ console.log('*** Sync svgs ***')
6
+
7
+ const svgDirs = fs
8
+ .readdirSync(dir, {
9
+ withFileTypes: true,
10
+ })
11
+ .filter(f => f.name.includes('.svg'))
12
+ .map(f => f.name.split('.')[0])
13
+
14
+ const svgs = svgDirs.map(svgDir => {
15
+ const parts = svgDir.split('-')
16
+ let name = ''
17
+ for (let i = 0; i < parts.length; i++) {
18
+ name +=
19
+ parts[i][0].toUpperCase() +
20
+ parts[i].substring(1, parts[i].length)
21
+ }
22
+ return 'Icon' + name
23
+ })
24
+
25
+ const imports = svgDirs.reduce((ret, svgDir, idx) => {
26
+ return (
27
+ ret +
28
+ `import ${svgs[idx]} from './${svgDir}.svg'` +
29
+ (idx !== svgDirs.length - 1 ? '\n' : '')
30
+ )
31
+ }, '')
32
+
33
+ const exports = svgs.reduce((ret, svg, idx) => {
34
+ return ret + ` ${svg},\n` + (idx === svgs.length - 1 ? '}\n' : '')
35
+ }, 'export {\n')
36
+
37
+ if (svgs.length === 0) {
38
+ return '\n// Export\nexport {}'
39
+ }
40
+
41
+ return `// Icon\n${imports}\n\n// Export\n${exports}`
42
+ }
43
+
44
+ const svgsPath = path.join(__dirname, '../assets/svgs')
45
+
46
+ let output = sync(svgsPath)
47
+
48
+ fs.writeFile(path.join(__dirname, '../assets/svgs/index.ts'), output, err =>
49
+ console.log(`Sync svgs ${err ? 'failed: ' + err : 'succeeded'}`),
50
+ )
@@ -0,0 +1,24 @@
1
+ // App-wide ambient types that used to live in the project's `model/` layer.
2
+ // Kept minimal here; move real contracts into `@repo/shared` as you build out.
3
+
4
+ /** Standard API envelope returned by ApiService. */
5
+ declare interface IResponse<T = any> {
6
+ data: T;
7
+ message?: string;
8
+ success?: boolean;
9
+ statusCode?: number;
10
+ }
11
+
12
+ /** A file ready for multipart/form-data upload (image picker, etc.). */
13
+ declare interface IMediaFormData {
14
+ uri: string;
15
+ name: string;
16
+ type: string;
17
+ }
18
+
19
+ /** Result of a place/address selection (geo features). */
20
+ declare interface AddressSelectedResult {
21
+ address: string;
22
+ latitude: number;
23
+ longitude: number;
24
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "extends": "expo/tsconfig.base",
3
+ "compilerOptions": {
4
+ "jsx": "react",
5
+ "strict": true,
6
+ "noUnusedLocals": true,
7
+ "noUnusedParameters": true,
8
+ "noImplicitReturns": true,
9
+ "resolveJsonModule": true,
10
+ "skipLibCheck": true,
11
+ "paths": {
12
+ "@src/*": ["./src/*"],
13
+ "@modules/*": ["./src/modules/*"],
14
+ "@repo/shared": ["../../packages/shared/dist/index.d.ts"]
15
+ }
16
+ },
17
+ "include": ["src"],
18
+ "exclude": ["node_modules"]
19
+ }
@@ -0,0 +1,2 @@
1
+ BUNDLE_PATH: "vendor/bundle"
2
+ BUNDLE_FORCE_RUBY_PLATFORM: 1
@@ -0,0 +1,5 @@
1
+ # Copy to .env and fill in. Read at build time by react-native-config.
2
+ # NEVER commit the real .env — only this example.
3
+
4
+ # Base URL of your API (include trailing slash).
5
+ BASE_URL=https://api.example.com/
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ root: true,
3
+ extends: '@react-native',
4
+ rules: {
5
+ semi: 0,
6
+ },
7
+ };
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ arrowParens: 'avoid',
3
+ bracketSameLine: true,
4
+ bracketSpacing: true,
5
+ singleQuote: true,
6
+ trailingComma: 'all',
7
+ };
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ replaceAttrValues: {
3
+ '{currentColor}': '{props.color || "#0D1F2D"}',
4
+ '{292929}': '{props.color || "#292929"}',
5
+ '{D4D4FF}': '{props.color || "#D4D4FF"}',
6
+ '{7C7C7C}': '{props.color || "#7C7C7C"}',
7
+ '{D97706}': '{props.color || "#D97706"}',
8
+ },
9
+ }
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4
+ ruby ">= 2.6.10"
5
+
6
+ # Exclude problematic versions of cocoapods and activesupport that causes build failures.
7
+ gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8
+ gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9
+ gem 'xcodeproj', '< 1.26.0'
10
+ gem 'concurrent-ruby', '< 1.3.4'
11
+
12
+ # Ruby 3.4.0 has removed some libraries from the standard library.
13
+ gem 'bigdecimal'
14
+ gem 'logger'
15
+ gem 'benchmark'
16
+ gem 'mutex_m'
17
+ gem 'nkf'
@@ -1,11 +1,76 @@
1
- # Placeholder: React Native (mobile/rn)
1
+ # {{PROJECT_NAME}} — Mobile (React Native CLI)
2
2
 
3
- This is a **placeholder** for the **React Native** template.
3
+ A bare **React Native CLI** starter (no Expo) built from the company's production
4
+ core. Same `src/` architecture and reusable `src/core` kit as the Expo variant —
5
+ only the build tooling differs.
4
6
 
5
- Drop the standard React Native source here. Conventions:
7
+ ## Architecture
6
8
 
7
- - Name the template's `package.json` as **`_package.json`** (the CLI renames it on generate).
8
- - Name `.gitignore` as **`_gitignore`**, `.npmrc` as **`_npmrc`** if present.
9
- - Wherever you need the project name, write `{{PROJECT_NAME}}` — the CLI replaces it with the real name.
9
+ ```
10
+ src/
11
+ ├── app/ composition: providers, navigation, global stores (auth/loading/common), i18n
12
+ ├── core/ reusable infrastructure (API/services, theme, UI kit, forms, hooks, utils)
13
+ ├── modules/ your features (home/profile examples included)
14
+ └── assets/ i18n, svgs (sync-generated barrel), images, lotties
15
+ ```
10
16
 
11
- `lang: js` this app counts toward the condition for creating `packages/shared`.
17
+ See the Expo template's README for the full `src/core` breakdown — it is identical.
18
+
19
+ ## Expo vs this (bare RN CLI)
20
+
21
+ | | This (RN CLI) | Expo |
22
+ |--|---------------|------|
23
+ | Entry | `AppRegistry.registerComponent` + `app.json` name | `registerRootComponent` |
24
+ | Babel | `module:@react-native/babel-preset` | `babel-preset-expo` |
25
+ | Metro | `@react-native/metro-config` | `expo/metro-config` |
26
+ | TS base | `@react-native/typescript-config` | `expo/tsconfig.base` |
27
+ | Native build | `pod install` + Xcode / Gradle | `expo prebuild` then run |
28
+
29
+ ## Shared contracts
30
+ The core imports `ApiEndpoints`, `ExternalUrls`, enums from **`@repo/shared`** —
31
+ generate this app alongside another JS/TS stack; the CLI wires `workspace:*` automatically.
32
+
33
+ ## Getting started
34
+
35
+ ```bash
36
+ pnpm bootstrap # install + build @repo/shared
37
+ pnpm --filter {{PROJECT_NAME}}-mobile typecheck # verify
38
+ pnpm --filter {{PROJECT_NAME}}-mobile start # metro
39
+ ```
40
+
41
+ Add an icon: drop `name.svg` in `src/assets/svgs/` then `pnpm --filter {{PROJECT_NAME}}-mobile sync-svgs`.
42
+
43
+ ## Native folders (ios / android)
44
+
45
+ Native projects **ship with this template** (RN 0.85.3), so no `prebuild` /
46
+ scaffolding step is needed:
47
+
48
+ ```bash
49
+ pnpm bootstrap # install
50
+ cd apps/mobile/ios && bundle install && bundle exec pod install && cd -
51
+ pnpm --filter {{PROJECT_NAME}}-mobile ios # or android
52
+ ```
53
+
54
+ The native app is named **`DuMobile`** with bundle id **`com.dumobile`** (matches
55
+ `app.json` `name`, `AppDelegate` moduleName, and `MainActivity`). **Rename these
56
+ before shipping** (Xcode target/scheme, `app.json` `name`, `android` `applicationId`
57
+ + `namespace` + the `com/dumobile` Java dir, and `index.js` registration must all match).
58
+
59
+ Monorepo note: under pnpm's hoisted layout the RN packages live in the repo-root
60
+ `node_modules`, not `apps/mobile/node_modules`. So `android/settings.gradle` and
61
+ `android/app/build.gradle` resolve `react-native`, `@react-native/gradle-plugin`
62
+ and `@react-native/codegen` via `node --print require.resolve(...)` (which walks up
63
+ to the root), and the iOS `Podfile` resolves react-native the same way. These
64
+ patches are already applied in the template.
65
+
66
+ ## Native library config (already wired)
67
+
68
+ | Library | Status |
69
+ |---------|--------|
70
+ | gesture-handler | imported first in `index.js` ✅ |
71
+ | reanimated | babel plugin set ✅ |
72
+ | svg | metro transformer set ✅ |
73
+ | keyboard-controller / toast | provider + `<Toast>` mounted ✅ |
74
+ | `react-native-config` (.env) | autolinked; if Android doesn't read `.env`, add `apply from: ".../react-native-config/android/dotenv.gradle"` to `android/app/build.gradle` |
75
+ | `react-native-image-picker` | add `NSPhotoLibraryUsageDescription` + `NSCameraUsageDescription` to `ios/DuMobile/Info.plist` and `CAMERA` / `READ_MEDIA_IMAGES` to `AndroidManifest.xml` |
76
+ | `react-native-mmkv` v4 | needs the New Architecture (default on in RN 0.85) |
@@ -0,0 +1,24 @@
1
+ # Native build artifacts
2
+ /ios/Pods/
3
+ /ios/build/
4
+ /android/build/
5
+ /android/app/build/
6
+ /android/.gradle/
7
+ /android/local.properties
8
+
9
+ # Dependencies
10
+ node_modules/
11
+
12
+ # Metro
13
+ .metro-health-check*
14
+
15
+ # Env (keep .env.example)
16
+ .env
17
+ .env.*
18
+ !.env.example
19
+
20
+ # Logs / OS
21
+ *.log
22
+ .DS_Store
23
+ *.keystore
24
+ !debug.keystore
@@ -2,5 +2,73 @@
2
2
  "name": "{{PROJECT_NAME}}-mobile",
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
- "description": "Placeholder React Native app for {{PROJECT_NAME}}"
5
+ "scripts": {
6
+ "dev": "react-native start",
7
+ "start": "react-native start",
8
+ "android": "react-native run-android",
9
+ "ios": "react-native run-ios",
10
+ "lint": "eslint . --ext .ts,.tsx",
11
+ "typecheck": "tsc --noEmit",
12
+ "sync-svgs": "node src/scripts/sync-svgs.js",
13
+ "sync-images": "node src/scripts/sync-images.js"
14
+ },
15
+ "dependencies": {
16
+ "@hookform/error-message": "2.0.0",
17
+ "@react-native-async-storage/async-storage": "^2.1.2",
18
+ "@react-native-community/netinfo": "^12.0.1",
19
+ "@react-navigation/bottom-tabs": "^7.12.0",
20
+ "@react-navigation/native": "^7.0.13",
21
+ "@react-navigation/native-stack": "^7.1.14",
22
+ "@tanstack/react-query": "^5.101.0",
23
+ "@tanstack/react-query-persist-client": "^5.101.0",
24
+ "axios": "^1.7.9",
25
+ "i18next": "^21.5.4",
26
+ "lodash": "^4.17.21",
27
+ "lottie-react-native": "^7.3.4",
28
+ "qs": "^6.10.1",
29
+ "react": "19.2.3",
30
+ "react-hook-form": "^7.53.2",
31
+ "react-i18next": "^11.14.3",
32
+ "react-native": "0.85.3",
33
+ "react-native-config": "^1.6.1",
34
+ "react-native-date-picker": "5.0.12",
35
+ "react-native-device-info": "^15.0.2",
36
+ "react-native-fast-image": "^8.6.3",
37
+ "react-native-gesture-handler": "~2.31.1",
38
+ "react-native-image-picker": "^8.2.1",
39
+ "react-native-keyboard-controller": "^1.21.6",
40
+ "react-native-linear-gradient": "^2.8.3",
41
+ "react-native-localize": "^3.7.0",
42
+ "react-native-mmkv": "^4.3.1",
43
+ "react-native-nitro-modules": "^0.35.9",
44
+ "react-native-reanimated": "4.3.1",
45
+ "react-native-safe-area-context": "^5.7.0",
46
+ "react-native-screens": "4.25.2",
47
+ "react-native-svg": "^15.15.4",
48
+ "react-native-toast-message": "^2.2.1",
49
+ "react-native-worklets": "0.8.3",
50
+ "yup": "^0.32.11",
51
+ "zustand": "^5.0.7"
52
+ },
53
+ "devDependencies": {
54
+ "@babel/core": "^7.25.2",
55
+ "@babel/preset-env": "^7.25.3",
56
+ "@babel/runtime": "^7.25.0",
57
+ "@react-native-community/cli": "20.1.3",
58
+ "@react-native-community/cli-platform-android": "20.1.3",
59
+ "@react-native-community/cli-platform-ios": "20.1.3",
60
+ "@react-native/babel-preset": "0.85.3",
61
+ "@react-native/eslint-config": "0.85.3",
62
+ "@react-native/gradle-plugin": "0.85.3",
63
+ "@react-native/metro-config": "0.85.3",
64
+ "@react-native/typescript-config": "0.85.3",
65
+ "@types/lodash": "^4.14.176",
66
+ "@types/qs": "^6.9.7",
67
+ "@types/react": "^19.1.1",
68
+ "babel-plugin-module-resolver": "^4.1.0",
69
+ "eslint": "^8.19.0",
70
+ "prettier": "2.8.8",
71
+ "react-native-svg-transformer": "^1.5.0",
72
+ "typescript": "~5.8.3"
73
+ }
6
74
  }
@@ -0,0 +1,126 @@
1
+ apply plugin: "com.android.application"
2
+ apply plugin: "org.jetbrains.kotlin.android"
3
+ apply plugin: "com.facebook.react"
4
+
5
+ /**
6
+ * This is the configuration block to customize your React Native Android app.
7
+ * By default you don't need to apply any configuration, just uncomment the lines you need.
8
+ */
9
+ react {
10
+ // --- pnpm monorepo: resolve RN packages from the repo-root node_modules via Node ---
11
+ def rnPackageJson = ['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()
12
+ def rnDir = new File(rnPackageJson).getParentFile()
13
+ reactNativeDir = rnDir
14
+ cliFile = new File(rnDir, "cli.js")
15
+ codegenDir = new File(['node', '--print', "require.resolve('@react-native/codegen/package.json')"].execute(null, rootDir).text.trim()).getParentFile()
16
+
17
+ /* Folders */
18
+ // The root of your project, i.e. where "package.json" lives. Default is '../..'
19
+ // root = file("../../")
20
+ // The folder where the react-native NPM package is. Default is ../../node_modules/react-native
21
+ // reactNativeDir = file("../../node_modules/react-native")
22
+ // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
23
+ // codegenDir = file("../../node_modules/@react-native/codegen")
24
+ // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
25
+ // cliFile = file("../../node_modules/react-native/cli.js")
26
+
27
+ /* Variants */
28
+ // The list of variants to that are debuggable. For those we're going to
29
+ // skip the bundling of the JS bundle and the assets. Default is "debug", "debugOptimized".
30
+ // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
31
+ // debuggableVariants = ["liteDebug", "liteDebugOptimized", "prodDebug", "prodDebugOptimized"]
32
+
33
+ /* Bundling */
34
+ // A list containing the node command and its flags. Default is just 'node'.
35
+ // nodeExecutableAndArgs = ["node"]
36
+ //
37
+ // The command to run when bundling. By default is 'bundle'
38
+ // bundleCommand = "ram-bundle"
39
+ //
40
+ // The path to the CLI configuration file. Default is empty.
41
+ // bundleConfig = file(../rn-cli.config.js)
42
+ //
43
+ // The name of the generated asset file containing your JS bundle
44
+ // bundleAssetName = "MyApplication.android.bundle"
45
+ //
46
+ // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
47
+ // entryFile = file("../js/MyApplication.android.js")
48
+ //
49
+ // A list of extra flags to pass to the 'bundle' commands.
50
+ // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
51
+ // extraPackagerArgs = []
52
+
53
+ /* Hermes Commands */
54
+ // The hermes compiler command to run. By default it is 'hermesc'
55
+ // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
56
+ //
57
+ // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
58
+ // hermesFlags = ["-O", "-output-source-map"]
59
+
60
+ /* Autolinking */
61
+ autolinkLibrariesWithApp()
62
+ }
63
+
64
+ /**
65
+ * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
66
+ */
67
+ def enableProguardInReleaseBuilds = false
68
+
69
+ /**
70
+ * The preferred build flavor of JavaScriptCore (JSC)
71
+ *
72
+ * For example, to use the international variant, you can use:
73
+ * `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
74
+ *
75
+ * The international variant includes ICU i18n library and necessary data
76
+ * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
77
+ * give correct results when using with locales other than en-US. Note that
78
+ * this variant is about 6MiB larger per architecture than default.
79
+ */
80
+ def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
81
+
82
+ android {
83
+ ndkVersion rootProject.ext.ndkVersion
84
+ buildToolsVersion rootProject.ext.buildToolsVersion
85
+ compileSdk rootProject.ext.compileSdkVersion
86
+
87
+ namespace "com.dumobile"
88
+ defaultConfig {
89
+ applicationId "com.dumobile"
90
+ minSdkVersion rootProject.ext.minSdkVersion
91
+ targetSdkVersion rootProject.ext.targetSdkVersion
92
+ versionCode 1
93
+ versionName "1.0"
94
+ }
95
+ signingConfigs {
96
+ debug {
97
+ storeFile file('debug.keystore')
98
+ storePassword 'android'
99
+ keyAlias 'androiddebugkey'
100
+ keyPassword 'android'
101
+ }
102
+ }
103
+ buildTypes {
104
+ debug {
105
+ signingConfig signingConfigs.debug
106
+ }
107
+ release {
108
+ // Caution! In production, you need to generate your own keystore file.
109
+ // see https://reactnative.dev/docs/signed-apk-android.
110
+ signingConfig signingConfigs.debug
111
+ minifyEnabled enableProguardInReleaseBuilds
112
+ proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
113
+ }
114
+ }
115
+ }
116
+
117
+ dependencies {
118
+ // The version of react-native is set by the React Native Gradle Plugin
119
+ implementation("com.facebook.react:react-android")
120
+
121
+ if (hermesEnabled.toBoolean()) {
122
+ implementation("com.facebook.react:hermes-android")
123
+ } else {
124
+ implementation jscFlavor
125
+ }
126
+ }
@@ -0,0 +1,10 @@
1
+ # Add project specific ProGuard rules here.
2
+ # By default, the flags in this file are appended to flags specified
3
+ # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4
+ # You can edit the include path and order by changing the proguardFiles
5
+ # directive in build.gradle.
6
+ #
7
+ # For more details, see
8
+ # http://developer.android.com/guide/developing/tools/proguard.html
9
+
10
+ # Add any project specific keep options here:
@@ -0,0 +1,27 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+
3
+ <uses-permission android:name="android.permission.INTERNET" />
4
+
5
+ <application
6
+ android:name=".MainApplication"
7
+ android:label="@string/app_name"
8
+ android:icon="@mipmap/ic_launcher"
9
+ android:roundIcon="@mipmap/ic_launcher_round"
10
+ android:allowBackup="false"
11
+ android:theme="@style/AppTheme"
12
+ android:usesCleartextTraffic="${usesCleartextTraffic}"
13
+ android:supportsRtl="true">
14
+ <activity
15
+ android:name=".MainActivity"
16
+ android:label="@string/app_name"
17
+ android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
18
+ android:launchMode="singleTask"
19
+ android:windowSoftInputMode="adjustResize"
20
+ android:exported="true">
21
+ <intent-filter>
22
+ <action android:name="android.intent.action.MAIN" />
23
+ <category android:name="android.intent.category.LAUNCHER" />
24
+ </intent-filter>
25
+ </activity>
26
+ </application>
27
+ </manifest>
@@ -0,0 +1,22 @@
1
+ package com.dumobile
2
+
3
+ import com.facebook.react.ReactActivity
4
+ import com.facebook.react.ReactActivityDelegate
5
+ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
6
+ import com.facebook.react.defaults.DefaultReactActivityDelegate
7
+
8
+ class MainActivity : ReactActivity() {
9
+
10
+ /**
11
+ * Returns the name of the main component registered from JavaScript. This is used to schedule
12
+ * rendering of the component.
13
+ */
14
+ override fun getMainComponentName(): String = "DuMobile"
15
+
16
+ /**
17
+ * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
18
+ * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
19
+ */
20
+ override fun createReactActivityDelegate(): ReactActivityDelegate =
21
+ DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
22
+ }
@@ -0,0 +1,27 @@
1
+ package com.dumobile
2
+
3
+ import android.app.Application
4
+ import com.facebook.react.PackageList
5
+ import com.facebook.react.ReactApplication
6
+ import com.facebook.react.ReactHost
7
+ import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
8
+ import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
9
+
10
+ class MainApplication : Application(), ReactApplication {
11
+
12
+ override val reactHost: ReactHost by lazy {
13
+ getDefaultReactHost(
14
+ context = applicationContext,
15
+ packageList =
16
+ PackageList(this).packages.apply {
17
+ // Packages that cannot be autolinked yet can be added manually here, for example:
18
+ // add(MyReactNativePackage())
19
+ },
20
+ )
21
+ }
22
+
23
+ override fun onCreate() {
24
+ super.onCreate()
25
+ loadReactNative(this)
26
+ }
27
+ }
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Copyright (C) 2014 The Android Open Source Project
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ -->
16
+ <inset xmlns:android="http://schemas.android.com/apk/res/android"
17
+ android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
18
+ android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
19
+ android:insetTop="@dimen/abc_edit_text_inset_top_material"
20
+ android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
21
+ >
22
+
23
+ <selector>
24
+ <!--
25
+ This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
26
+ The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
27
+ NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
28
+
29
+ <item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
30
+
31
+ For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
32
+ -->
33
+ <item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
34
+ <item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
35
+ </selector>
36
+
37
+ </inset>