@digilogiclabs/create-saas-app 1.10.6 → 1.12.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 (204) hide show
  1. package/README.md +331 -350
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/cli/commands/create.js +2 -2
  4. package/dist/cli/commands/create.js.map +1 -1
  5. package/dist/generators/template-generator.d.ts.map +1 -1
  6. package/dist/generators/template-generator.js +14 -2
  7. package/dist/generators/template-generator.js.map +1 -1
  8. package/dist/templates/web/ui-auth/template/.claude +21 -0
  9. package/dist/templates/web/ui-auth/template/context.md +105 -0
  10. package/dist/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +801 -0
  11. package/dist/templates/web/ui-auth/template/src/app/setup/page.tsx +403 -0
  12. package/dist/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +801 -0
  13. package/dist/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +507 -0
  14. package/dist/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +127 -32
  15. package/dist/templates/web/ui-auth-payments-ai/template/.claude +21 -0
  16. package/dist/templates/web/ui-auth-payments-ai/template/.env.example +15 -0
  17. package/dist/templates/web/ui-auth-payments-ai/template/README.md +207 -0
  18. package/dist/templates/web/ui-auth-payments-ai/template/context.md +169 -0
  19. package/dist/templates/web/ui-auth-payments-ai/template/middleware.ts +68 -0
  20. package/dist/templates/web/ui-auth-payments-ai/template/next.config.js +12 -0
  21. package/dist/templates/web/ui-auth-payments-ai/template/package-lock.json +12241 -0
  22. package/dist/templates/web/ui-auth-payments-ai/template/package.json +55 -0
  23. package/dist/templates/web/ui-auth-payments-ai/template/postcss.config.js +7 -0
  24. package/dist/templates/web/ui-auth-payments-ai/template/src/app/ai/page.tsx +310 -0
  25. package/dist/templates/web/ui-auth-payments-ai/template/src/app/api/ai/audio/route.ts +56 -0
  26. package/dist/templates/web/ui-auth-payments-ai/template/src/app/api/ai/chat/route.ts +49 -0
  27. package/dist/templates/web/ui-auth-payments-ai/template/src/app/api/ai/text/route.ts +64 -0
  28. package/dist/templates/web/ui-auth-payments-ai/template/src/app/api/ai/video/route.ts +73 -0
  29. package/dist/templates/web/ui-auth-payments-ai/template/src/app/auth/callback/route.ts +12 -0
  30. package/dist/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +211 -0
  31. package/dist/templates/web/ui-auth-payments-ai/template/src/app/checkout/page.tsx +142 -0
  32. package/dist/templates/web/ui-auth-payments-ai/template/src/app/dashboard/layout.tsx +22 -0
  33. package/dist/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +183 -0
  34. package/dist/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +801 -0
  35. package/dist/templates/web/ui-auth-payments-ai/template/src/app/error.tsx +67 -0
  36. package/dist/templates/web/ui-auth-payments-ai/template/src/app/globals.css +43 -0
  37. package/dist/templates/web/ui-auth-payments-ai/template/src/app/layout.tsx +35 -0
  38. package/dist/templates/web/ui-auth-payments-ai/template/src/app/loading.tsx +20 -0
  39. package/dist/templates/web/ui-auth-payments-ai/template/src/app/login/page.tsx +6 -0
  40. package/dist/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +380 -0
  41. package/dist/templates/web/ui-auth-payments-ai/template/src/app/page.tsx.backup +391 -0
  42. package/dist/templates/web/ui-auth-payments-ai/template/src/app/page.tsx.bak +391 -0
  43. package/dist/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +640 -0
  44. package/dist/templates/web/ui-auth-payments-ai/template/src/app/signup/page.tsx +6 -0
  45. package/dist/templates/web/ui-auth-payments-ai/template/src/components/__tests__/example.test.tsx +49 -0
  46. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/auth-status.tsx +52 -0
  47. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +144 -0
  48. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +185 -0
  49. package/dist/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +36 -0
  50. package/dist/templates/web/ui-auth-payments-ai/template/src/components/providers/theme-provider.tsx +96 -0
  51. package/dist/templates/web/ui-auth-payments-ai/template/src/components/shared/footer.tsx +36 -0
  52. package/dist/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +246 -0
  53. package/dist/templates/web/ui-auth-payments-ai/template/src/components/ui/badge.tsx +36 -0
  54. package/dist/templates/web/ui-auth-payments-ai/template/src/components/ui/theme-toggle.tsx +34 -0
  55. package/dist/templates/web/ui-auth-payments-ai/template/src/lib/actions/auth.ts +246 -0
  56. package/dist/templates/web/ui-auth-payments-ai/template/src/lib/actions/index.ts +14 -0
  57. package/dist/templates/web/ui-auth-payments-ai/template/src/lib/auth-server.ts +177 -0
  58. package/dist/templates/web/ui-auth-payments-ai/template/src/lib/env.ts +49 -0
  59. package/dist/templates/web/ui-auth-payments-ai/template/src/lib/utils.ts +140 -0
  60. package/dist/templates/web/ui-auth-payments-ai/template/src/test/setup.ts +79 -0
  61. package/dist/templates/web/ui-auth-payments-ai/template/tailwind.config.js +77 -0
  62. package/dist/templates/web/ui-auth-payments-ai/template/tsconfig.json +33 -0
  63. package/dist/templates/web/ui-auth-payments-ai/template/tsconfig.tsbuildinfo +1 -0
  64. package/dist/templates/web/ui-auth-payments-ai/template/vitest.config.ts +17 -0
  65. package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +28 -20
  66. package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx.backup +391 -0
  67. package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx.bak +391 -0
  68. package/dist/templates/web/ui-auth-payments-audio/template/src/app/setup/page.tsx +345 -0
  69. package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +122 -37
  70. package/dist/templates/web/ui-auth-payments-video/template/src/app/setup/page.tsx +351 -0
  71. package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +122 -37
  72. package/package.json +1 -1
  73. package/src/templates/web/ui-auth/template/.claude +21 -0
  74. package/src/templates/web/ui-auth/template/context.md +105 -0
  75. package/src/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +801 -0
  76. package/src/templates/web/ui-auth/template/src/app/setup/page.tsx +403 -0
  77. package/src/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +801 -0
  78. package/src/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +507 -0
  79. package/src/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +127 -32
  80. package/src/templates/web/ui-auth-payments-ai/template/.claude +21 -0
  81. package/src/templates/web/ui-auth-payments-ai/template/.env.example +15 -0
  82. package/src/templates/web/ui-auth-payments-ai/template/README.md +207 -0
  83. package/src/templates/web/ui-auth-payments-ai/template/context.md +169 -0
  84. package/src/templates/web/ui-auth-payments-ai/template/middleware.ts +68 -0
  85. package/src/templates/web/ui-auth-payments-ai/template/next.config.js +12 -0
  86. package/src/templates/web/ui-auth-payments-ai/template/package-lock.json +12241 -0
  87. package/src/templates/web/ui-auth-payments-ai/template/package.json +55 -0
  88. package/src/templates/web/ui-auth-payments-ai/template/postcss.config.js +7 -0
  89. package/src/templates/web/ui-auth-payments-ai/template/src/app/ai/page.tsx +310 -0
  90. package/src/templates/web/ui-auth-payments-ai/template/src/app/api/ai/audio/route.ts +56 -0
  91. package/src/templates/web/ui-auth-payments-ai/template/src/app/api/ai/chat/route.ts +49 -0
  92. package/src/templates/web/ui-auth-payments-ai/template/src/app/api/ai/text/route.ts +64 -0
  93. package/src/templates/web/ui-auth-payments-ai/template/src/app/api/ai/video/route.ts +73 -0
  94. package/src/templates/web/ui-auth-payments-ai/template/src/app/auth/callback/route.ts +12 -0
  95. package/src/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +211 -0
  96. package/src/templates/web/ui-auth-payments-ai/template/src/app/checkout/page.tsx +142 -0
  97. package/src/templates/web/ui-auth-payments-ai/template/src/app/dashboard/layout.tsx +22 -0
  98. package/src/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +183 -0
  99. package/src/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +801 -0
  100. package/src/templates/web/ui-auth-payments-ai/template/src/app/error.tsx +67 -0
  101. package/src/templates/web/ui-auth-payments-ai/template/src/app/globals.css +43 -0
  102. package/src/templates/web/ui-auth-payments-ai/template/src/app/layout.tsx +35 -0
  103. package/src/templates/web/ui-auth-payments-ai/template/src/app/loading.tsx +20 -0
  104. package/src/templates/web/ui-auth-payments-ai/template/src/app/login/page.tsx +6 -0
  105. package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +380 -0
  106. package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx.backup +391 -0
  107. package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx.bak +391 -0
  108. package/src/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +640 -0
  109. package/src/templates/web/ui-auth-payments-ai/template/src/app/signup/page.tsx +6 -0
  110. package/src/templates/web/ui-auth-payments-ai/template/src/components/__tests__/example.test.tsx +49 -0
  111. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/auth-status.tsx +52 -0
  112. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +144 -0
  113. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +185 -0
  114. package/src/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +36 -0
  115. package/src/templates/web/ui-auth-payments-ai/template/src/components/providers/theme-provider.tsx +96 -0
  116. package/src/templates/web/ui-auth-payments-ai/template/src/components/shared/footer.tsx +36 -0
  117. package/src/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +246 -0
  118. package/src/templates/web/ui-auth-payments-ai/template/src/components/ui/badge.tsx +36 -0
  119. package/src/templates/web/ui-auth-payments-ai/template/src/components/ui/theme-toggle.tsx +34 -0
  120. package/src/templates/web/ui-auth-payments-ai/template/src/lib/actions/auth.ts +246 -0
  121. package/src/templates/web/ui-auth-payments-ai/template/src/lib/actions/index.ts +14 -0
  122. package/src/templates/web/ui-auth-payments-ai/template/src/lib/auth-server.ts +177 -0
  123. package/src/templates/web/ui-auth-payments-ai/template/src/lib/env.ts +49 -0
  124. package/src/templates/web/ui-auth-payments-ai/template/src/lib/utils.ts +140 -0
  125. package/src/templates/web/ui-auth-payments-ai/template/src/test/setup.ts +79 -0
  126. package/src/templates/web/ui-auth-payments-ai/template/tailwind.config.js +77 -0
  127. package/src/templates/web/ui-auth-payments-ai/template/tsconfig.json +33 -0
  128. package/src/templates/web/ui-auth-payments-ai/template/tsconfig.tsbuildinfo +1 -0
  129. package/src/templates/web/ui-auth-payments-ai/template/vitest.config.ts +17 -0
  130. package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +28 -20
  131. package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx.backup +391 -0
  132. package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx.bak +391 -0
  133. package/src/templates/web/ui-auth-payments-audio/template/src/app/setup/page.tsx +345 -0
  134. package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +122 -37
  135. package/src/templates/web/ui-auth-payments-video/template/src/app/setup/page.tsx +351 -0
  136. package/src/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +122 -37
  137. package/dist/cli/commands/add.d.ts +0 -6
  138. package/dist/cli/commands/add.d.ts.map +0 -1
  139. package/dist/cli/commands/add.js +0 -39
  140. package/dist/cli/commands/add.js.map +0 -1
  141. package/dist/cli/commands/index.d.ts +0 -4
  142. package/dist/cli/commands/index.d.ts.map +0 -1
  143. package/dist/cli/commands/index.js +0 -20
  144. package/dist/cli/commands/index.js.map +0 -1
  145. package/dist/cli/commands/update.d.ts +0 -6
  146. package/dist/cli/commands/update.d.ts.map +0 -1
  147. package/dist/cli/commands/update.js +0 -68
  148. package/dist/cli/commands/update.js.map +0 -1
  149. package/dist/cli/index.d.ts +0 -4
  150. package/dist/cli/index.d.ts.map +0 -1
  151. package/dist/cli/index.js +0 -61
  152. package/dist/cli/index.js.map +0 -1
  153. package/dist/cli/prompts/index.d.ts +0 -2
  154. package/dist/cli/prompts/index.d.ts.map +0 -1
  155. package/dist/cli/prompts/index.js +0 -18
  156. package/dist/cli/prompts/index.js.map +0 -1
  157. package/dist/cli/prompts/project-setup.d.ts +0 -5
  158. package/dist/cli/prompts/project-setup.d.ts.map +0 -1
  159. package/dist/cli/prompts/project-setup.js +0 -251
  160. package/dist/cli/prompts/project-setup.js.map +0 -1
  161. package/dist/cli/utils/git.d.ts +0 -9
  162. package/dist/cli/utils/git.d.ts.map +0 -1
  163. package/dist/cli/utils/git.js +0 -77
  164. package/dist/cli/utils/git.js.map +0 -1
  165. package/dist/cli/utils/index.d.ts +0 -5
  166. package/dist/cli/utils/index.d.ts.map +0 -1
  167. package/dist/cli/utils/index.js +0 -21
  168. package/dist/cli/utils/index.js.map +0 -1
  169. package/dist/cli/utils/logger.d.ts +0 -16
  170. package/dist/cli/utils/logger.d.ts.map +0 -1
  171. package/dist/cli/utils/logger.js +0 -55
  172. package/dist/cli/utils/logger.js.map +0 -1
  173. package/dist/cli/utils/package-manager.d.ts +0 -8
  174. package/dist/cli/utils/package-manager.d.ts.map +0 -1
  175. package/dist/cli/utils/package-manager.js +0 -92
  176. package/dist/cli/utils/package-manager.js.map +0 -1
  177. package/dist/cli/utils/spinner.d.ts +0 -7
  178. package/dist/cli/utils/spinner.d.ts.map +0 -1
  179. package/dist/cli/utils/spinner.js +0 -48
  180. package/dist/cli/utils/spinner.js.map +0 -1
  181. package/dist/cli/validators/dependencies.d.ts +0 -15
  182. package/dist/cli/validators/dependencies.d.ts.map +0 -1
  183. package/dist/cli/validators/dependencies.js +0 -108
  184. package/dist/cli/validators/dependencies.js.map +0 -1
  185. package/dist/cli/validators/index.d.ts +0 -3
  186. package/dist/cli/validators/index.d.ts.map +0 -1
  187. package/dist/cli/validators/index.js +0 -19
  188. package/dist/cli/validators/index.js.map +0 -1
  189. package/dist/cli/validators/project-name.d.ts +0 -5
  190. package/dist/cli/validators/project-name.d.ts.map +0 -1
  191. package/dist/cli/validators/project-name.js +0 -151
  192. package/dist/cli/validators/project-name.js.map +0 -1
  193. package/dist/generators/file-processor.d.ts +0 -28
  194. package/dist/generators/file-processor.d.ts.map +0 -1
  195. package/dist/generators/file-processor.js +0 -224
  196. package/dist/generators/file-processor.js.map +0 -1
  197. package/dist/generators/index.d.ts +0 -4
  198. package/dist/generators/index.d.ts.map +0 -1
  199. package/dist/generators/index.js +0 -20
  200. package/dist/generators/index.js.map +0 -1
  201. package/dist/generators/package-installer.d.ts +0 -29
  202. package/dist/generators/package-installer.d.ts.map +0 -1
  203. package/dist/generators/package-installer.js +0 -167
  204. package/dist/generators/package-installer.js.map +0 -1
