@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.
Files changed (94) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/generators/template-generator.js +8 -8
  3. package/dist/generators/template-generator.js.map +1 -1
  4. package/dist/templates/shared/quality/web/src/__tests__/accessibility.test.tsx +3 -3
  5. package/dist/templates/web/ai-platform/template/src/app/page.tsx +207 -207
  6. package/dist/templates/web/base/template/package.json +1 -3
  7. package/dist/templates/web/base/template/src/app/auth/callback/route.ts +32 -18
  8. package/dist/templates/web/base/template/src/app/dashboard/page.tsx +6 -43
  9. package/dist/templates/web/base/template/src/app/globals.css +158 -157
  10. package/dist/templates/web/base/template/src/app/page.tsx +2 -2
  11. package/dist/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +800 -800
  12. package/dist/templates/web/ui-auth/template/src/app/globals.css +96 -95
  13. package/dist/templates/web/ui-auth/template/src/app/login/page.tsx +109 -109
  14. package/dist/templates/web/ui-auth/template/src/app/page.tsx +4 -3
  15. package/dist/templates/web/ui-auth/template/src/app/signup/page.tsx +128 -128
  16. package/dist/templates/web/ui-auth-ai/template/src/app/globals.css +35 -40
  17. package/dist/templates/web/ui-auth-ai/template/src/app/layout.tsx +1 -0
  18. package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +3 -3
  19. package/dist/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +10 -49
  20. package/dist/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +800 -800
  21. package/dist/templates/web/ui-auth-payments/template/src/app/globals.css +212 -211
  22. package/dist/templates/web/ui-auth-payments/template/src/app/login/page.tsx +109 -109
  23. package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +350 -350
  24. package/dist/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +506 -506
  25. package/dist/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +128 -128
  26. package/dist/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +143 -143
  27. package/dist/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +184 -184
  28. package/dist/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +143 -233
  29. package/dist/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +10 -50
  30. package/dist/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +800 -800
  31. package/dist/templates/web/ui-auth-payments-ai/template/src/app/globals.css +97 -96
  32. package/dist/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +325 -364
  33. package/dist/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +1 -1
  34. package/dist/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +389 -532
  35. package/dist/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +644 -644
  36. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +119 -163
  37. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +158 -201
  38. package/dist/templates/web/ui-auth-payments-ai-rag/template/package.json +1 -2
  39. package/dist/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +10 -51
  40. package/dist/templates/web/ui-auth-payments-audio/template/src/app/globals.css +97 -96
  41. package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +402 -403
  42. package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +143 -143
  43. package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +184 -184
  44. package/dist/templates/web/ui-auth-payments-video/template/src/app/globals.css +229 -228
  45. package/dist/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +1 -1
  46. package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +4 -7
  47. package/dist/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +1 -1
  48. package/dist/templates/web/ui-only/template/src/app/globals.css +43 -42
  49. package/package.json +1 -1
  50. package/src/templates/shared/quality/web/src/__tests__/accessibility.test.tsx +3 -3
  51. package/src/templates/web/ai-platform/template/src/app/page.tsx +207 -207
  52. package/src/templates/web/base/template/package.json +1 -3
  53. package/src/templates/web/base/template/src/app/auth/callback/route.ts +32 -18
  54. package/src/templates/web/base/template/src/app/dashboard/page.tsx +6 -43
  55. package/src/templates/web/base/template/src/app/globals.css +158 -157
  56. package/src/templates/web/base/template/src/app/page.tsx +2 -2
  57. package/src/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +800 -800
  58. package/src/templates/web/ui-auth/template/src/app/globals.css +96 -95
  59. package/src/templates/web/ui-auth/template/src/app/login/page.tsx +109 -109
  60. package/src/templates/web/ui-auth/template/src/app/page.tsx +4 -3
  61. package/src/templates/web/ui-auth/template/src/app/signup/page.tsx +128 -128
  62. package/src/templates/web/ui-auth-ai/template/src/app/globals.css +35 -40
  63. package/src/templates/web/ui-auth-ai/template/src/app/layout.tsx +1 -0
  64. package/src/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +3 -3
  65. package/src/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +10 -49
  66. package/src/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +800 -800
  67. package/src/templates/web/ui-auth-payments/template/src/app/globals.css +212 -211
  68. package/src/templates/web/ui-auth-payments/template/src/app/login/page.tsx +109 -109
  69. package/src/templates/web/ui-auth-payments/template/src/app/page.tsx +350 -350
  70. package/src/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +506 -506
  71. package/src/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +128 -128
  72. package/src/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +143 -143
  73. package/src/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +184 -184
  74. package/src/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +143 -233
  75. package/src/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +10 -50
  76. package/src/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +800 -800
  77. package/src/templates/web/ui-auth-payments-ai/template/src/app/globals.css +97 -96
  78. package/src/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +325 -364
  79. package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +1 -1
  80. package/src/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +389 -532
  81. package/src/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +644 -644
  82. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +119 -163
  83. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +158 -201
  84. package/src/templates/web/ui-auth-payments-ai-rag/template/package.json +1 -2
  85. package/src/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +10 -51
  86. package/src/templates/web/ui-auth-payments-audio/template/src/app/globals.css +97 -96
  87. package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +402 -403
  88. package/src/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +143 -143
  89. package/src/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +184 -184
  90. package/src/templates/web/ui-auth-payments-video/template/src/app/globals.css +229 -228
  91. package/src/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +1 -1
  92. package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +4 -7
  93. package/src/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +1 -1
  94. 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
