@imksh/create 1.0.24 → 1.0.26

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 (415) hide show
  1. package/package.json +1 -1
  2. package/src/commands/create.js +2 -1
  3. package/src/index.js +1 -1
  4. package/src/utils/askTemplate.js +1 -0
  5. package/templates/mern-react-native/client/src/vite-env.d.ts +1 -0
  6. package/templates/mern-react-native/mobile/_gitignore +43 -0
  7. package/templates/mern-react-native/mobile/babel.config.js +1 -0
  8. package/templates/mern-react-native/mobile/drizzle.config.ts +8 -0
  9. package/templates/mern-react-native/mobile/expo-env.d.ts +3 -0
  10. package/templates/mern-react-native/mobile/package.json +8 -1
  11. package/templates/mern-react-native/mobile/src/app/(auth)/_layout.tsx +12 -0
  12. package/templates/mern-react-native/mobile/src/app/(auth)/change-password.tsx +112 -0
  13. package/templates/mern-react-native/mobile/src/app/(auth)/edit-profile.tsx +156 -0
  14. package/templates/mern-react-native/mobile/src/app/(auth)/forgot-password.tsx +191 -0
  15. package/templates/mern-react-native/mobile/src/app/{login.tsx → (auth)/login.tsx} +69 -21
  16. package/templates/mern-react-native/mobile/src/app/(tabs)/dashboard.tsx +2 -2
  17. package/templates/mern-react-native/mobile/src/app/(tabs)/index.tsx +18 -17
  18. package/templates/mern-react-native/mobile/src/app/(tabs)/profile.tsx +23 -60
  19. package/templates/mern-react-native/mobile/src/app/(tabs)/search.tsx +2 -2
  20. package/templates/mern-react-native/mobile/src/app/_layout.tsx +22 -4
  21. package/templates/mern-react-native/mobile/src/components/common/AnimatedHeader.tsx +328 -0
  22. package/templates/mern-react-native/mobile/src/components/common/LocationLoader.tsx +591 -0
  23. package/templates/mern-react-native/mobile/src/components/common/ScreenHeader.tsx +41 -17
  24. package/templates/mern-react-native/mobile/src/components/common/TabHeader.tsx +58 -0
  25. package/templates/mern-react-native/mobile/src/components/common/Typography.tsx +49 -30
  26. package/templates/mern-react-native/mobile/src/components/common/Welcome.tsx +2 -2
  27. package/templates/mern-react-native/mobile/src/components/ui/BottomModal.tsx +31 -20
  28. package/templates/mern-react-native/mobile/src/components/ui/ClassicTabBar.tsx +4 -3
  29. package/templates/mern-react-native/mobile/src/components/ui/CustomTabBar.tsx +108 -71
  30. package/templates/mern-react-native/mobile/src/components/ui/Sidebar.tsx +81 -56
  31. package/templates/mern-react-native/mobile/src/components/ui/buttons/Button.tsx +106 -37
  32. package/templates/mern-react-native/mobile/src/components/ui/buttons/IconButton.tsx +4 -2
  33. package/templates/mern-react-native/mobile/src/components/ui/data-display/Accordion.tsx +3 -2
  34. package/templates/mern-react-native/mobile/src/components/ui/data-display/Avatar.tsx +4 -3
  35. package/templates/mern-react-native/mobile/src/components/ui/data-display/Badge.tsx +45 -17
  36. package/templates/mern-react-native/mobile/src/components/ui/data-display/ImageViewer.tsx +19 -9
  37. package/templates/mern-react-native/mobile/src/components/ui/feedback/CircularProgress.tsx +5 -4
  38. package/templates/mern-react-native/mobile/src/components/ui/feedback/ProgressBar.tsx +4 -3
  39. package/templates/mern-react-native/mobile/src/components/ui/feedback/Skeleton.tsx +3 -0
  40. package/templates/mern-react-native/mobile/src/components/ui/feedback/Spinner.tsx +11 -3
  41. package/templates/mern-react-native/mobile/src/components/ui/inputs/Checkbox.tsx +3 -2
  42. package/templates/mern-react-native/mobile/src/components/ui/inputs/DatePicker.tsx +186 -0
  43. package/templates/mern-react-native/mobile/src/components/ui/inputs/ImagePickerModal.tsx +129 -0
  44. package/templates/mern-react-native/mobile/src/components/ui/inputs/Input.tsx +54 -14
  45. package/templates/mern-react-native/mobile/src/components/ui/inputs/LocationPicker.tsx +211 -0
  46. package/templates/mern-react-native/mobile/src/components/ui/inputs/OTPInput.tsx +32 -9
  47. package/templates/mern-react-native/mobile/src/components/ui/inputs/PasswordInput.tsx +2 -1
  48. package/templates/mern-react-native/mobile/src/components/ui/inputs/Radio.tsx +3 -2
  49. package/templates/mern-react-native/mobile/src/components/ui/inputs/SearchBar.tsx +41 -4
  50. package/templates/mern-react-native/mobile/src/components/ui/inputs/Slider.tsx +4 -3
  51. package/templates/mern-react-native/mobile/src/components/ui/inputs/Switch.tsx +3 -2
  52. package/templates/mern-react-native/mobile/src/components/ui/inputs/TextArea.tsx +2 -1
  53. package/templates/mern-react-native/mobile/src/components/ui/inputs/WebLocationPicker.tsx +321 -0
  54. package/templates/mern-react-native/mobile/src/components/ui/layout/Grid.tsx +52 -10
  55. package/templates/mern-react-native/mobile/src/components/ui/layout/Section.tsx +7 -8
  56. package/templates/mern-react-native/mobile/src/components/ui/navigation/Pagination.tsx +4 -3
  57. package/templates/mern-react-native/mobile/src/components/ui/navigation/ProgressStepper.tsx +6 -5
  58. package/templates/mern-react-native/mobile/src/components/ui/navigation/Tabs.tsx +30 -4
  59. package/templates/mern-react-native/mobile/src/config/api.ts +12 -1
  60. package/templates/mern-react-native/mobile/src/config/sidebar.config.ts +12 -0
  61. package/templates/mern-react-native/mobile/src/config/tabNavigation.ts +1 -1
  62. package/templates/mern-react-native/mobile/src/db/index.ts +9 -0
  63. package/templates/mern-react-native/mobile/src/db/schema.ts +14 -0
  64. package/templates/mern-react-native/mobile/src/hooks/useDebounce.ts +17 -0
  65. package/templates/mern-react-native/mobile/src/services/notification.service.ts +22 -0
  66. package/templates/mern-react-native/mobile/src/services/socket.service.ts +36 -0
  67. package/templates/mern-react-native/mobile/src/store/useAuthStore.ts +122 -27
  68. package/templates/mern-react-native/mobile/src/store/useNotificationStore.ts +178 -0
  69. package/templates/mern-react-native/mobile/src/types/auth.type.ts +14 -0
  70. package/templates/mern-react-native/mobile/tsconfig.json +1 -0
  71. package/templates/mern-ts/client/src/vite-env.d.ts +1 -0
  72. package/templates/next/next.config.mjs +1 -0
  73. package/templates/next/package.json +10 -9
  74. package/templates/next/postcss.config.js +5 -0
  75. package/templates/next/src/app/layout.js +1 -0
  76. package/templates/next/src/app/page.js +1 -1
  77. package/templates/next/src/components/layout/ProtectedRoute.jsx +3 -3
  78. package/templates/next/src/index.css +1 -0
  79. package/templates/next/src/store/useUiStore.js +13 -7
  80. package/templates/next-ts/.env.example +0 -0
  81. package/templates/next-ts/AGENTS.md +37 -0
  82. package/templates/next-ts/CLAUDE.md +1 -0
  83. package/templates/next-ts/_gitignore +0 -24
  84. package/templates/next-ts/next-env.d.ts +3 -1
  85. package/templates/next-ts/next.config.mjs +1 -0
  86. package/templates/next-ts/package.json +13 -12
  87. package/templates/next-ts/postcss.config.js +5 -0
  88. package/templates/next-ts/public/logo.png +0 -0
  89. package/templates/next-ts/src/app/error.tsx +41 -0
  90. package/templates/next-ts/src/app/layout.tsx +2 -1
  91. package/templates/next-ts/src/app/not-found.tsx +5 -0
  92. package/templates/next-ts/src/app/page.tsx +1 -1
  93. package/templates/next-ts/src/components/layout/ProtectedRoute.tsx +3 -3
  94. package/templates/next-ts/src/components/ui/Button.tsx +63 -0
  95. package/templates/next-ts/src/components/ui/Input.tsx +79 -0
  96. package/templates/next-ts/src/index.css +1 -0
  97. package/templates/next-ts/src/store/useUiStore.ts +13 -7
  98. package/templates/next-ts/tsconfig.json +19 -5
  99. package/templates/production-fullstack/client/index.html +14 -0
  100. package/templates/production-fullstack/client/package.json +47 -0
  101. package/templates/production-fullstack/client/public/_redirects +1 -0
  102. package/templates/production-fullstack/client/public/favicon.ico +0 -0
  103. package/templates/production-fullstack/client/public/favicon.svg +1 -0
  104. package/templates/production-fullstack/client/public/logo.png +0 -0
  105. package/templates/production-fullstack/client/public/manifest.json +24 -0
  106. package/templates/production-fullstack/client/public/sw.js +56 -0
  107. package/templates/production-fullstack/client/src/App.tsx +68 -0
  108. package/templates/production-fullstack/client/src/assets/animations/loading.json +1 -0
  109. package/templates/production-fullstack/client/src/assets/data/navigation.ts +29 -0
  110. package/templates/production-fullstack/client/src/assets/images/logo.png +0 -0
  111. package/templates/production-fullstack/client/src/components/layout/ProtectedRoute.tsx +23 -0
  112. package/templates/production-fullstack/client/src/components/layout/PublicLayout.tsx +13 -0
  113. package/templates/production-fullstack/client/src/components/layout/SidebarLayout.tsx +37 -0
  114. package/templates/production-fullstack/client/src/components/shared/Breadcrumbs.tsx +27 -0
  115. package/templates/production-fullstack/client/src/components/shared/LottieIcon.tsx +36 -0
  116. package/templates/production-fullstack/client/src/components/shared/NotFound.tsx +78 -0
  117. package/templates/production-fullstack/client/src/components/shared/PwaInstallPrompt.tsx +72 -0
  118. package/templates/production-fullstack/client/src/components/shared/SEO.tsx +67 -0
  119. package/templates/production-fullstack/client/src/components/shared/Scroll.tsx +25 -0
  120. package/templates/production-fullstack/client/src/components/shared/Unauthorized.tsx +76 -0
  121. package/templates/production-fullstack/client/src/components/shared/skeletons/common/CardSkeleton.tsx +23 -0
  122. package/templates/production-fullstack/client/src/components/shared/skeletons/common/DashboardSkeleton.tsx +19 -0
  123. package/templates/production-fullstack/client/src/components/shared/skeletons/common/ListSkeleton.tsx +24 -0
  124. package/templates/production-fullstack/client/src/components/shared/skeletons/common/PageSkeleton.tsx +26 -0
  125. package/templates/production-fullstack/client/src/components/shared/skeletons/common/ProfileSkeleton.tsx +23 -0
  126. package/templates/production-fullstack/client/src/components/shared/skeletons/common/Skeleton.tsx +18 -0
  127. package/templates/production-fullstack/client/src/components/shared/skeletons/common/TableSkeleton.tsx +33 -0
  128. package/templates/production-fullstack/client/src/components/ui/ConfirmModal.tsx +152 -0
  129. package/templates/production-fullstack/client/src/components/ui/Header.tsx +230 -0
  130. package/templates/production-fullstack/client/src/components/ui/Loading.tsx +19 -0
  131. package/templates/production-fullstack/client/src/components/ui/Modal.tsx +106 -0
  132. package/templates/production-fullstack/client/src/components/ui/SidebarHeader.tsx +34 -0
  133. package/templates/production-fullstack/client/src/components/ui/Table.tsx +118 -0
  134. package/templates/production-fullstack/client/src/components/ui/ToggleSwitch.tsx +38 -0
  135. package/templates/production-fullstack/client/src/components/ui/sidebar.tsx +152 -0
  136. package/templates/production-fullstack/client/src/config/index.ts +44 -0
  137. package/templates/production-fullstack/client/src/constants/navigation.ts +14 -0
  138. package/templates/production-fullstack/client/src/features/auth/api/authService.ts +19 -0
  139. package/templates/production-fullstack/client/src/features/auth/pages/Login.tsx +233 -0
  140. package/templates/production-fullstack/client/src/features/auth/store/useAuthStore.ts +143 -0
  141. package/templates/production-fullstack/client/src/features/core/pages/Home.tsx +150 -0
  142. package/templates/production-fullstack/client/src/features/core/pages/Profile.tsx +9 -0
  143. package/templates/production-fullstack/client/src/hooks/useLenis.ts +28 -0
  144. package/templates/production-fullstack/client/src/hooks/usePwaInstall.ts +45 -0
  145. package/templates/production-fullstack/client/src/hooks/useWindowSize.ts +25 -0
  146. package/templates/production-fullstack/client/src/index.css +158 -0
  147. package/templates/production-fullstack/client/src/lib/axios.ts +22 -0
  148. package/templates/production-fullstack/client/src/lib/dayjs.ts +12 -0
  149. package/templates/production-fullstack/client/src/lib/query-client.ts +11 -0
  150. package/templates/production-fullstack/client/src/lib/socket.ts +6 -0
  151. package/templates/production-fullstack/client/src/main.tsx +28 -0
  152. package/templates/production-fullstack/client/src/store/useUiStore.ts +74 -0
  153. package/templates/production-fullstack/client/src/utils/formatDate.ts +19 -0
  154. package/templates/production-fullstack/client/src/utils/getInitials.ts +10 -0
  155. package/templates/production-fullstack/client/src/vite-env.d.ts +1 -0
  156. package/templates/production-fullstack/client/tsconfig.json +25 -0
  157. package/templates/production-fullstack/client/tsconfig.node.json +10 -0
  158. package/templates/production-fullstack/client/vite.config.ts +8 -0
  159. package/templates/production-fullstack/mobile/LICENSE +21 -0
  160. package/templates/production-fullstack/mobile/app.json +84 -0
  161. package/templates/production-fullstack/mobile/assets/animations/celebrate.json +1 -0
  162. package/templates/production-fullstack/mobile/assets/animations/infinity.json +1 -0
  163. package/templates/production-fullstack/mobile/assets/animations/loading.json +1 -0
  164. package/templates/production-fullstack/mobile/assets/fonts/Inter_Bold.ttf +0 -0
  165. package/templates/production-fullstack/mobile/assets/fonts/Inter_ExtraBold.ttf +0 -0
  166. package/templates/production-fullstack/mobile/assets/fonts/Inter_Medium.ttf +0 -0
  167. package/templates/production-fullstack/mobile/assets/fonts/Inter_Regular.ttf +0 -0
  168. package/templates/production-fullstack/mobile/assets/fonts/Inter_SemiBold.ttf +0 -0
  169. package/templates/production-fullstack/mobile/assets/images/logo/logo.png +0 -0
  170. package/templates/production-fullstack/mobile/assets/images/logo/logo.svg +1 -0
  171. package/templates/production-fullstack/mobile/assets/images/logo/logoWithBg.png +0 -0
  172. package/templates/production-fullstack/mobile/babel.config.js +13 -0
  173. package/templates/production-fullstack/mobile/drizzle.config.ts +8 -0
  174. package/templates/production-fullstack/mobile/eas.json +24 -0
  175. package/templates/production-fullstack/mobile/eslint.config.js +10 -0
  176. package/templates/production-fullstack/mobile/expo-env.d.ts +3 -0
  177. package/templates/production-fullstack/mobile/metro.config.js +6 -0
  178. package/templates/production-fullstack/mobile/nativewind-env.d.ts +3 -0
  179. package/templates/production-fullstack/mobile/package.json +89 -0
  180. package/templates/production-fullstack/mobile/src/app/(auth)/_layout.tsx +12 -0
  181. package/templates/production-fullstack/mobile/src/app/(auth)/change-password.tsx +112 -0
  182. package/templates/production-fullstack/mobile/src/app/(auth)/edit-profile.tsx +160 -0
  183. package/templates/production-fullstack/mobile/src/app/(auth)/forgot-password.tsx +191 -0
  184. package/templates/production-fullstack/mobile/src/app/(auth)/login.tsx +253 -0
  185. package/templates/production-fullstack/mobile/src/app/_layout.tsx +102 -0
  186. package/templates/production-fullstack/mobile/src/app/global.css +82 -0
  187. package/templates/production-fullstack/mobile/src/components/common/AnimatedHeader.tsx +328 -0
  188. package/templates/production-fullstack/mobile/src/components/common/ConfirmationToast.tsx +67 -0
  189. package/templates/production-fullstack/mobile/src/components/common/Loading.tsx +26 -0
  190. package/templates/production-fullstack/mobile/src/components/common/LocationLoader.tsx +591 -0
  191. package/templates/production-fullstack/mobile/src/components/common/ScreenHeader.tsx +68 -0
  192. package/templates/production-fullstack/mobile/src/components/common/TabHeader.tsx +58 -0
  193. package/templates/production-fullstack/mobile/src/components/common/Typography.tsx +113 -0
  194. package/templates/production-fullstack/mobile/src/components/common/Welcome.tsx +55 -0
  195. package/templates/production-fullstack/mobile/src/components/ui/BottomModal.tsx +159 -0
  196. package/templates/production-fullstack/mobile/src/components/ui/ClassicTabBar.tsx +129 -0
  197. package/templates/production-fullstack/mobile/src/components/ui/CustomTabBar.tsx +238 -0
  198. package/templates/production-fullstack/mobile/src/components/ui/Sidebar.tsx +258 -0
  199. package/templates/production-fullstack/mobile/src/components/ui/buttons/Button.tsx +180 -0
  200. package/templates/production-fullstack/mobile/src/components/ui/buttons/ButtonGroup.tsx +32 -0
  201. package/templates/production-fullstack/mobile/src/components/ui/buttons/FloatingActionButton.tsx +72 -0
  202. package/templates/production-fullstack/mobile/src/components/ui/buttons/IconButton.tsx +84 -0
  203. package/templates/production-fullstack/mobile/src/components/ui/data-display/Accordion.tsx +82 -0
  204. package/templates/production-fullstack/mobile/src/components/ui/data-display/Avatar.tsx +47 -0
  205. package/templates/production-fullstack/mobile/src/components/ui/data-display/Badge.tsx +104 -0
  206. package/templates/production-fullstack/mobile/src/components/ui/data-display/Card.tsx +36 -0
  207. package/templates/production-fullstack/mobile/src/components/ui/data-display/Image.tsx +43 -0
  208. package/templates/production-fullstack/mobile/src/components/ui/data-display/ImageViewer.tsx +33 -0
  209. package/templates/production-fullstack/mobile/src/components/ui/data-display/SwipeableRow.tsx +94 -0
  210. package/templates/production-fullstack/mobile/src/components/ui/feedback/CircularProgress.tsx +38 -0
  211. package/templates/production-fullstack/mobile/src/components/ui/feedback/GestureWrapper.tsx +114 -0
  212. package/templates/production-fullstack/mobile/src/components/ui/feedback/ProgressBar.tsx +51 -0
  213. package/templates/production-fullstack/mobile/src/components/ui/feedback/Skeleton.tsx +84 -0
  214. package/templates/production-fullstack/mobile/src/components/ui/feedback/Spinner.tsx +50 -0
  215. package/templates/production-fullstack/mobile/src/components/ui/inputs/Checkbox.tsx +54 -0
  216. package/templates/production-fullstack/mobile/src/components/ui/inputs/DatePicker.tsx +186 -0
  217. package/templates/production-fullstack/mobile/src/components/ui/inputs/ImagePickerModal.tsx +129 -0
  218. package/templates/production-fullstack/mobile/src/components/ui/inputs/Input.tsx +158 -0
  219. package/templates/production-fullstack/mobile/src/components/ui/inputs/LocationPicker.tsx +211 -0
  220. package/templates/production-fullstack/mobile/src/components/ui/inputs/OTPInput.tsx +83 -0
  221. package/templates/production-fullstack/mobile/src/components/ui/inputs/PasswordInput.tsx +16 -0
  222. package/templates/production-fullstack/mobile/src/components/ui/inputs/Radio.tsx +54 -0
  223. package/templates/production-fullstack/mobile/src/components/ui/inputs/SearchBar.tsx +53 -0
  224. package/templates/production-fullstack/mobile/src/components/ui/inputs/Slider.tsx +49 -0
  225. package/templates/production-fullstack/mobile/src/components/ui/inputs/Switch.tsx +75 -0
  226. package/templates/production-fullstack/mobile/src/components/ui/inputs/TextArea.tsx +15 -0
  227. package/templates/production-fullstack/mobile/src/components/ui/inputs/WebLocationPicker.tsx +321 -0
  228. package/templates/production-fullstack/mobile/src/components/ui/layout/Container.tsx +23 -0
  229. package/templates/production-fullstack/mobile/src/components/ui/layout/Divider.tsx +20 -0
  230. package/templates/production-fullstack/mobile/src/components/ui/layout/Grid.tsx +62 -0
  231. package/templates/production-fullstack/mobile/src/components/ui/layout/KeyboardAvoidingViewWrapper.tsx +16 -0
  232. package/templates/production-fullstack/mobile/src/components/ui/layout/ScrollContainer.tsx +21 -0
  233. package/templates/production-fullstack/mobile/src/components/ui/layout/Section.tsx +51 -0
  234. package/templates/production-fullstack/mobile/src/components/ui/layout/Spacer.tsx +6 -0
  235. package/templates/production-fullstack/mobile/src/components/ui/layout/Stack.tsx +34 -0
  236. package/templates/production-fullstack/mobile/src/components/ui/navigation/Pagination.tsx +61 -0
  237. package/templates/production-fullstack/mobile/src/components/ui/navigation/ProgressStepper.tsx +66 -0
  238. package/templates/production-fullstack/mobile/src/components/ui/navigation/Tabs.tsx +173 -0
  239. package/templates/production-fullstack/mobile/src/config/sidebar.config.ts +72 -0
  240. package/templates/production-fullstack/mobile/src/config/tabNavigation.ts +64 -0
  241. package/templates/production-fullstack/mobile/src/constants/Colors.ts +71 -0
  242. package/templates/production-fullstack/mobile/src/db/index.ts +9 -0
  243. package/templates/production-fullstack/mobile/src/db/schema.ts +14 -0
  244. package/templates/production-fullstack/mobile/src/features/auth/api/auth.service.ts +35 -0
  245. package/templates/production-fullstack/mobile/src/features/auth/store/useAuthStore.ts +273 -0
  246. package/templates/production-fullstack/mobile/src/features/auth/types/auth.type.ts +14 -0
  247. package/templates/production-fullstack/mobile/src/hooks/useDebounce.ts +17 -0
  248. package/templates/production-fullstack/mobile/src/lib/axios.ts +27 -0
  249. package/templates/production-fullstack/mobile/src/lib/query-client.ts +11 -0
  250. package/templates/production-fullstack/mobile/src/lib/socket.ts +36 -0
  251. package/templates/production-fullstack/mobile/src/lib/storage.ts +55 -0
  252. package/templates/production-fullstack/mobile/src/services/permission.service.ts +214 -0
  253. package/templates/production-fullstack/mobile/src/store/localStore.ts +7 -0
  254. package/templates/production-fullstack/mobile/src/store/useNotificationStore.ts +53 -0
  255. package/templates/production-fullstack/mobile/src/types/common.type.ts +6 -0
  256. package/templates/production-fullstack/mobile/src/types/images.d.ts +24 -0
  257. package/templates/production-fullstack/mobile/src/utils/toast.ts +26 -0
  258. package/templates/production-fullstack/mobile/tailwind.config.js +71 -0
  259. package/templates/production-fullstack/mobile/tsconfig.json +23 -0
  260. package/templates/production-fullstack/server/.env.example +63 -0
  261. package/templates/production-fullstack/server/README.md +75 -0
  262. package/templates/production-fullstack/server/eslint.config.js +13 -0
  263. package/templates/production-fullstack/server/package.json +58 -0
  264. package/templates/production-fullstack/server/prisma/schema/core/attachment.prisma +14 -0
  265. package/templates/production-fullstack/server/prisma/schema/core/notification.prisma +18 -0
  266. package/templates/production-fullstack/server/prisma/schema/core/permission.prisma +26 -0
  267. package/templates/production-fullstack/server/prisma/schema/core/role.prisma +25 -0
  268. package/templates/production-fullstack/server/prisma/schema/core/user.prisma +56 -0
  269. package/templates/production-fullstack/server/prisma/schema/enums/common.prisma +13 -0
  270. package/templates/production-fullstack/server/prisma/schema/enums/notification.prisma +6 -0
  271. package/templates/production-fullstack/server/prisma/schema/enums/user.prisma +11 -0
  272. package/templates/production-fullstack/server/prisma/schema/schema.prisma +7 -0
  273. package/templates/production-fullstack/server/prisma.config.ts +14 -0
  274. package/templates/production-fullstack/server/src/app.ts +36 -0
  275. package/templates/production-fullstack/server/src/common/middlewares/auth.middleware.ts +45 -0
  276. package/templates/production-fullstack/server/src/common/middlewares/errorHandler.ts +16 -0
  277. package/templates/production-fullstack/server/src/common/middlewares/multer.ts +20 -0
  278. package/templates/production-fullstack/server/src/common/middlewares/rateLimiter.ts +53 -0
  279. package/templates/production-fullstack/server/src/common/services/email.service.ts +28 -0
  280. package/templates/production-fullstack/server/src/common/services/push.service.ts +65 -0
  281. package/templates/production-fullstack/server/src/common/services/storage.service.ts +9 -0
  282. package/templates/production-fullstack/server/src/common/types/express.d.ts +10 -0
  283. package/templates/production-fullstack/server/src/common/utils/cloudinaryUpload.ts +44 -0
  284. package/templates/production-fullstack/server/src/common/utils/emailOtp.ts +30 -0
  285. package/templates/production-fullstack/server/src/common/utils/genOtpToken.ts +22 -0
  286. package/templates/production-fullstack/server/src/common/utils/generateVapidKeys.ts +12 -0
  287. package/templates/production-fullstack/server/src/common/utils/jwt.ts +27 -0
  288. package/templates/production-fullstack/server/src/common/utils/pushHelper.ts +22 -0
  289. package/templates/production-fullstack/server/src/config/env.ts +2 -0
  290. package/templates/production-fullstack/server/src/config/logger.ts +58 -0
  291. package/templates/production-fullstack/server/src/config/prisma.ts +26 -0
  292. package/templates/production-fullstack/server/src/features/attachments/upload.controller.ts +22 -0
  293. package/templates/production-fullstack/server/src/features/attachments/upload.routes.ts +11 -0
  294. package/templates/production-fullstack/server/src/features/auth/auth.controller.ts +124 -0
  295. package/templates/production-fullstack/server/src/features/auth/auth.routes.ts +22 -0
  296. package/templates/production-fullstack/server/src/features/auth/auth.service.ts +155 -0
  297. package/templates/production-fullstack/server/src/features/notifications/push.controller.ts +55 -0
  298. package/templates/production-fullstack/server/src/features/notifications/push.routes.ts +11 -0
  299. package/templates/production-fullstack/server/src/index.ts +17 -0
  300. package/templates/production-fullstack/server/src/routes/index.ts +12 -0
  301. package/templates/production-fullstack/server/src/sockets/auth.ts +0 -0
  302. package/templates/production-fullstack/server/src/sockets/connection.ts +31 -0
  303. package/templates/production-fullstack/server/src/sockets/emitters/assignment.emitter.ts +0 -0
  304. package/templates/production-fullstack/server/src/sockets/emitters/attendance.emitter.ts +0 -0
  305. package/templates/production-fullstack/server/src/sockets/emitters/exam.emitter.ts +0 -0
  306. package/templates/production-fullstack/server/src/sockets/emitters/notification.emitter.ts +17 -0
  307. package/templates/production-fullstack/server/src/sockets/events.ts +27 -0
  308. package/templates/production-fullstack/server/src/sockets/handlers/attendance.handler.ts +0 -0
  309. package/templates/production-fullstack/server/src/sockets/handlers/chat.handler.ts +0 -0
  310. package/templates/production-fullstack/server/src/sockets/handlers/index.ts +15 -0
  311. package/templates/production-fullstack/server/src/sockets/handlers/lms.handler.ts +0 -0
  312. package/templates/production-fullstack/server/src/sockets/handlers/notification.handler.ts +39 -0
  313. package/templates/production-fullstack/server/src/sockets/index.ts +39 -0
  314. package/templates/production-fullstack/server/src/sockets/middleware.ts +54 -0
  315. package/templates/production-fullstack/server/src/sockets/rooms.ts +11 -0
  316. package/templates/production-fullstack/server/src/sockets/types.ts +32 -0
  317. package/templates/production-fullstack/server/tsconfig.json +14 -0
  318. package/templates/react-native/babel.config.js +1 -0
  319. package/templates/react-native/drizzle.config.ts +8 -0
  320. package/templates/react-native/package.json +8 -1
  321. package/templates/react-native/src/app/(auth)/_layout.tsx +12 -0
  322. package/templates/react-native/src/app/(auth)/change-password.tsx +112 -0
  323. package/templates/react-native/src/app/(auth)/edit-profile.tsx +156 -0
  324. package/templates/react-native/src/app/(auth)/forgot-password.tsx +191 -0
  325. package/templates/react-native/src/app/{login.tsx → (auth)/login.tsx} +69 -21
  326. package/templates/react-native/src/app/(tabs)/dashboard.tsx +2 -2
  327. package/templates/react-native/src/app/(tabs)/index.tsx +18 -17
  328. package/templates/react-native/src/app/(tabs)/profile.tsx +23 -60
  329. package/templates/react-native/src/app/(tabs)/search.tsx +2 -2
  330. package/templates/react-native/src/app/_layout.tsx +22 -4
  331. package/templates/react-native/src/components/common/AnimatedHeader.tsx +328 -0
  332. package/templates/react-native/src/components/common/LocationLoader.tsx +591 -0
  333. package/templates/react-native/src/components/common/ScreenHeader.tsx +41 -17
  334. package/templates/react-native/src/components/common/TabHeader.tsx +58 -0
  335. package/templates/react-native/src/components/common/Typography.tsx +49 -30
  336. package/templates/react-native/src/components/common/Welcome.tsx +2 -2
  337. package/templates/react-native/src/components/ui/BottomModal.tsx +31 -20
  338. package/templates/react-native/src/components/ui/ClassicTabBar.tsx +4 -3
  339. package/templates/react-native/src/components/ui/CustomTabBar.tsx +108 -71
  340. package/templates/react-native/src/components/ui/Sidebar.tsx +81 -56
  341. package/templates/react-native/src/components/ui/buttons/Button.tsx +106 -37
  342. package/templates/react-native/src/components/ui/buttons/IconButton.tsx +4 -2
  343. package/templates/react-native/src/components/ui/data-display/Accordion.tsx +3 -2
  344. package/templates/react-native/src/components/ui/data-display/Avatar.tsx +4 -3
  345. package/templates/react-native/src/components/ui/data-display/Badge.tsx +45 -17
  346. package/templates/react-native/src/components/ui/data-display/ImageViewer.tsx +19 -9
  347. package/templates/react-native/src/components/ui/feedback/CircularProgress.tsx +5 -4
  348. package/templates/react-native/src/components/ui/feedback/ProgressBar.tsx +4 -3
  349. package/templates/react-native/src/components/ui/feedback/Skeleton.tsx +3 -0
  350. package/templates/react-native/src/components/ui/feedback/Spinner.tsx +11 -3
  351. package/templates/react-native/src/components/ui/inputs/Checkbox.tsx +3 -2
  352. package/templates/react-native/src/components/ui/inputs/DatePicker.tsx +186 -0
  353. package/templates/react-native/src/components/ui/inputs/ImagePickerModal.tsx +129 -0
  354. package/templates/react-native/src/components/ui/inputs/Input.tsx +54 -14
  355. package/templates/react-native/src/components/ui/inputs/LocationPicker.tsx +211 -0
  356. package/templates/react-native/src/components/ui/inputs/OTPInput.tsx +32 -9
  357. package/templates/react-native/src/components/ui/inputs/PasswordInput.tsx +2 -1
  358. package/templates/react-native/src/components/ui/inputs/Radio.tsx +3 -2
  359. package/templates/react-native/src/components/ui/inputs/SearchBar.tsx +41 -4
  360. package/templates/react-native/src/components/ui/inputs/Slider.tsx +4 -3
  361. package/templates/react-native/src/components/ui/inputs/Switch.tsx +3 -2
  362. package/templates/react-native/src/components/ui/inputs/TextArea.tsx +2 -1
  363. package/templates/react-native/src/components/ui/inputs/WebLocationPicker.tsx +321 -0
  364. package/templates/react-native/src/components/ui/layout/Grid.tsx +52 -10
  365. package/templates/react-native/src/components/ui/layout/Section.tsx +7 -8
  366. package/templates/react-native/src/components/ui/navigation/Pagination.tsx +4 -3
  367. package/templates/react-native/src/components/ui/navigation/ProgressStepper.tsx +6 -5
  368. package/templates/react-native/src/components/ui/navigation/Tabs.tsx +30 -4
  369. package/templates/react-native/src/config/api.ts +12 -1
  370. package/templates/react-native/src/config/sidebar.config.ts +12 -0
  371. package/templates/react-native/src/config/tabNavigation.ts +1 -1
  372. package/templates/react-native/src/db/index.ts +9 -0
  373. package/templates/react-native/src/db/schema.ts +14 -0
  374. package/templates/react-native/src/hooks/useDebounce.ts +17 -0
  375. package/templates/react-native/src/services/notification.service.ts +22 -0
  376. package/templates/react-native/src/services/socket.service.ts +36 -0
  377. package/templates/react-native/src/store/useAuthStore.ts +122 -27
  378. package/templates/react-native/src/store/useNotificationStore.ts +178 -0
  379. package/templates/react-native/src/types/auth.type.ts +14 -0
  380. package/templates/react-native/tsconfig.json +1 -0
  381. package/templates/react-ts/src/vite-env.d.ts +1 -0
  382. package/templates/mern-react-native/mobile/.env.example +0 -2
  383. package/templates/mern-react-native/mobile/.vscode/extensions.json +0 -1
  384. package/templates/mern-react-native/mobile/.vscode/settings.json +0 -7
  385. package/templates/mern-react-native/mobile/README.md +0 -159
  386. package/templates/mern-react-native/mobile/docs/README.md +0 -17
  387. package/templates/mern-react-native/mobile/docs/components/buttons.md +0 -40
  388. package/templates/mern-react-native/mobile/docs/components/data-display.md +0 -44
  389. package/templates/mern-react-native/mobile/docs/components/feedback.md +0 -36
  390. package/templates/mern-react-native/mobile/docs/components/gestures.md +0 -60
  391. package/templates/mern-react-native/mobile/docs/components/inputs.md +0 -41
  392. package/templates/mern-react-native/mobile/docs/components/layout.md +0 -34
  393. package/templates/mern-react-native/mobile/docs/components/navigation.md +0 -31
  394. package/templates/mern-react-native/mobile/docs/features.md +0 -85
  395. package/templates/mern-react-native/mobile/docs/getting-started.md +0 -47
  396. package/templates/mern-react-native/mobile/src/components/common/HomeHeader.tsx +0 -43
  397. package/templates/mern-react-native/mobile/src/components/settings/SettingToggle.tsx +0 -26
  398. package/templates/mern-react-native/mobile/src/components/settings/SettingsOptions.tsx +0 -47
  399. package/templates/react-native/.env.example +0 -2
  400. package/templates/react-native/.vscode/extensions.json +0 -1
  401. package/templates/react-native/.vscode/settings.json +0 -7
  402. package/templates/react-native/README.md +0 -159
  403. package/templates/react-native/docs/README.md +0 -17
  404. package/templates/react-native/docs/components/buttons.md +0 -40
  405. package/templates/react-native/docs/components/data-display.md +0 -44
  406. package/templates/react-native/docs/components/feedback.md +0 -36
  407. package/templates/react-native/docs/components/gestures.md +0 -60
  408. package/templates/react-native/docs/components/inputs.md +0 -41
  409. package/templates/react-native/docs/components/layout.md +0 -34
  410. package/templates/react-native/docs/components/navigation.md +0 -31
  411. package/templates/react-native/docs/features.md +0 -85
  412. package/templates/react-native/docs/getting-started.md +0 -47
  413. package/templates/react-native/src/components/common/HomeHeader.tsx +0 -43
  414. package/templates/react-native/src/components/settings/SettingToggle.tsx +0 -26
  415. package/templates/react-native/src/components/settings/SettingsOptions.tsx +0 -47
