@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.
- package/package.json +1 -1
- package/src/commands/create.js +2 -1
- package/src/index.js +1 -1
- package/src/utils/askTemplate.js +1 -0
- package/templates/mern-react-native/client/src/vite-env.d.ts +1 -0
- package/templates/mern-react-native/mobile/_gitignore +43 -0
- package/templates/mern-react-native/mobile/babel.config.js +1 -0
- package/templates/mern-react-native/mobile/drizzle.config.ts +8 -0
- package/templates/mern-react-native/mobile/expo-env.d.ts +3 -0
- package/templates/mern-react-native/mobile/package.json +8 -1
- package/templates/mern-react-native/mobile/src/app/(auth)/_layout.tsx +12 -0
- package/templates/mern-react-native/mobile/src/app/(auth)/change-password.tsx +112 -0
- package/templates/mern-react-native/mobile/src/app/(auth)/edit-profile.tsx +156 -0
- package/templates/mern-react-native/mobile/src/app/(auth)/forgot-password.tsx +191 -0
- package/templates/mern-react-native/mobile/src/app/{login.tsx → (auth)/login.tsx} +69 -21
- package/templates/mern-react-native/mobile/src/app/(tabs)/dashboard.tsx +2 -2
- package/templates/mern-react-native/mobile/src/app/(tabs)/index.tsx +18 -17
- package/templates/mern-react-native/mobile/src/app/(tabs)/profile.tsx +23 -60
- package/templates/mern-react-native/mobile/src/app/(tabs)/search.tsx +2 -2
- package/templates/mern-react-native/mobile/src/app/_layout.tsx +22 -4
- package/templates/mern-react-native/mobile/src/components/common/AnimatedHeader.tsx +328 -0
- package/templates/mern-react-native/mobile/src/components/common/LocationLoader.tsx +591 -0
- package/templates/mern-react-native/mobile/src/components/common/ScreenHeader.tsx +41 -17
- package/templates/mern-react-native/mobile/src/components/common/TabHeader.tsx +58 -0
- package/templates/mern-react-native/mobile/src/components/common/Typography.tsx +49 -30
- package/templates/mern-react-native/mobile/src/components/common/Welcome.tsx +2 -2
- package/templates/mern-react-native/mobile/src/components/ui/BottomModal.tsx +31 -20
- package/templates/mern-react-native/mobile/src/components/ui/ClassicTabBar.tsx +4 -3
- package/templates/mern-react-native/mobile/src/components/ui/CustomTabBar.tsx +108 -71
- package/templates/mern-react-native/mobile/src/components/ui/Sidebar.tsx +81 -56
- package/templates/mern-react-native/mobile/src/components/ui/buttons/Button.tsx +106 -37
- package/templates/mern-react-native/mobile/src/components/ui/buttons/IconButton.tsx +4 -2
- package/templates/mern-react-native/mobile/src/components/ui/data-display/Accordion.tsx +3 -2
- package/templates/mern-react-native/mobile/src/components/ui/data-display/Avatar.tsx +4 -3
- package/templates/mern-react-native/mobile/src/components/ui/data-display/Badge.tsx +45 -17
- package/templates/mern-react-native/mobile/src/components/ui/data-display/ImageViewer.tsx +19 -9
- package/templates/mern-react-native/mobile/src/components/ui/feedback/CircularProgress.tsx +5 -4
- package/templates/mern-react-native/mobile/src/components/ui/feedback/ProgressBar.tsx +4 -3
- package/templates/mern-react-native/mobile/src/components/ui/feedback/Skeleton.tsx +3 -0
- package/templates/mern-react-native/mobile/src/components/ui/feedback/Spinner.tsx +11 -3
- package/templates/mern-react-native/mobile/src/components/ui/inputs/Checkbox.tsx +3 -2
- package/templates/mern-react-native/mobile/src/components/ui/inputs/DatePicker.tsx +186 -0
- package/templates/mern-react-native/mobile/src/components/ui/inputs/ImagePickerModal.tsx +129 -0
- package/templates/mern-react-native/mobile/src/components/ui/inputs/Input.tsx +54 -14
- package/templates/mern-react-native/mobile/src/components/ui/inputs/LocationPicker.tsx +211 -0
- package/templates/mern-react-native/mobile/src/components/ui/inputs/OTPInput.tsx +32 -9
- package/templates/mern-react-native/mobile/src/components/ui/inputs/PasswordInput.tsx +2 -1
- package/templates/mern-react-native/mobile/src/components/ui/inputs/Radio.tsx +3 -2
- package/templates/mern-react-native/mobile/src/components/ui/inputs/SearchBar.tsx +41 -4
- package/templates/mern-react-native/mobile/src/components/ui/inputs/Slider.tsx +4 -3
- package/templates/mern-react-native/mobile/src/components/ui/inputs/Switch.tsx +3 -2
- package/templates/mern-react-native/mobile/src/components/ui/inputs/TextArea.tsx +2 -1
- package/templates/mern-react-native/mobile/src/components/ui/inputs/WebLocationPicker.tsx +321 -0
- package/templates/mern-react-native/mobile/src/components/ui/layout/Grid.tsx +52 -10
- package/templates/mern-react-native/mobile/src/components/ui/layout/Section.tsx +7 -8
- package/templates/mern-react-native/mobile/src/components/ui/navigation/Pagination.tsx +4 -3
- package/templates/mern-react-native/mobile/src/components/ui/navigation/ProgressStepper.tsx +6 -5
- package/templates/mern-react-native/mobile/src/components/ui/navigation/Tabs.tsx +30 -4
- package/templates/mern-react-native/mobile/src/config/api.ts +12 -1
- package/templates/mern-react-native/mobile/src/config/sidebar.config.ts +12 -0
- package/templates/mern-react-native/mobile/src/config/tabNavigation.ts +1 -1
- package/templates/mern-react-native/mobile/src/db/index.ts +9 -0
- package/templates/mern-react-native/mobile/src/db/schema.ts +14 -0
- package/templates/mern-react-native/mobile/src/hooks/useDebounce.ts +17 -0
- package/templates/mern-react-native/mobile/src/services/notification.service.ts +22 -0
- package/templates/mern-react-native/mobile/src/services/socket.service.ts +36 -0
- package/templates/mern-react-native/mobile/src/store/useAuthStore.ts +122 -27
- package/templates/mern-react-native/mobile/src/store/useNotificationStore.ts +178 -0
- package/templates/mern-react-native/mobile/src/types/auth.type.ts +14 -0
- package/templates/mern-react-native/mobile/tsconfig.json +1 -0
- package/templates/mern-ts/client/src/vite-env.d.ts +1 -0
- package/templates/next/next.config.mjs +1 -0
- package/templates/next/package.json +10 -9
- package/templates/next/postcss.config.js +5 -0
- package/templates/next/src/app/layout.js +1 -0
- package/templates/next/src/app/page.js +1 -1
- package/templates/next/src/components/layout/ProtectedRoute.jsx +3 -3
- package/templates/next/src/index.css +1 -0
- package/templates/next/src/store/useUiStore.js +13 -7
- package/templates/next-ts/.env.example +0 -0
- package/templates/next-ts/AGENTS.md +37 -0
- package/templates/next-ts/CLAUDE.md +1 -0
- package/templates/next-ts/_gitignore +0 -24
- package/templates/next-ts/next-env.d.ts +3 -1
- package/templates/next-ts/next.config.mjs +1 -0
- package/templates/next-ts/package.json +13 -12
- package/templates/next-ts/postcss.config.js +5 -0
- package/templates/next-ts/public/logo.png +0 -0
- package/templates/next-ts/src/app/error.tsx +41 -0
- package/templates/next-ts/src/app/layout.tsx +2 -1
- package/templates/next-ts/src/app/not-found.tsx +5 -0
- package/templates/next-ts/src/app/page.tsx +1 -1
- package/templates/next-ts/src/components/layout/ProtectedRoute.tsx +3 -3
- package/templates/next-ts/src/components/ui/Button.tsx +63 -0
- package/templates/next-ts/src/components/ui/Input.tsx +79 -0
- package/templates/next-ts/src/index.css +1 -0
- package/templates/next-ts/src/store/useUiStore.ts +13 -7
- package/templates/next-ts/tsconfig.json +19 -5
- package/templates/production-fullstack/client/index.html +14 -0
- package/templates/production-fullstack/client/package.json +47 -0
- package/templates/production-fullstack/client/public/_redirects +1 -0
- package/templates/production-fullstack/client/public/favicon.ico +0 -0
- package/templates/production-fullstack/client/public/favicon.svg +1 -0
- package/templates/production-fullstack/client/public/logo.png +0 -0
- package/templates/production-fullstack/client/public/manifest.json +24 -0
- package/templates/production-fullstack/client/public/sw.js +56 -0
- package/templates/production-fullstack/client/src/App.tsx +68 -0
- package/templates/production-fullstack/client/src/assets/animations/loading.json +1 -0
- package/templates/production-fullstack/client/src/assets/data/navigation.ts +29 -0
- package/templates/production-fullstack/client/src/assets/images/logo.png +0 -0
- package/templates/production-fullstack/client/src/components/layout/ProtectedRoute.tsx +23 -0
- package/templates/production-fullstack/client/src/components/layout/PublicLayout.tsx +13 -0
- package/templates/production-fullstack/client/src/components/layout/SidebarLayout.tsx +37 -0
- package/templates/production-fullstack/client/src/components/shared/Breadcrumbs.tsx +27 -0
- package/templates/production-fullstack/client/src/components/shared/LottieIcon.tsx +36 -0
- package/templates/production-fullstack/client/src/components/shared/NotFound.tsx +78 -0
- package/templates/production-fullstack/client/src/components/shared/PwaInstallPrompt.tsx +72 -0
- package/templates/production-fullstack/client/src/components/shared/SEO.tsx +67 -0
- package/templates/production-fullstack/client/src/components/shared/Scroll.tsx +25 -0
- package/templates/production-fullstack/client/src/components/shared/Unauthorized.tsx +76 -0
- package/templates/production-fullstack/client/src/components/shared/skeletons/common/CardSkeleton.tsx +23 -0
- package/templates/production-fullstack/client/src/components/shared/skeletons/common/DashboardSkeleton.tsx +19 -0
- package/templates/production-fullstack/client/src/components/shared/skeletons/common/ListSkeleton.tsx +24 -0
- package/templates/production-fullstack/client/src/components/shared/skeletons/common/PageSkeleton.tsx +26 -0
- package/templates/production-fullstack/client/src/components/shared/skeletons/common/ProfileSkeleton.tsx +23 -0
- package/templates/production-fullstack/client/src/components/shared/skeletons/common/Skeleton.tsx +18 -0
- package/templates/production-fullstack/client/src/components/shared/skeletons/common/TableSkeleton.tsx +33 -0
- package/templates/production-fullstack/client/src/components/ui/ConfirmModal.tsx +152 -0
- package/templates/production-fullstack/client/src/components/ui/Header.tsx +230 -0
- package/templates/production-fullstack/client/src/components/ui/Loading.tsx +19 -0
- package/templates/production-fullstack/client/src/components/ui/Modal.tsx +106 -0
- package/templates/production-fullstack/client/src/components/ui/SidebarHeader.tsx +34 -0
- package/templates/production-fullstack/client/src/components/ui/Table.tsx +118 -0
- package/templates/production-fullstack/client/src/components/ui/ToggleSwitch.tsx +38 -0
- package/templates/production-fullstack/client/src/components/ui/sidebar.tsx +152 -0
- package/templates/production-fullstack/client/src/config/index.ts +44 -0
- package/templates/production-fullstack/client/src/constants/navigation.ts +14 -0
- package/templates/production-fullstack/client/src/features/auth/api/authService.ts +19 -0
- package/templates/production-fullstack/client/src/features/auth/pages/Login.tsx +233 -0
- package/templates/production-fullstack/client/src/features/auth/store/useAuthStore.ts +143 -0
- package/templates/production-fullstack/client/src/features/core/pages/Home.tsx +150 -0
- package/templates/production-fullstack/client/src/features/core/pages/Profile.tsx +9 -0
- package/templates/production-fullstack/client/src/hooks/useLenis.ts +28 -0
- package/templates/production-fullstack/client/src/hooks/usePwaInstall.ts +45 -0
- package/templates/production-fullstack/client/src/hooks/useWindowSize.ts +25 -0
- package/templates/production-fullstack/client/src/index.css +158 -0
- package/templates/production-fullstack/client/src/lib/axios.ts +22 -0
- package/templates/production-fullstack/client/src/lib/dayjs.ts +12 -0
- package/templates/production-fullstack/client/src/lib/query-client.ts +11 -0
- package/templates/production-fullstack/client/src/lib/socket.ts +6 -0
- package/templates/production-fullstack/client/src/main.tsx +28 -0
- package/templates/production-fullstack/client/src/store/useUiStore.ts +74 -0
- package/templates/production-fullstack/client/src/utils/formatDate.ts +19 -0
- package/templates/production-fullstack/client/src/utils/getInitials.ts +10 -0
- package/templates/production-fullstack/client/src/vite-env.d.ts +1 -0
- package/templates/production-fullstack/client/tsconfig.json +25 -0
- package/templates/production-fullstack/client/tsconfig.node.json +10 -0
- package/templates/production-fullstack/client/vite.config.ts +8 -0
- package/templates/production-fullstack/mobile/LICENSE +21 -0
- package/templates/production-fullstack/mobile/app.json +84 -0
- package/templates/production-fullstack/mobile/assets/animations/celebrate.json +1 -0
- package/templates/production-fullstack/mobile/assets/animations/infinity.json +1 -0
- package/templates/production-fullstack/mobile/assets/animations/loading.json +1 -0
- package/templates/production-fullstack/mobile/assets/fonts/Inter_Bold.ttf +0 -0
- package/templates/production-fullstack/mobile/assets/fonts/Inter_ExtraBold.ttf +0 -0
- package/templates/production-fullstack/mobile/assets/fonts/Inter_Medium.ttf +0 -0
- package/templates/production-fullstack/mobile/assets/fonts/Inter_Regular.ttf +0 -0
- package/templates/production-fullstack/mobile/assets/fonts/Inter_SemiBold.ttf +0 -0
- package/templates/production-fullstack/mobile/assets/images/logo/logo.png +0 -0
- package/templates/production-fullstack/mobile/assets/images/logo/logo.svg +1 -0
- package/templates/production-fullstack/mobile/assets/images/logo/logoWithBg.png +0 -0
- package/templates/production-fullstack/mobile/babel.config.js +13 -0
- package/templates/production-fullstack/mobile/drizzle.config.ts +8 -0
- package/templates/production-fullstack/mobile/eas.json +24 -0
- package/templates/production-fullstack/mobile/eslint.config.js +10 -0
- package/templates/production-fullstack/mobile/expo-env.d.ts +3 -0
- package/templates/production-fullstack/mobile/metro.config.js +6 -0
- package/templates/production-fullstack/mobile/nativewind-env.d.ts +3 -0
- package/templates/production-fullstack/mobile/package.json +89 -0
- package/templates/production-fullstack/mobile/src/app/(auth)/_layout.tsx +12 -0
- package/templates/production-fullstack/mobile/src/app/(auth)/change-password.tsx +112 -0
- package/templates/production-fullstack/mobile/src/app/(auth)/edit-profile.tsx +160 -0
- package/templates/production-fullstack/mobile/src/app/(auth)/forgot-password.tsx +191 -0
- package/templates/production-fullstack/mobile/src/app/(auth)/login.tsx +253 -0
- package/templates/production-fullstack/mobile/src/app/_layout.tsx +102 -0
- package/templates/production-fullstack/mobile/src/app/global.css +82 -0
- package/templates/production-fullstack/mobile/src/components/common/AnimatedHeader.tsx +328 -0
- package/templates/production-fullstack/mobile/src/components/common/ConfirmationToast.tsx +67 -0
- package/templates/production-fullstack/mobile/src/components/common/Loading.tsx +26 -0
- package/templates/production-fullstack/mobile/src/components/common/LocationLoader.tsx +591 -0
- package/templates/production-fullstack/mobile/src/components/common/ScreenHeader.tsx +68 -0
- package/templates/production-fullstack/mobile/src/components/common/TabHeader.tsx +58 -0
- package/templates/production-fullstack/mobile/src/components/common/Typography.tsx +113 -0
- package/templates/production-fullstack/mobile/src/components/common/Welcome.tsx +55 -0
- package/templates/production-fullstack/mobile/src/components/ui/BottomModal.tsx +159 -0
- package/templates/production-fullstack/mobile/src/components/ui/ClassicTabBar.tsx +129 -0
- package/templates/production-fullstack/mobile/src/components/ui/CustomTabBar.tsx +238 -0
- package/templates/production-fullstack/mobile/src/components/ui/Sidebar.tsx +258 -0
- package/templates/production-fullstack/mobile/src/components/ui/buttons/Button.tsx +180 -0
- package/templates/production-fullstack/mobile/src/components/ui/buttons/ButtonGroup.tsx +32 -0
- package/templates/production-fullstack/mobile/src/components/ui/buttons/FloatingActionButton.tsx +72 -0
- package/templates/production-fullstack/mobile/src/components/ui/buttons/IconButton.tsx +84 -0
- package/templates/production-fullstack/mobile/src/components/ui/data-display/Accordion.tsx +82 -0
- package/templates/production-fullstack/mobile/src/components/ui/data-display/Avatar.tsx +47 -0
- package/templates/production-fullstack/mobile/src/components/ui/data-display/Badge.tsx +104 -0
- package/templates/production-fullstack/mobile/src/components/ui/data-display/Card.tsx +36 -0
- package/templates/production-fullstack/mobile/src/components/ui/data-display/Image.tsx +43 -0
- package/templates/production-fullstack/mobile/src/components/ui/data-display/ImageViewer.tsx +33 -0
- package/templates/production-fullstack/mobile/src/components/ui/data-display/SwipeableRow.tsx +94 -0
- package/templates/production-fullstack/mobile/src/components/ui/feedback/CircularProgress.tsx +38 -0
- package/templates/production-fullstack/mobile/src/components/ui/feedback/GestureWrapper.tsx +114 -0
- package/templates/production-fullstack/mobile/src/components/ui/feedback/ProgressBar.tsx +51 -0
- package/templates/production-fullstack/mobile/src/components/ui/feedback/Skeleton.tsx +84 -0
- package/templates/production-fullstack/mobile/src/components/ui/feedback/Spinner.tsx +50 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/Checkbox.tsx +54 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/DatePicker.tsx +186 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/ImagePickerModal.tsx +129 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/Input.tsx +158 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/LocationPicker.tsx +211 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/OTPInput.tsx +83 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/PasswordInput.tsx +16 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/Radio.tsx +54 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/SearchBar.tsx +53 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/Slider.tsx +49 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/Switch.tsx +75 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/TextArea.tsx +15 -0
- package/templates/production-fullstack/mobile/src/components/ui/inputs/WebLocationPicker.tsx +321 -0
- package/templates/production-fullstack/mobile/src/components/ui/layout/Container.tsx +23 -0
- package/templates/production-fullstack/mobile/src/components/ui/layout/Divider.tsx +20 -0
- package/templates/production-fullstack/mobile/src/components/ui/layout/Grid.tsx +62 -0
- package/templates/production-fullstack/mobile/src/components/ui/layout/KeyboardAvoidingViewWrapper.tsx +16 -0
- package/templates/production-fullstack/mobile/src/components/ui/layout/ScrollContainer.tsx +21 -0
- package/templates/production-fullstack/mobile/src/components/ui/layout/Section.tsx +51 -0
- package/templates/production-fullstack/mobile/src/components/ui/layout/Spacer.tsx +6 -0
- package/templates/production-fullstack/mobile/src/components/ui/layout/Stack.tsx +34 -0
- package/templates/production-fullstack/mobile/src/components/ui/navigation/Pagination.tsx +61 -0
- package/templates/production-fullstack/mobile/src/components/ui/navigation/ProgressStepper.tsx +66 -0
- package/templates/production-fullstack/mobile/src/components/ui/navigation/Tabs.tsx +173 -0
- package/templates/production-fullstack/mobile/src/config/sidebar.config.ts +72 -0
- package/templates/production-fullstack/mobile/src/config/tabNavigation.ts +64 -0
- package/templates/production-fullstack/mobile/src/constants/Colors.ts +71 -0
- package/templates/production-fullstack/mobile/src/db/index.ts +9 -0
- package/templates/production-fullstack/mobile/src/db/schema.ts +14 -0
- package/templates/production-fullstack/mobile/src/features/auth/api/auth.service.ts +35 -0
- package/templates/production-fullstack/mobile/src/features/auth/store/useAuthStore.ts +273 -0
- package/templates/production-fullstack/mobile/src/features/auth/types/auth.type.ts +14 -0
- package/templates/production-fullstack/mobile/src/hooks/useDebounce.ts +17 -0
- package/templates/production-fullstack/mobile/src/lib/axios.ts +27 -0
- package/templates/production-fullstack/mobile/src/lib/query-client.ts +11 -0
- package/templates/production-fullstack/mobile/src/lib/socket.ts +36 -0
- package/templates/production-fullstack/mobile/src/lib/storage.ts +55 -0
- package/templates/production-fullstack/mobile/src/services/permission.service.ts +214 -0
- package/templates/production-fullstack/mobile/src/store/localStore.ts +7 -0
- package/templates/production-fullstack/mobile/src/store/useNotificationStore.ts +53 -0
- package/templates/production-fullstack/mobile/src/types/common.type.ts +6 -0
- package/templates/production-fullstack/mobile/src/types/images.d.ts +24 -0
- package/templates/production-fullstack/mobile/src/utils/toast.ts +26 -0
- package/templates/production-fullstack/mobile/tailwind.config.js +71 -0
- package/templates/production-fullstack/mobile/tsconfig.json +23 -0
- package/templates/production-fullstack/server/.env.example +63 -0
- package/templates/production-fullstack/server/README.md +75 -0
- package/templates/production-fullstack/server/eslint.config.js +13 -0
- package/templates/production-fullstack/server/package.json +58 -0
- package/templates/production-fullstack/server/prisma/schema/core/attachment.prisma +14 -0
- package/templates/production-fullstack/server/prisma/schema/core/notification.prisma +18 -0
- package/templates/production-fullstack/server/prisma/schema/core/permission.prisma +26 -0
- package/templates/production-fullstack/server/prisma/schema/core/role.prisma +25 -0
- package/templates/production-fullstack/server/prisma/schema/core/user.prisma +56 -0
- package/templates/production-fullstack/server/prisma/schema/enums/common.prisma +13 -0
- package/templates/production-fullstack/server/prisma/schema/enums/notification.prisma +6 -0
- package/templates/production-fullstack/server/prisma/schema/enums/user.prisma +11 -0
- package/templates/production-fullstack/server/prisma/schema/schema.prisma +7 -0
- package/templates/production-fullstack/server/prisma.config.ts +14 -0
- package/templates/production-fullstack/server/src/app.ts +36 -0
- package/templates/production-fullstack/server/src/common/middlewares/auth.middleware.ts +45 -0
- package/templates/production-fullstack/server/src/common/middlewares/errorHandler.ts +16 -0
- package/templates/production-fullstack/server/src/common/middlewares/multer.ts +20 -0
- package/templates/production-fullstack/server/src/common/middlewares/rateLimiter.ts +53 -0
- package/templates/production-fullstack/server/src/common/services/email.service.ts +28 -0
- package/templates/production-fullstack/server/src/common/services/push.service.ts +65 -0
- package/templates/production-fullstack/server/src/common/services/storage.service.ts +9 -0
- package/templates/production-fullstack/server/src/common/types/express.d.ts +10 -0
- package/templates/production-fullstack/server/src/common/utils/cloudinaryUpload.ts +44 -0
- package/templates/production-fullstack/server/src/common/utils/emailOtp.ts +30 -0
- package/templates/production-fullstack/server/src/common/utils/genOtpToken.ts +22 -0
- package/templates/production-fullstack/server/src/common/utils/generateVapidKeys.ts +12 -0
- package/templates/production-fullstack/server/src/common/utils/jwt.ts +27 -0
- package/templates/production-fullstack/server/src/common/utils/pushHelper.ts +22 -0
- package/templates/production-fullstack/server/src/config/env.ts +2 -0
- package/templates/production-fullstack/server/src/config/logger.ts +58 -0
- package/templates/production-fullstack/server/src/config/prisma.ts +26 -0
- package/templates/production-fullstack/server/src/features/attachments/upload.controller.ts +22 -0
- package/templates/production-fullstack/server/src/features/attachments/upload.routes.ts +11 -0
- package/templates/production-fullstack/server/src/features/auth/auth.controller.ts +124 -0
- package/templates/production-fullstack/server/src/features/auth/auth.routes.ts +22 -0
- package/templates/production-fullstack/server/src/features/auth/auth.service.ts +155 -0
- package/templates/production-fullstack/server/src/features/notifications/push.controller.ts +55 -0
- package/templates/production-fullstack/server/src/features/notifications/push.routes.ts +11 -0
- package/templates/production-fullstack/server/src/index.ts +17 -0
- package/templates/production-fullstack/server/src/routes/index.ts +12 -0
- package/templates/production-fullstack/server/src/sockets/auth.ts +0 -0
- package/templates/production-fullstack/server/src/sockets/connection.ts +31 -0
- package/templates/production-fullstack/server/src/sockets/emitters/assignment.emitter.ts +0 -0
- package/templates/production-fullstack/server/src/sockets/emitters/attendance.emitter.ts +0 -0
- package/templates/production-fullstack/server/src/sockets/emitters/exam.emitter.ts +0 -0
- package/templates/production-fullstack/server/src/sockets/emitters/notification.emitter.ts +17 -0
- package/templates/production-fullstack/server/src/sockets/events.ts +27 -0
- package/templates/production-fullstack/server/src/sockets/handlers/attendance.handler.ts +0 -0
- package/templates/production-fullstack/server/src/sockets/handlers/chat.handler.ts +0 -0
- package/templates/production-fullstack/server/src/sockets/handlers/index.ts +15 -0
- package/templates/production-fullstack/server/src/sockets/handlers/lms.handler.ts +0 -0
- package/templates/production-fullstack/server/src/sockets/handlers/notification.handler.ts +39 -0
- package/templates/production-fullstack/server/src/sockets/index.ts +39 -0
- package/templates/production-fullstack/server/src/sockets/middleware.ts +54 -0
- package/templates/production-fullstack/server/src/sockets/rooms.ts +11 -0
- package/templates/production-fullstack/server/src/sockets/types.ts +32 -0
- package/templates/production-fullstack/server/tsconfig.json +14 -0
- package/templates/react-native/babel.config.js +1 -0
- package/templates/react-native/drizzle.config.ts +8 -0
- package/templates/react-native/package.json +8 -1
- package/templates/react-native/src/app/(auth)/_layout.tsx +12 -0
- package/templates/react-native/src/app/(auth)/change-password.tsx +112 -0
- package/templates/react-native/src/app/(auth)/edit-profile.tsx +156 -0
- package/templates/react-native/src/app/(auth)/forgot-password.tsx +191 -0
- package/templates/react-native/src/app/{login.tsx → (auth)/login.tsx} +69 -21
- package/templates/react-native/src/app/(tabs)/dashboard.tsx +2 -2
- package/templates/react-native/src/app/(tabs)/index.tsx +18 -17
- package/templates/react-native/src/app/(tabs)/profile.tsx +23 -60
- package/templates/react-native/src/app/(tabs)/search.tsx +2 -2
- package/templates/react-native/src/app/_layout.tsx +22 -4
- package/templates/react-native/src/components/common/AnimatedHeader.tsx +328 -0
- package/templates/react-native/src/components/common/LocationLoader.tsx +591 -0
- package/templates/react-native/src/components/common/ScreenHeader.tsx +41 -17
- package/templates/react-native/src/components/common/TabHeader.tsx +58 -0
- package/templates/react-native/src/components/common/Typography.tsx +49 -30
- package/templates/react-native/src/components/common/Welcome.tsx +2 -2
- package/templates/react-native/src/components/ui/BottomModal.tsx +31 -20
- package/templates/react-native/src/components/ui/ClassicTabBar.tsx +4 -3
- package/templates/react-native/src/components/ui/CustomTabBar.tsx +108 -71
- package/templates/react-native/src/components/ui/Sidebar.tsx +81 -56
- package/templates/react-native/src/components/ui/buttons/Button.tsx +106 -37
- package/templates/react-native/src/components/ui/buttons/IconButton.tsx +4 -2
- package/templates/react-native/src/components/ui/data-display/Accordion.tsx +3 -2
- package/templates/react-native/src/components/ui/data-display/Avatar.tsx +4 -3
- package/templates/react-native/src/components/ui/data-display/Badge.tsx +45 -17
- package/templates/react-native/src/components/ui/data-display/ImageViewer.tsx +19 -9
- package/templates/react-native/src/components/ui/feedback/CircularProgress.tsx +5 -4
- package/templates/react-native/src/components/ui/feedback/ProgressBar.tsx +4 -3
- package/templates/react-native/src/components/ui/feedback/Skeleton.tsx +3 -0
- package/templates/react-native/src/components/ui/feedback/Spinner.tsx +11 -3
- package/templates/react-native/src/components/ui/inputs/Checkbox.tsx +3 -2
- package/templates/react-native/src/components/ui/inputs/DatePicker.tsx +186 -0
- package/templates/react-native/src/components/ui/inputs/ImagePickerModal.tsx +129 -0
- package/templates/react-native/src/components/ui/inputs/Input.tsx +54 -14
- package/templates/react-native/src/components/ui/inputs/LocationPicker.tsx +211 -0
- package/templates/react-native/src/components/ui/inputs/OTPInput.tsx +32 -9
- package/templates/react-native/src/components/ui/inputs/PasswordInput.tsx +2 -1
- package/templates/react-native/src/components/ui/inputs/Radio.tsx +3 -2
- package/templates/react-native/src/components/ui/inputs/SearchBar.tsx +41 -4
- package/templates/react-native/src/components/ui/inputs/Slider.tsx +4 -3
- package/templates/react-native/src/components/ui/inputs/Switch.tsx +3 -2
- package/templates/react-native/src/components/ui/inputs/TextArea.tsx +2 -1
- package/templates/react-native/src/components/ui/inputs/WebLocationPicker.tsx +321 -0
- package/templates/react-native/src/components/ui/layout/Grid.tsx +52 -10
- package/templates/react-native/src/components/ui/layout/Section.tsx +7 -8
- package/templates/react-native/src/components/ui/navigation/Pagination.tsx +4 -3
- package/templates/react-native/src/components/ui/navigation/ProgressStepper.tsx +6 -5
- package/templates/react-native/src/components/ui/navigation/Tabs.tsx +30 -4
- package/templates/react-native/src/config/api.ts +12 -1
- package/templates/react-native/src/config/sidebar.config.ts +12 -0
- package/templates/react-native/src/config/tabNavigation.ts +1 -1
- package/templates/react-native/src/db/index.ts +9 -0
- package/templates/react-native/src/db/schema.ts +14 -0
- package/templates/react-native/src/hooks/useDebounce.ts +17 -0
- package/templates/react-native/src/services/notification.service.ts +22 -0
- package/templates/react-native/src/services/socket.service.ts +36 -0
- package/templates/react-native/src/store/useAuthStore.ts +122 -27
- package/templates/react-native/src/store/useNotificationStore.ts +178 -0
- package/templates/react-native/src/types/auth.type.ts +14 -0
- package/templates/react-native/tsconfig.json +1 -0
- package/templates/react-ts/src/vite-env.d.ts +1 -0
- package/templates/mern-react-native/mobile/.env.example +0 -2
- package/templates/mern-react-native/mobile/.vscode/extensions.json +0 -1
- package/templates/mern-react-native/mobile/.vscode/settings.json +0 -7
- package/templates/mern-react-native/mobile/README.md +0 -159
- package/templates/mern-react-native/mobile/docs/README.md +0 -17
- package/templates/mern-react-native/mobile/docs/components/buttons.md +0 -40
- package/templates/mern-react-native/mobile/docs/components/data-display.md +0 -44
- package/templates/mern-react-native/mobile/docs/components/feedback.md +0 -36
- package/templates/mern-react-native/mobile/docs/components/gestures.md +0 -60
- package/templates/mern-react-native/mobile/docs/components/inputs.md +0 -41
- package/templates/mern-react-native/mobile/docs/components/layout.md +0 -34
- package/templates/mern-react-native/mobile/docs/components/navigation.md +0 -31
- package/templates/mern-react-native/mobile/docs/features.md +0 -85
- package/templates/mern-react-native/mobile/docs/getting-started.md +0 -47
- package/templates/mern-react-native/mobile/src/components/common/HomeHeader.tsx +0 -43
- package/templates/mern-react-native/mobile/src/components/settings/SettingToggle.tsx +0 -26
- package/templates/mern-react-native/mobile/src/components/settings/SettingsOptions.tsx +0 -47
- package/templates/react-native/.env.example +0 -2
- package/templates/react-native/.vscode/extensions.json +0 -1
- package/templates/react-native/.vscode/settings.json +0 -7
- package/templates/react-native/README.md +0 -159
- package/templates/react-native/docs/README.md +0 -17
- package/templates/react-native/docs/components/buttons.md +0 -40
- package/templates/react-native/docs/components/data-display.md +0 -44
- package/templates/react-native/docs/components/feedback.md +0 -36
- package/templates/react-native/docs/components/gestures.md +0 -60
- package/templates/react-native/docs/components/inputs.md +0 -41
- package/templates/react-native/docs/components/layout.md +0 -34
- package/templates/react-native/docs/components/navigation.md +0 -31
- package/templates/react-native/docs/features.md +0 -85
- package/templates/react-native/docs/getting-started.md +0 -47
- package/templates/react-native/src/components/common/HomeHeader.tsx +0 -43
- package/templates/react-native/src/components/settings/SettingToggle.tsx +0 -26
- package/templates/react-native/src/components/settings/SettingsOptions.tsx +0 -47
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Data Display Components
|
|
2
|
-
|
|
3
|
-
These components are used to display data visually, such as lists, images, and accordions.
|
|
4
|
-
|
|
5
|
-
## `SwipeableRow`
|
|
6
|
-
A highly complex component that wraps list items, allowing them to be swiped left or right to reveal action buttons.
|
|
7
|
-
|
|
8
|
-
### Usage Example
|
|
9
|
-
```tsx
|
|
10
|
-
import { SwipeableRow, SwipeAction } from '@/components/ui/data-display/SwipeableRow';
|
|
11
|
-
import { MaterialIcons } from '@expo/vector-icons';
|
|
12
|
-
|
|
13
|
-
export default function ItemList() {
|
|
14
|
-
const rightActions: SwipeAction[] = [
|
|
15
|
-
{
|
|
16
|
-
icon: <MaterialIcons name="archive" size={24} color="white" />,
|
|
17
|
-
backgroundColor: '#3B82F6', // Blue
|
|
18
|
-
onPress: () => console.log('Archived!'),
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
icon: <MaterialIcons name="delete" size={24} color="white" />,
|
|
22
|
-
backgroundColor: '#EF4444', // Red
|
|
23
|
-
onPress: () => console.log('Deleted!'),
|
|
24
|
-
},
|
|
25
|
-
];
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<SwipeableRow rightActions={rightActions}>
|
|
29
|
-
<View className="p-4 bg-white dark:bg-gray-800">
|
|
30
|
-
<Text className="text-lg text-black dark:text-white">Swipe me left!</Text>
|
|
31
|
-
</View>
|
|
32
|
-
</SwipeableRow>
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## `Accordion`
|
|
38
|
-
An expandable section to hide/show details.
|
|
39
|
-
|
|
40
|
-
## `Avatar`
|
|
41
|
-
Displays a user profile image or their initials if the image is missing.
|
|
42
|
-
|
|
43
|
-
## `Badge`
|
|
44
|
-
A small visual indicator, often used for unread counts or status indicators.
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Feedback Components
|
|
2
|
-
|
|
3
|
-
Components designed to provide visual or physical feedback to the user, including loading states and gesture wrappers.
|
|
4
|
-
|
|
5
|
-
## `GestureWrapper`
|
|
6
|
-
A powerful utility component that simplifies `react-native-gesture-handler`. It abstracts the boilerplate of the `GestureDetector` API.
|
|
7
|
-
|
|
8
|
-
### Usage Example
|
|
9
|
-
```tsx
|
|
10
|
-
import { GestureWrapper } from '@/components/ui/feedback/GestureWrapper';
|
|
11
|
-
import { View, Text } from 'react-native';
|
|
12
|
-
|
|
13
|
-
export default function InteractiveCard() {
|
|
14
|
-
return (
|
|
15
|
-
<GestureWrapper
|
|
16
|
-
onTap={() => console.log("Card Tapped")}
|
|
17
|
-
onDoubleTap={() => console.log("Card Liked (Double Tap)")}
|
|
18
|
-
onSwipeLeft={() => console.log("Dismissed to the left")}
|
|
19
|
-
onPanUpdate={(e) => console.log(`Dragging at X: ${e.translationX}`)}
|
|
20
|
-
>
|
|
21
|
-
<View className="p-8 bg-blue-500 rounded-xl">
|
|
22
|
-
<Text className="text-white text-xl">Interact with me!</Text>
|
|
23
|
-
</View>
|
|
24
|
-
</GestureWrapper>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## `CircularProgress` & `ProgressBar`
|
|
30
|
-
Used to indicate loading progress or task completion.
|
|
31
|
-
|
|
32
|
-
## `Skeleton`
|
|
33
|
-
Used as a placeholder while data is loading.
|
|
34
|
-
|
|
35
|
-
## `Spinner`
|
|
36
|
-
An infinite spinning loading indicator.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Gesture Control Components
|
|
2
|
-
|
|
3
|
-
Handling touch events and gestures natively in React Native can be complex, but this template provides highly abstracted, easy-to-use gesture wrappers powered by `react-native-gesture-handler` and `react-native-reanimated`.
|
|
4
|
-
|
|
5
|
-
## `GestureWrapper`
|
|
6
|
-
The most versatile component for gesture handling. It abstracts away the boilerplate of the `GestureDetector` API, allowing you to easily handle taps, double-taps, drags, and directional swipes.
|
|
7
|
-
|
|
8
|
-
### Supported Events
|
|
9
|
-
- **Taps**: `onTap`, `onDoubleTap`
|
|
10
|
-
- **Directional Swipes**: `onSwipeLeft`, `onSwipeRight`, `onSwipeUp`, `onSwipeDown` (fires when a quick fling exceeds the velocity threshold).
|
|
11
|
-
- **Pan / Dragging**: `onPanStart`, `onPanUpdate`, `onPanEnd` (provides the raw `translationX`/`translationY` event data).
|
|
12
|
-
|
|
13
|
-
### Usage Example
|
|
14
|
-
```tsx
|
|
15
|
-
import { GestureWrapper } from '@/components/ui/feedback/GestureWrapper';
|
|
16
|
-
import { View, Text } from 'react-native';
|
|
17
|
-
|
|
18
|
-
export default function InteractiveCard() {
|
|
19
|
-
return (
|
|
20
|
-
<GestureWrapper
|
|
21
|
-
// Simple Taps
|
|
22
|
-
onTap={() => console.log("Card Tapped")}
|
|
23
|
-
onDoubleTap={() => console.log("Card Liked (Double Tap)")}
|
|
24
|
-
|
|
25
|
-
// Swipes
|
|
26
|
-
onSwipeLeft={() => console.log("Dismissed to the left")}
|
|
27
|
-
onSwipeRight={() => console.log("Dismissed to the right")}
|
|
28
|
-
onSwipeUp={() => console.log("Swiped up")}
|
|
29
|
-
|
|
30
|
-
// Continuous Dragging
|
|
31
|
-
onPanUpdate={(e) => console.log(`Dragging at X: ${e.translationX}`)}
|
|
32
|
-
>
|
|
33
|
-
<View className="p-8 bg-blue-500 rounded-xl">
|
|
34
|
-
<Text className="text-white text-xl">Interact with me!</Text>
|
|
35
|
-
</View>
|
|
36
|
-
</GestureWrapper>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## `SwipeableRow` (Data Display)
|
|
42
|
-
While `GestureWrapper` is great for generic components, if you need a classic "Swipe to reveal actions" row (commonly seen in lists or emails), use the `SwipeableRow` component.
|
|
43
|
-
|
|
44
|
-
### Usage Example
|
|
45
|
-
```tsx
|
|
46
|
-
import { SwipeableRow, SwipeAction } from '@/components/ui/data-display/SwipeableRow';
|
|
47
|
-
|
|
48
|
-
// Define the actions revealed when swiping
|
|
49
|
-
const rightActions: SwipeAction[] = [
|
|
50
|
-
{
|
|
51
|
-
icon: <Icon name="delete" />,
|
|
52
|
-
backgroundColor: '#EF4444',
|
|
53
|
-
onPress: () => console.log('Delete tapped'),
|
|
54
|
-
},
|
|
55
|
-
];
|
|
56
|
-
|
|
57
|
-
<SwipeableRow rightActions={rightActions}>
|
|
58
|
-
<ListItem content="Swipe me!" />
|
|
59
|
-
</SwipeableRow>
|
|
60
|
-
```
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Input Components
|
|
2
|
-
|
|
3
|
-
Inputs are used to collect data from the user. They are highly styled, accessible, and integrate cleanly with form libraries like React Hook Form.
|
|
4
|
-
|
|
5
|
-
## `Input` (Text Input)
|
|
6
|
-
The core text input component.
|
|
7
|
-
|
|
8
|
-
### Usage Example
|
|
9
|
-
```tsx
|
|
10
|
-
import { Input } from '@/components/ui/inputs/Input';
|
|
11
|
-
import { useState } from 'react';
|
|
12
|
-
|
|
13
|
-
export default function Form() {
|
|
14
|
-
const [email, setEmail] = useState('');
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<Input
|
|
18
|
-
label="Email Address"
|
|
19
|
-
placeholder="Enter your email"
|
|
20
|
-
value={email}
|
|
21
|
-
onChangeText={setEmail}
|
|
22
|
-
error={email.includes('@') ? '' : 'Invalid email'}
|
|
23
|
-
/>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## `OTPInput`
|
|
29
|
-
A component optimized for handling multi-digit verification codes.
|
|
30
|
-
- Usage: `<OTPInput length={6} onComplete={(code) => console.log(code)} />`
|
|
31
|
-
|
|
32
|
-
## `PasswordInput`
|
|
33
|
-
An extension of the `Input` component that includes a toggle to show/hide the password text.
|
|
34
|
-
|
|
35
|
-
## Other Inputs
|
|
36
|
-
- `Checkbox`: Boolean selection.
|
|
37
|
-
- `Radio`: Select one from a list.
|
|
38
|
-
- `Switch`: A modern iOS/Android style toggle.
|
|
39
|
-
- `Slider`: Choose a numeric value on a track.
|
|
40
|
-
- `SearchBar`: A specialized text input for searching with a clear button.
|
|
41
|
-
- `TextArea`: A multiline text input.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Layout Components
|
|
2
|
-
|
|
3
|
-
Layout components provide the foundational structure of the application screens, ensuring consistent padding, spacing, and structural organization.
|
|
4
|
-
|
|
5
|
-
## `Container`
|
|
6
|
-
Wraps main content to ensure consistent margins across all screens.
|
|
7
|
-
|
|
8
|
-
## `ScrollContainer`
|
|
9
|
-
Similar to `Container`, but uses a `ScrollView`. Essential for screens whose content exceeds the device height.
|
|
10
|
-
|
|
11
|
-
## `KeyboardAvoidingViewWrapper`
|
|
12
|
-
An extremely helpful utility that wraps the screen and automatically adjusts the layout padding when the virtual keyboard appears, preventing inputs from being hidden by the keyboard.
|
|
13
|
-
|
|
14
|
-
### Usage Example
|
|
15
|
-
```tsx
|
|
16
|
-
import { KeyboardAvoidingViewWrapper } from '@/components/ui/layout/KeyboardAvoidingViewWrapper';
|
|
17
|
-
import { Input } from '@/components/ui/inputs/Input';
|
|
18
|
-
|
|
19
|
-
export default function LoginScreen() {
|
|
20
|
-
return (
|
|
21
|
-
<KeyboardAvoidingViewWrapper>
|
|
22
|
-
{/* Content won't be blocked by the keyboard here! */}
|
|
23
|
-
<Input placeholder="Username" />
|
|
24
|
-
<Input placeholder="Password" />
|
|
25
|
-
</KeyboardAvoidingViewWrapper>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## `Divider`
|
|
31
|
-
A simple horizontal or vertical line to separate content sections visually.
|
|
32
|
-
|
|
33
|
-
## `Grid` & `Stack`
|
|
34
|
-
Utility components for quickly aligning children items using flexbox properties, saving you from writing repetitive nativewind classes.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Navigation Components
|
|
2
|
-
|
|
3
|
-
These components are used to guide the user between different views or show their current position within a multi-step process.
|
|
4
|
-
|
|
5
|
-
## `Tabs`
|
|
6
|
-
A highly complex, customizable top tab bar component, typically used for switching views horizontally (e.g., inside a profile or feed).
|
|
7
|
-
|
|
8
|
-
### Usage Example
|
|
9
|
-
```tsx
|
|
10
|
-
import { Tabs } from '@/components/ui/navigation/Tabs';
|
|
11
|
-
import { useState } from 'react';
|
|
12
|
-
|
|
13
|
-
export default function Profile() {
|
|
14
|
-
const [activeTab, setActiveTab] = useState(0);
|
|
15
|
-
const tabs = ["Posts", "Followers", "Following"];
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<Tabs
|
|
19
|
-
tabs={tabs}
|
|
20
|
-
activeIndex={activeTab}
|
|
21
|
-
onChange={setActiveTab}
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## `ProgressStepper`
|
|
28
|
-
Used for multi-step wizards, such as an onboarding flow or a multi-page checkout, clearly displaying the completed, current, and upcoming steps.
|
|
29
|
-
|
|
30
|
-
## `Pagination`
|
|
31
|
-
Displays a series of dots to indicate the current page in a carousel or swipeable view.
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# 🌟 Starter Kit Features
|
|
2
|
-
|
|
3
|
-
This starter kit is packed with a robust set of features, prebuilt components, and essential services designed to eliminate setup time so you can focus entirely on building your product.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 🧩 UI Components
|
|
8
|
-
|
|
9
|
-
Our custom UI library is built entirely from atomic elements, fully typed, beautifully styled with NativeWind, and ready for gesture-driven interactions.
|
|
10
|
-
|
|
11
|
-
### 📐 Layout
|
|
12
|
-
- **`Container`**: A responsive wrapper for consistent screen margins.
|
|
13
|
-
- **`Section`**: A structured block for grouping related components with headers.
|
|
14
|
-
- **`ScrollContainer`**: An optimized scrolling view that natively handles keyboard avoidance and safe area insets.
|
|
15
|
-
- **`HStack` / `VStack`**: Flexbox utility components for rapid horizontal and vertical alignment.
|
|
16
|
-
|
|
17
|
-
### 🔘 Buttons
|
|
18
|
-
- **`Button`**: The core interactive element supporting multiple variants (`primary`, `secondary`, `accent`, `outline`, `ghost`), sizing (`sm`, `md`, `lg`), and a dynamic `soft` prop for pale translucent styling.
|
|
19
|
-
- **`IconButton`**: Icon-only circular buttons for compact interactions.
|
|
20
|
-
- **`FloatingActionButton`**: A prominent, elevated CTA button, typically anchored at the bottom of the screen.
|
|
21
|
-
|
|
22
|
-
### 📊 Data Display
|
|
23
|
-
- **`Avatar`**: Display user profile images with automatic fallbacks and size variants.
|
|
24
|
-
- **`Badge`**: Small status indicators supporting all semantic theme colors and the `soft` prop.
|
|
25
|
-
- **`Accordion`**: Collapsible vertical panels for FAQs or dense information.
|
|
26
|
-
- **`Card`**: Elevated, rounded containers for grouping information.
|
|
27
|
-
- **`SwipeableRow`**: Natively gesture-driven list items that reveal hidden actions (e.g., delete, archive) upon swiping left or right.
|
|
28
|
-
|
|
29
|
-
### 📝 Inputs & Controls
|
|
30
|
-
- **`Input`**: A highly styled text input supporting left/right icons, error states, and secure text entry.
|
|
31
|
-
- **`SearchBar`**: A dedicated input variant tailored for real-time search filtering.
|
|
32
|
-
- **`Switch`**: A native-feeling toggle switch for boolean states.
|
|
33
|
-
- **`Checkbox` & `Radio`**: Accessible selection controls for forms and settings.
|
|
34
|
-
- **`Slider`**: A continuous drag slider for numeric value selection.
|
|
35
|
-
|
|
36
|
-
### ⏳ Feedback & Loading
|
|
37
|
-
- **`Spinner`**: A minimal, rotating activity indicator.
|
|
38
|
-
- **`ProgressBar`**: A linear progress bar for uploading/downloading tasks.
|
|
39
|
-
- **`CircularProgress`**: An SVG-based circular indicator for data syncing or completion rates.
|
|
40
|
-
- **`Skeleton`**: Animated placeholder blocks for loading states before data is fetched.
|
|
41
|
-
- **`GestureWrapper`**: A powerful higher-order component that wraps any view to easily handle double-taps, long-presses, and directional swipes using `react-native-reanimated`.
|
|
42
|
-
|
|
43
|
-
### 🧭 Navigation & Overlays
|
|
44
|
-
- **`Tabs`**: Clean, customizable local tab navigation (supports `underline` and `button` pill styles).
|
|
45
|
-
- **`BottomModal`**: A gesture-driven, highly responsive bottom sheet that slides up and can be dismissed interactively via drag gestures.
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## 🔌 Core Services
|
|
50
|
-
|
|
51
|
-
Pre-configured, strongly-typed service wrappers handle complex background logic so you don't have to write boilerplate.
|
|
52
|
-
|
|
53
|
-
### 🔐 Authentication (`auth.service.ts`)
|
|
54
|
-
Fully integrated Axios endpoints for standard auth flows:
|
|
55
|
-
- `sendOtp`: Dispatch sign-up verification codes.
|
|
56
|
-
- `signup`: Register a new user with OTP verification.
|
|
57
|
-
- `login`: Authenticate existing users.
|
|
58
|
-
- `updateMe`: Sync profile updates to the backend.
|
|
59
|
-
- `logout`: Clear session data securely.
|
|
60
|
-
- `savePushToken`: Send device push tokens to the server.
|
|
61
|
-
|
|
62
|
-
### 📱 Hardware Permissions (`permission.service.ts`)
|
|
63
|
-
A centralized, cross-platform handler that abstracts away iOS/Android permission complexity:
|
|
64
|
-
- `requirePermission`: Request camera, location, photo library, or microphone access gracefully.
|
|
65
|
-
- `openSettingsForApp`: Deep-link users to system settings if they previously blocked a permission.
|
|
66
|
-
- `registerForPushNotificationsAsync`: Automatically negotiate with Apple APNs / Firebase FCM, configure local Android channels, and return the Expo Push Token.
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## 🏗 System Architecture
|
|
71
|
-
|
|
72
|
-
### 🚀 Tech Stack
|
|
73
|
-
- **Framework**: Expo / React Native
|
|
74
|
-
- **Styling**: NativeWind (Tailwind v3) & `react-native-reanimated`
|
|
75
|
-
- **Routing**: `expo-router`
|
|
76
|
-
- **Global State**: `zustand`
|
|
77
|
-
- **Storage**: `@react-native-async-storage/async-storage`
|
|
78
|
-
- **API**: `axios`
|
|
79
|
-
|
|
80
|
-
### 🎨 Theming
|
|
81
|
-
- **Dynamic Light/Dark Mode**: The entire UI responds instantly to the system appearance.
|
|
82
|
-
- **Semantic Colors**: Colors are defined centrally (e.g., `primary`, `base100`, `error`) via CSS variables, making global restyling effortless.
|
|
83
|
-
|
|
84
|
-
### ⚡ Build Pipeline
|
|
85
|
-
- Pre-configured `eas.json` and local `npm` scripts to instantly compile Cloud or Local `.apk`, `.aab`, and `.ipa` artifacts.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Getting Started
|
|
2
|
-
|
|
3
|
-
This mobile app is built on **Expo Router**, **NativeWind**, and **Zustand**.
|
|
4
|
-
|
|
5
|
-
## App Architecture
|
|
6
|
-
|
|
7
|
-
- **`src/app/`**: This is the routing directory. Expo Router uses file-based routing similar to Next.js.
|
|
8
|
-
- `_layout.tsx`: The root wrapper. This is where providers (`GestureHandlerRootView`, `PaperProvider`, `StatusBar`) are initialized.
|
|
9
|
-
- `(tabs)/`: A route group that shares a bottom tab bar layout.
|
|
10
|
-
- `login.tsx`: The login screen route.
|
|
11
|
-
- **`src/components/`**: Reusable React components. The `ui/` folder contains our custom design system.
|
|
12
|
-
- **`src/store/`**: Global state management using `Zustand`. `useAuthStore.ts` handles the authentication lifecycle.
|
|
13
|
-
- **`src/services/`**: Abstracts API calls and device native capabilities (e.g., `permission.service.ts` for unified hardware permissions).
|
|
14
|
-
|
|
15
|
-
## Managing Theme
|
|
16
|
-
|
|
17
|
-
The app uses **NativeWind** to handle styling.
|
|
18
|
-
By default, the theme is bound to the device OS theme, but it can be overridden and saved using `AsyncStorage`.
|
|
19
|
-
|
|
20
|
-
```tsx
|
|
21
|
-
import { useColorScheme } from 'nativewind';
|
|
22
|
-
|
|
23
|
-
export default function MyComponent() {
|
|
24
|
-
const { colorScheme, toggleColorScheme } = useColorScheme();
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<View className="bg-white dark:bg-gray-900">
|
|
28
|
-
<Text className="text-black dark:text-white">Current theme: {colorScheme}</Text>
|
|
29
|
-
</View>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Hardware Permissions
|
|
35
|
-
|
|
36
|
-
Never install a separate `expo-*` permission library manually. Use the `PermissionService`:
|
|
37
|
-
|
|
38
|
-
```typescript
|
|
39
|
-
import { permissionService } from '@/services/permission.service';
|
|
40
|
-
|
|
41
|
-
const requestCamera = async () => {
|
|
42
|
-
const granted = await permissionService.requirePermission('camera');
|
|
43
|
-
if (granted) {
|
|
44
|
-
console.log('Camera ready!');
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
```
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { View, TouchableOpacity, Pressable } from "react-native";
|
|
2
|
-
import React, { useState } from "react";
|
|
3
|
-
import { Txt } from "./Typography";
|
|
4
|
-
import { useColorScheme } from "nativewind";
|
|
5
|
-
import { Colors } from "../../constants/Colors";
|
|
6
|
-
import { Ionicons } from "@expo/vector-icons";
|
|
7
|
-
import Sidebar from "../ui/Sidebar";
|
|
8
|
-
|
|
9
|
-
export default function HomeHeader({
|
|
10
|
-
title,
|
|
11
|
-
icon,
|
|
12
|
-
fun,
|
|
13
|
-
}: {
|
|
14
|
-
title?: string;
|
|
15
|
-
icon?: keyof typeof Ionicons.glyphMap;
|
|
16
|
-
fun?: () => void;
|
|
17
|
-
}) {
|
|
18
|
-
const { colorScheme } = useColorScheme();
|
|
19
|
-
const [isSidebarOpen, setIsSidebarOpen] = useState<boolean>(false);
|
|
20
|
-
const colors = Colors[colorScheme ?? "light"];
|
|
21
|
-
return (
|
|
22
|
-
<>
|
|
23
|
-
<View
|
|
24
|
-
className="h-28 pb-4 px-6 flex-row items-end justify-between border-b border-base-300 w-full"
|
|
25
|
-
style={{
|
|
26
|
-
backgroundColor: colors.base200,
|
|
27
|
-
// elevation: 1,
|
|
28
|
-
}}
|
|
29
|
-
>
|
|
30
|
-
<Pressable onPress={() => setIsSidebarOpen(true)}>
|
|
31
|
-
<Txt variant="xl" className="text-primary font-bold">
|
|
32
|
-
{title}
|
|
33
|
-
</Txt>
|
|
34
|
-
</Pressable>
|
|
35
|
-
<TouchableOpacity onPress={fun}>
|
|
36
|
-
<Ionicons name={icon} color={colors.baseContent} size={28} />
|
|
37
|
-
</TouchableOpacity>
|
|
38
|
-
</View>
|
|
39
|
-
|
|
40
|
-
<Sidebar isOpen={isSidebarOpen} onClose={() => setIsSidebarOpen(false)} />
|
|
41
|
-
</>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { View, Switch } from "react-native";
|
|
2
|
-
import { Txt } from "../common/Typography";
|
|
3
|
-
import { Ionicons } from "@expo/vector-icons";
|
|
4
|
-
|
|
5
|
-
export default function SettingToggle({ check, fun, icon, name }) {
|
|
6
|
-
return (
|
|
7
|
-
<View className="flex-row justify-between items-center my-4">
|
|
8
|
-
<View className="flex-row justify-center items-center">
|
|
9
|
-
<View className="p-4 bg-blue-600 rounded-2xl mr-5 justify-center items-center">
|
|
10
|
-
<Ionicons name={icon} size={18} color="#fff" />
|
|
11
|
-
</View>
|
|
12
|
-
<Txt variant="mid">{name}</Txt>
|
|
13
|
-
</View>
|
|
14
|
-
<Switch
|
|
15
|
-
trackColor={{ false: "#767577", true: "#81b0ff" }}
|
|
16
|
-
thumbColor={check ? "#2196F3" : "#f4f3f4"}
|
|
17
|
-
ios_backgroundColor="#3e3e3e"
|
|
18
|
-
onValueChange={fun}
|
|
19
|
-
value={check}
|
|
20
|
-
style={{
|
|
21
|
-
transform: [{ scaleX: 1.5 }, { scaleY: 1.5 }],
|
|
22
|
-
}}
|
|
23
|
-
/>
|
|
24
|
-
</View>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { View, TouchableOpacity } from "react-native";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { Txt } from "../common/Typography";
|
|
4
|
-
import { Ionicons } from "@expo/vector-icons";
|
|
5
|
-
import ConfirmationToast from "../common/ConfirmationToast";
|
|
6
|
-
import { Portal } from "react-native-paper";
|
|
7
|
-
import { useColorScheme } from "nativewind";
|
|
8
|
-
import { Colors } from "../../constants/Colors";
|
|
9
|
-
|
|
10
|
-
export default function SettingsOptins({ check, icon, fun, name, message }) {
|
|
11
|
-
const [show, setShow] = useState(false);
|
|
12
|
-
const { colorScheme } = useColorScheme();
|
|
13
|
-
const colors = Colors[colorScheme ?? "light"];
|
|
14
|
-
return (
|
|
15
|
-
<>
|
|
16
|
-
<TouchableOpacity
|
|
17
|
-
className="flex-row justify-between items-center my-4"
|
|
18
|
-
onPress={() => setShow(!show)}
|
|
19
|
-
>
|
|
20
|
-
<View className="flex-row justify-center items-center">
|
|
21
|
-
<View className="p-4 bg-blue-600 rounded-2xl mr-5 justify-center items-center">
|
|
22
|
-
<Ionicons name={icon} size={18} color="#fff" />
|
|
23
|
-
</View>
|
|
24
|
-
<Txt variant="mid">{name}</Txt>
|
|
25
|
-
</View>
|
|
26
|
-
<TouchableOpacity onPress={() => setShow(!show)}>
|
|
27
|
-
<Ionicons
|
|
28
|
-
name="chevron-forward-outline"
|
|
29
|
-
size={25}
|
|
30
|
-
color={colors.baseContent}
|
|
31
|
-
/>
|
|
32
|
-
</TouchableOpacity>
|
|
33
|
-
</TouchableOpacity>
|
|
34
|
-
<Portal>
|
|
35
|
-
{show && (
|
|
36
|
-
<ConfirmationToast
|
|
37
|
-
fun={fun}
|
|
38
|
-
icon={icon}
|
|
39
|
-
setShow={setShow}
|
|
40
|
-
name={name}
|
|
41
|
-
message={message}
|
|
42
|
-
/>
|
|
43
|
-
)}
|
|
44
|
-
</Portal>
|
|
45
|
-
</>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{ "recommendations": ["expo.vscode-expo-tools"] }
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
# 📱 Mobile App (React Native + Expo)
|
|
2
|
-
|
|
3
|
-
This is the mobile application of the starter template, built entirely with **React Native** and **Expo**. It is designed to be a highly scalable boilerplate featuring a modern tech stack, a unified permissions system, and a robust custom UI component library.
|
|
4
|
-
|
|
5
|
-
## ✨ Key Features
|
|
6
|
-
|
|
7
|
-
- **Expo Router**: File-based routing that makes navigation predictable and deeply linkable.
|
|
8
|
-
- **NativeWind (Tailwind CSS)**: Styling is powered by Tailwind CSS classes, complete with dynamic Light/Dark mode support.
|
|
9
|
-
- **Custom UI Library**: Beautiful, highly-reusable components built from scratch (e.g., `Tabs`, `Button`, `Image`, `ScrollContainer`, `Input`) designed to work perfectly across both themes.
|
|
10
|
-
- **Zustand State Management**: Lightweight and fast global state management, used to handle the user's auth session securely.
|
|
11
|
-
- **Unified Permission Service**: A centralized handler for iOS and Android hardware permissions using `react-native-permissions`.
|
|
12
|
-
- **Push Notification Pipeline**: Built-in support for generating Expo Push Tokens on physical devices and syncing them to your backend.
|
|
13
|
-
|
|
14
|
-
## 🧩 Included UI Components
|
|
15
|
-
|
|
16
|
-
The starter kit comes with a massive, completely customizable, and gesture-driven UI library built from scratch out of atomic elements.
|
|
17
|
-
|
|
18
|
-
- **Layout**: `Container`, `Section`, `ScrollContainer`, `HStack`, `VStack`
|
|
19
|
-
- **Buttons**: `Button` (with variants, sizes, and soft props), `IconButton`, `FloatingActionButton`
|
|
20
|
-
- **Data Display**: `Avatar`, `Badge`, `Accordion`, `SwipeableRow`, `Card`
|
|
21
|
-
- **Inputs**: `Input`, `Checkbox`, `Radio`, `Switch`, `Slider`, `SearchBar`
|
|
22
|
-
- **Feedback & Loading**: `Spinner`, `ProgressBar`, `CircularProgress`, `Skeleton`, `GestureWrapper`
|
|
23
|
-
- **Navigation**: `Tabs` (Underline & Button variants)
|
|
24
|
-
- **Overlay & Modals**: `BottomModal` (Gesture-driven bottom sheet)
|
|
25
|
-
|
|
26
|
-
## 🔌 Included Services
|
|
27
|
-
|
|
28
|
-
Pre-configured service wrappers allow you to focus on logic rather than boilerplate:
|
|
29
|
-
|
|
30
|
-
- **`auth.service.ts`**: Prebuilt Axios integrations for `sendOtp`, `signup`, `login`, `updateMe`, `logout`, and `savePushToken`.
|
|
31
|
-
- **`permission.service.ts`**: A unified permissions handler exposing `requirePermission`, `openSettingsForApp`, and `registerForPushNotificationsAsync`.
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## 🛠 Tech Stack
|
|
36
|
-
|
|
37
|
-
- **Framework**: Expo / React Native
|
|
38
|
-
- **Styling**: NativeWind (Tailwind v3) & `react-native-reanimated`
|
|
39
|
-
- **Routing**: `expo-router`
|
|
40
|
-
- **State**: `zustand`
|
|
41
|
-
- **Storage**: `@react-native-async-storage/async-storage`
|
|
42
|
-
- **API**: `axios`
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## 🚀 Getting Started
|
|
47
|
-
|
|
48
|
-
### Prerequisites
|
|
49
|
-
|
|
50
|
-
Make sure you have the following installed on your machine:
|
|
51
|
-
|
|
52
|
-
- Node.js (v18+)
|
|
53
|
-
- [EAS CLI](https://docs.expo.dev/build/setup/) (`npm install -g eas-cli`)
|
|
54
|
-
- iOS Simulator (macOS only) or Android Emulator
|
|
55
|
-
|
|
56
|
-
### Installation
|
|
57
|
-
|
|
58
|
-
1. Navigate to the `mobile` directory:
|
|
59
|
-
```bash
|
|
60
|
-
cd mobile
|
|
61
|
-
```
|
|
62
|
-
2. Install dependencies:
|
|
63
|
-
```bash
|
|
64
|
-
npm install
|
|
65
|
-
```
|
|
66
|
-
3. Start the development server:
|
|
67
|
-
```bash
|
|
68
|
-
npm run dev
|
|
69
|
-
```
|
|
70
|
-
4. Press `i` to open the app on an iOS Simulator, or `a` to open it on an Android Emulator.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## 🏗 Project Structure
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
src/
|
|
78
|
-
├── app/ # Expo Router screens (e.g., _layout.tsx, login.tsx, (tabs)/)
|
|
79
|
-
├── components/ # Reusable UI components
|
|
80
|
-
│ ├── common/ # Generic components (Loading, etc.)
|
|
81
|
-
│ └── ui/ # Custom UI library (Button, Tabs, Image, Input)
|
|
82
|
-
├── constants/ # Theme tokens (Colors, Typography)
|
|
83
|
-
├── services/ # API and business logic wrappers
|
|
84
|
-
│ ├── auth.service.ts # Axios API calls for authentication
|
|
85
|
-
│ └── permission.service.ts # Unified hardware permission logic
|
|
86
|
-
├── store/ # Zustand global stores (useAuthStore.ts)
|
|
87
|
-
└── utils/ # Helper functions (storage.ts, api.ts)
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## 📦 Build Instructions
|
|
93
|
-
|
|
94
|
-
This template is configured for both cloud-based builds (via EAS) and fast local compilations using standard Gradle scripts.
|
|
95
|
-
|
|
96
|
-
### Cloud Builds (Expo Application Services)
|
|
97
|
-
|
|
98
|
-
If you don't have Android Studio or Xcode configured, you can build directly in the cloud:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
# Build an Android APK (Uses the "preview" profile in eas.json)
|
|
102
|
-
npm run build:eas:apk
|
|
103
|
-
|
|
104
|
-
# Build an Android App Bundle (.aab) for the Play Store (Uses "production" profile)
|
|
105
|
-
npm run build:eas:aab
|
|
106
|
-
|
|
107
|
-
# Build an iOS app
|
|
108
|
-
npm run build:ios
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Local Builds (Requires Android Studio/SDK)
|
|
112
|
-
|
|
113
|
-
If you have your local SDK set up, you can compile extremely fast on your own machine:
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
# Compile a local .apk
|
|
117
|
-
npm run build:apk
|
|
118
|
-
|
|
119
|
-
# Compile a local .aab
|
|
120
|
-
npm run build:aab
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
_(Note: Rebuilding natively is required whenever you add new npm packages containing native code, or modify the `app.json` plugins!)_
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
## 🔒 Handling Permissions
|
|
128
|
-
|
|
129
|
-
Rather than installing different disjointed `expo-*` libraries every time you need hardware access, this template centralizes all permission requests using the `PermissionService`.
|
|
130
|
-
|
|
131
|
-
To check or request access:
|
|
132
|
-
|
|
133
|
-
```typescript
|
|
134
|
-
import { permissionService } from "@/services/permission.service";
|
|
135
|
-
|
|
136
|
-
// Calling requirePermission() will automatically prompt the user if they haven't been asked yet
|
|
137
|
-
const hasCameraAccess = await permissionService.requirePermission("camera");
|
|
138
|
-
|
|
139
|
-
if (!hasCameraAccess) {
|
|
140
|
-
// Deep link the user to the OS settings if they permanently blocked the permission
|
|
141
|
-
permissionService.openSettingsForApp();
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## 🔔 Push Notifications
|
|
146
|
-
|
|
147
|
-
To request push notifications, just call the utility function. It will automatically detect if it is running on a physical device, set up the required Android notification channels, fetch the token from Apple/Google, and return it:
|
|
148
|
-
|
|
149
|
-
```typescript
|
|
150
|
-
import { permissionService } from "@/services/permission.service";
|
|
151
|
-
import { authService } from "@/services/auth.service";
|
|
152
|
-
|
|
153
|
-
const token = await permissionService.registerForPushNotificationsAsync();
|
|
154
|
-
|
|
155
|
-
// Send it to the backend!
|
|
156
|
-
if (token) {
|
|
157
|
-
await authService.savePushToken(token);
|
|
158
|
-
}
|
|
159
|
-
```
|