@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.
Files changed (84) hide show
  1. package/README.md +134 -29
  2. package/bin/index.js +1 -1
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/cli/prompts/project-setup.d.ts.map +1 -1
  5. package/dist/cli/prompts/project-setup.js +45 -12
  6. package/dist/cli/prompts/project-setup.js.map +1 -1
  7. package/dist/generators/template-generator.d.ts.map +1 -1
  8. package/dist/generators/template-generator.js +27 -4
  9. package/dist/generators/template-generator.js.map +1 -1
  10. package/dist/templates/mobile/ui-auth-payments/template/.env.example +20 -0
  11. package/dist/templates/mobile/ui-auth-payments/template/README.md +218 -0
  12. package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/_layout.tsx +153 -0
  13. package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/analytics.tsx +668 -0
  14. package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/billing.tsx +743 -0
  15. package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +676 -0
  16. package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/orders.tsx +402 -0
  17. package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/profile.tsx +580 -0
  18. package/dist/templates/mobile/ui-auth-payments/template/app/_layout.tsx +125 -0
  19. package/dist/templates/mobile/ui-auth-payments/template/app/auth/login.tsx +246 -0
  20. package/dist/templates/mobile/ui-auth-payments/template/app/auth/signup.tsx +362 -0
  21. package/dist/templates/mobile/ui-auth-payments/template/app/onboarding/index.tsx +193 -0
  22. package/dist/templates/mobile/ui-auth-payments/template/app/tour/index.tsx +272 -0
  23. package/dist/templates/mobile/ui-auth-payments/template/app.json +93 -0
  24. package/dist/templates/mobile/ui-auth-payments/template/babel.config.js +23 -0
  25. package/dist/templates/mobile/ui-auth-payments/template/eas.json +45 -0
  26. package/dist/templates/mobile/ui-auth-payments/template/expo-env.d.ts +3 -0
  27. package/dist/templates/mobile/ui-auth-payments/template/jest-setup.ts +74 -0
  28. package/dist/templates/mobile/ui-auth-payments/template/metro.config.js +11 -0
  29. package/dist/templates/mobile/ui-auth-payments/template/package.json +106 -0
  30. package/dist/templates/mobile/ui-auth-payments/template/tsconfig.json +31 -0
  31. package/dist/templates/web/base/template/src/app/dashboard/page.tsx +62 -20
  32. package/dist/templates/web/ui-auth/template/package.json +1 -1
  33. package/dist/templates/web/ui-auth-payments/template/package.json +1 -1
  34. package/dist/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +69 -17
  35. package/dist/templates/web/ui-auth-payments-ai/template/package.json +1 -1
  36. package/dist/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +218 -7
  37. package/dist/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +62 -9
  38. package/dist/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +364 -0
  39. package/dist/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +532 -0
  40. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +70 -51
  41. package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +76 -60
  42. package/dist/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +1 -1
  43. package/dist/templates/web/ui-auth-payments-audio/template/package.json +1 -1
  44. package/dist/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +71 -17
  45. package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +1 -1
  46. package/dist/templates/web/ui-auth-payments-video/template/package.json +1 -1
  47. package/package.json +1 -1
  48. package/src/templates/mobile/ui-auth-payments/template/.env.example +20 -0
  49. package/src/templates/mobile/ui-auth-payments/template/README.md +218 -0
  50. package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/_layout.tsx +153 -0
  51. package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/analytics.tsx +668 -0
  52. package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/billing.tsx +743 -0
  53. package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +676 -0
  54. package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/orders.tsx +402 -0
  55. package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/profile.tsx +580 -0
  56. package/src/templates/mobile/ui-auth-payments/template/app/_layout.tsx +125 -0
  57. package/src/templates/mobile/ui-auth-payments/template/app/auth/login.tsx +246 -0
  58. package/src/templates/mobile/ui-auth-payments/template/app/auth/signup.tsx +362 -0
  59. package/src/templates/mobile/ui-auth-payments/template/app/onboarding/index.tsx +193 -0
  60. package/src/templates/mobile/ui-auth-payments/template/app/tour/index.tsx +272 -0
  61. package/src/templates/mobile/ui-auth-payments/template/app.json +93 -0
  62. package/src/templates/mobile/ui-auth-payments/template/babel.config.js +23 -0
  63. package/src/templates/mobile/ui-auth-payments/template/eas.json +45 -0
  64. package/src/templates/mobile/ui-auth-payments/template/expo-env.d.ts +3 -0
  65. package/src/templates/mobile/ui-auth-payments/template/jest-setup.ts +74 -0
  66. package/src/templates/mobile/ui-auth-payments/template/metro.config.js +11 -0
  67. package/src/templates/mobile/ui-auth-payments/template/package.json +106 -0
  68. package/src/templates/mobile/ui-auth-payments/template/tsconfig.json +31 -0
  69. package/src/templates/web/base/template/src/app/dashboard/page.tsx +62 -20
  70. package/src/templates/web/ui-auth/template/package.json +1 -1
  71. package/src/templates/web/ui-auth-payments/template/package.json +1 -1
  72. package/src/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +69 -17
  73. package/src/templates/web/ui-auth-payments-ai/template/package.json +1 -1
  74. package/src/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +218 -7
  75. package/src/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +62 -9
  76. package/src/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +364 -0
  77. package/src/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +532 -0
  78. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +70 -51
  79. package/src/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +76 -60
  80. package/src/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +1 -1
  81. package/src/templates/web/ui-auth-payments-audio/template/package.json +1 -1
  82. package/src/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +71 -17
  83. package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +1 -1
  84. package/src/templates/web/ui-auth-payments-video/template/package.json +1 -1