@@ -20,6 +20,9 @@ import { Txt } from "../common/Typography";
20
20
  import { Ionicons } from "@expo/vector-icons";
21
21
  import { useSafeAreaInsets } from "react-native-safe-area-context";
22
22
  import { useAuthStore } from "../../store/useAuthStore";
23
+ import { sidebarConfig } from "../../config/sidebar.config";
24
+ import { router } from "expo-router";
25
+ import Image from "./data-display/Image";
23
26
 
24
27
  const { width } = Dimensions.get("window");
25
28
  const SIDEBAR_WIDTH = width * 0.75;
@@ -27,6 +30,7 @@ const SIDEBAR_WIDTH = width * 0.75;
27
30
  interface SidebarProps {
28
31
  isOpen: boolean;
29
32
  onClose: () => void;
33
+ side?: "left" | "right";
30
34
  children?: React.ReactNode;
31
35
  }
32
36
 
@@ -44,24 +48,30 @@ const MenuItem = ({
44
48
  <TouchableOpacity
45
49
  activeOpacity={0.7}
46
50
  onPress={onPress}
47
- className="flex-row items-center py-4 px-4 rounded-2xl"
51
+ className="flex-row items-center py-4 px-6 rounded-2xl mx-2"
48
52
  >
49
53
  <View className="w-10 h-10 rounded-full items-center justify-center bg-primary/10 mr-4">
50
54
  <Ionicons name={icon} size={20} color={colors.primary} />
51
55
  </View>
52
- <Txt variant="h3" className="text-base-content font-medium">
56
+ <Txt variant="md" className="text-base-content font-semibold">
53
57
  {label}
54
58
  </Txt>
55
59
  </TouchableOpacity>
56
60
  );
57
61
 
58
- export default function Sidebar({ isOpen, onClose, children }: SidebarProps) {
62
+ export default function Sidebar({
63
+ isOpen,
64
+ onClose,
65
+ side = "left",
66
+ children,
67
+ }: SidebarProps) {
59
68
  const { colorScheme } = useColorScheme();
60
69
  const colors = Colors[colorScheme ?? "light"];
61
70
  const insets = useSafeAreaInsets();
62
71
  const { user, logout } = useAuthStore();
63
72
 
64
- const translateX = useSharedValue(-SIDEBAR_WIDTH);
73
+ const startValue = side === "left" ? -SIDEBAR_WIDTH : SIDEBAR_WIDTH;
74
+ const translateX = useSharedValue(isOpen ? 0 : startValue);
65
75
  const backdropOpacity = useSharedValue(0);
66
76
  const [isRendered, setIsRendered] = useState(false);
67
77
 
@@ -70,24 +80,26 @@ export default function Sidebar({ isOpen, onClose, children }: SidebarProps) {
70
80
  }
71
81
 
72
82
  useEffect(() => {
83
+ const targetValue = isOpen
84
+ ? 0
85
+ : side === "left"
86
+ ? -SIDEBAR_WIDTH
87
+ : SIDEBAR_WIDTH;
88
+ translateX.value = withTiming(targetValue, {
89
+ duration: 300,
90
+ easing: Easing.out(Easing.ease),
91
+ });
92
+
73
93
  if (isOpen) {
74
- translateX.value = withTiming(0, {
75
- duration: 300,
76
- easing: Easing.out(Easing.ease),
77
- });
78
94
  backdropOpacity.value = withTiming(0.4, { duration: 300 });
79
95
  } else {
80
- translateX.value = withTiming(-SIDEBAR_WIDTH, {
81
- duration: 300,
82
- easing: Easing.in(Easing.ease),
83
- });
84
96
  backdropOpacity.value = withTiming(0, { duration: 300 }, (finished) => {
85
97
  if (finished) {
86
98
  runOnJS(setIsRendered)(false);
87
99
  }
88
100
  });
89
101
  }
90
- }, [isOpen, backdropOpacity, translateX]);
102
+ }, [isOpen, side, backdropOpacity, translateX, startValue]);
91
103
 
92
104
  const sidebarAnimatedStyle = useAnimatedStyle(() => ({
93
105
  transform: [{ translateX: translateX.value }],
@@ -99,6 +111,9 @@ export default function Sidebar({ isOpen, onClose, children }: SidebarProps) {
99
111
 
100
112
  if (!isRendered && !isOpen) return null;
101
113
 
114
+ const role = user?.role?.toLowerCase() || "default";
115
+ const menuItems = sidebarConfig[role] || sidebarConfig.default;
116
+
102
117
  return (
103
118
  <Portal>
104
119
  <View style={[StyleSheet.absoluteFill, { zIndex: 999 }]}>
@@ -120,12 +135,13 @@ export default function Sidebar({ isOpen, onClose, children }: SidebarProps) {
120
135
  position: "absolute",
121
136
  top: 0,
122
137
  bottom: 0,
123
- left: 0,
138
+ left: side === "left" ? 0 : undefined,
139
+ right: side === "right" ? 0 : undefined,
124
140
  width: SIDEBAR_WIDTH,
125
141
  backgroundColor: colors.base100,
126
142
  elevation: 24,
127
143
  shadowColor: "#000",
128
- shadowOffset: { width: 5, height: 0 },
144
+ shadowOffset: { width: side === "left" ? 5 : -5, height: 0 },
129
145
  shadowOpacity: 0.2,
130
146
  shadowRadius: 15,
131
147
  overflow: "hidden",
@@ -137,13 +153,17 @@ export default function Sidebar({ isOpen, onClose, children }: SidebarProps) {
137
153
  <View className="flex-1">
138
154
  {/* Sidebar Header */}
139
155
  <View
140
- className="px-6 bg-base-200 border-b border-base-300 items-center flex flex-row gap-4"
156
+ className="px-6 bg-base-200 border-b border-base-300 items-center flex flex-row gap-4"
141
157
  style={{
142
158
  paddingTop: insets.top > 0 ? insets.top + 12 : 30,
143
- paddingBottom: 8,
159
+ paddingBottom: 16,
144
160
  }}
145
161
  >
146
- <View
162
+ <TouchableOpacity
163
+ onPress={() => {
164
+ onClose();
165
+ router.push("/(tenant)/profile");
166
+ }}
147
167
  className="w-12 h-12 rounded-full bg-primary items-center justify-center"
148
168
  style={{
149
169
  shadowColor: colors.primary,
@@ -153,15 +173,36 @@ export default function Sidebar({ isOpen, onClose, children }: SidebarProps) {
153
173
  elevation: 8,
154
174
  }}
155
175
  >
156
- <Txt variant="h3">
157
- {user?.name?.charAt(0).toUpperCase() || "U"}
158
- </Txt>
159
- </View>
160
- <View>
161
- <Txt variant="h2" className="text-xl mb-1">
176
+ {user?.avatar?.url ? (
177
+ <View className="w-11 h-11 rounded-full border border-base-300 overflow-hidden">
178
+ <Image
179
+ src={user.avatar.url}
180
+ style={{ width: 44, height: 44 }}
181
+ />
182
+ </View>
183
+ ) : (
184
+ <View className="w-11 h-11 rounded-full bg-primary/15 items-center justify-center border border-primary/10">
185
+ <Ionicons
186
+ name="person"
187
+ size={22}
188
+ color={colors.primary}
189
+ />
190
+ </View>
191
+ )}
192
+ </TouchableOpacity>
193
+ <View className="flex-1">
194
+ <Txt
195
+ variant="md"
196
+ className="font-bold text-base-content"
197
+ numberOfLines={1}
198
+ >
162
199
  {user?.name || "User Name"}
163
200
  </Txt>
164
- <Txt variant="caption" className="text-base-content/60">
201
+ <Txt
202
+ variant="xs"
203
+ className="text-base-content/50"
204
+ numberOfLines={1}
205
+ >
165
206
  {user?.email || "user@example.com"}
166
207
  </Txt>
167
208
  </View>
@@ -169,42 +210,30 @@ export default function Sidebar({ isOpen, onClose, children }: SidebarProps) {
169
210
 
170
211
  {/* Menu Items */}
171
212
  <View className="flex-1 pt-4">
172
- <MenuItem
173
- icon="home-outline"
174
- label="Dashboard"
175
- onPress={onClose}
176
- colors={colors}
177
- />
178
- <MenuItem
179
- icon="person-outline"
180
- label="Profile"
181
- onPress={onClose}
182
- colors={colors}
183
- />
184
- <MenuItem
185
- icon="settings-outline"
186
- label="Settings"
187
- onPress={onClose}
188
- colors={colors}
189
- />
190
- <MenuItem
191
- icon="help-buoy-outline"
192
- label="Help & Support"
193
- onPress={onClose}
194
- colors={colors}
195
- />
213
+ {menuItems.map((item, index) => (
214
+ <MenuItem
215
+ key={index}
216
+ icon={item.icon}
217
+ label={item.label}
218
+ onPress={() => {
219
+ onClose();
220
+ router.push(item.route as any);
221
+ }}
222
+ colors={colors}
223
+ />
224
+ ))}
196
225
  </View>
197
226
 
198
227
  {/* Footer */}
199
228
  <View
200
- className="p-6"
229
+ className="p-6 border-t border-base-300"
201
230
  style={{
202
231
  paddingBottom: insets.bottom > 0 ? insets.bottom + 10 : 20,
203
232
  }}
204
233
  >
205
234
  <TouchableOpacity
206
235
  activeOpacity={0.8}
207
- className="flex-row items-center justify-center p-3 rounded-xl bg-error/10"
236
+ className="flex-row items-center justify-center p-3 rounded-xl bg-error/10 border border-error/20"
208
237
  onPress={() => {
209
238
  onClose();
210
239
  logout();
@@ -215,11 +244,7 @@ export default function Sidebar({ isOpen, onClose, children }: SidebarProps) {
215
244
  size={20}
216
245
  color={colors.error}
217
246
  />
218
- <Txt
219
- variant="mid"
220
- className="ml-2 font-bold"
221
- style={{ color: colors.error }}
222
- >
247
+ <Txt variant="md" className="ml-2 font-bold text-error">
223
248
  Log Out
224
249
  </Txt>
225
250
  </TouchableOpacity>
@@ -1,12 +1,26 @@
1
1
  import React from "react";
2
- import { TouchableOpacity, ActivityIndicator, TouchableOpacityProps } from "react-native";
2
+ import {
3
+ TouchableOpacity,
4
+ ActivityIndicator,
5
+ TouchableOpacityProps,
6
+ View,
7
+ } from "react-native";
3
8
  import { useColorScheme } from "nativewind";
4
9
  import { Colors } from "../../../constants/Colors";
5
10
  import { Txt } from "../../common/Typography";
6
11
  import { Ionicons } from "@expo/vector-icons";
7
12
 
8
- export type ButtonVariant = "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "error" | "ghost" | "outline";
9
- export type ButtonSize = "sm" | "md" | "lg";
13
+ export type ButtonVariant =
14
+ | "primary"
15
+ | "secondary"
16
+ | "accent"
17
+ | "info"
18
+ | "success"
19
+ | "warning"
20
+ | "error"
21
+ | "ghost"
22
+ | "outline";
23
+ export type ButtonSize = "xs" | "sm" | "base" | "md" | "lg";
10
24
 
11
25
  export interface ButtonProps extends TouchableOpacityProps {
12
26
  label: string;
@@ -17,17 +31,19 @@ export interface ButtonProps extends TouchableOpacityProps {
17
31
  rightIcon?: keyof typeof Ionicons.glyphMap;
18
32
  isFullWidth?: boolean;
19
33
  soft?: boolean;
34
+ outline?: boolean;
20
35
  }
21
36
 
22
37
  export default function Button({
23
38
  label,
24
39
  variant = "primary",
25
- size = "md",
40
+ size = "base",
26
41
  isLoading = false,
27
42
  leftIcon,
28
43
  rightIcon,
29
44
  isFullWidth = false,
30
45
  soft = false,
46
+ outline = false,
31
47
  style,
32
48
  disabled,
33
49
  ...props
@@ -35,38 +51,73 @@ export default function Button({
35
51
  const { colorScheme } = useColorScheme();
36
52
  const theme = Colors[colorScheme ?? "light"];
37
53
 
38
- const getVariantStyles = (): { bg: string; text: string; border?: string } => {
54
+ const getVariantStyles = (): {
55
+ bg: string;
56
+ text: string;
57
+ border?: string;
58
+ } => {
39
59
  switch (variant) {
40
- case "primary": return { bg: theme.primary, text: theme.primaryContent };
41
- case "secondary": return { bg: theme.secondary, text: theme.secondaryContent };
42
- case "accent": return { bg: theme.accent, text: theme.accentContent };
43
- case "info": return { bg: theme.info, text: "#fff" };
44
- case "success": return { bg: theme.success, text: "#fff" };
45
- case "warning": return { bg: theme.warning, text: "#fff" };
46
- case "error": return { bg: theme.error, text: "#fff" };
47
- case "ghost": return { bg: "transparent", text: theme.baseContent };
48
- case "outline": return { bg: "transparent", text: theme.baseContent, border: theme.base300 };
49
- default: return { bg: theme.primary, text: theme.primaryContent };
60
+ case "primary":
61
+ return { bg: theme.primary, text: theme.primaryContent };
62
+ case "secondary":
63
+ return { bg: theme.secondary, text: theme.secondaryContent };
64
+ case "accent":
65
+ return { bg: theme.accent, text: theme.accentContent };
66
+ case "info":
67
+ return { bg: theme.info, text: "#fff" };
68
+ case "success":
69
+ return { bg: theme.success, text: "#fff" };
70
+ case "warning":
71
+ return { bg: theme.warning, text: "#fff" };
72
+ case "error":
73
+ return { bg: theme.error, text: "#fff" };
74
+ case "ghost":
75
+ return { bg: "transparent", text: theme.baseContent };
76
+ case "outline":
77
+ return {
78
+ bg: "transparent",
79
+ text: theme.baseContent,
80
+ border: theme.base300,
81
+ };
82
+ default:
83
+ return { bg: theme.primary, text: theme.primaryContent };
50
84
  }
51
85
  };
52
86
 
53
- const getSizeStyles = (): { height: number; px: number; fontSize: number; iconSize: number } => {
87
+ const getSizeStyles = (): {
88
+ height: number;
89
+ px: number;
90
+ fontSize: number;
91
+ iconSize: number;
92
+ } => {
54
93
  switch (size) {
55
- case "sm": return { height: 36, px: 12, fontSize: 13, iconSize: 16 };
56
- case "md": return { height: 48, px: 16, fontSize: 15, iconSize: 20 };
57
- case "lg": return { height: 56, px: 24, fontSize: 17, iconSize: 24 };
58
- default: return { height: 48, px: 16, fontSize: 15, iconSize: 20 };
94
+ case "xs":
95
+ return { height: 30, px: 10, fontSize: 12, iconSize: 14 };
96
+ case "sm":
97
+ return { height: 36, px: 12, fontSize: 13, iconSize: 16 };
98
+ case "base":
99
+ return { height: 40, px: 12, fontSize: 14, iconSize: 16 };
100
+ case "md":
101
+ return { height: 48, px: 16, fontSize: 15, iconSize: 20 };
102
+ case "lg":
103
+ return { height: 56, px: 24, fontSize: 17, iconSize: 24 };
104
+ default:
105
+ return { height: 40, px: 12, fontSize: 14, iconSize: 16 };
59
106
  }
60
107
  };
61
108
 
62
109
  const vStyles = getVariantStyles();
63
- if (soft && variant !== "ghost" && variant !== "outline") {
110
+ if (outline) {
111
+ vStyles.border = vStyles.bg === "transparent" ? theme.base300 : vStyles.bg;
112
+ vStyles.text = vStyles.bg === "transparent" ? theme.baseContent : vStyles.bg;
113
+ vStyles.bg = "transparent";
114
+ } else if (soft && variant !== "ghost" && variant !== "outline") {
64
115
  vStyles.text = vStyles.bg;
65
116
  vStyles.bg = vStyles.bg + "26"; // ~15% opacity
66
117
  }
67
118
 
68
119
  const sStyles = getSizeStyles();
69
-
120
+
70
121
  const isDisabled = disabled || isLoading;
71
122
 
72
123
  return (
@@ -83,7 +134,7 @@ export default function Button({
83
134
  alignItems: "center",
84
135
  justifyContent: "center",
85
136
  opacity: isDisabled ? 0.6 : 1,
86
- borderWidth: variant === "outline" ? 1 : 0,
137
+ borderWidth: (variant === "outline" || outline) ? 1 : 0,
87
138
  borderColor: vStyles.border,
88
139
  width: isFullWidth ? "100%" : undefined,
89
140
  },
@@ -91,21 +142,39 @@ export default function Button({
91
142
  ]}
92
143
  {...props}
93
144
  >
94
- {isLoading ? (
95
- <ActivityIndicator color={vStyles.text} size="small" />
96
- ) : (
97
- <>
98
- {leftIcon && (
99
- <Ionicons name={leftIcon} size={sStyles.iconSize} color={vStyles.text} style={{ marginRight: 8 }} />
100
- )}
101
- <Txt style={{ color: vStyles.text, fontSize: sStyles.fontSize, fontWeight: "600" }}>
102
- {label}
103
- </Txt>
104
- {rightIcon && (
105
- <Ionicons name={rightIcon} size={sStyles.iconSize} color={vStyles.text} style={{ marginLeft: 8 }} />
106
- )}
107
- </>
145
+ {/* Loading overlay */}
146
+ {isLoading && (
147
+ <View style={{ position: "absolute", top: 0, left: 0, right: 0, bottom: 0, justifyContent: "center", alignItems: "center" }}>
148
+ <ActivityIndicator color={vStyles.text} size="small" />
149
+ </View>
108
150
  )}
151
+
152
+ {/* Button content (hidden while loading to maintain dimensions) */}
153
+ <View style={{ flexDirection: "row", alignItems: "center", opacity: isLoading ? 0 : 1 }}>
154
+ {leftIcon && (
155
+ <Ionicons
156
+ name={leftIcon}
157
+ size={sStyles.iconSize}
158
+ color={vStyles.text}
159
+ style={{ marginRight: 8 }}
160
+ />
161
+ )}
162
+ <Txt
163
+ color={vStyles.text}
164
+ weight="semibold"
165
+ style={{ fontSize: sStyles.fontSize }}
166
+ >
167
+ {label}
168
+ </Txt>
169
+ {rightIcon && (
170
+ <Ionicons
171
+ name={rightIcon}
172
+ size={sStyles.iconSize}
173
+ color={vStyles.text}
174
+ style={{ marginLeft: 8 }}
175
+ />
176
+ )}
177
+ </View>
109
178
  </TouchableOpacity>
110
179
  );
111
180
  }
@@ -10,6 +10,7 @@ export interface IconButtonProps extends TouchableOpacityProps {
10
10
  variant?: ButtonVariant;
11
11
  size?: ButtonSize;
12
12
  isLoading?: boolean;
13
+ color?: string;
13
14
  }
14
15
 
15
16
  export default function IconButton({
@@ -17,6 +18,7 @@ export default function IconButton({
17
18
  variant = "ghost",
18
19
  size = "md",
19
20
  isLoading = false,
21
+ color,
20
22
  style,
21
23
  disabled,
22
24
  ...props
@@ -73,9 +75,9 @@ export default function IconButton({
73
75
  {...props}
74
76
  >
75
77
  {isLoading ? (
76
- <ActivityIndicator color={vStyles.iconColor} size="small" />
78
+ <ActivityIndicator color={color || vStyles.iconColor} size="small" />
77
79
  ) : (
78
- <Ionicons name={icon} size={sStyles.iconSize} color={vStyles.iconColor} />
80
+ <Ionicons name={icon} size={sStyles.iconSize} color={color || vStyles.iconColor} />
79
81
  )}
80
82
  </TouchableOpacity>
81
83
  );
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from "react";
2
- import { View, TouchableOpacity, Text } from "react-native";
2
+ import { View, TouchableOpacity } from "react-native";
3
3
  import Animated, {
4
4
  useAnimatedStyle,
5
5
  useSharedValue,
@@ -11,6 +11,7 @@ import Animated, {
11
11
  import { Ionicons } from "@expo/vector-icons";
12
12
  import { useColorScheme } from "nativewind";
13
13
  import { Colors } from "../../../constants/Colors";
14
+ import { Txt } from "../../common/Typography";
14
15
 
15
16
  export interface AccordionProps {
16
17
  title: string;
@@ -60,7 +61,7 @@ export default function Accordion({ title, children }: AccordionProps) {
60
61
  onPress={toggleAccordion}
61
62
  style={{ padding: 16, flexDirection: "row", justifyContent: "space-between", alignItems: "center" }}
62
63
  >
63
- <Text style={{ color: theme.baseContent, fontWeight: "600", fontSize: 16 }}>{title}</Text>
64
+ <Txt color={theme.baseContent} weight="semibold" variant="md">{title}</Txt>
64
65
  <Animated.View style={iconStyle}>
65
66
  <Ionicons name="chevron-down" size={24} color={theme.baseContent} />
66
67
  </Animated.View>
@@ -1,8 +1,9 @@
1
1
  import React from "react";
2
- import { View, Text, ViewProps } from "react-native";
2
+ import { View, ViewProps } from "react-native";
3
3
  import { Image } from "expo-image";
4
4
  import { useColorScheme } from "nativewind";
5
5
  import { Colors } from "../../../constants/Colors";
6
+ import { Txt } from "../../common/Typography";
6
7
 
7
8
  export interface AvatarProps extends ViewProps {
8
9
  url?: string;
@@ -37,9 +38,9 @@ export default function Avatar({ url, initials, size = 48, style, ...props }: Av
37
38
  contentFit="cover"
38
39
  />
39
40
  ) : (
40
- <Text style={{ color: theme.baseContent, fontSize: size * 0.4, fontWeight: "600" }}>
41
+ <Txt color={theme.baseContent} weight="semibold" style={{ fontSize: size * 0.4 }}>
41
42
  {initials?.substring(0, 2).toUpperCase()}
42
- </Text>
43
+ </Txt>
43
44
  )}
44
45
  </View>
45
46
  );
@@ -1,19 +1,28 @@
1
1
  import React from "react";
2
- import { View, Text, ViewProps } from "react-native";
2
+ import { View, ViewProps } from "react-native";
3
3
  import { useColorScheme } from "nativewind";
4
4
  import { Colors } from "../../../constants/Colors";
5
+ import { Txt } from "../../common/Typography";
5
6
 
6
7
  export interface BadgeProps extends ViewProps {
7
8
  label: string;
8
- variant?: "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "error" | "neutral";
9
- size?: "sm" | "md" | "lg";
9
+ variant?:
10
+ | "primary"
11
+ | "secondary"
12
+ | "accent"
13
+ | "info"
14
+ | "success"
15
+ | "warning"
16
+ | "error"
17
+ | "neutral";
18
+ size?: "xs" | "sm" | "base" | "md" | "lg";
10
19
  soft?: boolean;
11
20
  }
12
21
 
13
22
  export default function Badge({
14
23
  label,
15
24
  variant = "primary",
16
- size = "md",
25
+ size = "base",
17
26
  soft = false,
18
27
  style,
19
28
  ...props
@@ -23,24 +32,39 @@ export default function Badge({
23
32
 
24
33
  const getVariantStyles = (): { bg: string; text: string } => {
25
34
  switch (variant) {
26
- case "secondary": return { bg: theme.secondary, text: theme.secondaryContent };
27
- case "accent": return { bg: theme.accent, text: theme.accentContent };
28
- case "info": return { bg: theme.info, text: "#fff" };
29
- case "success": return { bg: theme.success, text: "#fff" };
30
- case "warning": return { bg: theme.warning, text: "#fff" };
31
- case "error": return { bg: theme.error, text: "#fff" };
32
- case "neutral": return { bg: theme.neutral, text: theme.neutralContent };
35
+ case "secondary":
36
+ return { bg: theme.secondary, text: theme.secondaryContent };
37
+ case "accent":
38
+ return { bg: theme.accent, text: theme.accentContent };
39
+ case "info":
40
+ return { bg: theme.info, text: "#fff" };
41
+ case "success":
42
+ return { bg: theme.success, text: "#fff" };
43
+ case "warning":
44
+ return { bg: theme.warning, text: "#fff" };
45
+ case "error":
46
+ return { bg: theme.error, text: "#fff" };
47
+ case "neutral":
48
+ return { bg: theme.neutral, text: theme.neutralContent };
33
49
  case "primary":
34
- default: return { bg: theme.primary, text: theme.primaryContent };
50
+ default:
51
+ return { bg: theme.primary, text: theme.primaryContent };
35
52
  }
36
53
  };
37
54
 
38
55
  const getSizeStyles = () => {
39
56
  switch (size) {
40
- case "sm": return { height: 20, px: 6, fontSize: 10 };
41
- case "lg": return { height: 28, px: 12, fontSize: 14 };
57
+ case "xs":
58
+ return { height: 16, px: 4, fontSize: 6 };
59
+ case "sm":
60
+ return { height: 18, px: 6, fontSize: 8 };
61
+ case "base":
62
+ return { height: 22, px: 8, fontSize: 10 };
63
+ case "lg":
64
+ return { height: 28, px: 12, fontSize: 14 };
42
65
  case "md":
43
- default: return { height: 24, px: 8, fontSize: 12 };
66
+ default:
67
+ return { height: 24, px: 8, fontSize: 12 };
44
68
  }
45
69
  };
46
70
 
@@ -68,9 +92,13 @@ export default function Badge({
68
92
  ]}
69
93
  {...props}
70
94
  >
71
- <Text style={{ color: vStyles.text, fontSize: sStyles.fontSize, fontWeight: "600" }}>
95
+ <Txt
96
+ color={vStyles.text}
97
+ weight="semibold"
98
+ style={{ fontSize: sStyles.fontSize }}
99
+ >
72
100
  {label}
73
- </Text>
101
+ </Txt>
74
102
  </View>
75
103
  );
76
104
  }
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import { StatusBar } from "react-native";
2
3
  import ImageViewing from "react-native-image-viewing";
3
4
  import { ImageSource } from "react-native-image-viewing/dist/@types";
4
5
 
@@ -9,15 +10,24 @@ export interface ImageViewerProps {
9
10
  onRequestClose: () => void;
10
11
  }
11
12
 
12
- export default function ImageViewer({ images, imageIndex, visible, onRequestClose }: ImageViewerProps) {
13
+ export default function ImageViewer({
14
+ images,
15
+ imageIndex,
16
+ visible,
17
+ onRequestClose,
18
+ }: ImageViewerProps) {
13
19
  return (
14
- <ImageViewing
15
- images={images}
16
- imageIndex={imageIndex}
17
- visible={visible}
18
- onRequestClose={onRequestClose}
19
- swipeToCloseEnabled
20
- doubleTapToZoomEnabled
21
- />
20
+ <>
21
+ <StatusBar hidden={visible} />
22
+ <ImageViewing
23
+ images={images}
24
+ imageIndex={imageIndex}
25
+ visible={visible}
26
+ onRequestClose={onRequestClose}
27
+ swipeToCloseEnabled
28
+ doubleTapToZoomEnabled
29
+ presentationStyle="overFullScreen"
30
+ />
31
+ </>
22
32
  );
23
33
  }