@digilogiclabs/create-saas-app 1.14.1 → 1.17.0

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 (80) hide show
  1. package/README.md +134 -29
  2. package/bin/index.js +1 -1
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/cli/prompts/project-setup.d.ts.map +1 -1
  5. package/dist/cli/prompts/project-setup.js +45 -12
  6. package/dist/cli/prompts/project-setup.js.map +1 -1
  7. package/dist/generators/template-generator.d.ts.map +1 -1
  8. package/dist/generators/template-generator.js +27 -4
  9. package/dist/generators/template-generator.js.map +1 -1
  10. package/dist/templates/mobile/ui-auth-payments/template/.env.example +20 -0
  11. package/dist/templates/mobile/ui-auth-payments/template/README.md +218 -0
  12. package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/_layout.tsx +153 -0
  13. package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/analytics.tsx +668 -0
  14. package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/billing.tsx +743 -0
  15. package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +676 -0
  16. package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/orders.tsx +402 -0
  17. package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/profile.tsx +580 -0
  18. package/dist/templates/mobile/ui-auth-payments/template/app/_layout.tsx +125 -0
  19. package/dist/templates/mobile/ui-auth-payments/template/app/auth/login.tsx +246 -0
  20. package/dist/templates/mobile/ui-auth-payments/template/app/auth/signup.tsx +362 -0
  21. package/dist/templates/mobile/ui-auth-payments/template/app/onboarding/index.tsx +193 -0
  22. package/dist/templates/mobile/ui-auth-payments/template/app/tour/index.tsx +272 -0
  23. package/dist/templates/mobile/ui-auth-payments/template/app.json +93 -0
  24. package/dist/templates/mobile/ui-auth-payments/template/babel.config.js +23 -0
  25. package/dist/templates/mobile/ui-auth-payments/template/eas.json +45 -0
  26. package/dist/templates/mobile/ui-auth-payments/template/expo-env.d.ts +3 -0
  27. package/dist/templates/mobile/ui-auth-payments/template/jest-setup.ts +74 -0
  28. package/dist/templates/mobile/ui-auth-payments/template/metro.config.js +11 -0
  29. package/dist/templates/mobile/ui-auth-payments/template/package.json +106 -0
  30. package/dist/templates/mobile/ui-auth-payments/template/tsconfig.json +31 -0
  31. package/dist/templates/web/base/template/src/app/dashboard/page.tsx +62 -20
  32. package/dist/templates/web/ui-auth/template/package.json +1 -1
  33. package/dist/templates/web/ui-auth-payments/template/package.json +1 -1
  34. package/dist/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +69 -17
  35. package/dist/templates/web/ui-auth-payments-ai/template/package.json +1 -1
  36. package/dist/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +218 -7
  37. package/dist/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +62 -9
  38. package/dist/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +364 -0
  39. package/dist/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +532 -0
  40. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +70 -51
  41. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +76 -60
  42. package/dist/templates/web/ui-auth-payments-audio/template/package.json +1 -1
  43. package/dist/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +71 -17
  44. package/dist/templates/web/ui-auth-payments-video/template/package.json +1 -1
  45. package/package.json +1 -1
  46. package/src/templates/mobile/ui-auth-payments/template/.env.example +20 -0
  47. package/src/templates/mobile/ui-auth-payments/template/README.md +218 -0
  48. package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/_layout.tsx +153 -0
  49. package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/analytics.tsx +668 -0
  50. package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/billing.tsx +743 -0
  51. package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +676 -0
  52. package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/orders.tsx +402 -0
  53. package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/profile.tsx +580 -0
  54. package/src/templates/mobile/ui-auth-payments/template/app/_layout.tsx +125 -0
  55. package/src/templates/mobile/ui-auth-payments/template/app/auth/login.tsx +246 -0
  56. package/src/templates/mobile/ui-auth-payments/template/app/auth/signup.tsx +362 -0
  57. package/src/templates/mobile/ui-auth-payments/template/app/onboarding/index.tsx +193 -0
  58. package/src/templates/mobile/ui-auth-payments/template/app/tour/index.tsx +272 -0
  59. package/src/templates/mobile/ui-auth-payments/template/app.json +93 -0
  60. package/src/templates/mobile/ui-auth-payments/template/babel.config.js +23 -0
  61. package/src/templates/mobile/ui-auth-payments/template/eas.json +45 -0
  62. package/src/templates/mobile/ui-auth-payments/template/expo-env.d.ts +3 -0
  63. package/src/templates/mobile/ui-auth-payments/template/jest-setup.ts +74 -0
  64. package/src/templates/mobile/ui-auth-payments/template/metro.config.js +11 -0
  65. package/src/templates/mobile/ui-auth-payments/template/package.json +106 -0
  66. package/src/templates/mobile/ui-auth-payments/template/tsconfig.json +31 -0
  67. package/src/templates/web/base/template/src/app/dashboard/page.tsx +62 -20
  68. package/src/templates/web/ui-auth/template/package.json +1 -1
  69. package/src/templates/web/ui-auth-payments/template/package.json +1 -1
  70. package/src/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +69 -17
  71. package/src/templates/web/ui-auth-payments-ai/template/package.json +1 -1
  72. package/src/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +218 -7
  73. package/src/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +62 -9
  74. package/src/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +364 -0
  75. package/src/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +532 -0
  76. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +70 -51
  77. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +76 -60
  78. package/src/templates/web/ui-auth-payments-audio/template/package.json +1 -1
  79. package/src/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +71 -17
  80. package/src/templates/web/ui-auth-payments-video/template/package.json +1 -1
