@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
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "React App",
3
+ "short_name": "React",
4
+ "description": "A React application built with @imksh/create",
5
+ "start_url": "/",
6
+ "display": "standalone",
7
+ "background_color": "#1d232a",
8
+ "theme_color": "#2563eb",
9
+ "orientation": "any",
10
+ "icons": [
11
+ {
12
+ "src": "/favicon.ico",
13
+ "sizes": "192x192",
14
+ "type": "image/x-icon",
15
+ "purpose": "any maskable"
16
+ },
17
+ {
18
+ "src": "/favicon.svg",
19
+ "sizes": "512x512",
20
+ "type": "image/svg+xml",
21
+ "purpose": "any maskable"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,56 @@
1
+ const CACHE_NAME = "React App";
2
+ const ASSETS = ["/", "/index.html", "/logo.png", "/manifest.json"];
3
+
4
+ // Install Event
5
+ self.addEventListener("install", (e) => {
6
+ e.waitUntil(
7
+ caches
8
+ .open(CACHE_NAME)
9
+ .then((cache) => {
10
+ return cache.addAll(ASSETS);
11
+ })
12
+ .then(() => self.skipWaiting()),
13
+ );
14
+ });
15
+
16
+ // Activate Event
17
+ self.addEventListener("activate", (e) => {
18
+ e.waitUntil(
19
+ caches
20
+ .keys()
21
+ .then((keys) => {
22
+ return Promise.all(
23
+ keys.map((key) => {
24
+ if (key !== CACHE_NAME) {
25
+ return caches.delete(key);
26
+ }
27
+ }),
28
+ );
29
+ })
30
+ .then(() => self.clients.claim()),
31
+ );
32
+ });
33
+
34
+ // Fetch Event (Network First, fallback to cache)
35
+ self.addEventListener("fetch", (e) => {
36
+ // Only handle GET requests and skip chrome-extension/dev-tools queries
37
+ if (
38
+ e.request.method !== "GET" ||
39
+ !e.request.url.startsWith(self.location.origin)
40
+ ) {
41
+ return;
42
+ }
43
+
44
+ e.respondWith(
45
+ fetch(e.request)
46
+ .then((res) => {
47
+ // Cache clone of successful network response
48
+ const resClone = res.clone();
49
+ caches.open(CACHE_NAME).then((cache) => {
50
+ cache.put(e.request, resClone);
51
+ });
52
+ return res;
53
+ })
54
+ .catch(() => caches.match(e.request)),
55
+ );
56
+ });
@@ -0,0 +1,68 @@
1
+ import React, { useEffect } from "react";
2
+ import { Routes, Route } from "react-router-dom";
3
+ import { Toaster } from "react-hot-toast";
4
+ import Home from "./features/core/pages/Home";
5
+ import Login from "./features/auth/pages/Login";
6
+ import Profile from "./features/core/pages/Profile";
7
+ import Scroll from "./components/shared/Scroll";
8
+ import Loading from "./components/ui/Loading";
9
+ import useLenis from "./hooks/useLenis";
10
+ import { useAuthStore } from "./features/auth/store/useAuthStore";
11
+ import NotFound from "./components/shared/NotFound";
12
+ import Unauthorized from "./components/shared/Unauthorized";
13
+ import ProtectedRoute from "./components/layout/ProtectedRoute";
14
+ import PublicLayout from "./components/layout/PublicLayout";
15
+ import SidebarLayout from "./components/layout/SidebarLayout";
16
+
17
+ const App = () => {
18
+ const { getMe, isCheckingAuth } = useAuthStore();
19
+
20
+ // Initialize Lenis smooth scroll
21
+ // useLenis();
22
+
23
+ // useEffect(() => {
24
+ // getMe();
25
+ // }, []);
26
+
27
+ // if (isCheckingAuth) {
28
+ // return (
29
+ // <div className="flex h-screen items-center justify-center bg-base-100">
30
+ // <Loading />
31
+ // </div>
32
+ // );
33
+ // }
34
+
35
+ return (
36
+ <div className="min-h-screen bg-base-100 text-base-content">
37
+ <Toaster position="top-right" />
38
+ <Scroll />
39
+ <Routes>
40
+ {/* <Route path="/" element={<Home />} /> */}
41
+
42
+ <Route element={<SidebarLayout />}>
43
+ <Route path="/" element={<Home />} />
44
+ </Route>
45
+
46
+ {/* Auth Page Routes */}
47
+ <Route path="/login" element={<Login />} />
48
+ <Route path="/unauthorized" element={<Unauthorized />} />
49
+
50
+ {/* Protected Routes wrapped in ProtectedRoute and SidebarLayout */}
51
+ <Route
52
+ element={
53
+ <ProtectedRoute>
54
+ <SidebarLayout />
55
+ </ProtectedRoute>
56
+ }
57
+ >
58
+ <Route path="/profile" element={<Profile />} />
59
+ </Route>
60
+
61
+ {/* Fallback Route */}
62
+ <Route path="/*" element={<NotFound />} />
63
+ </Routes>
64
+ </div>
65
+ );
66
+ };
67
+
68
+ export default App;
@@ -0,0 +1 @@
1
+ {"v":"4.6.8","fr":29.9700012207031,"ip":0,"op":40.0000016292334,"w":256,"h":256,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 3","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":20,"s":[208.6,127.969,0],"e":[208.6,88,0],"to":[0,-6.66145849227905,0],"ti":[0,-0.00520833348855,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":30,"s":[208.6,88,0],"e":[208.6,128,0],"to":[0,0.00520833348855,0],"ti":[0,-6.66666650772095,0]},{"t":40.0000016292334}]},"a":{"a":0,"k":[-70,-0.5,0]},"s":{"a":0,"k":[75,75,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[33.75,34.5]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":0,"k":[0.9843137,0.5490196,0,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":0,"k":[-70.125,-0.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group"}],"ip":0,"op":300.00001221925,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 2","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":15,"s":[168.6,128,0],"e":[168.6,88,0],"to":[0,-6.66666650772095,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":25,"s":[168.6,88,0],"e":[168.6,128,0],"to":[0,0,0],"ti":[0,-6.66666650772095,0]},{"t":35.0000014255792}]},"a":{"a":0,"k":[-70,-0.5,0]},"s":{"a":0,"k":[75,75,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[33.75,34.5]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":0,"k":[0.9921569,0.8470588,0.2078431,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":0,"k":[-70.125,-0.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group"}],"ip":0,"op":300.00001221925,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 1","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":10,"s":[128.594,127.969,0],"e":[128.594,88,0],"to":[0,-6.66145849227905,0],"ti":[0,-0.00520833348855,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":20,"s":[128.594,88,0],"e":[128.594,128,0],"to":[0,0.00520833348855,0],"ti":[0,-6.66666650772095,0]},{"t":30.0000012219251}]},"a":{"a":0,"k":[-70,-0.5,0]},"s":{"a":0,"k":[75,75,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[33.75,34.5]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":0,"k":[0.2627451,0.627451,0.2784314,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":0,"k":[-70.125,-0.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group"}],"ip":0,"op":300.00001221925,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 4","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":5,"s":[88.6,127.969,0],"e":[88.6,88,0],"to":[0,-6.66145849227905,0],"ti":[0,-0.00520833348855,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":15,"s":[88.6,88,0],"e":[88.6,128,0],"to":[0,0.00520833348855,0],"ti":[0,-6.66666650772095,0]},{"t":25.0000010182709}]},"a":{"a":0,"k":[-70,-0.5,0]},"s":{"a":0,"k":[75,75,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[33.75,34.5]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":0,"k":[0.1176471,0.5333334,0.8980392,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":0,"k":[-70.125,-0.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group"}],"ip":0,"op":300.00001221925,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":5,"ty":4,"nm":"Shape Layer 5","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":0,"s":[48.6,127.969,0],"e":[48.6,88,0],"to":[0,-6.66145849227905,0],"ti":[0,-0.00520833348855,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":10,"s":[48.6,88,0],"e":[48.6,128,0],"to":[0,0.00520833348855,0],"ti":[0,-6.66666650772095,0]},{"t":20.0000008146167}]},"a":{"a":0,"k":[-70,-0.5,0]},"s":{"a":0,"k":[75,75,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[33.75,34.5]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","c":{"a":0,"k":[0.8980392,0.2235294,0.2078431,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":0,"k":[-70.125,-0.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group"}],"ip":0,"op":300.00001221925,"st":0,"bm":0,"sr":1}]}
@@ -0,0 +1,29 @@
1
+ import {
2
+ FaHome,
3
+ FaUser,
4
+ FaCog,
5
+ FaBook
6
+ } from "react-icons/fa";
7
+
8
+ export const navigation = [
9
+ {
10
+ title: "Home",
11
+ path: "/",
12
+ icon: FaHome,
13
+ },
14
+ {
15
+ title: "Courses",
16
+ path: "/courses",
17
+ icon: FaBook,
18
+ },
19
+ {
20
+ title: "Profile",
21
+ path: "/profile",
22
+ icon: FaUser,
23
+ },
24
+ {
25
+ title: "Settings",
26
+ path: "/settings",
27
+ icon: FaCog,
28
+ },
29
+ ];
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import { Navigate } from "react-router-dom";
3
+ import { useAuthStore } from "../../features/auth/store/useAuthStore";
4
+ import Loading from "../ui/Loading";
5
+
6
+ interface ProtectedRouteProps {
7
+ children: React.ReactNode;
8
+ role?: string;
9
+ }
10
+
11
+ const ProtectedRoute: React.FC<ProtectedRouteProps> = ({ children, role }) => {
12
+ const { user, isCheckingAuth } = useAuthStore();
13
+
14
+ if (loading) return <Loading />;
15
+
16
+ if (!user) return <Navigate to="/login" />;
17
+
18
+ if (role && user.role !== role) return <Navigate to="/" />;
19
+
20
+ return children;
21
+ };
22
+
23
+ export default ProtectedRoute;
@@ -0,0 +1,13 @@
1
+ import { Outlet } from "react-router-dom";
2
+ import Header from "../ui/Header";
3
+
4
+ const PublicLayout = () => {
5
+ return (
6
+ <>
7
+ <Header />
8
+ <Outlet />
9
+ </>
10
+ );
11
+ };
12
+
13
+ export default PublicLayout;
@@ -0,0 +1,37 @@
1
+ import { useEffect } from "react";
2
+ import { Outlet, useLocation } from "react-router-dom";
3
+ import SidebarHeader from "../ui/SidebarHeader";
4
+ import Sidebar from "../ui/sidebar";
5
+ import { useUiStore } from "../../store/useUiStore";
6
+ import appConfig from "../../config/index";
7
+
8
+ const SidebarLayout = () => {
9
+ const { headerTitle, headerActions, setHeaderTitle, setHeaderActions } =
10
+ useUiStore();
11
+ const { pathname } = useLocation();
12
+
13
+ // Reset header title and actions whenever the route shifts
14
+ useEffect(() => {
15
+ setHeaderTitle(appConfig.app.name);
16
+ setHeaderActions(null);
17
+ }, [pathname, setHeaderTitle, setHeaderActions]);
18
+
19
+ return (
20
+ <div className="flex h-screen overflow-hidden">
21
+ <Sidebar />
22
+
23
+ <div className="flex flex-1 flex-col overflow-hidden">
24
+ <SidebarHeader title={headerTitle} actions={headerActions} />
25
+
26
+ <main
27
+ className="flex-1 h-full overflow-y-auto px-2 py-6 md:p-6 max-w-7xl"
28
+ data-lenis-prevent
29
+ >
30
+ <Outlet />
31
+ </main>
32
+ </div>
33
+ </div>
34
+ );
35
+ };
36
+
37
+ export default SidebarLayout;
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ import { Link } from "react-router-dom";
3
+ import { ChevronRight } from "lucide-react";
4
+
5
+ export const Breadcrumbs = ({ items }) => {
6
+ return (
7
+ <div className="flex items-center gap-1.5 text-sm font-bold text-base-content/50 flex-wrap">
8
+ {items.map((item, idx) => {
9
+ const isLast = idx === items.length - 1;
10
+ return (
11
+ <React.Fragment key={idx}>
12
+ {item.path && !isLast ? (
13
+ <Link to={item.path} className="hover:text-primary transition-colors">
14
+ {item.label}
15
+ </Link>
16
+ ) : (
17
+ <span className={isLast ? "text-base font-black text-base-content tracking-tight" : ""}>
18
+ {item.label}
19
+ </span>
20
+ )}
21
+ {!isLast && <ChevronRight size={14} className="text-base-content/30 shrink-0" />}
22
+ </React.Fragment>
23
+ );
24
+ })}
25
+ </div>
26
+ );
27
+ };
@@ -0,0 +1,36 @@
1
+ import { memo, useEffect, useRef } from "react";
2
+ import { useInView } from "framer-motion";
3
+ import lottie from "lottie-web";
4
+
5
+ const LottieIcon = memo(
6
+ ({ animation, className = "", loop = true, autoplay = true }) => {
7
+ const containerRef = useRef(null);
8
+
9
+ const isInView = useInView(containerRef, {
10
+ once: true,
11
+ margin: "100px",
12
+ });
13
+
14
+ useEffect(() => {
15
+ if (!isInView || !containerRef.current) return;
16
+
17
+ const instance = lottie.loadAnimation({
18
+ container: containerRef.current,
19
+ renderer: "svg",
20
+ loop,
21
+ autoplay,
22
+ animationData: animation,
23
+ });
24
+
25
+ return () => {
26
+ instance.destroy();
27
+ };
28
+ }, [animation, autoplay, loop, isInView]);
29
+
30
+ return <div ref={containerRef} className={className} />;
31
+ },
32
+ );
33
+
34
+ LottieIcon.displayName = "LottieIcon";
35
+
36
+ export default LottieIcon;
@@ -0,0 +1,78 @@
1
+ import { motion } from "framer-motion";
2
+ import { Link } from "react-router-dom";
3
+ import { FaArrowLeft, FaHouse } from "react-icons/fa6";
4
+
5
+ const NotFound = () => {
6
+ return (
7
+ <div className="min-h-screen flex items-center justify-center bg-base-100 px-6">
8
+ <div className="max-w-lg text-center">
9
+ <motion.h1
10
+ initial={{ opacity: 0, scale: 0.6 }}
11
+ animate={{ opacity: 1, scale: 1 }}
12
+ transition={{
13
+ duration: 0.5,
14
+ type: "spring",
15
+ stiffness: 120,
16
+ }}
17
+ className="text-8xl md:text-9xl font-black text-primary"
18
+ >
19
+ 404
20
+ </motion.h1>
21
+
22
+ <motion.h2
23
+ initial={{ opacity: 0, y: 20 }}
24
+ animate={{ opacity: 1, y: 0 }}
25
+ transition={{ delay: 0.15 }}
26
+ className="mt-6 text-3xl font-bold"
27
+ >
28
+ Page Not Found
29
+ </motion.h2>
30
+
31
+ <motion.p
32
+ initial={{ opacity: 0 }}
33
+ animate={{ opacity: 0.7 }}
34
+ transition={{ delay: 0.3 }}
35
+ className="mt-3 text-base-content/70"
36
+ >
37
+ Sorry, the page you're looking for doesn't exist or has been moved.
38
+ </motion.p>
39
+
40
+ <motion.div
41
+ initial={{ opacity: 0, y: 25 }}
42
+ animate={{ opacity: 1, y: 0 }}
43
+ transition={{ delay: 0.45 }}
44
+ className="mt-8 flex flex-wrap justify-center gap-3"
45
+ >
46
+ <Link to="/" className="btn btn-primary gap-2">
47
+ <FaHouse />
48
+ Home
49
+ </Link>
50
+
51
+ <button
52
+ onClick={() => window.history.back()}
53
+ className="btn btn-ghost gap-2"
54
+ >
55
+ <FaArrowLeft />
56
+ Go Back
57
+ </button>
58
+ </motion.div>
59
+
60
+ <motion.div
61
+ initial={{ opacity: 0 }}
62
+ animate={{
63
+ opacity: [0.2, 0.6, 0.2],
64
+ }}
65
+ transition={{
66
+ repeat: Infinity,
67
+ duration: 2,
68
+ }}
69
+ className="mt-16 text-8xl font-black text-base-300 select-none"
70
+ >
71
+ ?
72
+ </motion.div>
73
+ </div>
74
+ </div>
75
+ );
76
+ };
77
+
78
+ export default NotFound;
@@ -0,0 +1,72 @@
1
+ import { useEffect, useState } from "react";
2
+ import usePwaInstall from "../../hooks/usePwaInstall";
3
+
4
+ const DISMISS_KEY = "gradify_pwa_dismissed_at";
5
+ const DISMISS_TTL_MS = 7 * 24 * 60 * 60 * 1000;
6
+
7
+ const wasDismissedRecently = () => {
8
+ const raw = localStorage.getItem(DISMISS_KEY);
9
+ if (!raw) return false;
10
+ const dismissedAt = Number(raw);
11
+ if (!Number.isFinite(dismissedAt)) return false;
12
+ return Date.now() - dismissedAt < DISMISS_TTL_MS;
13
+ };
14
+
15
+ const PwaInstallPrompt = () => {
16
+ const { canInstall, isInstalled, promptInstall } = usePwaInstall();
17
+ const [visible, setVisible] = useState(false);
18
+
19
+ useEffect(() => {
20
+ if (typeof window === "undefined") return undefined;
21
+ if (!canInstall || wasDismissedRecently() || isInstalled) {
22
+ setVisible(false);
23
+ return undefined;
24
+ }
25
+
26
+ setVisible(true);
27
+ return undefined;
28
+ }, [canInstall, isInstalled]);
29
+
30
+ const handleInstall = async () => {
31
+ const result = await promptInstall();
32
+ if (result?.outcome === "accepted") {
33
+ setVisible(false);
34
+ return;
35
+ }
36
+ localStorage.setItem(DISMISS_KEY, String(Date.now()));
37
+ setVisible(false);
38
+ };
39
+
40
+ const handleDismiss = () => {
41
+ localStorage.setItem(DISMISS_KEY, String(Date.now()));
42
+ setVisible(false);
43
+ };
44
+
45
+ if (!visible) return null;
46
+
47
+ return (
48
+ <div className="fixed bottom-5 right-5 z-50 w-[min(92vw,360px)] rounded-2xl border border-(--border-color) bg-(--card-bg) p-4 shadow-lg">
49
+ <p className="text-sm text-(--text-secondary)">
50
+ Install Gradify for faster access and offline-ready learning.
51
+ </p>
52
+ <div className="mt-3 flex items-center gap-2">
53
+ <button
54
+ type="button"
55
+ onClick={handleInstall}
56
+ className="rounded-xl bg-(--color-primary) px-4 py-2 text-sm font-semibold text-white hover:opacity-90"
57
+ >
58
+ Install App
59
+ </button>
60
+ <button
61
+ type="button"
62
+ onClick={handleDismiss}
63
+ className="rounded-xl border border-(--border-color) px-3 py-2 text-sm text-(--text-secondary) hover:bg-(--bg-muted)"
64
+ >
65
+ Not now
66
+ </button>
67
+ </div>
68
+ </div>
69
+ );
70
+ };
71
+
72
+ export default PwaInstallPrompt;
@@ -0,0 +1,67 @@
1
+ import { useEffect } from "react";
2
+ import { useLocation } from "react-router-dom";
3
+
4
+ const SEO = ({
5
+ title,
6
+ description,
7
+ keywords,
8
+ canonical,
9
+ noIndex = false,
10
+ }) => {
11
+ const location = useLocation();
12
+
13
+ useEffect(() => {
14
+ // TITLE
15
+ if (title) {
16
+ document.title = title;
17
+ }
18
+
19
+ // DESCRIPTION
20
+ if (description) {
21
+ let meta = document.querySelector("meta[name='description']");
22
+ if (!meta) {
23
+ meta = document.createElement("meta");
24
+ meta.name = "description";
25
+ document.head.appendChild(meta);
26
+ }
27
+ meta.content = description;
28
+ }
29
+
30
+ // KEYWORDS (optional)
31
+ if (keywords) {
32
+ let meta = document.querySelector("meta[name='keywords']");
33
+ if (!meta) {
34
+ meta = document.createElement("meta");
35
+ meta.name = "keywords";
36
+ document.head.appendChild(meta);
37
+ }
38
+ meta.content = keywords;
39
+ }
40
+
41
+ // CANONICAL
42
+ let link = document.querySelector("link[rel='canonical']");
43
+ if (!link) {
44
+ link = document.createElement("link");
45
+ link.rel = "canonical";
46
+ document.head.appendChild(link);
47
+ }
48
+
49
+ link.href =
50
+ canonical ||
51
+ `https://shreebaglamukhi.com${location.pathname}`;
52
+
53
+ // ROBOTS
54
+ let robots = document.querySelector("meta[name='robots']");
55
+ if (!robots) {
56
+ robots = document.createElement("meta");
57
+ robots.name = "robots";
58
+ document.head.appendChild(robots);
59
+ }
60
+
61
+ robots.content = noIndex ? "noindex,nofollow" : "index,follow";
62
+ }, [title, description, keywords, canonical, noIndex, location.pathname]);
63
+
64
+ return null;
65
+ };
66
+
67
+ export default SEO;
@@ -0,0 +1,25 @@
1
+ import { useEffect, useRef } from "react";
2
+ import { useLocation, useNavigationType } from "react-router-dom";
3
+
4
+ export default function ScrollRestoration() {
5
+ const { pathname, key } = useLocation();
6
+ const navigationType = useNavigationType();
7
+ const positions = useRef(new Map());
8
+
9
+ useEffect(() => {
10
+ const main = document.querySelector("main");
11
+ if (!main) return;
12
+
13
+ if (navigationType === "POP") {
14
+ main.scrollTop = positions.current.get(key) ?? 0;
15
+ } else {
16
+ main.scrollTop = 0;
17
+ }
18
+
19
+ return () => {
20
+ positions.current.set(key, main.scrollTop);
21
+ };
22
+ }, [key, pathname, navigationType]);
23
+
24
+ return null;
25
+ }
@@ -0,0 +1,76 @@
1
+ import { motion } from "framer-motion";
2
+ import { Link } from "react-router-dom";
3
+ import { FaArrowLeft, FaLock } from "react-icons/fa6";
4
+
5
+ const Unauthorized = () => {
6
+ return (
7
+ <div className="min-h-screen flex items-center justify-center bg-base-100 px-6">
8
+ <div className="max-w-lg text-center">
9
+ <motion.div
10
+ initial={{ scale: 0 }}
11
+ animate={{ scale: 1 }}
12
+ transition={{
13
+ type: "spring",
14
+ stiffness: 180,
15
+ damping: 12,
16
+ }}
17
+ className="mx-auto mb-6 w-24 h-24 rounded-full bg-warning/15 flex items-center justify-center"
18
+ >
19
+ <FaLock className="text-5xl text-warning" />
20
+ </motion.div>
21
+
22
+ <motion.h1
23
+ initial={{ opacity: 0, y: -15 }}
24
+ animate={{ opacity: 1, y: 0 }}
25
+ className="text-7xl font-black text-warning"
26
+ >
27
+ 401
28
+ </motion.h1>
29
+
30
+ <motion.h2
31
+ initial={{ opacity: 0 }}
32
+ animate={{ opacity: 1 }}
33
+ transition={{ delay: 0.15 }}
34
+ className="mt-4 text-3xl font-bold"
35
+ >
36
+ Unauthorized
37
+ </motion.h2>
38
+
39
+ <motion.p
40
+ initial={{ opacity: 0 }}
41
+ animate={{ opacity: 0.7 }}
42
+ transition={{ delay: 0.3 }}
43
+ className="mt-3 text-base-content/70"
44
+ >
45
+ You don't have permission to access this page. Please sign in with an
46
+ authorized account.
47
+ </motion.p>
48
+
49
+ <motion.div
50
+ initial={{ opacity: 0, y: 25 }}
51
+ animate={{ opacity: 1, y: 0 }}
52
+ transition={{ delay: 0.45 }}
53
+ className="mt-8 flex flex-wrap justify-center gap-3"
54
+ >
55
+ <Link to="/login" className="btn btn-warning">
56
+ Sign In
57
+ </Link>
58
+
59
+ <Link to="/" className="btn btn-outline">
60
+ Home
61
+ </Link>
62
+
63
+ <button
64
+ onClick={() => window.history.back()}
65
+ className="btn btn-ghost gap-2"
66
+ >
67
+ <FaArrowLeft />
68
+ Go Back
69
+ </button>
70
+ </motion.div>
71
+ </div>
72
+ </div>
73
+ );
74
+ };
75
+
76
+ export default Unauthorized;