@digilogiclabs/create-saas-app 1.17.0 → 1.17.1
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/CHANGELOG.md +31 -0
- package/README.md +153 -12
- package/dist/.tsbuildinfo +1 -1
- package/dist/cli/prompts/project-setup.d.ts.map +1 -1
- package/dist/cli/prompts/project-setup.js +4 -0
- package/dist/cli/prompts/project-setup.js.map +1 -1
- package/dist/templates/mobile/base/template/App.tsx +2 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +85 -4
- package/dist/templates/mobile/ui-auth-payments/template/app/_layout.tsx +2 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/.env.example +23 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/README.md +254 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/_layout.tsx +169 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/ai.tsx +522 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/analytics.tsx +668 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/billing.tsx +743 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/index.tsx +676 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/orders.tsx +402 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/profile.tsx +580 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/_layout.tsx +127 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/auth/login.tsx +246 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/auth/signup.tsx +362 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/onboarding/index.tsx +193 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/tour/index.tsx +272 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app.json +93 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/babel.config.js +23 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/eas.json +45 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/expo-env.d.ts +3 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/jest-setup.ts +74 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/metro.config.js +11 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/package.json +108 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/tsconfig.json +31 -0
- package/dist/templates/web/base/template/src/app/loading.tsx +45 -27
- package/dist/templates/web/base/template/src/components/providers/app-providers.tsx +2 -0
- package/dist/templates/web/ui-auth/template/src/app/loading.tsx +30 -12
- package/dist/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +2 -0
- package/dist/templates/web/ui-auth/template/src/components/shared/header.tsx +43 -2
- package/dist/templates/web/ui-auth-ai/template/package.json +1 -1
- package/dist/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx +2 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +2 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +2 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +2 -0
- package/package.json +1 -1
- package/src/templates/mobile/base/template/App.tsx +2 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +85 -4
- package/src/templates/mobile/ui-auth-payments/template/app/_layout.tsx +2 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/.env.example +23 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/README.md +254 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/_layout.tsx +169 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/ai.tsx +522 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/analytics.tsx +668 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/billing.tsx +743 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/index.tsx +676 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/orders.tsx +402 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/profile.tsx +580 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/_layout.tsx +127 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/auth/login.tsx +246 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/auth/signup.tsx +362 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/onboarding/index.tsx +193 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/tour/index.tsx +272 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app.json +93 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/babel.config.js +23 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/eas.json +45 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/expo-env.d.ts +3 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/jest-setup.ts +74 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/metro.config.js +11 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/package.json +108 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/tsconfig.json +31 -0
- package/src/templates/web/base/template/src/app/loading.tsx +45 -27
- package/src/templates/web/base/template/src/components/providers/app-providers.tsx +2 -0
- package/src/templates/web/ui-auth/template/src/app/loading.tsx +30 -12
- package/src/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +2 -0
- package/src/templates/web/ui-auth/template/src/components/shared/header.tsx +43 -2
- package/src/templates/web/ui-auth-ai/template/package.json +1 -1
- package/src/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx +2 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +2 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +2 -0
- package/src/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +2 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const { getDefaultConfig } = require('expo/metro-config');
|
|
2
|
+
|
|
3
|
+
/** @type {import('expo/metro-config').MetroConfig} */
|
|
4
|
+
const config = getDefaultConfig(__dirname);
|
|
5
|
+
|
|
6
|
+
// Add SVG support
|
|
7
|
+
config.transformer.babelTransformerPath = require.resolve('react-native-svg-transformer');
|
|
8
|
+
config.resolver.assetExts = config.resolver.assetExts.filter((ext) => ext !== 'svg');
|
|
9
|
+
config.resolver.sourceExts = [...config.resolver.sourceExts, 'svg'];
|
|
10
|
+
|
|
11
|
+
module.exports = config;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{packageName}}",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "{{description}} - Mobile AI App with UI, Auth, Payments, and AI Generation",
|
|
5
|
+
"main": "node_modules/expo/AppEntry.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "expo start",
|
|
8
|
+
"dev": "expo start --dev-client",
|
|
9
|
+
"android": "expo start --android",
|
|
10
|
+
"ios": "expo start --ios",
|
|
11
|
+
"web": "expo start --web",
|
|
12
|
+
"build": "eas build",
|
|
13
|
+
"build:android": "eas build --platform android",
|
|
14
|
+
"build:ios": "eas build --platform ios",
|
|
15
|
+
"preview": "eas build --profile preview",
|
|
16
|
+
"submit": "eas submit",
|
|
17
|
+
"test": "jest",
|
|
18
|
+
"lint": "expo lint",
|
|
19
|
+
"type-check": "tsc --noEmit"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"expo": "~50.0.0",
|
|
23
|
+
"react": "18.2.0",
|
|
24
|
+
"react-native": "0.73.4",
|
|
25
|
+
|
|
26
|
+
"@expo/vector-icons": "^14.0.0",
|
|
27
|
+
"@expo/config-plugins": "~7.8.0",
|
|
28
|
+
|
|
29
|
+
"@react-navigation/native": "^6.1.9",
|
|
30
|
+
"@react-navigation/stack": "^6.3.20",
|
|
31
|
+
"@react-navigation/bottom-tabs": "^6.5.11",
|
|
32
|
+
"@react-navigation/drawer": "^6.6.6",
|
|
33
|
+
"react-native-screens": "~3.29.0",
|
|
34
|
+
"react-native-safe-area-context": "4.8.2",
|
|
35
|
+
"react-native-gesture-handler": "~2.14.0",
|
|
36
|
+
"react-native-reanimated": "~3.6.2",
|
|
37
|
+
|
|
38
|
+
"@digilogiclabs/saas-factory-ui": "^0.22.0",
|
|
39
|
+
"@digilogiclabs/saas-factory-auth": "^1.0.1",
|
|
40
|
+
"@digilogiclabs/saas-factory-payments": "^1.1.0",
|
|
41
|
+
"@digilogiclabs/saas-factory-ai": "^3.0.0",
|
|
42
|
+
"@digilogiclabs/saas-factory-ai-types": "^3.0.0",
|
|
43
|
+
|
|
44
|
+
"@supabase/supabase-js": "^2.39.0",
|
|
45
|
+
"@react-native-async-storage/async-storage": "1.21.0",
|
|
46
|
+
|
|
47
|
+
"@stripe/stripe-react-native": "0.37.2",
|
|
48
|
+
|
|
49
|
+
"expo-router": "~3.4.0",
|
|
50
|
+
"expo-font": "~11.10.0",
|
|
51
|
+
"expo-linking": "~6.2.2",
|
|
52
|
+
"expo-constants": "~15.4.0",
|
|
53
|
+
"expo-status-bar": "~1.11.1",
|
|
54
|
+
"expo-splash-screen": "~0.26.4",
|
|
55
|
+
"expo-system-ui": "~2.9.3",
|
|
56
|
+
"expo-web-browser": "~12.8.2",
|
|
57
|
+
"expo-haptics": "~12.8.1",
|
|
58
|
+
"expo-device": "~5.9.3",
|
|
59
|
+
"expo-location": "~16.5.3",
|
|
60
|
+
"expo-image-picker": "~14.7.1",
|
|
61
|
+
"expo-camera": "~14.1.3",
|
|
62
|
+
"expo-barcode-scanner": "~12.9.3",
|
|
63
|
+
"expo-notifications": "~0.27.6",
|
|
64
|
+
"expo-secure-store": "~12.8.1",
|
|
65
|
+
"expo-file-system": "~16.0.6",
|
|
66
|
+
"expo-updates": "~0.24.11",
|
|
67
|
+
"expo-linear-gradient": "~12.7.2",
|
|
68
|
+
"expo-blur": "~12.9.2",
|
|
69
|
+
|
|
70
|
+
"@react-native-community/netinfo": "11.2.1",
|
|
71
|
+
"react-native-mmkv": "^2.12.2",
|
|
72
|
+
"react-native-svg": "14.1.0",
|
|
73
|
+
"react-native-url-polyfill": "^2.0.0",
|
|
74
|
+
|
|
75
|
+
"zustand": "^4.4.7",
|
|
76
|
+
"react-hook-form": "^7.48.2",
|
|
77
|
+
"@hookform/resolvers": "^3.3.2",
|
|
78
|
+
"zod": "^3.22.4",
|
|
79
|
+
"date-fns": "^3.0.6",
|
|
80
|
+
"react-native-heroicons": "^4.0.0"
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@babel/core": "^7.23.6",
|
|
84
|
+
"@types/react": "~18.2.45",
|
|
85
|
+
"@types/react-native": "~0.73.0",
|
|
86
|
+
"typescript": "~5.3.3",
|
|
87
|
+
"jest": "^29.7.0",
|
|
88
|
+
"@testing-library/react-native": "^12.4.2",
|
|
89
|
+
"@testing-library/jest-native": "^5.4.3",
|
|
90
|
+
"babel-plugin-module-resolver": "^5.0.0",
|
|
91
|
+
"eslint": "^8.57.0",
|
|
92
|
+
"eslint-config-expo": "^7.0.0",
|
|
93
|
+
"prettier": "^3.1.1"
|
|
94
|
+
},
|
|
95
|
+
"jest": {
|
|
96
|
+
"preset": "jest-expo",
|
|
97
|
+
"setupFilesAfterEnv": ["<rootDir>/jest-setup.ts"],
|
|
98
|
+
"transformIgnorePatterns": [
|
|
99
|
+
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"private": true,
|
|
103
|
+
"expo": {
|
|
104
|
+
"install": {
|
|
105
|
+
"exclude": ["react-native-safe-area-context"]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "expo/tsconfig.base",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"strict": true,
|
|
5
|
+
"baseUrl": "./",
|
|
6
|
+
"paths": {
|
|
7
|
+
"@/*": ["./*"],
|
|
8
|
+
"@/components/*": ["./components/*"],
|
|
9
|
+
"@/hooks/*": ["./hooks/*"],
|
|
10
|
+
"@/utils/*": ["./utils/*"],
|
|
11
|
+
"@/types/*": ["./types/*"],
|
|
12
|
+
"@/constants/*": ["./constants/*"]
|
|
13
|
+
},
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"allowSyntheticDefaultImports": true,
|
|
16
|
+
"esModuleInterop": true,
|
|
17
|
+
"moduleResolution": "node",
|
|
18
|
+
"resolveJsonModule": true,
|
|
19
|
+
"noEmit": true,
|
|
20
|
+
"jsx": "react-jsx"
|
|
21
|
+
},
|
|
22
|
+
"include": [
|
|
23
|
+
"**/*.ts",
|
|
24
|
+
"**/*.tsx",
|
|
25
|
+
".expo/types/**/*.ts",
|
|
26
|
+
"expo-env.d.ts"
|
|
27
|
+
],
|
|
28
|
+
"exclude": [
|
|
29
|
+
"node_modules"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -1,34 +1,52 @@
|
|
|
1
|
-
import { Card } from '@digilogiclabs/saas-factory-ui'
|
|
1
|
+
import { Card, SkeletonCard, SkeletonText } from '@digilogiclabs/saas-factory-ui'
|
|
2
2
|
|
|
3
3
|
export default function Loading() {
|
|
4
4
|
return (
|
|
5
|
-
<div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
<div className="absolute top-0 left-0 w-12 h-12 border-4 border-blue-600 border-t-transparent rounded-full animate-spin"></div>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
{/* Loading text */}
|
|
15
|
-
<div className="text-center">
|
|
16
|
-
<h2 className="text-lg font-semibold text-gray-900 dark:text-white mb-2">
|
|
17
|
-
Loading...
|
|
18
|
-
</h2>
|
|
19
|
-
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
20
|
-
Please wait while we prepare your content
|
|
21
|
-
</p>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
{/* Pulsing dots */}
|
|
25
|
-
<div className="flex space-x-1">
|
|
26
|
-
<div className="w-2 h-2 bg-blue-600 rounded-full animate-pulse"></div>
|
|
27
|
-
<div className="w-2 h-2 bg-blue-600 rounded-full animate-pulse" style={{ animationDelay: '0.2s' }}></div>
|
|
28
|
-
<div className="w-2 h-2 bg-blue-600 rounded-full animate-pulse" style={{ animationDelay: '0.4s' }}></div>
|
|
29
|
-
</div>
|
|
5
|
+
<div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
|
|
6
|
+
<div className="container mx-auto px-4 py-8">
|
|
7
|
+
{/* Header skeleton */}
|
|
8
|
+
<div className="mb-8">
|
|
9
|
+
<SkeletonText className="h-8 w-64 mb-4" />
|
|
10
|
+
<SkeletonText className="h-4 w-96" />
|
|
30
11
|
</div>
|
|
31
|
-
|
|
12
|
+
|
|
13
|
+
{/* Cards grid skeleton */}
|
|
14
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8">
|
|
15
|
+
{Array.from({ length: 6 }).map((_, i) => (
|
|
16
|
+
<SkeletonCard key={i} />
|
|
17
|
+
))}
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
{/* Centered loading spinner */}
|
|
21
|
+
<div className="flex justify-center">
|
|
22
|
+
<Card className="p-8 max-w-sm w-full mx-4">
|
|
23
|
+
<div className="flex flex-col items-center space-y-4">
|
|
24
|
+
{/* Animated spinner */}
|
|
25
|
+
<div className="relative">
|
|
26
|
+
<div className="w-12 h-12 border-4 border-gray-200 dark:border-gray-700 rounded-full animate-spin"></div>
|
|
27
|
+
<div className="absolute top-0 left-0 w-12 h-12 border-4 border-blue-600 border-t-transparent rounded-full animate-spin"></div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
{/* Loading text */}
|
|
31
|
+
<div className="text-center">
|
|
32
|
+
<h2 className="text-lg font-semibold text-gray-900 dark:text-white mb-2">
|
|
33
|
+
Loading...
|
|
34
|
+
</h2>
|
|
35
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
36
|
+
Please wait while we prepare your content
|
|
37
|
+
</p>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
{/* Pulsing dots */}
|
|
41
|
+
<div className="flex space-x-1">
|
|
42
|
+
<div className="w-2 h-2 bg-blue-600 rounded-full animate-pulse"></div>
|
|
43
|
+
<div className="w-2 h-2 bg-blue-600 rounded-full animate-pulse" style={{ animationDelay: '0.2s' }}></div>
|
|
44
|
+
<div className="w-2 h-2 bg-blue-600 rounded-full animate-pulse" style={{ animationDelay: '0.4s' }}></div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</Card>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
32
50
|
</div>
|
|
33
51
|
)
|
|
34
52
|
}
|
|
@@ -4,6 +4,7 @@ import React from 'react'
|
|
|
4
4
|
import { AuthProvider } from '@digilogiclabs/saas-factory-auth'
|
|
5
5
|
import { ThemeProvider } from 'next-themes'
|
|
6
6
|
import { StripeProvider } from '@digilogiclabs/saas-factory-payments'
|
|
7
|
+
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
7
8
|
import { AppThemeProvider } from './theme-provider'
|
|
8
9
|
|
|
9
10
|
interface AppProvidersProps {
|
|
@@ -25,6 +26,7 @@ export function AppProviders({ children }: AppProvidersProps) {
|
|
|
25
26
|
>
|
|
26
27
|
<AppThemeProvider themeColor="{{themeColor}}">
|
|
27
28
|
{children}
|
|
29
|
+
<Toaster />
|
|
28
30
|
</AppThemeProvider>
|
|
29
31
|
</ThemeProvider>
|
|
30
32
|
</StripeProvider>
|
|
@@ -1,20 +1,38 @@
|
|
|
1
|
-
import { Card } from '@digilogiclabs/saas-factory-ui'
|
|
1
|
+
import { Card, SkeletonCard, SkeletonText } from '@digilogiclabs/saas-factory-ui'
|
|
2
2
|
import { Loader2 } from 'lucide-react'
|
|
3
3
|
|
|
4
4
|
export default function Loading() {
|
|
5
5
|
return (
|
|
6
|
-
<div className="min-h-screen bg-gray-50 dark:bg-gray-900
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
</h2>
|
|
13
|
-
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
14
|
-
Please wait while we load your content...
|
|
15
|
-
</p>
|
|
6
|
+
<div className="min-h-screen bg-gray-50 dark:bg-gray-900">
|
|
7
|
+
<div className="container mx-auto px-4 py-8">
|
|
8
|
+
{/* Header skeleton */}
|
|
9
|
+
<div className="mb-8">
|
|
10
|
+
<SkeletonText className="h-8 w-64 mb-4" />
|
|
11
|
+
<SkeletonText className="h-4 w-96" />
|
|
16
12
|
</div>
|
|
17
|
-
|
|
13
|
+
|
|
14
|
+
{/* Cards grid skeleton */}
|
|
15
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8">
|
|
16
|
+
{Array.from({ length: 6 }).map((_, i) => (
|
|
17
|
+
<SkeletonCard key={i} />
|
|
18
|
+
))}
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
{/* Centered loading spinner */}
|
|
22
|
+
<div className="flex justify-center">
|
|
23
|
+
<Card className="w-full max-w-md p-8 text-center">
|
|
24
|
+
<div className="flex flex-col items-center">
|
|
25
|
+
<Loader2 className="h-8 w-8 animate-spin text-blue-600 dark:text-blue-400 mb-4" />
|
|
26
|
+
<h2 className="text-lg font-medium text-gray-900 dark:text-white mb-2">
|
|
27
|
+
Loading
|
|
28
|
+
</h2>
|
|
29
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
30
|
+
Please wait while we load your content...
|
|
31
|
+
</p>
|
|
32
|
+
</div>
|
|
33
|
+
</Card>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
18
36
|
</div>
|
|
19
37
|
)
|
|
20
38
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { ThemeProvider } from 'next-themes'
|
|
5
5
|
import { AuthProvider } from '@digilogiclabs/saas-factory-auth'
|
|
6
|
+
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
6
7
|
import { AppThemeProvider } from './theme-provider'
|
|
7
8
|
|
|
8
9
|
interface AppProvidersProps {
|
|
@@ -21,6 +22,7 @@ export function AppProviders({ children }: AppProvidersProps) {
|
|
|
21
22
|
<AuthProvider>
|
|
22
23
|
<AppThemeProvider themeColor="{{themeColor}}">
|
|
23
24
|
{children}
|
|
25
|
+
<Toaster />
|
|
24
26
|
</AppThemeProvider>
|
|
25
27
|
</AuthProvider>
|
|
26
28
|
</ThemeProvider>
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
4
|
import Link from 'next/link';
|
|
5
|
-
import { LogOut } from 'lucide-react';
|
|
5
|
+
import { LogOut, Search, Command } from 'lucide-react';
|
|
6
|
+
import { SearchBar, CommandPalette, useToast } from '@digilogiclabs/saas-factory-ui';
|
|
6
7
|
import { ThemeToggle } from '../ui/theme-toggle';
|
|
7
8
|
|
|
8
9
|
export function Header() {
|
|
9
10
|
const user = null; // Placeholder for auth state
|
|
11
|
+
const [showSearch, setShowSearch] = useState(false);
|
|
12
|
+
const { toast } = useToast();
|
|
10
13
|
|
|
11
14
|
const handleSignOut = () => {
|
|
12
15
|
alert('Sign out functionality requires @digilogiclabs/saas-factory-auth package');
|
|
13
16
|
};
|
|
14
17
|
|
|
18
|
+
const handleSearch = (query: string) => {
|
|
19
|
+
toast({
|
|
20
|
+
title: "Search",
|
|
21
|
+
description: `Searching for: ${query}`,
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
15
25
|
return (
|
|
16
26
|
<header className="bg-white dark:bg-gray-800 shadow-md">
|
|
17
27
|
<div className="container mx-auto px-4 py-4 flex justify-between items-center">
|
|
@@ -19,6 +29,25 @@ export function Header() {
|
|
|
19
29
|
{{titleCaseName}}
|
|
20
30
|
</Link>
|
|
21
31
|
<nav className="flex items-center gap-4">
|
|
32
|
+
{/* Search Bar */}
|
|
33
|
+
<div className="hidden md:block">
|
|
34
|
+
<SearchBar
|
|
35
|
+
placeholder="Search..."
|
|
36
|
+
onSearch={handleSearch}
|
|
37
|
+
debounceMs={300}
|
|
38
|
+
className="w-64"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
{/* Mobile search toggle */}
|
|
43
|
+
<button
|
|
44
|
+
onClick={() => setShowSearch(!showSearch)}
|
|
45
|
+
className="md:hidden p-2 text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white"
|
|
46
|
+
>
|
|
47
|
+
<Search className="h-5 w-5" />
|
|
48
|
+
</button>
|
|
49
|
+
|
|
50
|
+
<CommandPalette />
|
|
22
51
|
<ThemeToggle />
|
|
23
52
|
{user ? (
|
|
24
53
|
<>
|
|
@@ -46,6 +75,18 @@ export function Header() {
|
|
|
46
75
|
</>
|
|
47
76
|
)}
|
|
48
77
|
</nav>
|
|
78
|
+
|
|
79
|
+
{/* Mobile search bar */}
|
|
80
|
+
{showSearch && (
|
|
81
|
+
<div className="md:hidden absolute top-full left-0 right-0 p-4 bg-white dark:bg-gray-800 border-t">
|
|
82
|
+
<SearchBar
|
|
83
|
+
placeholder="Search..."
|
|
84
|
+
onSearch={handleSearch}
|
|
85
|
+
debounceMs={300}
|
|
86
|
+
autoFocus
|
|
87
|
+
/>
|
|
88
|
+
</div>
|
|
89
|
+
)}
|
|
49
90
|
</div>
|
|
50
91
|
</header>
|
|
51
92
|
);
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"clsx": "^2.0.0",
|
|
20
20
|
"tailwindcss": "^3.3.0",
|
|
21
21
|
"autoprefixer": "^10.4.16",
|
|
22
|
-
"postcss": "^8.4.31"{{#ai.enabled}}
|
|
22
|
+
"postcss": "^8.4.31",{{#ai.enabled}}
|
|
23
23
|
"@digilogiclabs/saas-factory-ai": "^3.0.0",
|
|
24
24
|
"@digilogiclabs/saas-factory-ai-types": "^3.0.0"{{/ai.enabled}}
|
|
25
25
|
},
|
package/dist/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import React from 'react'
|
|
|
4
4
|
import { ThemeProvider } from 'next-themes'
|
|
5
5
|
import { AuthProvider } from '@digilogiclabs/saas-factory-auth'
|
|
6
6
|
import { PaymentsProvider } from '@digilogiclabs/saas-factory-payments'
|
|
7
|
+
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
7
8
|
import { AppThemeProvider } from './theme-provider'
|
|
8
9
|
|
|
9
10
|
interface AppProvidersProps {
|
|
@@ -23,6 +24,7 @@ export function AppProviders({ children }: AppProvidersProps) {
|
|
|
23
24
|
<PaymentsProvider>
|
|
24
25
|
<AppThemeProvider themeColor="{{themeColor}}">
|
|
25
26
|
{children}
|
|
27
|
+
<Toaster />
|
|
26
28
|
</AppThemeProvider>
|
|
27
29
|
</PaymentsProvider>
|
|
28
30
|
</AuthProvider>
|
package/dist/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import React from 'react'
|
|
|
4
4
|
import { ThemeProvider } from 'next-themes'
|
|
5
5
|
import { AuthProvider } from '@digilogiclabs/saas-factory-auth'
|
|
6
6
|
import { PaymentsProvider } from '@digilogiclabs/saas-factory-payments'
|
|
7
|
+
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
7
8
|
import { AppThemeProvider } from './theme-provider'
|
|
8
9
|
|
|
9
10
|
interface AppProvidersProps {
|
|
@@ -27,6 +28,7 @@ export function AppProviders({ children }: AppProvidersProps) {
|
|
|
27
28
|
<PaymentsProvider>
|
|
28
29
|
<AppThemeProvider themeColor={themeColor}>
|
|
29
30
|
{children}
|
|
31
|
+
<Toaster />
|
|
30
32
|
</AppThemeProvider>
|
|
31
33
|
</PaymentsProvider>
|
|
32
34
|
</AuthProvider>
|
|
@@ -4,6 +4,7 @@ import React from 'react'
|
|
|
4
4
|
import { ThemeProvider } from 'next-themes'
|
|
5
5
|
import { AuthProvider } from '@digilogiclabs/saas-factory-auth'
|
|
6
6
|
import { PaymentsProvider } from '@digilogiclabs/saas-factory-payments'
|
|
7
|
+
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
7
8
|
import { AppThemeProvider } from './theme-provider'
|
|
8
9
|
|
|
9
10
|
interface AppProvidersProps {
|
|
@@ -27,6 +28,7 @@ export function AppProviders({ children }: AppProvidersProps) {
|
|
|
27
28
|
<PaymentsProvider>
|
|
28
29
|
<AppThemeProvider themeColor={themeColor}>
|
|
29
30
|
{children}
|
|
31
|
+
<Toaster />
|
|
30
32
|
</AppThemeProvider>
|
|
31
33
|
</PaymentsProvider>
|
|
32
34
|
</AuthProvider>
|
|
@@ -4,6 +4,7 @@ import React from 'react'
|
|
|
4
4
|
import { ThemeProvider } from 'next-themes'
|
|
5
5
|
import { AuthProvider } from '@digilogiclabs/saas-factory-auth'
|
|
6
6
|
import { PaymentsProvider } from '@digilogiclabs/saas-factory-payments'
|
|
7
|
+
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
7
8
|
import { AppThemeProvider } from './theme-provider'
|
|
8
9
|
|
|
9
10
|
interface AppProvidersProps {
|
|
@@ -23,6 +24,7 @@ export function AppProviders({ children }: AppProvidersProps) {
|
|
|
23
24
|
<PaymentsProvider>
|
|
24
25
|
<AppThemeProvider themeColor="{{themeColor}}">
|
|
25
26
|
{children}
|
|
27
|
+
<Toaster />
|
|
26
28
|
</AppThemeProvider>
|
|
27
29
|
</PaymentsProvider>
|
|
28
30
|
</AuthProvider>
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
NativeMobileContainer as MobileContainer,
|
|
12
12
|
NativeNetworkAwareContent as NetworkAwareContent,
|
|
13
13
|
NativeOfflineWrapper as OfflineWrapper,
|
|
14
|
+
NativeToast as Toast,
|
|
14
15
|
useNetworkInfo,
|
|
15
16
|
useOfflineState
|
|
16
17
|
} from '@digilogiclabs/saas-factory-ui/native';
|
|
@@ -89,6 +90,7 @@ function AppContent() {
|
|
|
89
90
|
</NetworkAwareContent>
|
|
90
91
|
</MobileContainer>
|
|
91
92
|
</OfflineWrapper>
|
|
93
|
+
<Toast />
|
|
92
94
|
<StatusBar style="auto" />
|
|
93
95
|
</PageTransition>
|
|
94
96
|
);
|
|
@@ -13,6 +13,8 @@ import {
|
|
|
13
13
|
NativeProgressRing as ProgressRing,
|
|
14
14
|
NativeChart as Chart,
|
|
15
15
|
NativeStatCard as StatCard,
|
|
16
|
+
NativeSkeletonCard as SkeletonCard,
|
|
17
|
+
NativeSkeletonText as SkeletonText,
|
|
16
18
|
PageTransition,
|
|
17
19
|
NetworkAwareContent,
|
|
18
20
|
NativeMobileHero as MobileHero,
|
|
@@ -188,11 +190,59 @@ export default function HomeScreen() {
|
|
|
188
190
|
|
|
189
191
|
if (loading && !data) {
|
|
190
192
|
return (
|
|
191
|
-
<
|
|
192
|
-
<View style={styles.
|
|
193
|
-
<
|
|
193
|
+
<PageTransition type="fade">
|
|
194
|
+
<View style={styles.container}>
|
|
195
|
+
<LinearGradient
|
|
196
|
+
colors={
|
|
197
|
+
isDark
|
|
198
|
+
? ['#0F172A', '#1E293B', '#334155']
|
|
199
|
+
: ['#F8FAFC', '#E2E8F0', '#CBD5E1']
|
|
200
|
+
}
|
|
201
|
+
style={styles.gradientBackground}
|
|
202
|
+
/>
|
|
203
|
+
|
|
204
|
+
<ScrollView style={styles.scrollView} contentContainerStyle={styles.scrollContent}>
|
|
205
|
+
<MobileContainer style={styles.content}>
|
|
206
|
+
{/* Hero skeleton */}
|
|
207
|
+
<View style={styles.heroSkeleton}>
|
|
208
|
+
<SkeletonText style={{ width: '60%', height: 24, marginBottom: 16 }} />
|
|
209
|
+
<SkeletonText style={{ width: '80%', height: 16, marginBottom: 24 }} />
|
|
210
|
+
<View style={styles.buttonSkeletonRow}>
|
|
211
|
+
<SkeletonCard style={styles.buttonSkeleton} />
|
|
212
|
+
<SkeletonCard style={styles.buttonSkeleton} />
|
|
213
|
+
</View>
|
|
214
|
+
</View>
|
|
215
|
+
|
|
216
|
+
{/* Stats skeleton */}
|
|
217
|
+
<View style={styles.statsGrid}>
|
|
218
|
+
{Array.from({ length: 4 }).map((_, i) => (
|
|
219
|
+
<SkeletonCard key={i} style={styles.statCard} />
|
|
220
|
+
))}
|
|
221
|
+
</View>
|
|
222
|
+
|
|
223
|
+
{/* Chart skeleton */}
|
|
224
|
+
<SkeletonCard style={styles.chartCard} />
|
|
225
|
+
|
|
226
|
+
{/* Actions skeleton */}
|
|
227
|
+
<SkeletonCard style={styles.actionsCard} />
|
|
228
|
+
|
|
229
|
+
{/* Activity skeleton */}
|
|
230
|
+
<View style={styles.activitySkeleton}>
|
|
231
|
+
<SkeletonCard style={styles.activityCard} />
|
|
232
|
+
{Array.from({ length: 3 }).map((_, i) => (
|
|
233
|
+
<View key={i} style={styles.activityItemSkeleton}>
|
|
234
|
+
<SkeletonCard style={styles.activityIconSkeleton} />
|
|
235
|
+
<View style={styles.activityContentSkeleton}>
|
|
236
|
+
<SkeletonText style={{ width: '70%', height: 14, marginBottom: 4 }} />
|
|
237
|
+
<SkeletonText style={{ width: '40%', height: 12 }} />
|
|
238
|
+
</View>
|
|
239
|
+
</View>
|
|
240
|
+
))}
|
|
241
|
+
</View>
|
|
242
|
+
</MobileContainer>
|
|
243
|
+
</ScrollView>
|
|
194
244
|
</View>
|
|
195
|
-
</
|
|
245
|
+
</PageTransition>
|
|
196
246
|
);
|
|
197
247
|
}
|
|
198
248
|
|
|
@@ -673,4 +723,35 @@ const styles = StyleSheet.create({
|
|
|
673
723
|
color: '#64748b',
|
|
674
724
|
marginTop: 2,
|
|
675
725
|
},
|
|
726
|
+
// Skeleton styles
|
|
727
|
+
heroSkeleton: {
|
|
728
|
+
marginBottom: 32,
|
|
729
|
+
paddingHorizontal: 20,
|
|
730
|
+
},
|
|
731
|
+
buttonSkeletonRow: {
|
|
732
|
+
flexDirection: 'row',
|
|
733
|
+
gap: 12,
|
|
734
|
+
},
|
|
735
|
+
buttonSkeleton: {
|
|
736
|
+
flex: 1,
|
|
737
|
+
height: 44,
|
|
738
|
+
borderRadius: 22,
|
|
739
|
+
},
|
|
740
|
+
activitySkeleton: {
|
|
741
|
+
padding: 16,
|
|
742
|
+
},
|
|
743
|
+
activityItemSkeleton: {
|
|
744
|
+
flexDirection: 'row',
|
|
745
|
+
alignItems: 'center',
|
|
746
|
+
gap: 12,
|
|
747
|
+
marginBottom: 16,
|
|
748
|
+
},
|
|
749
|
+
activityIconSkeleton: {
|
|
750
|
+
width: 32,
|
|
751
|
+
height: 32,
|
|
752
|
+
borderRadius: 16,
|
|
753
|
+
},
|
|
754
|
+
activityContentSkeleton: {
|
|
755
|
+
flex: 1,
|
|
756
|
+
},
|
|
676
757
|
});
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
OfflineWrapper,
|
|
13
13
|
NetworkAwareContent,
|
|
14
14
|
NativeHapticsProvider as HapticsProvider,
|
|
15
|
+
NativeToast as Toast,
|
|
15
16
|
AppShell
|
|
16
17
|
} from '@digilogiclabs/saas-factory-ui/native';
|
|
17
18
|
|
|
@@ -112,6 +113,7 @@ export default function RootLayout() {
|
|
|
112
113
|
/>
|
|
113
114
|
</Stack>
|
|
114
115
|
</AppShell>
|
|
116
|
+
<Toast />
|
|
115
117
|
<StatusBar style="auto" />
|
|
116
118
|
</StripeProvider>
|
|
117
119
|
</AuthProvider>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Supabase Configuration
|
|
2
|
+
EXPO_PUBLIC_SUPABASE_URL=your_supabase_project_url
|
|
3
|
+
EXPO_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
|
|
4
|
+
|
|
5
|
+
# Stripe Configuration
|
|
6
|
+
EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
|
|
7
|
+
|
|
8
|
+
# AI Configuration - OpenAI
|
|
9
|
+
EXPO_PUBLIC_OPENAI_API_KEY=your_openai_api_key
|
|
10
|
+
|
|
11
|
+
# AI Configuration - ElevenLabs (for audio generation)
|
|
12
|
+
EXPO_PUBLIC_ELEVENLABS_API_KEY=your_elevenlabs_api_key
|
|
13
|
+
|
|
14
|
+
# AI Configuration - Replicate (for video/image generation)
|
|
15
|
+
EXPO_PUBLIC_REPLICATE_API_TOKEN=your_replicate_api_token
|
|
16
|
+
|
|
17
|
+
# Optional: Custom AI model configurations
|
|
18
|
+
EXPO_PUBLIC_AI_MODEL_TEXT=gpt-4
|
|
19
|
+
EXPO_PUBLIC_AI_MODEL_AUDIO=tts-1
|
|
20
|
+
EXPO_PUBLIC_AI_MODEL_VIDEO=stability-ai/stable-video-diffusion
|
|
21
|
+
|
|
22
|
+
# Development
|
|
23
|
+
EXPO_PUBLIC_DEV_MODE=true
|