@@ -0,0 +1,153 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import { Tabs } from 'expo-router';
4
+ import { useAuth } from '@digilogiclabs/saas-factory-auth/native';
5
+ import { Redirect } from 'expo-router';
6
+
7
+ // UI Components - Updated for v0.22.0
8
+ import {
9
+ BottomTabBar,
10
+ PageTransition,
11
+ useTheme
12
+ } from '@digilogiclabs/saas-factory-ui/native';
13
+
14
+ // Icons
15
+ import {
16
+ Home,
17
+ User,
18
+ Settings,
19
+ CreditCard,
20
+ BarChart3,
21
+ ShoppingBag
22
+ } from 'react-native-heroicons/outline';
23
+ import {
24
+ Home as HomeSolid,
25
+ User as UserSolid,
26
+ Settings as SettingsSolid,
27
+ CreditCard as CreditCardSolid,
28
+ BarChart3 as BarChart3Solid,
29
+ ShoppingBag as ShoppingBagSolid
30
+ } from 'react-native-heroicons/solid';
31
+
32
+ // Tab configuration for BottomTabBar
33
+ const tabConfig = [
34
+ {
35
+ id: 'index',
36
+ label: 'Home',
37
+ icon: Home,
38
+ activeIcon: HomeSolid,
39
+ route: '/dashboard'
40
+ },
41
+ {
42
+ id: 'orders',
43
+ label: 'Orders',
44
+ icon: ShoppingBag,
45
+ activeIcon: ShoppingBagSolid,
46
+ route: '/orders'
47
+ },
48
+ {
49
+ id: 'analytics',
50
+ label: 'Analytics',
51
+ icon: BarChart3,
52
+ activeIcon: BarChart3Solid,
53
+ route: '/analytics'
54
+ },
55
+ {
56
+ id: 'billing',
57
+ label: 'Billing',
58
+ icon: CreditCard,
59
+ activeIcon: CreditCardSolid,
60
+ route: '/billing'
61
+ },
62
+ {
63
+ id: 'profile',
64
+ label: 'Profile',
65
+ icon: User,
66
+ activeIcon: UserSolid,
67
+ route: '/profile'
68
+ }
69
+ ];
70
+
71
+ export default function TabLayout() {
72
+ const { user, loading } = useAuth();
73
+ const { colors } = useTheme();
74
+
75
+ // Show loading state while checking authentication
76
+ if (loading) {
77
+ return null; // or a loading component
78
+ }
79
+
80
+ // Redirect to auth if user is not authenticated
81
+ if (!user) {
82
+ return <Redirect href="/auth/login" />;
83
+ }
84
+
85
+ return (
86
+ <PageTransition type="slide" direction="horizontal">
87
+ <View style={{ flex: 1 }}>
88
+ <Tabs
89
+ screenOptions={{
90
+ headerShown: false,
91
+ tabBarStyle: { display: 'none' } // Hide default tab bar since we use BottomTabBar
92
+ }}
93
+ >
94
+ <Tabs.Screen
95
+ name="index"
96
+ options={{
97
+ title: 'Dashboard',
98
+ }}
99
+ />
100
+ <Tabs.Screen
101
+ name="orders"
102
+ options={{
103
+ title: 'Orders',
104
+ }}
105
+ />
106
+ <Tabs.Screen
107
+ name="analytics"
108
+ options={{
109
+ title: 'Analytics',
110
+ }}
111
+ />
112
+ <Tabs.Screen
113
+ name="billing"
114
+ options={{
115
+ title: 'Billing',
116
+ }}
117
+ />
118
+ <Tabs.Screen
119
+ name="profile"
120
+ options={{
121
+ title: 'Profile',
122
+ }}
123
+ />
124
+ </Tabs>
125
+
126
+ {/* Enhanced BottomTabBar from v0.22.0 */}
127
+ <BottomTabBar
128
+ tabs={tabConfig}
129
+ activeTabId="index" // This should be dynamic based on current route
130
+ onTabPress={(tabId) => {
131
+ // Handle tab navigation
132
+ console.log('Tab pressed:', tabId);
133
+ }}
134
+ style={{
135
+ position: 'absolute',
136
+ bottom: 16,
137
+ left: 16,
138
+ right: 16,
139
+ borderRadius: 24,
140
+ shadowColor: '#000',
141
+ shadowOffset: { width: 0, height: 8 },
142
+ shadowOpacity: 0.12,
143
+ shadowRadius: 24,
144
+ elevation: 12,
145
+ }}
146
+ variant="floating"
147
+ showLabels={true}
148
+ hapticFeedback={true}
149
+ />
150
+ </View>
151
+ </PageTransition>
152
+ );
153
+ }