@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.
- package/CHANGELOG.md +109 -49
- package/bin/index.js +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/generators/template-generator.d.ts.map +1 -1
- package/dist/generators/template-generator.js +3 -5
- package/dist/generators/template-generator.js.map +1 -1
- package/dist/templates/mobile/base/template/App.tsx +113 -23
- package/dist/templates/mobile/base/template/package.json +5 -2
- package/dist/templates/web/base/template/package.json +1 -1
- package/dist/templates/web/base/template/src/app/checkout/page.tsx +99 -8
- package/dist/templates/web/base/template/src/app/dashboard/page.tsx +309 -0
- package/dist/templates/web/base/template/src/app/globals.css +97 -0
- package/dist/templates/web/base/template/src/app/login/page.tsx +36 -8
- package/dist/templates/web/base/template/src/app/page.tsx +123 -83
- package/dist/templates/web/base/template/src/app/signup/page.tsx +36 -8
- package/dist/templates/web/base/template/src/components/shared/header.tsx +49 -30
- package/dist/templates/web/ui-auth/template/package.json +2 -2
- package/dist/templates/web/ui-auth/template/src/app/page.tsx +203 -61
- package/dist/templates/web/ui-auth-payments/template/package.json +2 -2
- package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +253 -87
- package/dist/templates/web/ui-auth-payments/template/src/app/globals.css +129 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +246 -74
- package/dist/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +106 -40
- package/dist/templates/web/ui-auth-payments-audio/template/package.json +2 -2
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +221 -82
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +132 -40
- package/dist/templates/web/ui-auth-payments-video/template/package.json +2 -2
- package/dist/templates/web/ui-auth-payments-video/template/src/app/globals.css +146 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +259 -85
- package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +133 -41
- package/package.json +106 -106
- package/src/templates/mobile/base/template/App.tsx +113 -23
- package/src/templates/mobile/base/template/package.json +5 -2
- package/src/templates/web/base/template/package.json +1 -1
- package/src/templates/web/base/template/src/app/checkout/page.tsx +99 -8
- package/src/templates/web/base/template/src/app/dashboard/page.tsx +309 -0
- package/src/templates/web/base/template/src/app/globals.css +97 -0
- package/src/templates/web/base/template/src/app/login/page.tsx +36 -8
- package/src/templates/web/base/template/src/app/page.tsx +123 -83
- package/src/templates/web/base/template/src/app/signup/page.tsx +36 -8
- package/src/templates/web/base/template/src/components/shared/header.tsx +49 -30
- package/src/templates/web/ui-auth/template/package.json +2 -2
- package/src/templates/web/ui-auth/template/src/app/page.tsx +203 -61
- package/src/templates/web/ui-auth-payments/template/package.json +2 -2
- package/src/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +253 -87
- package/src/templates/web/ui-auth-payments/template/src/app/globals.css +129 -0
- package/src/templates/web/ui-auth-payments/template/src/app/page.tsx +246 -74
- package/src/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +106 -40
- package/src/templates/web/ui-auth-payments-audio/template/package.json +2 -2
- package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +221 -82
- package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +132 -40
- package/src/templates/web/ui-auth-payments-video/template/package.json +2 -2
- package/src/templates/web/ui-auth-payments-video/template/src/app/globals.css +146 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +259 -85
- package/src/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +133 -41
- package/dist/index.js +0 -1173
- package/dist/index.js.map +0 -1
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
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
|
-
<
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
Get Started
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
<
|
|
75
|
-
|
|
76
|
-
<
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
|
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
|
-
|
|
127
|
-
|
|
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.
|
|
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.
|
|
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",
|