@digilogiclabs/create-saas-app 2.8.0 → 2.9.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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/generators/template-generator.js +8 -8
- package/dist/generators/template-generator.js.map +1 -1
- package/dist/templates/shared/quality/web/src/__tests__/accessibility.test.tsx +3 -3
- package/dist/templates/web/ai-platform/template/src/app/page.tsx +207 -207
- package/dist/templates/web/base/template/package.json +1 -3
- package/dist/templates/web/base/template/src/app/auth/callback/route.ts +32 -18
- package/dist/templates/web/base/template/src/app/dashboard/page.tsx +6 -43
- package/dist/templates/web/base/template/src/app/globals.css +158 -157
- package/dist/templates/web/base/template/src/app/page.tsx +2 -2
- package/dist/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +800 -800
- package/dist/templates/web/ui-auth/template/src/app/globals.css +96 -95
- package/dist/templates/web/ui-auth/template/src/app/login/page.tsx +109 -109
- package/dist/templates/web/ui-auth/template/src/app/page.tsx +4 -3
- package/dist/templates/web/ui-auth/template/src/app/signup/page.tsx +128 -128
- package/dist/templates/web/ui-auth-ai/template/src/app/globals.css +35 -40
- package/dist/templates/web/ui-auth-ai/template/src/app/layout.tsx +1 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +3 -3
- package/dist/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +10 -49
- package/dist/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +800 -800
- package/dist/templates/web/ui-auth-payments/template/src/app/globals.css +212 -211
- package/dist/templates/web/ui-auth-payments/template/src/app/login/page.tsx +109 -109
- package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +350 -350
- package/dist/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +506 -506
- package/dist/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +128 -128
- package/dist/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +143 -143
- package/dist/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +184 -184
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +143 -233
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +10 -50
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +800 -800
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/globals.css +97 -96
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +325 -364
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +389 -532
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +644 -644
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +119 -163
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +158 -201
- package/dist/templates/web/ui-auth-payments-ai-rag/template/package.json +1 -2
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +10 -51
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/globals.css +97 -96
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +402 -403
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +143 -143
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +184 -184
- package/dist/templates/web/ui-auth-payments-video/template/src/app/globals.css +229 -228
- package/dist/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +4 -7
- package/dist/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +1 -1
- package/dist/templates/web/ui-only/template/src/app/globals.css +43 -42
- package/package.json +1 -1
- package/src/templates/shared/quality/web/src/__tests__/accessibility.test.tsx +3 -3
- package/src/templates/web/ai-platform/template/src/app/page.tsx +207 -207
- package/src/templates/web/base/template/package.json +1 -3
- package/src/templates/web/base/template/src/app/auth/callback/route.ts +32 -18
- package/src/templates/web/base/template/src/app/dashboard/page.tsx +6 -43
- package/src/templates/web/base/template/src/app/globals.css +158 -157
- package/src/templates/web/base/template/src/app/page.tsx +2 -2
- package/src/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +800 -800
- package/src/templates/web/ui-auth/template/src/app/globals.css +96 -95
- package/src/templates/web/ui-auth/template/src/app/login/page.tsx +109 -109
- package/src/templates/web/ui-auth/template/src/app/page.tsx +4 -3
- package/src/templates/web/ui-auth/template/src/app/signup/page.tsx +128 -128
- package/src/templates/web/ui-auth-ai/template/src/app/globals.css +35 -40
- package/src/templates/web/ui-auth-ai/template/src/app/layout.tsx +1 -0
- package/src/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +3 -3
- package/src/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +10 -49
- package/src/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +800 -800
- package/src/templates/web/ui-auth-payments/template/src/app/globals.css +212 -211
- package/src/templates/web/ui-auth-payments/template/src/app/login/page.tsx +109 -109
- package/src/templates/web/ui-auth-payments/template/src/app/page.tsx +350 -350
- package/src/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +506 -506
- package/src/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +128 -128
- package/src/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +143 -143
- package/src/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +184 -184
- package/src/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +143 -233
- package/src/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +10 -50
- package/src/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +800 -800
- package/src/templates/web/ui-auth-payments-ai/template/src/app/globals.css +97 -96
- package/src/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +325 -364
- package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +389 -532
- package/src/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +644 -644
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +119 -163
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +158 -201
- package/src/templates/web/ui-auth-payments-ai-rag/template/package.json +1 -2
- package/src/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +10 -51
- package/src/templates/web/ui-auth-payments-audio/template/src/app/globals.css +97 -96
- package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +402 -403
- package/src/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +143 -143
- package/src/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +184 -184
- package/src/templates/web/ui-auth-payments-video/template/src/app/globals.css +229 -228
- package/src/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +4 -7
- package/src/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +1 -1
- package/src/templates/web/ui-only/template/src/app/globals.css +43 -42
|
@@ -1,350 +1,350 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Button,
|
|
5
|
-
Card,
|
|
6
|
-
PageTransition,
|
|
7
|
-
MobileContainer,
|
|
8
|
-
MobileHero,
|
|
9
|
-
ResponsiveGrid,
|
|
10
|
-
NetworkAwareContent,
|
|
11
|
-
OfflineWrapper,
|
|
12
|
-
SwipeableCard,
|
|
13
|
-
PullToRefresh,
|
|
14
|
-
LazyImage,
|
|
15
|
-
useNetworkInfo,
|
|
16
|
-
useOfflineState
|
|
17
|
-
} from '@digilogiclabs/saas-factory-ui'
|
|
18
|
-
import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Wifi, WifiOff, CreditCard, Smartphone } from 'lucide-react'
|
|
19
|
-
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
20
|
-
import Link from 'next/link'
|
|
21
|
-
import { useState } from 'react'
|
|
22
|
-
|
|
23
|
-
export default function Home() {
|
|
24
|
-
const { user, signOut, loading } = useAuth()
|
|
25
|
-
const networkInfo = useNetworkInfo()
|
|
26
|
-
const isOnline = useOfflineState()
|
|
27
|
-
const [isRefreshing, setIsRefreshing] = useState(false)
|
|
28
|
-
|
|
29
|
-
const projectName = "{{titleCaseName}}"
|
|
30
|
-
const projectDescription = "{{description}}"
|
|
31
|
-
|
|
32
|
-
const gridConfig = {
|
|
33
|
-
columns_1_2: { base: 1, md: 2 },
|
|
34
|
-
columns_1_3: { base: 1, md: 3 },
|
|
35
|
-
columns_1_sm2: { base: 1, sm: 2 },
|
|
36
|
-
columns_1_sm2_md3: { base: 1, sm: 2, md: 3 },
|
|
37
|
-
columns_1_sm2_md4: { base: 1, sm: 2, md: 4 },
|
|
38
|
-
columns_2: { base: 2 },
|
|
39
|
-
columns_2_md3: { base: 2, md: 3 },
|
|
40
|
-
columns_2_2: { base: 2 },
|
|
41
|
-
columns_2_md4: { base: 2, md: 4 }
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const heroConfig = {
|
|
45
|
-
badge: {
|
|
46
|
-
text: "🚀 Complete SaaS Solution",
|
|
47
|
-
variant: "secondary" as const,
|
|
48
|
-
icon: CheckCircle
|
|
49
|
-
},
|
|
50
|
-
title: {
|
|
51
|
-
text: `Welcome to ${projectName}`,
|
|
52
|
-
highlight: projectName,
|
|
53
|
-
size: "xl" as const
|
|
54
|
-
},
|
|
55
|
-
description: `${projectDescription}. Everything you need to launch your SaaS business with secure authentication, seamless payments, and beautiful mobile-first design.`
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const handleSignOut = async () => {
|
|
59
|
-
try {
|
|
60
|
-
await signOut()
|
|
61
|
-
} catch (err) {
|
|
62
|
-
console.error('Sign out error:', err)
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const handleRefresh = async () => {
|
|
67
|
-
setIsRefreshing(true)
|
|
68
|
-
// Simulate refresh
|
|
69
|
-
await new Promise(resolve => setTimeout(resolve, 1500))
|
|
70
|
-
setIsRefreshing(false)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<PageTransition type="fade" duration={300}>
|
|
75
|
-
<OfflineWrapper
|
|
76
|
-
cacheStrategy="stale-while-revalidate"
|
|
77
|
-
showOfflineIndicator={true}
|
|
78
|
-
backgroundSync={true}
|
|
79
|
-
>
|
|
80
|
-
<PullToRefresh
|
|
81
|
-
onRefresh={handleRefresh}
|
|
82
|
-
threshold={80}
|
|
83
|
-
loadingIndicator="spinner"
|
|
84
|
-
hapticOnTrigger={true}
|
|
85
|
-
networkAware={true}
|
|
86
|
-
>
|
|
87
|
-
<main className="min-h-screen relative overflow-hidden bg-background">
|
|
88
|
-
{/* Theme-aware gradient background for SaaS platform */}
|
|
89
|
-
<div className="absolute inset-0 bg-gradient-to-br from-primary/10 via-background to-secondary/10 dark:from-primary/20 dark:via-background dark:to-secondary/20" />
|
|
90
|
-
<div className="absolute inset-0 bg-gradient-to-tr from-accent/5 via-transparent to-primary/5 dark:from-accent/10 dark:via-transparent dark:to-primary/10" />
|
|
91
|
-
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top_left,_var(--tw-gradient-stops))] from-secondary/15 via-transparent to-transparent dark:from-secondary/25 dark:via-transparent dark:to-transparent" />
|
|
92
|
-
{/* Animated business-themed particles */}
|
|
93
|
-
<div className="absolute inset-0 opacity-25 dark:opacity-15">
|
|
94
|
-
<div className="absolute top-1/5 right-1/5 w-64 h-64 bg-primary/50 rounded-full mix-blend-multiply filter blur-3xl animate-pulse dark:bg-primary/70"></div>
|
|
95
|
-
<div className="absolute bottom-1/3 left-1/4 w-80 h-80 bg-secondary/50 rounded-full mix-blend-multiply filter blur-3xl animate-pulse animation-delay-2000 dark:bg-secondary/70"></div>
|
|
96
|
-
<div className="absolute top-2/3 right-1/3 w-56 h-56 bg-accent/50 rounded-full mix-blend-multiply filter blur-3xl animate-pulse animation-delay-4000 dark:bg-accent/70"></div>
|
|
97
|
-
</div>
|
|
98
|
-
{/* Subtle depth overlay */}
|
|
99
|
-
<div className="absolute inset-0 bg-gradient-to-b from-transparent via-background/2 to-background/5" />
|
|
100
|
-
<div className="relative z-10">
|
|
101
|
-
<MobileContainer className="py-16">
|
|
102
|
-
{/* Network & Auth Status Bar */}
|
|
103
|
-
<div className="flex flex-col sm:flex-row justify-between items-center mb-8 gap-4">
|
|
104
|
-
<div className="flex items-center gap-2 text-sm">
|
|
105
|
-
{isOnline ? (
|
|
106
|
-
<div className="flex items-center gap-2 text-green-600">
|
|
107
|
-
<Wifi className="w-4 h-4" />
|
|
108
|
-
<span>Online</span>
|
|
109
|
-
{networkInfo?.effectiveType && (
|
|
110
|
-
<span className="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">
|
|
111
|
-
{networkInfo.effectiveType.toUpperCase()}
|
|
112
|
-
</span>
|
|
113
|
-
)}
|
|
114
|
-
</div>
|
|
115
|
-
) : (
|
|
116
|
-
<div className="flex items-center gap-2 text-red-600">
|
|
117
|
-
<WifiOff className="w-4 h-4" />
|
|
118
|
-
<span>Offline Mode</span>
|
|
119
|
-
</div>
|
|
120
|
-
)}
|
|
121
|
-
</div>
|
|
122
|
-
|
|
123
|
-
{loading ? (
|
|
124
|
-
<div className="text-sm text-gray-600">Loading auth...</div>
|
|
125
|
-
) : user ? (
|
|
126
|
-
<div className="flex items-center gap-4">
|
|
127
|
-
<div className="flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300">
|
|
128
|
-
<User className="w-4 h-4" />
|
|
129
|
-
Welcome, {user.email}
|
|
130
|
-
</div>
|
|
131
|
-
<Button variant="outline" size="sm" onClick={handleSignOut}>
|
|
132
|
-
<LogOut className="w-4 h-4 mr-2" />
|
|
133
|
-
Sign Out
|
|
134
|
-
</Button>
|
|
135
|
-
</div>
|
|
136
|
-
) : (
|
|
137
|
-
<div className="flex gap-2">
|
|
138
|
-
<Link href="/login">
|
|
139
|
-
<Button variant="outline" size="sm">Sign In</Button>
|
|
140
|
-
</Link>
|
|
141
|
-
<Link href="/signup">
|
|
142
|
-
<Button size="sm">Sign Up</Button>
|
|
143
|
-
</Link>
|
|
144
|
-
</div>
|
|
145
|
-
)}
|
|
146
|
-
</div>
|
|
147
|
-
|
|
148
|
-
{/* Hero Section */}
|
|
149
|
-
<MobileHero
|
|
150
|
-
badge={heroConfig.badge}
|
|
151
|
-
title={heroConfig.title}
|
|
152
|
-
description={heroConfig.description}
|
|
153
|
-
actions={[
|
|
154
|
-
{
|
|
155
|
-
label: "View Pricing",
|
|
156
|
-
href: "/checkout",
|
|
157
|
-
icon: CreditCard
|
|
158
|
-
variant: "default",
|
|
159
|
-
size: "lg"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
label: "Learn More",
|
|
163
|
-
variant: "outline",
|
|
164
|
-
size: "lg"
|
|
165
|
-
}
|
|
166
|
-
]}
|
|
167
|
-
className="text-center mb-16"
|
|
168
|
-
/>
|
|
169
|
-
|
|
170
|
-
{/* Component Showcase */}
|
|
171
|
-
<NetworkAwareContent
|
|
172
|
-
showOnSlow={
|
|
173
|
-
<ResponsiveGrid columns={gridConfig.columns_1_2} gap=
|
|
174
|
-
<SwipeableCard
|
|
175
|
-
rightActions={[
|
|
176
|
-
{
|
|
177
|
-
id: 'explore',
|
|
178
|
-
label: 'Explore',
|
|
179
|
-
onAction: () => console.log('Exploring mobile features'),
|
|
180
|
-
color: 'blue'
|
|
181
|
-
}
|
|
182
|
-
]}
|
|
183
|
-
threshold={60}
|
|
184
|
-
hapticFeedback={true}
|
|
185
|
-
showActionLabels={true}
|
|
186
|
-
>
|
|
187
|
-
<Card className="text-center p-6">
|
|
188
|
-
<div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
|
|
189
|
-
<Smartphone className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
190
|
-
</div>
|
|
191
|
-
<h3 className="text-lg font-semibold mb-2">Mobile-First UI</h3>
|
|
192
|
-
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
193
|
-
Touch-optimized components from @digilogiclabs/saas-factory-ui v0.13.3
|
|
194
|
-
</p>
|
|
195
|
-
</Card>
|
|
196
|
-
</SwipeableCard>
|
|
197
|
-
|
|
198
|
-
<SwipeableCard
|
|
199
|
-
rightActions={[
|
|
200
|
-
{
|
|
201
|
-
id: 'payments',
|
|
202
|
-
label: 'Try Payments',
|
|
203
|
-
onAction: () => window.location.href = '/checkout',
|
|
204
|
-
color: 'green'
|
|
205
|
-
}
|
|
206
|
-
]}
|
|
207
|
-
threshold={60}
|
|
208
|
-
hapticFeedback={true}
|
|
209
|
-
showActionLabels={true}
|
|
210
|
-
>
|
|
211
|
-
<Card className="text-center p-6">
|
|
212
|
-
<div className="mx-auto w-12 h-12 bg-orange-100 dark:bg-orange-900 rounded-lg flex items-center justify-center mb-4">
|
|
213
|
-
<CreditCard className="h-6 w-6 text-orange-600 dark:text-orange-400" />
|
|
214
|
-
</div>
|
|
215
|
-
<h3 className="text-lg font-semibold mb-2">Touch Payments</h3>
|
|
216
|
-
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
217
|
-
Mobile-optimized payment flows with swipe gestures
|
|
218
|
-
</p>
|
|
219
|
-
</Card>
|
|
220
|
-
</SwipeableCard>
|
|
221
|
-
</ResponsiveGrid>
|
|
222
|
-
}
|
|
223
|
-
>
|
|
224
|
-
<ResponsiveGrid columns={gridConfig.columns_1_sm2_md4} gap=
|
|
225
|
-
<SwipeableCard
|
|
226
|
-
rightActions={[
|
|
227
|
-
{
|
|
228
|
-
id: 'demo-ui',
|
|
229
|
-
label: 'Try Demo',
|
|
230
|
-
onAction: () => console.log('Demo UI components'),
|
|
231
|
-
color: 'blue'
|
|
232
|
-
}
|
|
233
|
-
]}
|
|
234
|
-
threshold={60}
|
|
235
|
-
hapticFeedback={true}
|
|
236
|
-
showActionLabels={true}
|
|
237
|
-
>
|
|
238
|
-
<Card className="text-center p-6">
|
|
239
|
-
<div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
|
|
240
|
-
<Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
241
|
-
</div>
|
|
242
|
-
<h3 className="text-lg font-semibold mb-2">Mobile UI Components</h3>
|
|
243
|
-
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
244
|
-
Touch-optimized buttons, cards, and gestures from @digilogiclabs/saas-factory-ui v0.13.3
|
|
245
|
-
</p>
|
|
246
|
-
</Card>
|
|
247
|
-
</SwipeableCard>
|
|
248
|
-
|
|
249
|
-
<SwipeableCard
|
|
250
|
-
rightActions={[
|
|
251
|
-
{
|
|
252
|
-
id: 'auth-demo',
|
|
253
|
-
label: 'Auth Demo',
|
|
254
|
-
onAction: () => window.location.href = '/login',
|
|
255
|
-
color: 'green'
|
|
256
|
-
}
|
|
257
|
-
]}
|
|
258
|
-
threshold={60}
|
|
259
|
-
hapticFeedback={true}
|
|
260
|
-
showActionLabels={true}
|
|
261
|
-
>
|
|
262
|
-
<Card className="text-center p-6">
|
|
263
|
-
<div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
|
|
264
|
-
<Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
|
|
265
|
-
</div>
|
|
266
|
-
<h3 className="text-lg font-semibold mb-2">Cross-Device Auth</h3>
|
|
267
|
-
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
268
|
-
Secure authentication across all devices with @digilogiclabs/saas-factory-auth v1.0.0
|
|
269
|
-
</p>
|
|
270
|
-
</Card>
|
|
271
|
-
</SwipeableCard>
|
|
272
|
-
|
|
273
|
-
<SwipeableCard
|
|
274
|
-
rightActions={[
|
|
275
|
-
{
|
|
276
|
-
id: 'performance',
|
|
277
|
-
label: 'See Performance',
|
|
278
|
-
onAction: () => console.log('Performance demo'),
|
|
279
|
-
color: 'purple'
|
|
280
|
-
}
|
|
281
|
-
]}
|
|
282
|
-
threshold={60}
|
|
283
|
-
hapticFeedback={true}
|
|
284
|
-
showActionLabels={true}
|
|
285
|
-
>
|
|
286
|
-
<Card className="text-center p-6">
|
|
287
|
-
<div className="mx-auto w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mb-4">
|
|
288
|
-
<Rocket className="h-6 w-6 text-purple-600 dark:text-purple-400" />
|
|
289
|
-
</div>
|
|
290
|
-
<h3 className="text-lg font-semibold mb-2">Performance First</h3>
|
|
291
|
-
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
292
|
-
Network-aware components with offline support and lazy loading
|
|
293
|
-
</p>
|
|
294
|
-
</Card>
|
|
295
|
-
</SwipeableCard>
|
|
296
|
-
|
|
297
|
-
<SwipeableCard
|
|
298
|
-
rightActions={[
|
|
299
|
-
{
|
|
300
|
-
id: 'checkout',
|
|
301
|
-
label: 'View Checkout',
|
|
302
|
-
onAction: () => window.location.href = '/checkout',
|
|
303
|
-
color: 'orange'
|
|
304
|
-
}
|
|
305
|
-
]}
|
|
306
|
-
threshold={60}
|
|
307
|
-
hapticFeedback={true}
|
|
308
|
-
showActionLabels={true}
|
|
309
|
-
>
|
|
310
|
-
<Card className="text-center p-6">
|
|
311
|
-
<div className="mx-auto w-12 h-12 bg-orange-100 dark:bg-orange-900 rounded-lg flex items-center justify-center mb-4">
|
|
312
|
-
<CreditCard className="h-6 w-6 text-orange-600 dark:text-orange-400" />
|
|
313
|
-
</div>
|
|
314
|
-
<h3 className="text-lg font-semibold mb-2">Mobile Payments</h3>
|
|
315
|
-
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
316
|
-
Touch-optimized payment processing with @digilogiclabs/saas-factory-payments v1.0.0
|
|
317
|
-
</p>
|
|
318
|
-
</Card>
|
|
319
|
-
</SwipeableCard>
|
|
320
|
-
</ResponsiveGrid>
|
|
321
|
-
</NetworkAwareContent>
|
|
322
|
-
|
|
323
|
-
{/* Button Variants Showcase */}
|
|
324
|
-
<Card className="max-w-4xl mx-auto p-8">
|
|
325
|
-
<div className="text-center mb-6">
|
|
326
|
-
<h2 className="text-2xl font-bold mb-2">Full SaaS Package Integration</h2>
|
|
327
|
-
<p className="text-gray-600 dark:text-gray-300">
|
|
328
|
-
Complete integration of UI, Auth, and Payments packages
|
|
329
|
-
</p>
|
|
330
|
-
</div>
|
|
331
|
-
<div className="flex flex-wrap justify-center gap-4 mb-6">
|
|
332
|
-
<Button>Default Button</Button>
|
|
333
|
-
<Button variant="secondary">Secondary Button</Button>
|
|
334
|
-
<Button variant="outline">Outline Button</Button>
|
|
335
|
-
<Button disabled>Disabled Button</Button>
|
|
336
|
-
</div>
|
|
337
|
-
<div className="text-center">
|
|
338
|
-
<p className="text-sm text-gray-500">
|
|
339
|
-
All mobile-optimized components from @digilogiclabs/saas-factory-ui v0.13.3 + auth v1.0.0 + payments v1.0.0
|
|
340
|
-
</p>
|
|
341
|
-
</div>
|
|
342
|
-
</Card>
|
|
343
|
-
</MobileContainer>
|
|
344
|
-
</div>
|
|
345
|
-
</main>
|
|
346
|
-
</PullToRefresh>
|
|
347
|
-
</OfflineWrapper>
|
|
348
|
-
</PageTransition>
|
|
349
|
-
)
|
|
350
|
-
}
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
Card,
|
|
6
|
+
PageTransition,
|
|
7
|
+
MobileContainer,
|
|
8
|
+
MobileHero,
|
|
9
|
+
ResponsiveGrid,
|
|
10
|
+
NetworkAwareContent,
|
|
11
|
+
OfflineWrapper,
|
|
12
|
+
SwipeableCard,
|
|
13
|
+
PullToRefresh,
|
|
14
|
+
LazyImage,
|
|
15
|
+
useNetworkInfo,
|
|
16
|
+
useOfflineState
|
|
17
|
+
} from '@digilogiclabs/saas-factory-ui'
|
|
18
|
+
import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Wifi, WifiOff, CreditCard, Smartphone } from 'lucide-react'
|
|
19
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
20
|
+
import Link from 'next/link'
|
|
21
|
+
import { useState } from 'react'
|
|
22
|
+
|
|
23
|
+
export default function Home() {
|
|
24
|
+
const { user, signOut, loading } = useAuth()
|
|
25
|
+
const networkInfo = useNetworkInfo()
|
|
26
|
+
const isOnline = useOfflineState()
|
|
27
|
+
const [isRefreshing, setIsRefreshing] = useState(false)
|
|
28
|
+
|
|
29
|
+
const projectName = "{{titleCaseName}}"
|
|
30
|
+
const projectDescription = "{{description}}"
|
|
31
|
+
|
|
32
|
+
const gridConfig = {
|
|
33
|
+
columns_1_2: { base: 1, md: 2 },
|
|
34
|
+
columns_1_3: { base: 1, md: 3 },
|
|
35
|
+
columns_1_sm2: { base: 1, sm: 2 },
|
|
36
|
+
columns_1_sm2_md3: { base: 1, sm: 2, md: 3 },
|
|
37
|
+
columns_1_sm2_md4: { base: 1, sm: 2, md: 4 },
|
|
38
|
+
columns_2: { base: 2 },
|
|
39
|
+
columns_2_md3: { base: 2, md: 3 },
|
|
40
|
+
columns_2_2: { base: 2 },
|
|
41
|
+
columns_2_md4: { base: 2, md: 4 }
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const heroConfig = {
|
|
45
|
+
badge: {
|
|
46
|
+
text: "🚀 Complete SaaS Solution",
|
|
47
|
+
variant: "secondary" as const,
|
|
48
|
+
icon: <CheckCircle className="w-4 h-4" />
|
|
49
|
+
},
|
|
50
|
+
title: {
|
|
51
|
+
text: `Welcome to ${projectName}`,
|
|
52
|
+
highlight: projectName,
|
|
53
|
+
size: "xl" as const
|
|
54
|
+
},
|
|
55
|
+
description: `${projectDescription}. Everything you need to launch your SaaS business with secure authentication, seamless payments, and beautiful mobile-first design.`
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const handleSignOut = async () => {
|
|
59
|
+
try {
|
|
60
|
+
await signOut()
|
|
61
|
+
} catch (err) {
|
|
62
|
+
console.error('Sign out error:', err)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const handleRefresh = async () => {
|
|
67
|
+
setIsRefreshing(true)
|
|
68
|
+
// Simulate refresh
|
|
69
|
+
await new Promise(resolve => setTimeout(resolve, 1500))
|
|
70
|
+
setIsRefreshing(false)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<PageTransition type="fade" duration={300}>
|
|
75
|
+
<OfflineWrapper
|
|
76
|
+
cacheStrategy="stale-while-revalidate"
|
|
77
|
+
showOfflineIndicator={true}
|
|
78
|
+
backgroundSync={true}
|
|
79
|
+
>
|
|
80
|
+
<PullToRefresh
|
|
81
|
+
onRefresh={handleRefresh}
|
|
82
|
+
threshold={80}
|
|
83
|
+
loadingIndicator="spinner"
|
|
84
|
+
hapticOnTrigger={true}
|
|
85
|
+
networkAware={true}
|
|
86
|
+
>
|
|
87
|
+
<main className="min-h-screen relative overflow-hidden bg-background">
|
|
88
|
+
{/* Theme-aware gradient background for SaaS platform */}
|
|
89
|
+
<div className="absolute inset-0 bg-gradient-to-br from-primary/10 via-background to-secondary/10 dark:from-primary/20 dark:via-background dark:to-secondary/20" />
|
|
90
|
+
<div className="absolute inset-0 bg-gradient-to-tr from-accent/5 via-transparent to-primary/5 dark:from-accent/10 dark:via-transparent dark:to-primary/10" />
|
|
91
|
+
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top_left,_var(--tw-gradient-stops))] from-secondary/15 via-transparent to-transparent dark:from-secondary/25 dark:via-transparent dark:to-transparent" />
|
|
92
|
+
{/* Animated business-themed particles */}
|
|
93
|
+
<div className="absolute inset-0 opacity-25 dark:opacity-15">
|
|
94
|
+
<div className="absolute top-1/5 right-1/5 w-64 h-64 bg-primary/50 rounded-full mix-blend-multiply filter blur-3xl animate-pulse dark:bg-primary/70"></div>
|
|
95
|
+
<div className="absolute bottom-1/3 left-1/4 w-80 h-80 bg-secondary/50 rounded-full mix-blend-multiply filter blur-3xl animate-pulse animation-delay-2000 dark:bg-secondary/70"></div>
|
|
96
|
+
<div className="absolute top-2/3 right-1/3 w-56 h-56 bg-accent/50 rounded-full mix-blend-multiply filter blur-3xl animate-pulse animation-delay-4000 dark:bg-accent/70"></div>
|
|
97
|
+
</div>
|
|
98
|
+
{/* Subtle depth overlay */}
|
|
99
|
+
<div className="absolute inset-0 bg-gradient-to-b from-transparent via-background/2 to-background/5" />
|
|
100
|
+
<div className="relative z-10">
|
|
101
|
+
<MobileContainer className="py-16">
|
|
102
|
+
{/* Network & Auth Status Bar */}
|
|
103
|
+
<div className="flex flex-col sm:flex-row justify-between items-center mb-8 gap-4">
|
|
104
|
+
<div className="flex items-center gap-2 text-sm">
|
|
105
|
+
{isOnline ? (
|
|
106
|
+
<div className="flex items-center gap-2 text-green-600">
|
|
107
|
+
<Wifi className="w-4 h-4" />
|
|
108
|
+
<span>Online</span>
|
|
109
|
+
{networkInfo?.effectiveType && (
|
|
110
|
+
<span className="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">
|
|
111
|
+
{networkInfo.effectiveType.toUpperCase()}
|
|
112
|
+
</span>
|
|
113
|
+
)}
|
|
114
|
+
</div>
|
|
115
|
+
) : (
|
|
116
|
+
<div className="flex items-center gap-2 text-red-600">
|
|
117
|
+
<WifiOff className="w-4 h-4" />
|
|
118
|
+
<span>Offline Mode</span>
|
|
119
|
+
</div>
|
|
120
|
+
)}
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
{loading ? (
|
|
124
|
+
<div className="text-sm text-gray-600">Loading auth...</div>
|
|
125
|
+
) : user ? (
|
|
126
|
+
<div className="flex items-center gap-4">
|
|
127
|
+
<div className="flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300">
|
|
128
|
+
<User className="w-4 h-4" />
|
|
129
|
+
Welcome, {user.email}
|
|
130
|
+
</div>
|
|
131
|
+
<Button variant="outline" size="sm" onClick={handleSignOut}>
|
|
132
|
+
<LogOut className="w-4 h-4 mr-2" />
|
|
133
|
+
Sign Out
|
|
134
|
+
</Button>
|
|
135
|
+
</div>
|
|
136
|
+
) : (
|
|
137
|
+
<div className="flex gap-2">
|
|
138
|
+
<Link href="/login">
|
|
139
|
+
<Button variant="outline" size="sm">Sign In</Button>
|
|
140
|
+
</Link>
|
|
141
|
+
<Link href="/signup">
|
|
142
|
+
<Button size="sm">Sign Up</Button>
|
|
143
|
+
</Link>
|
|
144
|
+
</div>
|
|
145
|
+
)}
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
{/* Hero Section */}
|
|
149
|
+
<MobileHero
|
|
150
|
+
badge={heroConfig.badge}
|
|
151
|
+
title={heroConfig.title}
|
|
152
|
+
description={heroConfig.description}
|
|
153
|
+
actions={[
|
|
154
|
+
{
|
|
155
|
+
label: "View Pricing",
|
|
156
|
+
href: "/checkout",
|
|
157
|
+
icon: <CreditCard className="w-4 h-4" />,
|
|
158
|
+
variant: "default",
|
|
159
|
+
size: "lg"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
label: "Learn More",
|
|
163
|
+
variant: "outline",
|
|
164
|
+
size: "lg"
|
|
165
|
+
}
|
|
166
|
+
]}
|
|
167
|
+
className="text-center mb-16"
|
|
168
|
+
/>
|
|
169
|
+
|
|
170
|
+
{/* Component Showcase */}
|
|
171
|
+
<NetworkAwareContent
|
|
172
|
+
showOnSlow={
|
|
173
|
+
<ResponsiveGrid columns={gridConfig.columns_1_2} gap={6} className="mb-16">
|
|
174
|
+
<SwipeableCard
|
|
175
|
+
rightActions={[
|
|
176
|
+
{
|
|
177
|
+
id: 'explore',
|
|
178
|
+
label: 'Explore',
|
|
179
|
+
onAction: () => console.log('Exploring mobile features'),
|
|
180
|
+
color: 'blue'
|
|
181
|
+
}
|
|
182
|
+
]}
|
|
183
|
+
threshold={60}
|
|
184
|
+
hapticFeedback={true}
|
|
185
|
+
showActionLabels={true}
|
|
186
|
+
>
|
|
187
|
+
<Card className="text-center p-6">
|
|
188
|
+
<div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
|
|
189
|
+
<Smartphone className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
190
|
+
</div>
|
|
191
|
+
<h3 className="text-lg font-semibold mb-2">Mobile-First UI</h3>
|
|
192
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
193
|
+
Touch-optimized components from @digilogiclabs/saas-factory-ui v0.13.3
|
|
194
|
+
</p>
|
|
195
|
+
</Card>
|
|
196
|
+
</SwipeableCard>
|
|
197
|
+
|
|
198
|
+
<SwipeableCard
|
|
199
|
+
rightActions={[
|
|
200
|
+
{
|
|
201
|
+
id: 'payments',
|
|
202
|
+
label: 'Try Payments',
|
|
203
|
+
onAction: () => window.location.href = '/checkout',
|
|
204
|
+
color: 'green'
|
|
205
|
+
}
|
|
206
|
+
]}
|
|
207
|
+
threshold={60}
|
|
208
|
+
hapticFeedback={true}
|
|
209
|
+
showActionLabels={true}
|
|
210
|
+
>
|
|
211
|
+
<Card className="text-center p-6">
|
|
212
|
+
<div className="mx-auto w-12 h-12 bg-orange-100 dark:bg-orange-900 rounded-lg flex items-center justify-center mb-4">
|
|
213
|
+
<CreditCard className="h-6 w-6 text-orange-600 dark:text-orange-400" />
|
|
214
|
+
</div>
|
|
215
|
+
<h3 className="text-lg font-semibold mb-2">Touch Payments</h3>
|
|
216
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
217
|
+
Mobile-optimized payment flows with swipe gestures
|
|
218
|
+
</p>
|
|
219
|
+
</Card>
|
|
220
|
+
</SwipeableCard>
|
|
221
|
+
</ResponsiveGrid>
|
|
222
|
+
}
|
|
223
|
+
>
|
|
224
|
+
<ResponsiveGrid columns={gridConfig.columns_1_sm2_md4} gap={6} className="mb-16">
|
|
225
|
+
<SwipeableCard
|
|
226
|
+
rightActions={[
|
|
227
|
+
{
|
|
228
|
+
id: 'demo-ui',
|
|
229
|
+
label: 'Try Demo',
|
|
230
|
+
onAction: () => console.log('Demo UI components'),
|
|
231
|
+
color: 'blue'
|
|
232
|
+
}
|
|
233
|
+
]}
|
|
234
|
+
threshold={60}
|
|
235
|
+
hapticFeedback={true}
|
|
236
|
+
showActionLabels={true}
|
|
237
|
+
>
|
|
238
|
+
<Card className="text-center p-6">
|
|
239
|
+
<div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
|
|
240
|
+
<Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
241
|
+
</div>
|
|
242
|
+
<h3 className="text-lg font-semibold mb-2">Mobile UI Components</h3>
|
|
243
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
244
|
+
Touch-optimized buttons, cards, and gestures from @digilogiclabs/saas-factory-ui v0.13.3
|
|
245
|
+
</p>
|
|
246
|
+
</Card>
|
|
247
|
+
</SwipeableCard>
|
|
248
|
+
|
|
249
|
+
<SwipeableCard
|
|
250
|
+
rightActions={[
|
|
251
|
+
{
|
|
252
|
+
id: 'auth-demo',
|
|
253
|
+
label: 'Auth Demo',
|
|
254
|
+
onAction: () => window.location.href = '/login',
|
|
255
|
+
color: 'green'
|
|
256
|
+
}
|
|
257
|
+
]}
|
|
258
|
+
threshold={60}
|
|
259
|
+
hapticFeedback={true}
|
|
260
|
+
showActionLabels={true}
|
|
261
|
+
>
|
|
262
|
+
<Card className="text-center p-6">
|
|
263
|
+
<div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
|
|
264
|
+
<Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
|
|
265
|
+
</div>
|
|
266
|
+
<h3 className="text-lg font-semibold mb-2">Cross-Device Auth</h3>
|
|
267
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
268
|
+
Secure authentication across all devices with @digilogiclabs/saas-factory-auth v1.0.0
|
|
269
|
+
</p>
|
|
270
|
+
</Card>
|
|
271
|
+
</SwipeableCard>
|
|
272
|
+
|
|
273
|
+
<SwipeableCard
|
|
274
|
+
rightActions={[
|
|
275
|
+
{
|
|
276
|
+
id: 'performance',
|
|
277
|
+
label: 'See Performance',
|
|
278
|
+
onAction: () => console.log('Performance demo'),
|
|
279
|
+
color: 'purple'
|
|
280
|
+
}
|
|
281
|
+
]}
|
|
282
|
+
threshold={60}
|
|
283
|
+
hapticFeedback={true}
|
|
284
|
+
showActionLabels={true}
|
|
285
|
+
>
|
|
286
|
+
<Card className="text-center p-6">
|
|
287
|
+
<div className="mx-auto w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mb-4">
|
|
288
|
+
<Rocket className="h-6 w-6 text-purple-600 dark:text-purple-400" />
|
|
289
|
+
</div>
|
|
290
|
+
<h3 className="text-lg font-semibold mb-2">Performance First</h3>
|
|
291
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
292
|
+
Network-aware components with offline support and lazy loading
|
|
293
|
+
</p>
|
|
294
|
+
</Card>
|
|
295
|
+
</SwipeableCard>
|
|
296
|
+
|
|
297
|
+
<SwipeableCard
|
|
298
|
+
rightActions={[
|
|
299
|
+
{
|
|
300
|
+
id: 'checkout',
|
|
301
|
+
label: 'View Checkout',
|
|
302
|
+
onAction: () => window.location.href = '/checkout',
|
|
303
|
+
color: 'orange'
|
|
304
|
+
}
|
|
305
|
+
]}
|
|
306
|
+
threshold={60}
|
|
307
|
+
hapticFeedback={true}
|
|
308
|
+
showActionLabels={true}
|
|
309
|
+
>
|
|
310
|
+
<Card className="text-center p-6">
|
|
311
|
+
<div className="mx-auto w-12 h-12 bg-orange-100 dark:bg-orange-900 rounded-lg flex items-center justify-center mb-4">
|
|
312
|
+
<CreditCard className="h-6 w-6 text-orange-600 dark:text-orange-400" />
|
|
313
|
+
</div>
|
|
314
|
+
<h3 className="text-lg font-semibold mb-2">Mobile Payments</h3>
|
|
315
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
316
|
+
Touch-optimized payment processing with @digilogiclabs/saas-factory-payments v1.0.0
|
|
317
|
+
</p>
|
|
318
|
+
</Card>
|
|
319
|
+
</SwipeableCard>
|
|
320
|
+
</ResponsiveGrid>
|
|
321
|
+
</NetworkAwareContent>
|
|
322
|
+
|
|
323
|
+
{/* Button Variants Showcase */}
|
|
324
|
+
<Card className="max-w-4xl mx-auto p-8">
|
|
325
|
+
<div className="text-center mb-6">
|
|
326
|
+
<h2 className="text-2xl font-bold mb-2">Full SaaS Package Integration</h2>
|
|
327
|
+
<p className="text-gray-600 dark:text-gray-300">
|
|
328
|
+
Complete integration of UI, Auth, and Payments packages
|
|
329
|
+
</p>
|
|
330
|
+
</div>
|
|
331
|
+
<div className="flex flex-wrap justify-center gap-4 mb-6">
|
|
332
|
+
<Button>Default Button</Button>
|
|
333
|
+
<Button variant="secondary">Secondary Button</Button>
|
|
334
|
+
<Button variant="outline">Outline Button</Button>
|
|
335
|
+
<Button disabled>Disabled Button</Button>
|
|
336
|
+
</div>
|
|
337
|
+
<div className="text-center">
|
|
338
|
+
<p className="text-sm text-gray-500">
|
|
339
|
+
All mobile-optimized components from @digilogiclabs/saas-factory-ui v0.13.3 + auth v1.0.0 + payments v1.0.0
|
|
340
|
+
</p>
|
|
341
|
+
</div>
|
|
342
|
+
</Card>
|
|
343
|
+
</MobileContainer>
|
|
344
|
+
</div>
|
|
345
|
+
</main>
|
|
346
|
+
</PullToRefresh>
|
|
347
|
+
</OfflineWrapper>
|
|
348
|
+
</PageTransition>
|
|
349
|
+
)
|
|
350
|
+
}
|