- MultiStepForm,
6
- FormField,
7
- FormSection,
8
- FormProvider,
9
- Card,
10
- MobileContainer,
11
- PageTransition
12
- } from '@digilogiclabs/saas-factory-ui'
13
- import { useAuth } from '@digilogiclabs/app-sdk'
14
- import { useRouter } from 'next/navigation'
15
- import {
16
- User,
17
- Brain,
18
- Users,
19
- Target,
20
- CreditCard,
21
- CheckCircle,
22
- ArrowLeft
23
- } from 'lucide-react'
24
- import Link from 'next/link'
25
-
26
- export default function OnboardingPage() {
27
- const { user } = useAuth()
28
- const router = useRouter()
29
-
30
- const handleOnboardingComplete = async (formData: FormData) => {
31
- console.log('Onboarding completed:', Object.fromEntries(formData))
32
- // Save onboarding data to user profile
33
- // Redirect to main app
34
- router.push('/dashboard')
35
- }
36
-
37
- if (!user) {
38
- router.push('/login')
39
- return null
40
- }
41
-
42
- return (
43
- <PageTransition type="slide" direction="up" duration={300}>
44
- <main className="min-h-screen bg-gradient-to-br from-primary/5 via-background to-secondary/5">
45
- <MobileContainer className="py-8">
46
- {/* Header */}
47
- <div className="flex items-center justify-between mb-8">
48
- <div className="flex items-center gap-4">
49
- <Link href="/" className="p-2 rounded-xl bg-white/10 backdrop-blur-md border border-white/20 hover:scale-105 transition-transform">
50
- <ArrowLeft className="w-5 h-5" />
51
- </Link>
52
- <div>
53
- <h1 className="text-2xl font-bold">Welcome to {{projectName}}</h1>
54
- <p className="text-gray-600 dark:text-gray-300">Let's get you set up</p>
55
- </div>
56
- </div>
57
- </div>
58
-
59
- {/* Multi-Step Onboarding Form */}
60
- <Card className="max-w-4xl mx-auto p-8">
61
- <FormProvider>
62
- <MultiStepForm
63
- onComplete={handleOnboardingComplete}
64
- autoSave={true}
65
- progressTracking={true}
66
- allowSkip={false}
67
- steps={[
68
- {
69
- id: 'profile',
70
- title: 'Personal Information',
71
- description: 'Tell us about yourself',
72
- icon: User,
73
- fields: [
74
- {
75
- name: 'fullName',
76
- type: 'text',
77
- label: 'Full Name',
78
- placeholder: 'Enter your full name',
79
- validation: ['required', 'minLength:2'],
80
- defaultValue: user.user_metadata?.full_name || ''
81
- },
82
- {
83
- name: 'company',
84
- type: 'text',
85
- label: 'Company',
86
- placeholder: 'Enter your company name',
87
- validation: ['required']
88
- },
89
- {
90
- name: 'role',
91
- type: 'select',
92
- label: 'Role',
93
- placeholder: 'Select your role',
94
- options: [
95
- { value: 'developer', label: 'Developer' },
96
- { value: 'designer', label: 'Designer' },
97
- { value: 'product-manager', label: 'Product Manager' },
98
- { value: 'entrepreneur', label: 'Entrepreneur' },
99
- { value: 'content-creator', label: 'Content Creator' },
100
- { value: 'student', label: 'Student' },
101
- { value: 'other', label: 'Other' }
102
- ],
103
- validation: ['required']
104
- },
105
- {
106
- name: 'industry',
107
- type: 'select',
108
- label: 'Industry',
109
- placeholder: 'Select your industry',
110
- options: [
111
- { value: 'technology', label: 'Technology' },
112
- { value: 'healthcare', label: 'Healthcare' },
113
- { value: 'finance', label: 'Finance' },
114
- { value: 'education', label: 'Education' },
115
- { value: 'media', label: 'Media & Entertainment' },
116
- { value: 'retail', label: 'Retail' },
117
- { value: 'manufacturing', label: 'Manufacturing' },
118
- { value: 'other', label: 'Other' }
119
- ],
120
- validation: ['required']
121
- }
122
- ]
123
- },
124
- {
125
- id: 'ai-preferences',
126
- title: 'AI Preferences',
127
- description: 'Customize your AI experience',
128
- icon: Brain,
129
- component: (
130
- <div className="space-y-6">
131
- <FormSection title="AI Usage Goals" className="space-y-4">
132
- <FormField
133
- name="usageGoals"
134
- type="multiSelect"
135
- label="What do you plan to use AI for?"
136
- options={[
137
- { value: 'content-creation', label: 'Content Creation' },
138
- { value: 'code-generation', label: 'Code Generation' },
139
- { value: 'data-analysis', label: 'Data Analysis' },
140
- { value: 'customer-support', label: 'Customer Support' },
141
- { value: 'marketing', label: 'Marketing & SEO' },
142
- { value: 'research', label: 'Research & Analysis' },
143
- { value: 'automation', label: 'Workflow Automation' },
144
- { value: 'creative-projects', label: 'Creative Projects' }
145
- ]}
146
- validation={['required']}
147
- helpText="Select all that apply"
148
- />
149
- </FormSection>
150
-
151
- <FormSection title="Content Preferences" className="space-y-4">
152
- <FormField
153
- name="contentTypes"
154
- type="multiSelect"
155
- label="What types of content do you create?"
156
- options={[
157
- { value: 'text', label: 'Text & Articles' },
158
- { value: 'audio', label: 'Audio & Podcasts' },
159
- { value: 'video', label: 'Video Content' },
160
- { value: 'images', label: 'Images & Graphics' },
161
- { value: 'presentations', label: 'Presentations' },
162
- { value: 'social-media', label: 'Social Media Posts' },
163
- { value: 'documentation', label: 'Documentation' },
164
- { value: 'code', label: 'Code & Technical Content' }
165
- ]}
166
- validation: ['required']
167
- />
168
-
169
- <FormField
170
- name: 'creativityLevel'
171
- type: 'range'
172
- label: 'Creativity Level'
173
- min: 0
174
- max: 100
175
- defaultValue: 50
176
- helpText: 'Lower values are more conservative, higher values are more creative'
177
- showValue: true
178
- />
179
- </FormSection>
180
-
181
- <FormSection title="AI Model Preferences" className="space-y-4">
182
- <FormField
183
- name="preferredModels"
184
- type="multiSelect"
185
- label="Preferred AI Models"
186
- options={[
187
- { value: 'gpt-4', label: 'GPT-4 (Text & Chat)' },
188
- { value: 'gpt-4-turbo', label: 'GPT-4 Turbo (Faster)' },
189
- { value: 'claude-3', label: 'Claude 3 (Analysis)' },
190
- { value: 'elevenlabs', label: 'ElevenLabs (Voice)' },
191
- { value: 'whisper', label: 'Whisper (Speech-to-Text)' },
192
- { value: 'dall-e', label: 'DALL-E (Images)' },
193
- { value: 'stable-diffusion', label: 'Stable Diffusion (Images)' }
194
- ]}
195
- helpText="We'll prioritize these models for your requests"
196
- />
197
- </FormSection>
198
- </div>
199
- )
200
- },
201
- {
202
- id: 'team-setup',
203
- title: 'Team Setup',
204
- description: 'Set up your team and collaboration',
205
- icon: Users,
206
- fields: [
207
- {
208
- name: 'teamSize',
209
- type: 'select',
210
- label: 'Team Size',
211
- placeholder: 'Select your team size',
212
- options: [
213
- { value: 'solo', label: 'Just me' },
214
- { value: 'small', label: '2-5 people' },
215
- { value: 'medium', label: '6-20 people' },
216
- { value: 'large', label: '21-100 people' },
217
- { value: 'enterprise', label: '100+ people' }
218
- ],
219
- validation: ['required']
220
- },
221
- {
222
- name: 'inviteMembers',
223
- type: 'textarea',
224
- label: 'Invite Team Members',
225
- placeholder: 'Enter email addresses, one per line',
226
- helpText: 'Invite your team members to collaborate (optional)',
227
- rows: 4
228
- },
229
- {
230
- name: 'workspacePreferences',
231
- type: 'multiSelect',
232
- label: 'Workspace Features',
233
- options: [
234
- { value: 'shared-projects', label: 'Shared Projects' },
235
- { value: 'team-templates', label: 'Team Templates' },
236
- { value: 'usage-analytics', label: 'Usage Analytics' },
237
- { value: 'approval-workflows', label: 'Approval Workflows' },
238
- { value: 'brand-guidelines', label: 'Brand Guidelines' },
239
- { value: 'api-access', label: 'API Access' }
240
- ],
241
- helpText: 'Features you'd like enabled for your team'
242
- }
243
- ]
244
- },
245
- {
246
- id: 'subscription',
247
- title: 'Choose Your Plan',
248
- description: 'Select a plan that fits your needs',
249
- icon: CreditCard,
250
- component: (
251
- <div className="space-y-6">
252
- <FormField
253
- name="selectedPlan"
254
- type="radio"
255
- label="Choose Your Plan"
256
- options={[
257
- {
258
- value: 'starter',
259
- label: 'Starter Plan',
260
- description: 'Perfect for individuals and small projects',
261
- price: '$9/month',
262
- features: [
263
- '1,000 AI requests/month',
264
- 'Basic AI models',
265
- 'Email support',
266
- '5GB storage'
267
- ]
268
- },
269
- {
270
- value: 'pro',
271
- label: 'Pro Plan',
272
- description: 'Best for growing teams and businesses',
273
- price: '$29/month',
274
- features: [
275
- '10,000 AI requests/month',
276
- 'Advanced AI models',
277
- 'Priority support',
278
- '50GB storage',
279
- 'Team collaboration',
280
- 'API access'
281
- ],
282
- recommended: true
283
- },
284
- {
285
- value: 'enterprise',
286
- label: 'Enterprise Plan',
287
- description: 'For large organizations with custom needs',
288
- price: 'Custom pricing',
289
- features: [
290
- 'Unlimited AI requests',
291
- 'All AI models',
292
- 'Dedicated support',
293
- 'Unlimited storage',
294
- 'Advanced security',
295
- 'Custom integrations'
296
- ]
297
- }
298
- ]}
299
- validation={['required']}
300
- />
301
-
302
- <FormField
303
- name="billingInterval"
304
- type="radio"
305
- label="Billing Interval"
306
- options={[
307
- { value: 'monthly', label: 'Monthly billing' },
308
- { value: 'yearly', label: 'Yearly billing (save 20%)' }
309
- ]}
310
- defaultValue="monthly"
311
- validation={['required']}
312
- />
313
- </div>
314
- )
315
- },
316
- {
317
- id: 'completion',
318
- title: 'All Set!',
319
- description: 'Your account is ready to go',
320
- icon: CheckCircle,
321
- component: (
322
- <div className="text-center space-y-6">
323
- <div className="w-16 h-16 bg-green-500 rounded-full flex items-center justify-center mx-auto">
324
- <CheckCircle className="w-8 h-8 text-white" />
325
- </div>
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&apos;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 &amp; 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&apos;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
+ }