@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,364 +1,325 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export default function OnboardingPage() {
|
|
27
|
-
const { user } = useAuth()
|
|
28
|
-
const router = useRouter()
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
<div>
|
|
327
|
-
<h3 className="text-xl font-semibold mb-2">Welcome to {{projectName}}!</h3>
|
|
328
|
-
<p className="text-gray-600 dark:text-gray-300">
|
|
329
|
-
Your account has been set up successfully. You're ready to start using AI to supercharge your productivity.
|
|
330
|
-
</p>
|
|
331
|
-
</div>
|
|
332
|
-
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 text-sm">
|
|
333
|
-
<div className="p-4 rounded-lg bg-blue-50 dark:bg-blue-900/20">
|
|
334
|
-
<Brain className="w-6 h-6 text-blue-500 mx-auto mb-2" />
|
|
335
|
-
<div className="font-medium">AI Tools Ready</div>
|
|
336
|
-
<div className="text-gray-600 dark:text-gray-400">Access all AI capabilities</div>
|
|
337
|
-
</div>
|
|
338
|
-
<div className="p-4 rounded-lg bg-green-50 dark:bg-green-900/20">
|
|
339
|
-
<Users className="w-6 h-6 text-green-500 mx-auto mb-2" />
|
|
340
|
-
<div className="font-medium">Team Configured</div>
|
|
341
|
-
<div className="text-gray-600 dark:text-gray-400">Collaboration features enabled</div>
|
|
342
|
-
</div>
|
|
343
|
-
<div className="p-4 rounded-lg bg-purple-50 dark:bg-purple-900/20">
|
|
344
|
-
<Target className="w-6 h-6 text-purple-500 mx-auto mb-2" />
|
|
345
|
-
<div className="font-medium">Goals Set</div>
|
|
346
|
-
<div className="text-gray-600 dark:text-gray-400">Personalized experience ready</div>
|
|
347
|
-
</div>
|
|
348
|
-
</div>
|
|
349
|
-
</div>
|
|
350
|
-
)
|
|
351
|
-
}
|
|
352
|
-
]}
|
|
353
|
-
submitButtonText="Complete Setup"
|
|
354
|
-
nextButtonText="Continue"
|
|
355
|
-
previousButtonText="Back"
|
|
356
|
-
className="space-y-6"
|
|
357
|
-
/>
|
|
358
|
-
</FormProvider>
|
|
359
|
-
</Card>
|
|
360
|
-
</MobileContainer>
|
|
361
|
-
</main>
|
|
362
|
-
</PageTransition>
|
|
363
|
-
)
|
|
364
|
-
}
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import React, { useState } from 'react'
|
|
4
|
+
import {
|
|
5
|
+
Button,
|
|
6
|
+
Card,
|
|
7
|
+
MobileContainer,
|
|
8
|
+
PageTransition
|
|
9
|
+
} from '@digilogiclabs/saas-factory-ui'
|
|
10
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
11
|
+
import { useRouter } from 'next/navigation'
|
|
12
|
+
import {
|
|
13
|
+
User,
|
|
14
|
+
Brain,
|
|
15
|
+
Users,
|
|
16
|
+
Target,
|
|
17
|
+
CreditCard,
|
|
18
|
+
CheckCircle,
|
|
19
|
+
ArrowLeft,
|
|
20
|
+
ArrowRight
|
|
21
|
+
} from 'lucide-react'
|
|
22
|
+
import Link from 'next/link'
|
|
23
|
+
|
|
24
|
+
const STEPS = ['profile', 'ai-preferences', 'team-setup', 'subscription', 'completion'] as const
|
|
25
|
+
|
|
26
|
+
export default function OnboardingPage() {
|
|
27
|
+
const { user } = useAuth()
|
|
28
|
+
const router = useRouter()
|
|
29
|
+
const [currentStep, setCurrentStep] = useState(0)
|
|
30
|
+
const [formData, setFormData] = useState<Record<string, string>>({})
|
|
31
|
+
|
|
32
|
+
const updateField = (name: string, value: string) => {
|
|
33
|
+
setFormData(prev => ({ ...prev, [name]: value }))
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const handleNext = () => {
|
|
37
|
+
if (currentStep < STEPS.length - 1) {
|
|
38
|
+
setCurrentStep(prev => prev + 1)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const handleBack = () => {
|
|
43
|
+
if (currentStep > 0) {
|
|
44
|
+
setCurrentStep(prev => prev - 1)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const handleComplete = () => {
|
|
49
|
+
console.log('Onboarding completed:', formData)
|
|
50
|
+
router.push('/dashboard')
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!user) {
|
|
54
|
+
router.push('/login')
|
|
55
|
+
return null
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const stepIcons = [User, Brain, Users, CreditCard, CheckCircle]
|
|
59
|
+
const StepIcon = stepIcons[currentStep]
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<PageTransition type="slide" direction="up" duration={300}>
|
|
63
|
+
<main className="min-h-screen bg-gradient-to-br from-primary/5 via-background to-secondary/5">
|
|
64
|
+
<MobileContainer className="py-8">
|
|
65
|
+
{/* Header */}
|
|
66
|
+
<div className="flex items-center justify-between mb-8">
|
|
67
|
+
<div className="flex items-center gap-4">
|
|
68
|
+
<Link href="/" className="p-2 rounded-xl bg-white/10 backdrop-blur-md border border-white/20 hover:scale-105 transition-transform">
|
|
69
|
+
<ArrowLeft className="w-5 h-5" />
|
|
70
|
+
</Link>
|
|
71
|
+
<div>
|
|
72
|
+
<h1 className="text-2xl font-bold">Welcome to {'{{projectName}}'}</h1>
|
|
73
|
+
<p className="text-gray-600 dark:text-gray-300">Let's get you set up</p>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
{/* Progress Bar */}
|
|
79
|
+
<div className="flex items-center gap-2 mb-8 max-w-4xl mx-auto">
|
|
80
|
+
{STEPS.map((step, index) => (
|
|
81
|
+
<div key={step} className="flex-1 flex items-center">
|
|
82
|
+
<div className={`h-2 flex-1 rounded-full ${index <= currentStep ? 'bg-primary' : 'bg-gray-200 dark:bg-gray-700'}`} />
|
|
83
|
+
</div>
|
|
84
|
+
))}
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
{/* Form Steps */}
|
|
88
|
+
<Card className="max-w-4xl mx-auto p-8">
|
|
89
|
+
<div className="flex items-center gap-3 mb-6">
|
|
90
|
+
<StepIcon className="w-6 h-6 text-primary" />
|
|
91
|
+
<div>
|
|
92
|
+
<h2 className="text-xl font-semibold">
|
|
93
|
+
{currentStep === 0 && 'Personal Information'}
|
|
94
|
+
{currentStep === 1 && 'AI Preferences'}
|
|
95
|
+
{currentStep === 2 && 'Team Setup'}
|
|
96
|
+
{currentStep === 3 && 'Choose Your Plan'}
|
|
97
|
+
{currentStep === 4 && 'All Set!'}
|
|
98
|
+
</h2>
|
|
99
|
+
<p className="text-sm text-gray-600 dark:text-gray-400">
|
|
100
|
+
{currentStep === 0 && 'Tell us about yourself'}
|
|
101
|
+
{currentStep === 1 && 'Customize your AI experience'}
|
|
102
|
+
{currentStep === 2 && 'Set up your team and collaboration'}
|
|
103
|
+
{currentStep === 3 && 'Select a plan that fits your needs'}
|
|
104
|
+
{currentStep === 4 && 'Your account is ready to go'}
|
|
105
|
+
</p>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
{/* Step 1: Profile */}
|
|
110
|
+
{currentStep === 0 && (
|
|
111
|
+
<div className="space-y-4">
|
|
112
|
+
<div>
|
|
113
|
+
<label className="block text-sm font-medium mb-1">Full Name</label>
|
|
114
|
+
<input
|
|
115
|
+
type="text"
|
|
116
|
+
value={formData.fullName || ''}
|
|
117
|
+
onChange={(e) => updateField('fullName', e.target.value)}
|
|
118
|
+
placeholder="Enter your full name"
|
|
119
|
+
className="w-full p-3 border rounded-lg bg-background"
|
|
120
|
+
/>
|
|
121
|
+
</div>
|
|
122
|
+
<div>
|
|
123
|
+
<label className="block text-sm font-medium mb-1">Company</label>
|
|
124
|
+
<input
|
|
125
|
+
type="text"
|
|
126
|
+
value={formData.company || ''}
|
|
127
|
+
onChange={(e) => updateField('company', e.target.value)}
|
|
128
|
+
placeholder="Enter your company name"
|
|
129
|
+
className="w-full p-3 border rounded-lg bg-background"
|
|
130
|
+
/>
|
|
131
|
+
</div>
|
|
132
|
+
<div>
|
|
133
|
+
<label className="block text-sm font-medium mb-1">Role</label>
|
|
134
|
+
<select
|
|
135
|
+
value={formData.role || ''}
|
|
136
|
+
onChange={(e) => updateField('role', e.target.value)}
|
|
137
|
+
className="w-full p-3 border rounded-lg bg-background"
|
|
138
|
+
>
|
|
139
|
+
<option value="">Select your role</option>
|
|
140
|
+
<option value="developer">Developer</option>
|
|
141
|
+
<option value="designer">Designer</option>
|
|
142
|
+
<option value="product-manager">Product Manager</option>
|
|
143
|
+
<option value="entrepreneur">Entrepreneur</option>
|
|
144
|
+
<option value="content-creator">Content Creator</option>
|
|
145
|
+
<option value="student">Student</option>
|
|
146
|
+
<option value="other">Other</option>
|
|
147
|
+
</select>
|
|
148
|
+
</div>
|
|
149
|
+
<div>
|
|
150
|
+
<label className="block text-sm font-medium mb-1">Industry</label>
|
|
151
|
+
<select
|
|
152
|
+
value={formData.industry || ''}
|
|
153
|
+
onChange={(e) => updateField('industry', e.target.value)}
|
|
154
|
+
className="w-full p-3 border rounded-lg bg-background"
|
|
155
|
+
>
|
|
156
|
+
<option value="">Select your industry</option>
|
|
157
|
+
<option value="technology">Technology</option>
|
|
158
|
+
<option value="healthcare">Healthcare</option>
|
|
159
|
+
<option value="finance">Finance</option>
|
|
160
|
+
<option value="education">Education</option>
|
|
161
|
+
<option value="media">Media & Entertainment</option>
|
|
162
|
+
<option value="retail">Retail</option>
|
|
163
|
+
<option value="manufacturing">Manufacturing</option>
|
|
164
|
+
<option value="other">Other</option>
|
|
165
|
+
</select>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
)}
|
|
169
|
+
|
|
170
|
+
{/* Step 2: AI Preferences */}
|
|
171
|
+
{currentStep === 1 && (
|
|
172
|
+
<div className="space-y-6">
|
|
173
|
+
<div>
|
|
174
|
+
<label className="block text-sm font-medium mb-2">What do you plan to use AI for?</label>
|
|
175
|
+
<p className="text-xs text-gray-500 mb-2">Select all that apply</p>
|
|
176
|
+
<div className="grid grid-cols-2 gap-2">
|
|
177
|
+
{['Content Creation', 'Code Generation', 'Data Analysis', 'Customer Support', 'Marketing & SEO', 'Research & Analysis', 'Workflow Automation', 'Creative Projects'].map(goal => (
|
|
178
|
+
<label key={goal} className="flex items-center gap-2 p-2 border rounded-lg cursor-pointer hover:bg-accent/50">
|
|
179
|
+
<input type="checkbox" className="rounded" />
|
|
180
|
+
<span className="text-sm">{goal}</span>
|
|
181
|
+
</label>
|
|
182
|
+
))}
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
<div>
|
|
186
|
+
<label className="block text-sm font-medium mb-2">Creativity Level</label>
|
|
187
|
+
<input
|
|
188
|
+
type="range"
|
|
189
|
+
min="0"
|
|
190
|
+
max="100"
|
|
191
|
+
value={formData.creativityLevel || '50'}
|
|
192
|
+
onChange={(e) => updateField('creativityLevel', e.target.value)}
|
|
193
|
+
className="w-full"
|
|
194
|
+
/>
|
|
195
|
+
<p className="text-xs text-gray-500 mt-1">Lower values are more conservative, higher values are more creative</p>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
)}
|
|
199
|
+
|
|
200
|
+
{/* Step 3: Team Setup */}
|
|
201
|
+
{currentStep === 2 && (
|
|
202
|
+
<div className="space-y-4">
|
|
203
|
+
<div>
|
|
204
|
+
<label className="block text-sm font-medium mb-1">Team Size</label>
|
|
205
|
+
<select
|
|
206
|
+
value={formData.teamSize || ''}
|
|
207
|
+
onChange={(e) => updateField('teamSize', e.target.value)}
|
|
208
|
+
className="w-full p-3 border rounded-lg bg-background"
|
|
209
|
+
>
|
|
210
|
+
<option value="">Select your team size</option>
|
|
211
|
+
<option value="solo">Just me</option>
|
|
212
|
+
<option value="small">2-5 people</option>
|
|
213
|
+
<option value="medium">6-20 people</option>
|
|
214
|
+
<option value="large">21-100 people</option>
|
|
215
|
+
<option value="enterprise">100+ people</option>
|
|
216
|
+
</select>
|
|
217
|
+
</div>
|
|
218
|
+
<div>
|
|
219
|
+
<label className="block text-sm font-medium mb-1">Invite Team Members</label>
|
|
220
|
+
<textarea
|
|
221
|
+
value={formData.inviteMembers || ''}
|
|
222
|
+
onChange={(e) => updateField('inviteMembers', e.target.value)}
|
|
223
|
+
placeholder="Enter email addresses, one per line"
|
|
224
|
+
rows={4}
|
|
225
|
+
className="w-full p-3 border rounded-lg bg-background"
|
|
226
|
+
/>
|
|
227
|
+
<p className="text-xs text-gray-500 mt-1">Invite your team members to collaborate (optional)</p>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
)}
|
|
231
|
+
|
|
232
|
+
{/* Step 4: Subscription */}
|
|
233
|
+
{currentStep === 3 && (
|
|
234
|
+
<div className="space-y-4">
|
|
235
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
236
|
+
{[
|
|
237
|
+
{ id: 'starter', name: 'Starter Plan', price: '$9/month', features: ['1,000 AI requests/month', 'Basic AI models', 'Email support', '5GB storage'] },
|
|
238
|
+
{ id: 'pro', name: 'Pro Plan', price: '$29/month', features: ['10,000 AI requests/month', 'Advanced AI models', 'Priority support', '50GB storage', 'Team collaboration', 'API access'], recommended: true },
|
|
239
|
+
{ id: 'enterprise', name: 'Enterprise Plan', price: 'Custom pricing', features: ['Unlimited AI requests', 'All AI models', 'Dedicated support', 'Unlimited storage', 'Advanced security', 'Custom integrations'] },
|
|
240
|
+
].map(plan => (
|
|
241
|
+
<label
|
|
242
|
+
key={plan.id}
|
|
243
|
+
className={`relative block p-4 border-2 rounded-xl cursor-pointer hover:border-primary transition-colors ${formData.selectedPlan === plan.id ? 'border-primary bg-primary/5' : 'border-gray-200 dark:border-gray-700'}`}
|
|
244
|
+
>
|
|
245
|
+
<input
|
|
246
|
+
type="radio"
|
|
247
|
+
name="selectedPlan"
|
|
248
|
+
value={plan.id}
|
|
249
|
+
checked={formData.selectedPlan === plan.id}
|
|
250
|
+
onChange={(e) => updateField('selectedPlan', e.target.value)}
|
|
251
|
+
className="sr-only"
|
|
252
|
+
/>
|
|
253
|
+
{plan.recommended && (
|
|
254
|
+
<span className="absolute -top-3 left-1/2 -translate-x-1/2 bg-primary text-primary-foreground text-xs px-2 py-1 rounded-full">Recommended</span>
|
|
255
|
+
)}
|
|
256
|
+
<h3 className="font-semibold">{plan.name}</h3>
|
|
257
|
+
<p className="text-2xl font-bold my-2">{plan.price}</p>
|
|
258
|
+
<ul className="text-sm space-y-1">
|
|
259
|
+
{plan.features.map(f => <li key={f} className="flex items-center gap-1"><CheckCircle className="w-3 h-3 text-green-500" />{f}</li>)}
|
|
260
|
+
</ul>
|
|
261
|
+
</label>
|
|
262
|
+
))}
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
)}
|
|
266
|
+
|
|
267
|
+
{/* Step 5: Completion */}
|
|
268
|
+
{currentStep === 4 && (
|
|
269
|
+
<div className="text-center space-y-6">
|
|
270
|
+
<div className="w-16 h-16 bg-green-500 rounded-full flex items-center justify-center mx-auto">
|
|
271
|
+
<CheckCircle className="w-8 h-8 text-white" />
|
|
272
|
+
</div>
|
|
273
|
+
<div>
|
|
274
|
+
<h3 className="text-xl font-semibold mb-2">Welcome to {'{{projectName}}'}!</h3>
|
|
275
|
+
<p className="text-gray-600 dark:text-gray-300">
|
|
276
|
+
Your account has been set up successfully. You're ready to start using AI to supercharge your productivity.
|
|
277
|
+
</p>
|
|
278
|
+
</div>
|
|
279
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 text-sm">
|
|
280
|
+
<div className="p-4 rounded-lg bg-blue-50 dark:bg-blue-900/20">
|
|
281
|
+
<Brain className="w-6 h-6 text-blue-500 mx-auto mb-2" />
|
|
282
|
+
<div className="font-medium">AI Tools Ready</div>
|
|
283
|
+
<div className="text-gray-600 dark:text-gray-400">Access all AI capabilities</div>
|
|
284
|
+
</div>
|
|
285
|
+
<div className="p-4 rounded-lg bg-green-50 dark:bg-green-900/20">
|
|
286
|
+
<Users className="w-6 h-6 text-green-500 mx-auto mb-2" />
|
|
287
|
+
<div className="font-medium">Team Configured</div>
|
|
288
|
+
<div className="text-gray-600 dark:text-gray-400">Collaboration features enabled</div>
|
|
289
|
+
</div>
|
|
290
|
+
<div className="p-4 rounded-lg bg-purple-50 dark:bg-purple-900/20">
|
|
291
|
+
<Target className="w-6 h-6 text-purple-500 mx-auto mb-2" />
|
|
292
|
+
<div className="font-medium">Goals Set</div>
|
|
293
|
+
<div className="text-gray-600 dark:text-gray-400">Personalized experience ready</div>
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
)}
|
|
298
|
+
|
|
299
|
+
{/* Navigation Buttons */}
|
|
300
|
+
<div className="flex justify-between mt-8">
|
|
301
|
+
<Button
|
|
302
|
+
variant="outline"
|
|
303
|
+
onClick={handleBack}
|
|
304
|
+
disabled={currentStep === 0}
|
|
305
|
+
>
|
|
306
|
+
Back
|
|
307
|
+
</Button>
|
|
308
|
+
{currentStep < STEPS.length - 1 ? (
|
|
309
|
+
<Button onClick={handleNext}>
|
|
310
|
+
Continue
|
|
311
|
+
<ArrowRight className="w-4 h-4 ml-2" />
|
|
312
|
+
</Button>
|
|
313
|
+
) : (
|
|
314
|
+
<Button onClick={handleComplete}>
|
|
315
|
+
Complete Setup
|
|
316
|
+
<CheckCircle className="w-4 h-4 ml-2" />
|
|
317
|
+
</Button>
|
|
318
|
+
)}
|
|
319
|
+
</div>
|
|
320
|
+
</Card>
|
|
321
|
+
</MobileContainer>
|
|
322
|
+
</main>
|
|
323
|
+
</PageTransition>
|
|
324
|
+
)
|
|
325
|
+
}
|