@@ -0,0 +1,640 @@
1
+ 'use client'
2
+
3
+ import {
4
+ Card,
5
+ Button,
6
+ PageTransition,
7
+ MobileContainer,
8
+ ResponsiveGrid,
9
+ useAnimationTokens,
10
+ useGlassmorphism
11
+ } from '@digilogiclabs/saas-factory-ui'
12
+ import {
13
+ ArrowLeft,
14
+ CheckCircle,
15
+ AlertCircle,
16
+ ExternalLink,
17
+ Copy,
18
+ Database,
19
+ CreditCard,
20
+ Shield,
21
+ Brain,
22
+ Key,
23
+ Globe,
24
+ Settings,
25
+ BookOpen,
26
+ Zap,
27
+ Server,
28
+ Code2,
29
+ FileText
30
+ } from 'lucide-react'
31
+ import Link from 'next/link'
32
+ import { useState } from 'react'
33
+
34
+ interface ServiceConfig {
35
+ name: string
36
+ status: 'required' | 'optional' | 'configured'
37
+ icon: any
38
+ description: string
39
+ setupSteps: Array<{
40
+ title: string
41
+ description: string
42
+ code?: string
43
+ link?: string
44
+ }>
45
+ envVars: Array<{
46
+ name: string
47
+ description: string
48
+ example: string
49
+ required: boolean
50
+ }>
51
+ }
52
+
53
+ export default function SetupPage() {
54
+ const animations = useAnimationTokens()
55
+ const glass = useGlassmorphism()
56
+ const [copiedVar, setCopiedVar] = useState<string | null>(null)
57
+
58
+ const projectName = "{{projectName}}"
59
+ const templateName = "Full-Stack AI Platform"
60
+ const templateDescription = "UI + Authentication + Payments + AI (Text, Audio, Video, Chat)"
61
+
62
+ const services: ServiceConfig[] = [
63
+ {
64
+ name: "Supabase (Database & Auth)",
65
+ status: 'required',
66
+ icon: Database,
67
+ description: "PostgreSQL database with built-in authentication, real-time subscriptions, and edge functions.",
68
+ setupSteps: [
69
+ {
70
+ title: "Create Supabase Project",
71
+ description: "Sign up at supabase.com and create a new project",
72
+ link: "https://supabase.com/dashboard"
73
+ },
74
+ {
75
+ title: "Get API Keys",
76
+ description: "Go to Settings → API to find your project URL and anon key"
77
+ },
78
+ {
79
+ title: "Configure Authentication",
80
+ description: "Enable email/password auth in Authentication → Settings"
81
+ },
82
+ {
83
+ title: "Set up Database Tables",
84
+ description: "Create tables for user profiles, AI conversations, and usage tracking",
85
+ code: `-- User profiles table
86
+ CREATE TABLE profiles (
87
+ id UUID REFERENCES auth.users(id) PRIMARY KEY,
88
+ email TEXT,
89
+ full_name TEXT,
90
+ avatar_url TEXT,
91
+ created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
92
+ );
93
+
94
+ -- AI conversations table
95
+ CREATE TABLE ai_conversations (
96
+ id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
97
+ user_id UUID REFERENCES profiles(id),
98
+ message_type TEXT NOT NULL,
99
+ user_message TEXT NOT NULL,
100
+ ai_response TEXT NOT NULL,
101
+ metadata JSONB,
102
+ created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
103
+ );
104
+
105
+ -- Enable RLS
106
+ ALTER TABLE profiles ENABLE ROW LEVEL SECURITY;
107
+ ALTER TABLE ai_conversations ENABLE ROW LEVEL SECURITY;
108
+
109
+ -- RLS Policies
110
+ CREATE POLICY "Users can view own profile" ON profiles FOR SELECT USING (auth.uid() = id);
111
+ CREATE POLICY "Users can update own profile" ON profiles FOR UPDATE USING (auth.uid() = id);
112
+ CREATE POLICY "Users can view own conversations" ON ai_conversations FOR ALL USING (auth.uid() = user_id);`
113
+ }
114
+ ],
115
+ envVars: [
116
+ {
117
+ name: "NEXT_PUBLIC_SUPABASE_URL",
118
+ description: "Your Supabase project URL",
119
+ example: "https://your-project.supabase.co",
120
+ required: true
121
+ },
122
+ {
123
+ name: "NEXT_PUBLIC_SUPABASE_ANON_KEY",
124
+ description: "Your Supabase anonymous key",
125
+ example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
126
+ required: true
127
+ },
128
+ {
129
+ name: "SUPABASE_SERVICE_ROLE_KEY",
130
+ description: "Service role key for server-side operations (optional)",
131
+ example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
132
+ required: false
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ name: "Stripe (Payments)",
138
+ status: 'required',
139
+ icon: CreditCard,
140
+ description: "Payment processing for subscriptions, one-time payments, and billing management.",
141
+ setupSteps: [
142
+ {
143
+ title: "Create Stripe Account",
144
+ description: "Sign up at stripe.com and complete account verification",
145
+ link: "https://dashboard.stripe.com/register"
146
+ },
147
+ {
148
+ title: "Get API Keys",
149
+ description: "Go to Developers → API keys to find your publishable and secret keys"
150
+ },
151
+ {
152
+ title: "Set up Products & Pricing",
153
+ description: "Create products and pricing plans in the Stripe dashboard"
154
+ },
155
+ {
156
+ title: "Configure Webhooks",
157
+ description: "Set up webhooks to handle payment events",
158
+ code: `// Add to your API route: /api/webhooks/stripe
159
+ const endpointSecret = process.env.STRIPE_WEBHOOK_SECRET!
160
+
161
+ const sig = headers.get('stripe-signature')!
162
+ const payload = await request.text()
163
+
164
+ try {
165
+ const event = stripe.webhooks.constructEvent(payload, sig, endpointSecret)
166
+
167
+ switch (event.type) {
168
+ case 'customer.subscription.created':
169
+ case 'customer.subscription.updated':
170
+ case 'customer.subscription.deleted':
171
+ // Handle subscription changes
172
+ break
173
+ case 'invoice.payment_succeeded':
174
+ // Handle successful payments
175
+ break
176
+ }
177
+ } catch (err) {
178
+ console.error('Webhook signature verification failed:', err)
179
+ return new Response('Webhook Error', { status: 400 })
180
+ }`
181
+ }
182
+ ],
183
+ envVars: [
184
+ {
185
+ name: "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY",
186
+ description: "Your Stripe publishable key",
187
+ example: "pk_test_51234567890abcdef...",
188
+ required: true
189
+ },
190
+ {
191
+ name: "STRIPE_SECRET_KEY",
192
+ description: "Your Stripe secret key",
193
+ example: "sk_test_51234567890abcdef...",
194
+ required: true
195
+ },
196
+ {
197
+ name: "STRIPE_WEBHOOK_SECRET",
198
+ description: "Webhook endpoint secret for event verification",
199
+ example: "whsec_1234567890abcdef...",
200
+ required: true
201
+ }
202
+ ]
203
+ },
204
+ {
205
+ name: "OpenAI (AI Provider)",
206
+ status: 'required',
207
+ icon: Brain,
208
+ description: "Primary AI provider for text generation, chat, and other AI capabilities.",
209
+ setupSteps: [
210
+ {
211
+ title: "Create OpenAI Account",
212
+ description: "Sign up at platform.openai.com and add billing information",
213
+ link: "https://platform.openai.com/signup"
214
+ },
215
+ {
216
+ title: "Generate API Key",
217
+ description: "Go to API Keys section and create a new secret key"
218
+ },
219
+ {
220
+ title: "Set Usage Limits",
221
+ description: "Configure usage limits and monitoring in your OpenAI dashboard"
222
+ },
223
+ {
224
+ title: "Test Integration",
225
+ description: "Verify your API key works with a simple test request",
226
+ code: `// Test your OpenAI API key
227
+ import OpenAI from 'openai'
228
+
229
+ const openai = new OpenAI({
230
+ apiKey: process.env.OPENAI_API_KEY,
231
+ })
232
+
233
+ const response = await openai.chat.completions.create({
234
+ model: "gpt-4",
235
+ messages: [{ role: "user", content: "Hello, world!" }],
236
+ max_tokens: 50
237
+ })`
238
+ }
239
+ ],
240
+ envVars: [
241
+ {
242
+ name: "OPENAI_API_KEY",
243
+ description: "Your OpenAI API key",
244
+ example: "sk-1234567890abcdef...",
245
+ required: true
246
+ },
247
+ {
248
+ name: "OPENAI_ORG_ID",
249
+ description: "Your OpenAI organization ID (optional)",
250
+ example: "org-1234567890abcdef",
251
+ required: false
252
+ }
253
+ ]
254
+ },
255
+ {
256
+ name: "ElevenLabs (Audio AI)",
257
+ status: 'optional',
258
+ icon: Server,
259
+ description: "Advanced voice synthesis and audio generation for high-quality AI voices.",
260
+ setupSteps: [
261
+ {
262
+ title: "Create ElevenLabs Account",
263
+ description: "Sign up at elevenlabs.io for voice synthesis",
264
+ link: "https://elevenlabs.io"
265
+ },
266
+ {
267
+ title: "Get API Key",
268
+ description: "Generate an API key from your profile settings"
269
+ },
270
+ {
271
+ title: "Choose Voice Models",
272
+ description: "Select or clone voices for your audio generation needs"
273
+ }
274
+ ],
275
+ envVars: [
276
+ {
277
+ name: "ELEVENLABS_API_KEY",
278
+ description: "Your ElevenLabs API key for voice synthesis",
279
+ example: "sk-1234567890abcdef...",
280
+ required: false
281
+ }
282
+ ]
283
+ },
284
+ {
285
+ name: "Replicate (Video AI)",
286
+ status: 'optional',
287
+ icon: Globe,
288
+ description: "Video generation and processing using various AI models.",
289
+ setupSteps: [
290
+ {
291
+ title: "Create Replicate Account",
292
+ description: "Sign up at replicate.com for AI video generation",
293
+ link: "https://replicate.com"
294
+ },
295
+ {
296
+ title: "Get API Token",
297
+ description: "Generate an API token from your account settings"
298
+ },
299
+ {
300
+ title: "Explore Models",
301
+ description: "Browse video generation models in the Replicate model library"
302
+ }
303
+ ],
304
+ envVars: [
305
+ {
306
+ name: "REPLICATE_API_TOKEN",
307
+ description: "Your Replicate API token for video generation",
308
+ example: "r8_1234567890abcdef...",
309
+ required: false
310
+ }
311
+ ]
312
+ }
313
+ ]
314
+
315
+ const allEnvVars = services.flatMap(service => service.envVars)
316
+
317
+ const copyToClipboard = async (text: string, varName: string) => {
318
+ await navigator.clipboard.writeText(text)
319
+ setCopiedVar(varName)
320
+ setTimeout(() => setCopiedVar(null), 2000)
321
+ }
322
+
323
+ const getStatusColor = (status: ServiceConfig['status']) => {
324
+ switch (status) {
325
+ case 'required': return 'text-red-400'
326
+ case 'optional': return 'text-yellow-400'
327
+ case 'configured': return 'text-green-400'
328
+ default: return 'text-gray-400'
329
+ }
330
+ }
331
+
332
+ const getStatusIcon = (status: ServiceConfig['status']) => {
333
+ switch (status) {
334
+ case 'required': return AlertCircle
335
+ case 'optional': return Settings
336
+ case 'configured': return CheckCircle
337
+ default: return AlertCircle
338
+ }
339
+ }
340
+
341
+ return (
342
+ <PageTransition type="slide" direction="up" duration={300}>
343
+ <main className={`min-h-screen ${glass.background.primary} relative overflow-hidden`}>
344
+ <div className={`absolute inset-0 ${glass.background.accent} opacity-30`} />
345
+ <div className="relative z-10">
346
+ <MobileContainer className="py-8">
347
+ {/* Header */}
348
+ <div className="flex items-center justify-between mb-8">
349
+ <div className="flex items-center gap-4">
350
+ <Link href="/" className={`${glass.card} ${glass.border} p-2 rounded-xl ${animations.hover.scale}`}>
351
+ <ArrowLeft className="w-5 h-5" />
352
+ </Link>
353
+ <div>
354
+ <h1 className="text-2xl font-bold">Setup Guide</h1>
355
+ <p className="text-gray-600 dark:text-gray-300">{templateName}</p>
356
+ </div>
357
+ </div>
358
+ <div className={`${glass.card} ${glass.border} px-4 py-2 rounded-xl`}>
359
+ <span className="text-sm font-medium">{projectName}</span>
360
+ </div>
361
+ </div>
362
+
363
+ {/* Template Overview */}
364
+ <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mb-8`}>
365
+ <div className="flex items-center gap-4 mb-4">
366
+ <div className={`w-12 h-12 rounded-xl bg-gradient-to-r from-purple-500 to-pink-500 flex items-center justify-center`}>
367
+ <Zap className="w-6 h-6 text-white" />
368
+ </div>
369
+ <div>
370
+ <h2 className="text-xl font-semibold">{templateName}</h2>
371
+ <p className="text-gray-600 dark:text-gray-300">{templateDescription}</p>
372
+ </div>
373
+ </div>
374
+ <div className="grid grid-cols-2 md:grid-cols-4 gap-4 mt-6">
375
+ <div className="text-center p-3 rounded-xl bg-blue-500/10">
376
+ <Shield className="w-6 h-6 text-blue-400 mx-auto mb-2" />
377
+ <div className="text-sm font-medium">Authentication</div>
378
+ </div>
379
+ <div className="text-center p-3 rounded-xl bg-green-500/10">
380
+ <CreditCard className="w-6 h-6 text-green-400 mx-auto mb-2" />
381
+ <div className="text-sm font-medium">Payments</div>
382
+ </div>
383
+ <div className="text-center p-3 rounded-xl bg-purple-500/10">
384
+ <Brain className="w-6 h-6 text-purple-400 mx-auto mb-2" />
385
+ <div className="text-sm font-medium">AI Platform</div>
386
+ </div>
387
+ <div className="text-center p-3 rounded-xl bg-orange-500/10">
388
+ <Code2 className="w-6 h-6 text-orange-400 mx-auto mb-2" />
389
+ <div className="text-sm font-medium">Modern UI</div>
390
+ </div>
391
+ </div>
392
+ </div>
393
+
394
+ {/* Quick Start */}
395
+ <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mb-8`}>
396
+ <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
397
+ <Zap className="w-5 h-5 text-yellow-400" />
398
+ Quick Start
399
+ </h3>
400
+ <div className="space-y-3 text-sm">
401
+ <div className="flex items-center gap-3">
402
+ <CheckCircle className="w-5 h-5 text-green-400" />
403
+ <span>1. Set up your environment variables (see below)</span>
404
+ </div>
405
+ <div className="flex items-center gap-3">
406
+ <CheckCircle className="w-5 h-5 text-green-400" />
407
+ <span>2. Configure Supabase database and authentication</span>
408
+ </div>
409
+ <div className="flex items-center gap-3">
410
+ <CheckCircle className="w-5 h-5 text-green-400" />
411
+ <span>3. Set up Stripe for payment processing</span>
412
+ </div>
413
+ <div className="flex items-center gap-3">
414
+ <CheckCircle className="w-5 h-5 text-green-400" />
415
+ <span>4. Connect your AI providers (OpenAI, ElevenLabs, Replicate)</span>
416
+ </div>
417
+ <div className="flex items-center gap-3">
418
+ <CheckCircle className="w-5 h-5 text-green-400" />
419
+ <span>5. Run <code className="px-2 py-1 bg-gray-800 rounded text-green-400">npm run dev</code> to start developing</span>
420
+ </div>
421
+ </div>
422
+ </div>
423
+
424
+ {/* Environment Variables */}
425
+ <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mb-8`}>
426
+ <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
427
+ <Key className="w-5 h-5 text-blue-400" />
428
+ Environment Variables
429
+ </h3>
430
+ <p className="text-sm text-gray-600 dark:text-gray-300 mb-4">
431
+ Copy these to your <code className="px-2 py-1 bg-gray-800 rounded">.env.local</code> file:
432
+ </p>
433
+ <div className="bg-gray-900 rounded-xl p-4 overflow-x-auto">
434
+ <pre className="text-sm text-green-400">
435
+ {allEnvVars.map(envVar => (
436
+ `${envVar.name}=${envVar.example}${envVar.required ? ' # Required' : ' # Optional'}`
437
+ )).join('\n')}
438
+ </pre>
439
+ <button
440
+ onClick={() => copyToClipboard(
441
+ allEnvVars.map(envVar => `${envVar.name}=${envVar.example}`).join('\n'),
442
+ 'all-env-vars'
443
+ )}
444
+ className="mt-3 flex items-center gap-2 text-xs text-gray-400 hover:text-white transition-colors"
445
+ >
446
+ <Copy className="w-4 h-4" />
447
+ {copiedVar === 'all-env-vars' ? 'Copied!' : 'Copy all environment variables'}
448
+ </button>
449
+ </div>
450
+ </div>
451
+
452
+ {/* Services Configuration */}
453
+ <div className="space-y-6">
454
+ <h3 className="text-lg font-semibold flex items-center gap-2">
455
+ <Settings className="w-5 h-5 text-gray-400" />
456
+ Service Configuration
457
+ </h3>
458
+
459
+ {services.map((service, index) => {
460
+ const StatusIcon = getStatusIcon(service.status)
461
+ const ServiceIcon = service.icon
462
+
463
+ return (
464
+ <div key={service.name} className={`${glass.card} ${glass.border} rounded-2xl p-6`}>
465
+ <div className="flex items-start justify-between mb-4">
466
+ <div className="flex items-center gap-3">
467
+ <div className={`w-10 h-10 rounded-xl bg-gray-800 flex items-center justify-center`}>
468
+ <ServiceIcon className="w-5 h-5 text-white" />
469
+ </div>
470
+ <div>
471
+ <h4 className="text-lg font-semibold flex items-center gap-2">
472
+ {service.name}
473
+ <StatusIcon className={`w-4 h-4 ${getStatusColor(service.status)}`} />
474
+ </h4>
475
+ <p className="text-sm text-gray-600 dark:text-gray-300">{service.description}</p>
476
+ </div>
477
+ </div>
478
+ <span className={`px-3 py-1 rounded-full text-xs font-medium ${
479
+ service.status === 'required' ? 'bg-red-500/20 text-red-400' :
480
+ service.status === 'optional' ? 'bg-yellow-500/20 text-yellow-400' :
481
+ 'bg-green-500/20 text-green-400'
482
+ }`}>
483
+ {service.status}
484
+ </span>
485
+ </div>
486
+
487
+ {/* Setup Steps */}
488
+ <div className="mb-6">
489
+ <h5 className="font-semibold mb-3">Setup Steps:</h5>
490
+ <div className="space-y-3">
491
+ {service.setupSteps.map((step, stepIndex) => (
492
+ <div key={stepIndex} className="flex gap-3">
493
+ <div className="w-6 h-6 rounded-full bg-blue-500 text-white text-xs flex items-center justify-center flex-shrink-0 mt-0.5">
494
+ {stepIndex + 1}
495
+ </div>
496
+ <div className="flex-1">
497
+ <h6 className="font-medium">{step.title}</h6>
498
+ <p className="text-sm text-gray-600 dark:text-gray-300">{step.description}</p>
499
+ {step.link && (
500
+ <a
501
+ href={step.link}
502
+ target="_blank"
503
+ rel="noopener noreferrer"
504
+ className="inline-flex items-center gap-1 text-sm text-blue-400 hover:text-blue-300 mt-1"
505
+ >
506
+ Open Dashboard <ExternalLink className="w-3 h-3" />
507
+ </a>
508
+ )}
509
+ {step.code && (
510
+ <details className="mt-2">
511
+ <summary className="text-sm text-blue-400 cursor-pointer hover:text-blue-300">
512
+ Show code example
513
+ </summary>
514
+ <pre className="bg-gray-900 rounded-lg p-3 mt-2 text-xs overflow-x-auto">
515
+ <code className="text-green-400">{step.code}</code>
516
+ </pre>
517
+ </details>
518
+ )}
519
+ </div>
520
+ </div>
521
+ ))}
522
+ </div>
523
+ </div>
524
+
525
+ {/* Environment Variables for this service */}
526
+ <div>
527
+ <h5 className="font-semibold mb-3">Environment Variables:</h5>
528
+ <div className="space-y-2">
529
+ {service.envVars.map((envVar, envIndex) => (
530
+ <div key={envIndex} className="bg-gray-800/50 rounded-lg p-3">
531
+ <div className="flex items-center justify-between mb-1">
532
+ <code className="text-blue-400 font-mono text-sm">{envVar.name}</code>
533
+ <div className="flex items-center gap-2">
534
+ <span className={`px-2 py-1 rounded text-xs ${
535
+ envVar.required ? 'bg-red-500/20 text-red-400' : 'bg-gray-500/20 text-gray-400'
536
+ }`}>
537
+ {envVar.required ? 'Required' : 'Optional'}
538
+ </span>
539
+ <button
540
+ onClick={() => copyToClipboard(`${envVar.name}=${envVar.example}`, envVar.name)}
541
+ className="p-1 hover:bg-gray-700 rounded transition-colors"
542
+ >
543
+ <Copy className="w-3 h-3" />
544
+ </button>
545
+ </div>
546
+ </div>
547
+ <p className="text-xs text-gray-400 mb-2">{envVar.description}</p>
548
+ <code className="text-xs text-gray-500 font-mono">{envVar.example}</code>
549
+ {copiedVar === envVar.name && (
550
+ <span className="text-xs text-green-400 ml-2">Copied!</span>
551
+ )}
552
+ </div>
553
+ ))}
554
+ </div>
555
+ </div>
556
+ </div>
557
+ )
558
+ })}
559
+ </div>
560
+
561
+ {/* Next Steps */}
562
+ <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mt-8`}>
563
+ <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
564
+ <Zap className="w-5 h-5 text-yellow-400" />
565
+ Next Steps
566
+ </h3>
567
+ <p className="text-gray-600 dark:text-gray-300 mb-6">
568
+ Once you've configured your services, set up your development workflow and deploy your application.
569
+ </p>
570
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
571
+ <Link
572
+ href="/dev-setup"
573
+ className={`${glass.card} ${glass.border} p-4 rounded-xl ${animations.hover.scale} block`}
574
+ >
575
+ <Code2 className="w-8 h-8 text-purple-400 mb-2" />
576
+ <h4 className="font-medium">Development & Deployment</h4>
577
+ <p className="text-sm text-gray-600 dark:text-gray-300">Claude AI setup and hosting guides</p>
578
+ </Link>
579
+ <Link
580
+ href="/"
581
+ className={`${glass.card} ${glass.border} p-4 rounded-xl ${animations.hover.scale} block`}
582
+ >
583
+ <Zap className="w-8 h-8 text-blue-400 mb-2" />
584
+ <h4 className="font-medium">Start Building</h4>
585
+ <p className="text-sm text-gray-600 dark:text-gray-300">Go to your application and start coding</p>
586
+ </Link>
587
+ </div>
588
+ </div>
589
+
590
+ {/* Additional Resources */}
591
+ <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mt-8`}>
592
+ <h3 className="text-lg font-semibold mb-4 flex items-center gap-2">
593
+ <BookOpen className="w-5 h-5 text-green-400" />
594
+ Additional Resources
595
+ </h3>
596
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
597
+ <a
598
+ href="https://docs.digilogiclabs.com"
599
+ className={`${glass.card} ${glass.border} p-4 rounded-xl ${animations.hover.scale} block`}
600
+ >
601
+ <FileText className="w-8 h-8 text-blue-400 mb-2" />
602
+ <h4 className="font-medium">Documentation</h4>
603
+ <p className="text-sm text-gray-600 dark:text-gray-300">Complete guides and API reference</p>
604
+ </a>
605
+ <a
606
+ href="https://github.com/digilogiclabs/examples"
607
+ className={`${glass.card} ${glass.border} p-4 rounded-xl ${animations.hover.scale} block`}
608
+ >
609
+ <Code2 className="w-8 h-8 text-purple-400 mb-2" />
610
+ <h4 className="font-medium">Examples</h4>
611
+ <p className="text-sm text-gray-600 dark:text-gray-300">Sample projects and code snippets</p>
612
+ </a>
613
+ </div>
614
+ </div>
615
+
616
+ {/* Support */}
617
+ <div className={`${glass.card} ${glass.border} rounded-2xl p-6 mt-8 text-center`}>
618
+ <h3 className="text-lg font-semibold mb-4">Need Help?</h3>
619
+ <p className="text-gray-600 dark:text-gray-300 mb-4">
620
+ Our community and support team are here to help you get started.
621
+ </p>
622
+ <div className="flex justify-center gap-4">
623
+ <Button variant="outline" size="sm" asChild>
624
+ <a href="https://discord.gg/digilogiclabs" target="_blank" rel="noopener noreferrer">
625
+ Join Discord
626
+ </a>
627
+ </Button>
628
+ <Button size="sm" asChild>
629
+ <a href="https://docs.digilogiclabs.com/support" target="_blank" rel="noopener noreferrer">
630
+ Get Support
631
+ </a>
632
+ </Button>
633
+ </div>
634
+ </div>
635
+ </MobileContainer>
636
+ </div>
637
+ </main>
638
+ </PageTransition>
639
+ )
640
+ }
@@ -0,0 +1,6 @@
1
+ import { SignupForm } from '@/components/client/signup-form'
2
+
3
+ export default function SignupPage() {
4
+ return <SignupForm />
5
+ }
6
+