@digilogiclabs/create-saas-app 1.5.4 → 1.6.1

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 (57) hide show
  1. package/CHANGELOG.md +109 -49
  2. package/bin/index.js +1 -1
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/generators/template-generator.d.ts.map +1 -1
  5. package/dist/generators/template-generator.js +3 -5
  6. package/dist/generators/template-generator.js.map +1 -1
  7. package/dist/templates/mobile/base/template/App.tsx +113 -23
  8. package/dist/templates/mobile/base/template/package.json +5 -2
  9. package/dist/templates/web/base/template/package.json +1 -1
  10. package/dist/templates/web/base/template/src/app/checkout/page.tsx +99 -8
  11. package/dist/templates/web/base/template/src/app/dashboard/page.tsx +309 -0
  12. package/dist/templates/web/base/template/src/app/globals.css +97 -0
  13. package/dist/templates/web/base/template/src/app/login/page.tsx +36 -8
  14. package/dist/templates/web/base/template/src/app/page.tsx +123 -83
  15. package/dist/templates/web/base/template/src/app/signup/page.tsx +36 -8
  16. package/dist/templates/web/base/template/src/components/shared/header.tsx +49 -30
  17. package/dist/templates/web/ui-auth/template/package.json +2 -2
  18. package/dist/templates/web/ui-auth/template/src/app/page.tsx +203 -61
  19. package/dist/templates/web/ui-auth-payments/template/package.json +2 -2
  20. package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +253 -87
  21. package/dist/templates/web/ui-auth-payments/template/src/app/globals.css +129 -0
  22. package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +246 -74
  23. package/dist/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +106 -40
  24. package/dist/templates/web/ui-auth-payments-audio/template/package.json +2 -2
  25. package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +221 -82
  26. package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +132 -40
  27. package/dist/templates/web/ui-auth-payments-video/template/package.json +2 -2
  28. package/dist/templates/web/ui-auth-payments-video/template/src/app/globals.css +146 -0
  29. package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +259 -85
  30. package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +133 -41
  31. package/package.json +106 -106
  32. package/src/templates/mobile/base/template/App.tsx +113 -23
  33. package/src/templates/mobile/base/template/package.json +5 -2
  34. package/src/templates/web/base/template/package.json +1 -1
  35. package/src/templates/web/base/template/src/app/checkout/page.tsx +99 -8
  36. package/src/templates/web/base/template/src/app/dashboard/page.tsx +309 -0
  37. package/src/templates/web/base/template/src/app/globals.css +97 -0
  38. package/src/templates/web/base/template/src/app/login/page.tsx +36 -8
  39. package/src/templates/web/base/template/src/app/page.tsx +123 -83
  40. package/src/templates/web/base/template/src/app/signup/page.tsx +36 -8
  41. package/src/templates/web/base/template/src/components/shared/header.tsx +49 -30
  42. package/src/templates/web/ui-auth/template/package.json +2 -2
  43. package/src/templates/web/ui-auth/template/src/app/page.tsx +203 -61
  44. package/src/templates/web/ui-auth-payments/template/package.json +2 -2
  45. package/src/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +253 -87
  46. package/src/templates/web/ui-auth-payments/template/src/app/globals.css +129 -0
  47. package/src/templates/web/ui-auth-payments/template/src/app/page.tsx +246 -74
  48. package/src/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +106 -40
  49. package/src/templates/web/ui-auth-payments-audio/template/package.json +2 -2
  50. package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +221 -82
  51. package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +132 -40
  52. package/src/templates/web/ui-auth-payments-video/template/package.json +2 -2
  53. package/src/templates/web/ui-auth-payments-video/template/src/app/globals.css +146 -0
  54. package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +259 -85
  55. package/src/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +133 -41
  56. package/dist/index.js +0 -1173
  57. package/dist/index.js.map +0 -1
@@ -1,12 +1,26 @@
1
1
  'use client'
2
2
 
