@digilogiclabs/create-saas-app 1.14.0 → 1.17.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/README.md +134 -29
- package/bin/index.js +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/cli/prompts/project-setup.d.ts.map +1 -1
- package/dist/cli/prompts/project-setup.js +45 -12
- package/dist/cli/prompts/project-setup.js.map +1 -1
- package/dist/generators/template-generator.d.ts.map +1 -1
- package/dist/generators/template-generator.js +27 -4
- package/dist/generators/template-generator.js.map +1 -1
- package/dist/templates/mobile/ui-auth-payments/template/.env.example +20 -0
- package/dist/templates/mobile/ui-auth-payments/template/README.md +218 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/_layout.tsx +153 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/analytics.tsx +668 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/billing.tsx +743 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +676 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/orders.tsx +402 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/profile.tsx +580 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/_layout.tsx +125 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/auth/login.tsx +246 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/auth/signup.tsx +362 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/onboarding/index.tsx +193 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/tour/index.tsx +272 -0
- package/dist/templates/mobile/ui-auth-payments/template/app.json +93 -0
- package/dist/templates/mobile/ui-auth-payments/template/babel.config.js +23 -0
- package/dist/templates/mobile/ui-auth-payments/template/eas.json +45 -0
- package/dist/templates/mobile/ui-auth-payments/template/expo-env.d.ts +3 -0
- package/dist/templates/mobile/ui-auth-payments/template/jest-setup.ts +74 -0
- package/dist/templates/mobile/ui-auth-payments/template/metro.config.js +11 -0
- package/dist/templates/mobile/ui-auth-payments/template/package.json +106 -0
- package/dist/templates/mobile/ui-auth-payments/template/tsconfig.json +31 -0
- package/dist/templates/web/base/template/src/app/dashboard/page.tsx +62 -20
- package/dist/templates/web/ui-auth/template/package.json +1 -1
- package/dist/templates/web/ui-auth-payments/template/package.json +1 -1
- package/dist/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +69 -17
- package/dist/templates/web/ui-auth-payments-ai/template/package.json +1 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +218 -7
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +62 -9
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +364 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +532 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +70 -51
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +76 -60
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-audio/template/package.json +1 -1
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +71 -17
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-video/template/package.json +1 -1
- package/package.json +1 -1
- package/src/templates/mobile/ui-auth-payments/template/.env.example +20 -0
- package/src/templates/mobile/ui-auth-payments/template/README.md +218 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/_layout.tsx +153 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/analytics.tsx +668 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/billing.tsx +743 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +676 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/orders.tsx +402 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/profile.tsx +580 -0
- package/src/templates/mobile/ui-auth-payments/template/app/_layout.tsx +125 -0
- package/src/templates/mobile/ui-auth-payments/template/app/auth/login.tsx +246 -0
- package/src/templates/mobile/ui-auth-payments/template/app/auth/signup.tsx +362 -0
- package/src/templates/mobile/ui-auth-payments/template/app/onboarding/index.tsx +193 -0
- package/src/templates/mobile/ui-auth-payments/template/app/tour/index.tsx +272 -0
- package/src/templates/mobile/ui-auth-payments/template/app.json +93 -0
- package/src/templates/mobile/ui-auth-payments/template/babel.config.js +23 -0
- package/src/templates/mobile/ui-auth-payments/template/eas.json +45 -0
- package/src/templates/mobile/ui-auth-payments/template/expo-env.d.ts +3 -0
- package/src/templates/mobile/ui-auth-payments/template/jest-setup.ts +74 -0
- package/src/templates/mobile/ui-auth-payments/template/metro.config.js +11 -0
- package/src/templates/mobile/ui-auth-payments/template/package.json +106 -0
- package/src/templates/mobile/ui-auth-payments/template/tsconfig.json +31 -0
- package/src/templates/web/base/template/src/app/dashboard/page.tsx +62 -20
- package/src/templates/web/ui-auth/template/package.json +1 -1
- package/src/templates/web/ui-auth-payments/template/package.json +1 -1
- package/src/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +69 -17
- package/src/templates/web/ui-auth-payments-ai/template/package.json +1 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +218 -7
- package/src/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +62 -9
- package/src/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +364 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +532 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +70 -51
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +76 -60
- package/src/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +1 -1
- package/src/templates/web/ui-auth-payments-audio/template/package.json +1 -1
- package/src/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +71 -17
- package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +1 -1
- package/src/templates/web/ui-auth-payments-video/template/package.json +1 -1
package/src/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import React, { useState, useActionState } from 'react'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
Button,
|
|
6
|
+
Card,
|
|
7
|
+
Input,
|
|
8
|
+
Label,
|
|
9
|
+
SingleStepForm,
|
|
10
|
+
FormField,
|
|
11
|
+
FormProvider
|
|
12
|
+
} from '@digilogiclabs/saas-factory-ui'
|
|
5
13
|
import { useAuth } from '@digilogiclabs/saas-factory-auth'
|
|
6
14
|
import { useRouter } from 'next/navigation'
|
|
7
15
|
import { signUpAction } from '@/lib/actions/auth'
|
|
@@ -92,84 +100,92 @@ export function SignupForm() {
|
|
|
92
100
|
</div>
|
|
93
101
|
)}
|
|
94
102
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
103
|
+
{/* Enhanced form with enterprise form system */}
|
|
104
|
+
<FormProvider>
|
|
105
|
+
<SingleStepForm
|
|
106
|
+
onSubmit={async (formData) => {
|
|
107
|
+
try {
|
|
108
|
+
const result = await formAction(formData)
|
|
109
|
+
if (result?.success) {
|
|
110
|
+
const emailValue = formData.get('email') as string
|
|
111
|
+
const passwordValue = formData.get('password') as string
|
|
112
|
+
await signUp(emailValue, passwordValue)
|
|
113
|
+
router.push('/')
|
|
114
|
+
}
|
|
115
|
+
} catch (err) {
|
|
116
|
+
console.error('Sign up error:', err)
|
|
117
|
+
}
|
|
118
|
+
}}
|
|
119
|
+
className="space-y-4"
|
|
120
|
+
submitButton={{
|
|
121
|
+
text: loading ? 'Signing Up...' : 'Sign Up',
|
|
122
|
+
disabled: loading,
|
|
123
|
+
className: 'w-full'
|
|
124
|
+
}}
|
|
125
|
+
realTimeValidation={true}
|
|
126
|
+
debounceMs={300}
|
|
127
|
+
crossFieldValidation={{
|
|
128
|
+
passwordMatch: {
|
|
129
|
+
fields: ['password', 'confirmPassword'],
|
|
130
|
+
validator: (values) => values.password === values.confirmPassword,
|
|
131
|
+
message: 'Passwords must match'
|
|
132
|
+
}
|
|
133
|
+
}}
|
|
134
|
+
>
|
|
135
|
+
<FormField
|
|
100
136
|
name="name"
|
|
101
137
|
type="text"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
required
|
|
138
|
+
label="Name"
|
|
139
|
+
placeholder="Enter your full name"
|
|
140
|
+
validation={['required', 'minLength:2']}
|
|
106
141
|
disabled={loading}
|
|
142
|
+
className="mb-4"
|
|
107
143
|
/>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
)}
|
|
111
|
-
</div>
|
|
112
|
-
<div>
|
|
113
|
-
<Label htmlFor="email">Email</Label>
|
|
114
|
-
<Input
|
|
115
|
-
id="email"
|
|
144
|
+
|
|
145
|
+
<FormField
|
|
116
146
|
name="email"
|
|
117
147
|
type="email"
|
|
118
|
-
|
|
119
|
-
onChange={(e) => setEmail(e.target.value)}
|
|
148
|
+
label="Email"
|
|
120
149
|
placeholder="Enter your email"
|
|
121
|
-
required
|
|
150
|
+
validation={['required', 'email']}
|
|
122
151
|
disabled={loading}
|
|
152
|
+
className="mb-4"
|
|
123
153
|
/>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
)}
|
|
127
|
-
</div>
|
|
128
|
-
<div>
|
|
129
|
-
<Label htmlFor="password">Password</Label>
|
|
130
|
-
<Input
|
|
131
|
-
id="password"
|
|
154
|
+
|
|
155
|
+
<FormField
|
|
132
156
|
name="password"
|
|
133
157
|
type="password"
|
|
134
|
-
|
|
135
|
-
onChange={(e) => setPassword(e.target.value)}
|
|
158
|
+
label="Password"
|
|
136
159
|
placeholder="Enter your password"
|
|
137
|
-
required
|
|
160
|
+
validation={['required', 'minLength:8', 'hasUppercase', 'hasLowercase', 'hasNumber']}
|
|
138
161
|
disabled={loading}
|
|
162
|
+
className="mb-4"
|
|
163
|
+
showPasswordStrength={true}
|
|
164
|
+
helpText="Password must be at least 8 characters with uppercase, lowercase, and number"
|
|
139
165
|
/>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
)}
|
|
143
|
-
</div>
|
|
144
|
-
<div>
|
|
145
|
-
<Label htmlFor="confirmPassword">Confirm Password</Label>
|
|
146
|
-
<Input
|
|
147
|
-
id="confirmPassword"
|
|
166
|
+
|
|
167
|
+
<FormField
|
|
148
168
|
name="confirmPassword"
|
|
149
169
|
type="password"
|
|
150
|
-
|
|
151
|
-
onChange={(e) => setConfirmPassword(e.target.value)}
|
|
170
|
+
label="Confirm Password"
|
|
152
171
|
placeholder="Confirm your password"
|
|
153
|
-
required
|
|
172
|
+
validation={['required']}
|
|
154
173
|
disabled={loading}
|
|
174
|
+
className="mb-6"
|
|
155
175
|
/>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
>
|
|
170
|
-
Sign up with Google
|
|
171
|
-
</Button>
|
|
172
|
-
</form>
|
|
176
|
+
</SingleStepForm>
|
|
177
|
+
</FormProvider>
|
|
178
|
+
|
|
179
|
+
{/* Social Auth */}
|
|
180
|
+
<Button
|
|
181
|
+
type="button"
|
|
182
|
+
variant="outline"
|
|
183
|
+
className="w-full mt-4"
|
|
184
|
+
onClick={handleGoogleSignUp}
|
|
185
|
+
disabled={loading}
|
|
186
|
+
>
|
|
187
|
+
Sign up with Google
|
|
188
|
+
</Button>
|
|
173
189
|
|
|
174
190
|
<div className="mt-4 text-center">
|
|
175
191
|
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
@@ -144,7 +144,7 @@ export function Header() {
|
|
|
144
144
|
key={item.href}
|
|
145
145
|
href={item.href}
|
|
146
146
|
className="group flex items-center gap-2 text-muted-foreground hover:text-primary transition-all duration-300 relative px-3 py-2 rounded-lg hover:bg-gradient-to-r hover:from-primary/10 hover:to-secondary/10 animate-fade-in-up"
|
|
147
|
-
style={{ animationDelay:
|
|
147
|
+
style={{ animationDelay: (index * 100) + 'ms' }}
|
|
148
148
|
>
|
|
149
149
|
<item.icon className="w-4 h-4 transition-transform duration-300 group-hover:scale-110 group-hover:rotate-3" />
|
|
150
150
|
<span className="relative">
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"next": "^15.0.0",
|
|
18
18
|
"react": "^19.0.0",
|
|
19
19
|
"react-dom": "^19.0.0",
|
|
20
|
-
"@digilogiclabs/saas-factory-ui": "^0.
|
|
20
|
+
"@digilogiclabs/saas-factory-ui": "^0.21.0",
|
|
21
21
|
"@digilogiclabs/saas-factory-auth": "^1.0.1",
|
|
22
22
|
"@digilogiclabs/saas-factory-payments": "^1.1.0",
|
|
23
23
|
"stripe": "^14.0.0",
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { Suspense } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
Card,
|
|
5
|
+
DashboardLayout,
|
|
6
|
+
CommandPalette,
|
|
7
|
+
Tour
|
|
8
|
+
} from '@digilogiclabs/saas-factory-ui'
|
|
9
|
+
import {
|
|
10
|
+
User,
|
|
11
|
+
Settings,
|
|
12
|
+
CreditCard,
|
|
13
|
+
Activity,
|
|
14
|
+
Home,
|
|
15
|
+
Music,
|
|
16
|
+
Headphones,
|
|
17
|
+
Mic,
|
|
18
|
+
BarChart
|
|
19
|
+
} from 'lucide-react'
|
|
4
20
|
import { requireAuth } from '@/lib/auth-server'
|
|
5
21
|
import Link from 'next/link'
|
|
6
22
|
|
|
@@ -90,26 +106,63 @@ export default async function DashboardPage() {
|
|
|
90
106
|
// Server-side authentication requirement
|
|
91
107
|
const user = await requireAuth()
|
|
92
108
|
|
|
109
|
+
const sidebarNavigation = [
|
|
110
|
+
{ name: 'Overview', href: '/dashboard', icon: Home, current: true },
|
|
111
|
+
{ name: 'Audio Library', href: '/dashboard/library', icon: Music },
|
|
112
|
+
{ name: 'Recording Studio', href: '/dashboard/studio', icon: Mic },
|
|
113
|
+
{ name: 'Playback', href: '/dashboard/player', icon: Headphones },
|
|
114
|
+
{ name: 'Analytics', href: '/dashboard/analytics', icon: BarChart },
|
|
115
|
+
{ name: 'Settings', href: '/settings', icon: Settings },
|
|
116
|
+
{ name: 'Billing', href: '/billing', icon: CreditCard }
|
|
117
|
+
]
|
|
118
|
+
|
|
119
|
+
const tourSteps = [
|
|
120
|
+
{
|
|
121
|
+
target: '[data-tour="overview"]',
|
|
122
|
+
title: 'Audio Dashboard',
|
|
123
|
+
content: 'Welcome to your audio production dashboard. Manage your tracks and recordings here.'
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
target: '[data-tour="stats"]',
|
|
127
|
+
title: 'Audio Statistics',
|
|
128
|
+
content: 'View your audio production metrics and usage statistics.'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
target: '[data-tour="actions"]',
|
|
132
|
+
title: 'Audio Tools',
|
|
133
|
+
content: 'Quick access to recording, mixing, and audio management tools.'
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
|
|
93
137
|
return (
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
138
|
+
<DashboardLayout
|
|
139
|
+
navigation={sidebarNavigation}
|
|
140
|
+
headerActions={[
|
|
141
|
+
<CommandPalette key="command-palette" />,
|
|
142
|
+
<Tour key="tour" steps={tourSteps} />
|
|
143
|
+
]}
|
|
144
|
+
>
|
|
145
|
+
<div className="min-h-screen bg-gray-50 dark:bg-gray-900">
|
|
146
|
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
147
|
+
{/* Header */}
|
|
148
|
+
<div className="mb-8" data-tour="overview">
|
|
149
|
+
<h1 className="text-3xl font-bold text-gray-900 dark:text-white">
|
|
150
|
+
Welcome back, {user.name || user.email}!
|
|
151
|
+
</h1>
|
|
152
|
+
<p className="text-gray-600 dark:text-gray-300 mt-2">
|
|
153
|
+
Here's what's happening with your audio projects today.
|
|
154
|
+
</p>
|
|
155
|
+
</div>
|
|
105
156
|
|
|
106
157
|
{/* Stats - Streaming with Suspense */}
|
|
107
|
-
<
|
|
108
|
-
<
|
|
109
|
-
|
|
158
|
+
<div data-tour="stats">
|
|
159
|
+
<Suspense fallback={<UserStatsSkeleton />}>
|
|
160
|
+
<UserStats userId={user.id} />
|
|
161
|
+
</Suspense>
|
|
162
|
+
</div>
|
|
110
163
|
|
|
111
164
|
{/* Quick Actions */}
|
|
112
|
-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8">
|
|
165
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8" data-tour="actions">
|
|
113
166
|
<Card className="p-6">
|
|
114
167
|
<div className="flex items-center mb-4">
|
|
115
168
|
<User className="h-6 w-6 text-blue-600 dark:text-blue-400 mr-3" />
|
|
@@ -179,5 +232,6 @@ export default async function DashboardPage() {
|
|
|
179
232
|
</Card>
|
|
180
233
|
</div>
|
|
181
234
|
</div>
|
|
235
|
+
</DashboardLayout>
|
|
182
236
|
)
|
|
183
237
|
}
|
|
@@ -144,7 +144,7 @@ export function Header() {
|
|
|
144
144
|
key={item.href}
|
|
145
145
|
href={item.href}
|
|
146
146
|
className="group flex items-center gap-2 text-muted-foreground hover:text-primary transition-all duration-300 relative px-3 py-2 rounded-lg hover:bg-gradient-to-r hover:from-primary/10 hover:to-accent/10 animate-fade-in-up"
|
|
147
|
-
style={{ animationDelay:
|
|
147
|
+
style={{ animationDelay: (index * 100) + 'ms' }}
|
|
148
148
|
>
|
|
149
149
|
<item.icon className="w-4 h-4 transition-transform duration-300 group-hover:scale-110 group-hover:rotate-3" />
|
|
150
150
|
<span className="relative">
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"next": "^15.0.0",
|
|
18
18
|
"react": "^19.0.0",
|
|
19
19
|
"react-dom": "^19.0.0",
|
|
20
|
-
"@digilogiclabs/saas-factory-ui": "^0.
|
|
20
|
+
"@digilogiclabs/saas-factory-ui": "^0.21.0",
|
|
21
21
|
"@digilogiclabs/saas-factory-auth": "^1.0.1",
|
|
22
22
|
"@digilogiclabs/saas-factory-payments": "^1.1.0",
|
|
23
23
|
"stripe": "^14.0.0",
|