@@ -1,7 +1,15 @@
1
1
  'use client'
2
2
 
3
3
  import React, { useState, useActionState } from 'react'
4
- import { Button, Card, Input, Label } from '@digilogiclabs/saas-factory-ui'
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
- <form action={handleServerAction} className="space-y-4">
96
- <div>
97
- <Label htmlFor="name">Name</Label>
98
- <Input
99
- id="name"
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
- value={name}
103
- onChange={(e) => setName(e.target.value)}
104
- placeholder="Enter your name"
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
- {actionState?.fieldErrors?.name && (
109
- <p className="text-sm text-red-600 mt-1">{actionState.fieldErrors.name[0]}</p>
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
- value={email}
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
- {actionState?.fieldErrors?.email && (
125
- <p className="text-sm text-red-600 mt-1">{actionState.fieldErrors.email[0]}</p>
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
- value={password}
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
- {actionState?.fieldErrors?.password && (
141
- <p className="text-sm text-red-600 mt-1">{actionState.fieldErrors.password[0]}</p>
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
- value={confirmPassword}
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
- {actionState?.fieldErrors?.confirmPassword && (
157
- <p className="text-sm text-red-600 mt-1">{actionState.fieldErrors.confirmPassword[0]}</p>
158
- )}
159
- </div>
160
- <Button type="submit" className="w-full" disabled={loading}>
161
- {loading ? 'Signing Up...' : 'Sign Up'}
162
- </Button>
163
- <Button
164
- type="button"
165
- variant="outline"
166
- className="w-full"
167
- onClick={handleGoogleSignUp}
168
- disabled={loading}
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: `${index * 100}ms` }}
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.18.4",
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 { Button, Card } from '@digilogiclabs/saas-factory-ui'
3
- import { User, Settings, CreditCard, Activity } from 'lucide-react'
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
- <div className="min-h-screen bg-gray-50 dark:bg-gray-900">
95
- <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
96
- {/* Header */}
97
- <div className="mb-8">
98
- <h1 className="text-3xl font-bold text-gray-900 dark:text-white">
99
- Welcome back, {user.name || user.email}!
100
- </h1>
101
- <p className="text-gray-600 dark:text-gray-300 mt-2">
102
- Here's what's happening with your account today.
103
- </p>
104
- </div>
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
- <Suspense fallback={<UserStatsSkeleton />}>
108
- <UserStats userId={user.id} />
109
- </Suspense>
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: `${index * 100}ms` }}
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.18.4",
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",