3
- import { Button, Card } from '@digilogiclabs/saas-factory-ui'
4
- import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User } from 'lucide-react'
3
+ import {
4
+ Button,
5
+ Card,
6
+ PageTransition,
7
+ MobileContainer,
8
+ MobileHero,
9
+ ResponsiveGrid,
10
+ NetworkAwareContent,
11
+ OfflineWrapper,
12
+ SwipeableCard,
13
+ useNetworkInfo,
14
+ useOfflineState
15
+ } from '@digilogiclabs/saas-factory-ui'
16
+ import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Wifi, WifiOff, Smartphone } from 'lucide-react'
5
17
  import { useAuth } from '@digilogiclabs/saas-factory-auth'
6
18
  import Link from 'next/link'
7
19
 
8
20
  export default function Home() {
9
21
  const { user, signOut, loading } = useAuth()
22
+ const networkInfo = useNetworkInfo()
23
+ const isOnline = useOfflineState()
10
24
 
11
25
  const handleSignOut = async () => {
12
26
  try {
@@ -17,12 +31,37 @@ export default function Home() {
17
31
  }
18
32
 
19
33
  return (
20
- <main className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
21
- <div className="container mx-auto px-4 py-16">
22
- {/* Auth Status Bar */}
23
- <div className="flex justify-end mb-8">
34
+ <PageTransition type="fade" duration={300}>
35
+ <OfflineWrapper
36
+ cacheStrategy="stale-while-revalidate"
37
+ showOfflineIndicator={true}
38
+ backgroundSync={true}
39
+ >
40
+ <main className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
41
+ <MobileContainer className="py-16">
42
+ {/* Auth Status Bar with Network Info */}
43
+ <div className="flex flex-col sm:flex-row justify-between items-center mb-8 gap-4">
44
+ <div className="flex items-center gap-2 text-sm">
45
+ {isOnline ? (
46
+ <div className="flex items-center gap-2 text-green-600">
47
+ <Wifi className="w-4 h-4" />
48
+ <span>Connected</span>
49
+ {networkInfo?.effectiveType && (
50
+ <span className="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">
51
+ {networkInfo.effectiveType.toUpperCase()}
52
+ </span>
53
+ )}
54
+ </div>
55
+ ) : (
56
+ <div className="flex items-center gap-2 text-red-600">
57
+ <WifiOff className="w-4 h-4" />
58
+ <span>Offline Mode</span>
59
+ </div>
60
+ )}
61
+ </div>
62
+
24
63
  {loading ? (
25
- <div className="text-sm text-gray-600">Loading...</div>
64
+ <div className="text-sm text-gray-600">Loading auth...</div>
26
65
  ) : user ? (
27
66
  <div className="flex items-center gap-4">
28
67
  <div className="flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300">
@@ -47,61 +86,162 @@ export default function Home() {
47
86
  </div>
48
87
 
49
88
  {/* Hero Section */}
50
- <div className="text-center mb-16">
51
- <div className="inline-flex items-center px-4 py-2 rounded-full text-sm font-medium bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 mb-6">
52
- <CheckCircle className="w-4 h-4 mr-2" />
53
- UI Package v0.7.3 + Auth v0.4.4 Integrated Successfully
54
- </div>
55
- <h1 className="text-4xl md:text-6xl font-bold text-gray-900 dark:text-white mb-6">
56
- Welcome to{' '}
57
- <span className="text-blue-600 dark:text-blue-400">{{titleCaseName}}</span>
58
- </h1>
59
- <p className="text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-2xl mx-auto">
60
- {{description}}. This template uses the stable SaaS Factory UI package v0.7.3 with authentication v0.4.4.
61
- </p>
62
- <div className="flex flex-col sm:flex-row gap-4 justify-center">
63
- <Button size="lg" className="text-lg px-8">
64
- Get Started
65
- <ArrowRight className="ml-2 h-5 w-5" />
66
- </Button>
67
- <Button variant="outline" size="lg" className="text-lg px-8">
68
- Learn More
69
- </Button>
70
- </div>
71
- </div>
89
+ <MobileHero
90
+ badge={{
91
+ text: "UI Package v0.13.0 + Auth v1.0.0 - Cross-Device Ready",
92
+ variant: "secondary",
93
+ icon: CheckCircle
94
+ }}
95
+ title={{
96
+ text: "Welcome to {{titleCaseName}}",
97
+ highlight: "{{titleCaseName}}",
98
+ size: "xl"
99
+ }}
100
+ description="{{description}}. This mobile-optimized template uses SaaS Factory UI package v0.13.0 with cross-device authentication v1.0.0."
101
+ actions={[
102
+ {
103
+ label: "Get Started",
104
+ icon: ArrowRight,
105
+ variant: "default",
106
+ size: "lg"
107
+ },
108
+ {
109
+ label: "Learn More",
110
+ variant: "outline",
111
+ size: "lg"
112
+ }
113
+ ]}
114
+ className="text-center mb-16"
115
+ />
72
116
 
73
117
  {/* Component Showcase */}
74
- <div className="grid md:grid-cols-3 gap-8 mb-16">
75
- <Card className="text-center p-6">
76
- <div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
77
- <Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
78
- </div>
79
- <h3 className="text-xl font-semibold mb-2">UI Package Components</h3>
80
- <p className="text-gray-600 dark:text-gray-300">
81
- Button and Card components from @digilogiclabs/saas-factory-ui
82
- </p>
83
- </Card>
118
+ <NetworkAwareContent
119
+ showOnSlow={
120
+ <ResponsiveGrid columns={{ base: 1, sm: 2 }} gap="lg" className="mb-16">
121
+ <SwipeableCard
122
+ rightActions={[
123
+ {
124
+ id: 'explore',
125
+ label: 'Explore',
126
+ onAction: () => console.log('Exploring mobile features'),
127
+ color: 'blue'
128
+ }
129
+ ]}
130
+ threshold={60}
131
+ hapticFeedback={true}
132
+ showActionLabels={true}
133
+ >
134
+ <Card className="text-center p-6">
135
+ <div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
136
+ <Smartphone className="h-6 w-6 text-blue-600 dark:text-blue-400" />
137
+ </div>
138
+ <h3 className="text-lg font-semibold mb-2">Mobile-First UI</h3>
139
+ <p className="text-sm text-gray-600 dark:text-gray-300">
140
+ Touch-optimized components from @digilogiclabs/saas-factory-ui v0.13.0
141
+ </p>
142
+ </Card>
143
+ </SwipeableCard>
144
+
145
+ <SwipeableCard
146
+ rightActions={[
147
+ {
148
+ id: 'secure',
149
+ label: 'Secure',
150
+ onAction: () => console.log('Exploring auth features'),
151
+ color: 'green'
152
+ }
153
+ ]}
154
+ threshold={60}
155
+ hapticFeedback={true}
156
+ showActionLabels={true}
157
+ >
158
+ <Card className="text-center p-6">
159
+ <div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
160
+ <Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
161
+ </div>
162
+ <h3 className="text-lg font-semibold mb-2">Cross-Device Auth</h3>
163
+ <p className="text-sm text-gray-600 dark:text-gray-300">
164
+ Seamless authentication across web and mobile devices
165
+ </p>
166
+ </Card>
167
+ </SwipeableCard>
168
+ </ResponsiveGrid>
169
+ }
170
+ >
171
+ <ResponsiveGrid columns={{ base: 1, sm: 2, md: 3 }} gap="lg" className="mb-16">
172
+ <SwipeableCard
173
+ rightActions={[
174
+ {
175
+ id: 'demo',
176
+ label: 'Try Demo',
177
+ onAction: () => console.log('Demo UI components'),
178
+ color: 'blue'
179
+ }
180
+ ]}
181
+ threshold={60}
182
+ hapticFeedback={true}
183
+ showActionLabels={true}
184
+ >
185
+ <Card className="text-center p-6">
186
+ <div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
187
+ <Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
188
+ </div>
189
+ <h3 className="text-lg font-semibold mb-2">Touch UI Components</h3>
190
+ <p className="text-sm text-gray-600 dark:text-gray-300">
191
+ Mobile-first buttons, cards, and gestures from @digilogiclabs/saas-factory-ui v0.13.0
192
+ </p>
193
+ </Card>
194
+ </SwipeableCard>
84
195
 
85
- <Card className="text-center p-6">
86
- <div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
87
- <Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
88
- </div>
89
- <h3 className="text-xl font-semibold mb-2">Hybrid Architecture</h3>
90
- <p className="text-gray-600 dark:text-gray-300">
91
- Clean web build with no React Native contamination
92
- </p>
93
- </Card>
196
+ <SwipeableCard
197
+ rightActions={[
198
+ {
199
+ id: 'auth',
200
+ label: 'Auth Demo',
201
+ onAction: () => console.log('Demo auth flow'),
202
+ color: 'green'
203
+ }
204
+ ]}
205
+ threshold={60}
206
+ hapticFeedback={true}
207
+ showActionLabels={true}
208
+ >
209
+ <Card className="text-center p-6">
210
+ <div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
211
+ <Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
212
+ </div>
213
+ <h3 className="text-lg font-semibold mb-2">Cross-Device Security</h3>
214
+ <p className="text-sm text-gray-600 dark:text-gray-300">
215
+ Secure authentication that works seamlessly across all devices
216
+ </p>
217
+ </Card>
218
+ </SwipeableCard>
94
219
 
95
- <Card className="text-center p-6">
96
- <div className="mx-auto w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mb-4">
97
- <Rocket className="h-6 w-6 text-purple-600 dark:text-purple-400" />
98
- </div>
99
- <h3 className="text-xl font-semibold mb-2">TypeScript Ready</h3>
100
- <p className="text-gray-600 dark:text-gray-300">
101
- Full type safety with enhanced component definitions
102
- </p>
103
- </Card>
104
- </div>
220
+ <SwipeableCard
221
+ rightActions={[
222
+ {
223
+ id: 'performance',
224
+ label: 'See Speed',
225
+ onAction: () => console.log('Performance demo'),
226
+ color: 'purple'
227
+ }
228
+ ]}
229
+ threshold={60}
230
+ hapticFeedback={true}
231
+ showActionLabels={true}
232
+ >
233
+ <Card className="text-center p-6">
234
+ <div className="mx-auto w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mb-4">
235
+ <Rocket className="h-6 w-6 text-purple-600 dark:text-purple-400" />
236
+ </div>
237
+ <h3 className="text-lg font-semibold mb-2">Performance First</h3>
238
+ <p className="text-sm text-gray-600 dark:text-gray-300">
239
+ Network-aware components with offline support and lazy loading
240
+ </p>
241
+ </Card>
242
+ </SwipeableCard>
243
+ </ResponsiveGrid>
244
+ </NetworkAwareContent>
105
245
 
106
246
  {/* Button Variants Showcase */}
107
247
  <Card className="max-w-4xl mx-auto p-8">
@@ -119,11 +259,13 @@ export default function Home() {
119
259
  </div>
120
260
  <div className="text-center">
121
261
  <p className="text-sm text-gray-500">
122
- All components imported from @digilogiclabs/saas-factory-ui v0.7.3
262
+ All mobile-optimized components from @digilogiclabs/saas-factory-ui v0.13.0 + auth v1.0.0
123
263
  </p>
124
264
  </div>
125
265
  </Card>
126
- </div>
127
- </main>
266
+ </MobileContainer>
267
+ </main>
268
+ </OfflineWrapper>
269
+ </PageTransition>
128
270
  )
129
271
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "{{packageName}}",
3
3
  "version": "0.1.0",
4
- "description": "{{description}} (with UI Package v0.11.1 + Auth v1.0.0 + Payments)",
4
+ "description": "{{description}} (with UI Package v0.13.0 + Auth v1.0.0 + Payments)",
5
5
  "private": true,
6
6
  "scripts": {
7
7
  "dev": "next dev",
@@ -17,7 +17,7 @@
17
17
  "next": "^15.0.0",
18
18
  "react": "^19.0.0",
19
19
  "react-dom": "^19.0.0",
20
- "@digilogiclabs/saas-factory-ui": "^0.11.1",
20
+ "@digilogiclabs/saas-factory-ui": "^0.13.0",
21
21
  "@digilogiclabs/saas-factory-auth": "^1.0.0",
22
22
  "@digilogiclabs/saas-factory-payments": "^1.0.0",
23
23
  "stripe": "^14.0.0",