@digilogiclabs/create-saas-app 2.2.1 → 2.4.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 (70) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/generators/template-generator.js +4 -4
  3. package/dist/generators/template-generator.js.map +1 -1
  4. package/dist/templates/mobile/base/template/package.json +1 -1
  5. package/dist/templates/mobile/ui-auth-payments/template/package.json +2 -2
  6. package/dist/templates/mobile/ui-auth-payments-ai/template/package.json +2 -2
  7. package/dist/templates/mobile/ui-auth-payments-ai-rag/template/package.json +2 -2
  8. package/dist/templates/web/ai-platform/template/package.json +55 -55
  9. package/dist/templates/web/ai-platform/template/src/app/error.tsx +75 -0
  10. package/dist/templates/web/ai-platform/template/src/app/loading.tsx +71 -0
  11. package/dist/templates/web/ai-platform/template/src/app/page.tsx +24 -20
  12. package/dist/templates/web/base/template/package.json +3 -3
  13. package/dist/templates/web/iot-dashboard/template/package.json +49 -49
  14. package/dist/templates/web/iot-dashboard/template/src/app/dashboard/page.tsx +6 -11
  15. package/dist/templates/web/iot-dashboard/template/src/app/error.tsx +75 -0
  16. package/dist/templates/web/iot-dashboard/template/src/app/loading.tsx +78 -0
  17. package/dist/templates/web/iot-dashboard/template/src/app/page.tsx +6 -8
  18. package/dist/templates/web/marketplace/template/package.json +51 -51
  19. package/dist/templates/web/marketplace/template/src/app/error.tsx +75 -0
  20. package/dist/templates/web/marketplace/template/src/app/loading.tsx +57 -0
  21. package/dist/templates/web/marketplace/template/src/app/page.tsx +13 -11
  22. package/dist/templates/web/micro-saas/template/package.json +41 -41
  23. package/dist/templates/web/micro-saas/template/src/app/error.tsx +75 -0
  24. package/dist/templates/web/micro-saas/template/src/app/loading.tsx +39 -0
  25. package/dist/templates/web/ui-auth/template/package.json +3 -3
  26. package/dist/templates/web/ui-auth-ai/template/package.json +1 -1
  27. package/dist/templates/web/ui-auth-payments/template/package-lock.json +1 -1
  28. package/dist/templates/web/ui-auth-payments/template/package.json +3 -3
  29. package/dist/templates/web/ui-auth-payments-ai/template/package-lock.json +1 -1
  30. package/dist/templates/web/ui-auth-payments-ai/template/package.json +3 -3
  31. package/dist/templates/web/ui-auth-payments-ai-rag/template/package.json +2 -2
  32. package/dist/templates/web/ui-auth-payments-audio/template/package-lock.json +1 -1
  33. package/dist/templates/web/ui-auth-payments-audio/template/package.json +2 -2
  34. package/dist/templates/web/ui-auth-payments-video/template/package.json +2 -2
  35. package/dist/templates/web/ui-only/template/package.json +2 -2
  36. package/dist/templates/web/ui-package-test/template/package.json +1 -1
  37. package/package.json +1 -1
  38. package/src/templates/mobile/base/template/package.json +1 -1
  39. package/src/templates/mobile/ui-auth-payments/template/package.json +2 -2
  40. package/src/templates/mobile/ui-auth-payments-ai/template/package.json +2 -2
  41. package/src/templates/mobile/ui-auth-payments-ai-rag/template/package.json +2 -2
  42. package/src/templates/web/ai-platform/template/package.json +55 -55
  43. package/src/templates/web/ai-platform/template/src/app/error.tsx +75 -0
  44. package/src/templates/web/ai-platform/template/src/app/loading.tsx +71 -0
  45. package/src/templates/web/ai-platform/template/src/app/page.tsx +24 -20
  46. package/src/templates/web/base/template/package.json +3 -3
  47. package/src/templates/web/iot-dashboard/template/package.json +49 -49
  48. package/src/templates/web/iot-dashboard/template/src/app/dashboard/page.tsx +6 -11
  49. package/src/templates/web/iot-dashboard/template/src/app/error.tsx +75 -0
  50. package/src/templates/web/iot-dashboard/template/src/app/loading.tsx +78 -0
  51. package/src/templates/web/iot-dashboard/template/src/app/page.tsx +6 -8
  52. package/src/templates/web/marketplace/template/package.json +51 -51
  53. package/src/templates/web/marketplace/template/src/app/error.tsx +75 -0
  54. package/src/templates/web/marketplace/template/src/app/loading.tsx +57 -0
  55. package/src/templates/web/marketplace/template/src/app/page.tsx +13 -11
  56. package/src/templates/web/micro-saas/template/package.json +41 -41
  57. package/src/templates/web/micro-saas/template/src/app/error.tsx +75 -0
  58. package/src/templates/web/micro-saas/template/src/app/loading.tsx +39 -0
  59. package/src/templates/web/ui-auth/template/package.json +3 -3
  60. package/src/templates/web/ui-auth-ai/template/package.json +1 -1
  61. package/src/templates/web/ui-auth-payments/template/package-lock.json +1 -1
  62. package/src/templates/web/ui-auth-payments/template/package.json +3 -3
  63. package/src/templates/web/ui-auth-payments-ai/template/package-lock.json +1 -1
  64. package/src/templates/web/ui-auth-payments-ai/template/package.json +3 -3
  65. package/src/templates/web/ui-auth-payments-ai-rag/template/package.json +2 -2
  66. package/src/templates/web/ui-auth-payments-audio/template/package-lock.json +1 -1
  67. package/src/templates/web/ui-auth-payments-audio/template/package.json +2 -2
  68. package/src/templates/web/ui-auth-payments-video/template/package.json +2 -2
  69. package/src/templates/web/ui-only/template/package.json +2 -2
  70. package/src/templates/web/ui-package-test/template/package.json +1 -1
@@ -1,49 +1,49 @@
1
- {
2
- "name": "{{packageName}}",
3
- "version": "0.1.0",
4
- "description": "{{description}} - IoT Dashboard",
5
- "private": true,
6
- "scripts": {
7
- "dev": "next dev",
8
- "build": "next build",
9
- "start": "next start",
10
- "lint": "next lint",
11
- "type-check": "tsc --noEmit",
12
- "test": "vitest",
13
- "test:run": "vitest run"
14
- },
15
- "dependencies": {
16
- "next": "^15.0.0",
17
- "react": "^19.0.0",
18
- "react-dom": "^19.0.0",
19
- "@digilogiclabs/platform-core": "^1.1.0",
20
- "@digilogiclabs/app-sdk": "^1.0.0",
21
- "@digilogiclabs/saas-factory-auth": "^1.0.7",
22
- "@digilogiclabs/saas-factory-ui": "^1.0.1",
23
- "tailwindcss": "^4.0.0",
24
- "clsx": "^2.0.0",
25
- "class-variance-authority": "^0.7.0",
26
- "tailwind-merge": "^2.0.0",
27
- "next-themes": "^0.4.0",
28
- "lucide-react": "^0.460.0",
29
- "zod": "^3.22.4",
30
- "zustand": "^4.5.0",
31
- "recharts": "^2.13.0",
32
- "date-fns": "^4.1.0"
33
- },
34
- "devDependencies": {
35
- "typescript": "^5.7.0",
36
- "@types/node": "^22.0.0",
37
- "@types/react": "^19.0.0",
38
- "@types/react-dom": "^19.0.0",
39
- "eslint": "^9.0.0",
40
- "eslint-config-next": "^15.0.0",
41
- "prettier": "^3.4.0",
42
- "vitest": "^2.1.0",
43
- "@testing-library/react": "^16.0.0",
44
- "@testing-library/jest-dom": "^6.6.0"
45
- },
46
- "engines": {
47
- "node": ">=20.0.0"
48
- }
49
- }
1
+ {
2
+ "name": "{{packageName}}",
3
+ "version": "0.1.0",
4
+ "description": "{{description}} - IoT Dashboard",
5
+ "private": true,
6
+ "scripts": {
7
+ "dev": "next dev",
8
+ "build": "next build",
9
+ "start": "next start",
10
+ "lint": "next lint",
11
+ "type-check": "tsc --noEmit",
12
+ "test": "vitest",
13
+ "test:run": "vitest run"
14
+ },
15
+ "dependencies": {
16
+ "next": "^15.0.0",
17
+ "react": "^19.0.0",
18
+ "react-dom": "^19.0.0",
19
+ "@digilogiclabs/platform-core": "^1.13.0",
20
+ "@digilogiclabs/app-sdk": "^1.0.0",
21
+ "@digilogiclabs/saas-factory-auth": "^1.0.7",
22
+ "@digilogiclabs/saas-factory-ui": "^1.4.0",
23
+ "tailwindcss": "^4.0.0",
24
+ "clsx": "^2.0.0",
25
+ "class-variance-authority": "^0.7.0",
26
+ "tailwind-merge": "^2.0.0",
27
+ "next-themes": "^0.4.0",
28
+ "lucide-react": "^0.460.0",
29
+ "zod": "^4.1.0",
30
+ "zustand": "^4.5.0",
31
+ "recharts": "^2.13.0",
32
+ "date-fns": "^4.1.0"
33
+ },
34
+ "devDependencies": {
35
+ "typescript": "^5.7.0",
36
+ "@types/node": "^22.0.0",
37
+ "@types/react": "^19.0.0",
38
+ "@types/react-dom": "^19.0.0",
39
+ "eslint": "^9.0.0",
40
+ "eslint-config-next": "^15.0.0",
41
+ "prettier": "^3.4.0",
42
+ "vitest": "^2.1.0",
43
+ "@testing-library/react": "^16.0.0",
44
+ "@testing-library/jest-dom": "^6.6.0"
45
+ },
46
+ "engines": {
47
+ "node": ">=20.0.0"
48
+ }
49
+ }
@@ -1,7 +1,7 @@
1
1
  'use client'
2
2
 
3
3
  import { useState, useEffect } from 'react'
4
- import { Button, Card } from '@digilogiclabs/saas-factory-ui'
4
+ import { Button, Card, PulseIndicator } from '@digilogiclabs/saas-factory-ui'
5
5
  import { Cpu, Activity, Signal, Bell, AlertTriangle, CheckCircle, Clock, ThermometerSun, Gauge, Wifi, Plus } from 'lucide-react'
6
6
  import Link from 'next/link'
7
7
 
@@ -202,16 +202,11 @@ export default function DashboardPage() {
202
202
  </td>
203
203
  <td className="py-3 px-4 text-slate-600 dark:text-slate-400">{device.type}</td>
204
204
  <td className="py-3 px-4">
205
- <span className={`inline-flex items-center px-2 py-1 rounded-full text-xs ${
206
- device.status === 'online'
207
- ? 'bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400'
208
- : 'bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400'
209
- }`}>
210
- <span className={`w-1.5 h-1.5 rounded-full mr-1.5 ${
211
- device.status === 'online' ? 'bg-green-500' : 'bg-red-500'
212
- }`} />
213
- {device.status}
214
- </span>
205
+ <PulseIndicator
206
+ status={device.status === 'online' ? 'success' : 'error'}
207
+ label={device.status}
208
+ size="sm"
209
+ />
215
210
  </td>
216
211
  <td className="py-3 px-4 text-slate-600 dark:text-slate-400 flex items-center">
217
212
  <Clock className="w-3 h-3 mr-1" />
@@ -0,0 +1,75 @@
1
+ 'use client'
2
+
3
+ import { useEffect } from 'react'
4
+ import { Button, Card } from '@digilogiclabs/saas-factory-ui'
5
+ import { AlertTriangle, RefreshCw, Home } from 'lucide-react'
6
+ import Link from 'next/link'
7
+
8
+ interface ErrorProps {
9
+ error: Error & { digest?: string }
10
+ reset: () => void
11
+ }
12
+
13
+ export default function Error({ error, reset }: ErrorProps) {
14
+ useEffect(() => {
15
+ console.error('Application error:', error)
16
+ }, [error])
17
+
18
+ return (
19
+ <div className="min-h-screen bg-gradient-to-br from-red-50 to-orange-100 dark:from-slate-900 dark:to-slate-800 flex items-center justify-center p-4">
20
+ <Card className="p-8 max-w-lg w-full">
21
+ <div className="flex flex-col items-center space-y-6 text-center">
22
+ <div className="w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center">
23
+ <AlertTriangle className="w-8 h-8 text-red-600 dark:text-red-400" />
24
+ </div>
25
+
26
+ <div>
27
+ <h1 className="text-2xl font-bold text-slate-900 dark:text-white mb-2">
28
+ Something went wrong!
29
+ </h1>
30
+ <p className="text-slate-600 dark:text-slate-300 mb-4">
31
+ We encountered an unexpected error. This has been logged and our team will look into it.
32
+ </p>
33
+
34
+ {process.env.NODE_ENV === 'development' && (
35
+ <details className="mt-4 text-left">
36
+ <summary className="cursor-pointer text-sm text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200">
37
+ Error details (development only)
38
+ </summary>
39
+ <div className="mt-2 p-3 bg-slate-100 dark:bg-slate-800 rounded text-xs font-mono text-slate-700 dark:text-slate-300 overflow-auto max-h-40">
40
+ <div className="mb-2">
41
+ <strong>Message:</strong> {error.message}
42
+ </div>
43
+ {error.digest && (
44
+ <div className="mb-2">
45
+ <strong>Digest:</strong> {error.digest}
46
+ </div>
47
+ )}
48
+ {error.stack && (
49
+ <div>
50
+ <strong>Stack:</strong>
51
+ <pre className="whitespace-pre-wrap mt-1">{error.stack}</pre>
52
+ </div>
53
+ )}
54
+ </div>
55
+ </details>
56
+ )}
57
+ </div>
58
+
59
+ <div className="flex flex-col sm:flex-row gap-3 w-full">
60
+ <Button onClick={reset} className="flex-1 bg-emerald-600 hover:bg-emerald-700" size="lg">
61
+ <RefreshCw className="w-4 h-4 mr-2" />
62
+ Try again
63
+ </Button>
64
+ <Link href="/" className="flex-1">
65
+ <Button variant="outline" className="w-full" size="lg">
66
+ <Home className="w-4 h-4 mr-2" />
67
+ Go home
68
+ </Button>
69
+ </Link>
70
+ </div>
71
+ </div>
72
+ </Card>
73
+ </div>
74
+ )
75
+ }
@@ -0,0 +1,78 @@
1
+ import { Card, SkeletonText } from '@digilogiclabs/saas-factory-ui'
2
+
3
+ export default function Loading() {
4
+ return (
5
+ <div className="min-h-screen bg-slate-50 dark:bg-slate-900">
6
+ {/* Header skeleton */}
7
+ <div className="bg-white dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 px-4 py-4">
8
+ <div className="max-w-7xl mx-auto flex items-center justify-between">
9
+ <div className="flex items-center gap-2">
10
+ <SkeletonText className="h-8 w-8 rounded-lg" />
11
+ <SkeletonText className="h-8 w-48" />
12
+ </div>
13
+ <div className="flex gap-6">
14
+ <SkeletonText className="h-4 w-16" />
15
+ <SkeletonText className="h-4 w-20" />
16
+ <SkeletonText className="h-4 w-12" />
17
+ </div>
18
+ <div className="flex gap-2">
19
+ <SkeletonText className="h-8 w-20" />
20
+ <SkeletonText className="h-8 w-24" />
21
+ </div>
22
+ </div>
23
+ </div>
24
+
25
+ <div className="max-w-7xl mx-auto px-4 py-16">
26
+ {/* Hero skeleton */}
27
+ <div className="text-center mb-16">
28
+ <SkeletonText className="h-6 w-48 mx-auto mb-6" />
29
+ <SkeletonText className="h-12 w-96 mx-auto mb-6" />
30
+ <SkeletonText className="h-6 w-[32rem] mx-auto mb-8" />
31
+ </div>
32
+
33
+ {/* Device cards skeleton */}
34
+ <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-4 mb-16">
35
+ {Array.from({ length: 4 }).map((_, i) => (
36
+ <Card key={i} className="p-6">
37
+ <div className="animate-pulse">
38
+ <div className="flex items-center justify-between mb-3">
39
+ <SkeletonText className="h-10 w-10 rounded-lg" />
40
+ <SkeletonText className="h-5 w-20 rounded-full" />
41
+ </div>
42
+ <SkeletonText className="h-5 w-32 mb-2" />
43
+ <SkeletonText className="h-8 w-12" />
44
+ </div>
45
+ </Card>
46
+ ))}
47
+ </div>
48
+
49
+ {/* Features skeleton */}
50
+ <div className="mb-16">
51
+ <SkeletonText className="h-8 w-64 mx-auto mb-12" />
52
+ <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6">
53
+ {Array.from({ length: 4 }).map((_, i) => (
54
+ <Card key={i} className="p-6">
55
+ <div className="animate-pulse text-center">
56
+ <SkeletonText className="h-12 w-12 mx-auto mb-4 rounded-lg" />
57
+ <SkeletonText className="h-5 w-32 mx-auto mb-2" />
58
+ <SkeletonText className="h-4 w-full" />
59
+ </div>
60
+ </Card>
61
+ ))}
62
+ </div>
63
+ </div>
64
+
65
+ {/* Loading indicator */}
66
+ <div className="flex justify-center">
67
+ <div className="flex items-center gap-3">
68
+ <div className="relative">
69
+ <div className="w-8 h-8 border-4 border-slate-200 dark:border-slate-700 rounded-full"></div>
70
+ <div className="absolute top-0 left-0 w-8 h-8 border-4 border-emerald-600 border-t-transparent rounded-full animate-spin"></div>
71
+ </div>
72
+ <p className="text-sm text-slate-600 dark:text-slate-300">Loading IoT dashboard...</p>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ )
78
+ }
@@ -1,6 +1,6 @@
1
1
  'use client'
2
2
 
3
- import { Button, Card } from '@digilogiclabs/saas-factory-ui'
3
+ import { Button, Card, PulseIndicator } from '@digilogiclabs/saas-factory-ui'
4
4
  import { useAuth } from '@digilogiclabs/app-sdk'
5
5
  import { Cpu, Activity, Signal, Bell, Settings, ArrowRight, User, LogOut, Wifi, ThermometerSun, Gauge, Shield } from 'lucide-react'
6
6
  import Link from 'next/link'
@@ -140,13 +140,11 @@ export default function Home() {
140
140
  <div className="w-10 h-10 bg-emerald-100 dark:bg-emerald-900/30 rounded-lg flex items-center justify-center">
141
141
  <device.icon className="w-5 h-5 text-emerald-600" />
142
142
  </div>
143
- <span className={`text-xs px-2 py-1 rounded-full ${
144
- device.status === 'online'
145
- ? 'bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400'
146
- : 'bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400'
147
- }`}>
148
- {device.status === 'online' ? 'All Online' : 'Partial'}
149
- </span>
143
+ <PulseIndicator
144
+ status={device.status === 'online' ? 'success' : 'loading'}
145
+ label={device.status === 'online' ? 'All Online' : 'Partial'}
146
+ size="sm"
147
+ />
150
148
  </div>
151
149
  <h3 className="font-semibold text-slate-900 dark:text-white">{device.name}</h3>
152
150
  <p className="text-2xl font-bold text-emerald-600">{device.count}</p>
@@ -1,51 +1,51 @@
1
- {
2
- "name": "{{packageName}}",
3
- "version": "0.1.0",
4
- "description": "{{description}} - Multi-vendor Marketplace",
5
- "private": true,
6
- "scripts": {
7
- "dev": "next dev",
8
- "build": "next build",
9
- "start": "next start",
10
- "lint": "next lint",
11
- "type-check": "tsc --noEmit",
12
- "test": "vitest",
13
- "test:run": "vitest run"
14
- },
15
- "dependencies": {
16
- "next": "^15.0.0",
17
- "react": "^19.0.0",
18
- "react-dom": "^19.0.0",
19
- "@digilogiclabs/platform-core": "^1.1.0",
20
- "@digilogiclabs/app-sdk": "^1.0.0",
21
- "@digilogiclabs/saas-factory-auth": "^1.0.7",
22
- "@digilogiclabs/saas-factory-payments": "^1.2.9",
23
- "@digilogiclabs/saas-factory-ui": "^1.0.1",
24
- "stripe": "^16.12.0",
25
- "@stripe/react-stripe-js": "^2.8.0",
26
- "@stripe/stripe-js": "^4.10.0",
27
- "tailwindcss": "^4.0.0",
28
- "clsx": "^2.0.0",
29
- "class-variance-authority": "^0.7.0",
30
- "tailwind-merge": "^2.0.0",
31
- "next-themes": "^0.4.0",
32
- "lucide-react": "^0.460.0",
33
- "zod": "^3.22.4",
34
- "zustand": "^4.5.0"
35
- },
36
- "devDependencies": {
37
- "typescript": "^5.7.0",
38
- "@types/node": "^22.0.0",
39
- "@types/react": "^19.0.0",
40
- "@types/react-dom": "^19.0.0",
41
- "eslint": "^9.0.0",
42
- "eslint-config-next": "^15.0.0",
43
- "prettier": "^3.4.0",
44
- "vitest": "^2.1.0",
45
- "@testing-library/react": "^16.0.0",
46
- "@testing-library/jest-dom": "^6.6.0"
47
- },
48
- "engines": {
49
- "node": ">=20.0.0"
50
- }
51
- }
1
+ {
2
+ "name": "{{packageName}}",
3
+ "version": "0.1.0",
4
+ "description": "{{description}} - Multi-vendor Marketplace",
5
+ "private": true,
6
+ "scripts": {
7
+ "dev": "next dev",
8
+ "build": "next build",
9
+ "start": "next start",
10
+ "lint": "next lint",
11
+ "type-check": "tsc --noEmit",
12
+ "test": "vitest",
13
+ "test:run": "vitest run"
14
+ },
15
+ "dependencies": {
16
+ "next": "^15.0.0",
17
+ "react": "^19.0.0",
18
+ "react-dom": "^19.0.0",
19
+ "@digilogiclabs/platform-core": "^1.13.0",
20
+ "@digilogiclabs/app-sdk": "^1.0.0",
21
+ "@digilogiclabs/saas-factory-auth": "^1.0.7",
22
+ "@digilogiclabs/saas-factory-payments": "^1.2.9",
23
+ "@digilogiclabs/saas-factory-ui": "^1.4.0",
24
+ "stripe": "^16.12.0",
25
+ "@stripe/react-stripe-js": "^2.8.0",
26
+ "@stripe/stripe-js": "^4.10.0",
27
+ "tailwindcss": "^4.0.0",
28
+ "clsx": "^2.0.0",
29
+ "class-variance-authority": "^0.7.0",
30
+ "tailwind-merge": "^2.0.0",
31
+ "next-themes": "^0.4.0",
32
+ "lucide-react": "^0.460.0",
33
+ "zod": "^4.1.0",
34
+ "zustand": "^4.5.0"
35
+ },
36
+ "devDependencies": {
37
+ "typescript": "^5.7.0",
38
+ "@types/node": "^22.0.0",
39
+ "@types/react": "^19.0.0",
40
+ "@types/react-dom": "^19.0.0",
41
+ "eslint": "^9.0.0",
42
+ "eslint-config-next": "^15.0.0",
43
+ "prettier": "^3.4.0",
44
+ "vitest": "^2.1.0",
45
+ "@testing-library/react": "^16.0.0",
46
+ "@testing-library/jest-dom": "^6.6.0"
47
+ },
48
+ "engines": {
49
+ "node": ">=20.0.0"
50
+ }
51
+ }
@@ -0,0 +1,75 @@
1
+ 'use client'
2
+
3
+ import { useEffect } from 'react'
4
+ import { Button, Card } from '@digilogiclabs/saas-factory-ui'
5
+ import { AlertTriangle, RefreshCw, Home } from 'lucide-react'
6
+ import Link from 'next/link'
7
+
8
+ interface ErrorProps {
9
+ error: Error & { digest?: string }
10
+ reset: () => void
11
+ }
12
+
13
+ export default function Error({ error, reset }: ErrorProps) {
14
+ useEffect(() => {
15
+ console.error('Application error:', error)
16
+ }, [error])
17
+
18
+ return (
19
+ <div className="min-h-screen bg-gradient-to-br from-red-50 to-orange-100 dark:from-gray-900 dark:to-gray-800 flex items-center justify-center p-4">
20
+ <Card className="p-8 max-w-lg w-full">
21
+ <div className="flex flex-col items-center space-y-6 text-center">
22
+ <div className="w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center">
23
+ <AlertTriangle className="w-8 h-8 text-red-600 dark:text-red-400" />
24
+ </div>
25
+
26
+ <div>
27
+ <h1 className="text-2xl font-bold text-gray-900 dark:text-white mb-2">
28
+ Something went wrong!
29
+ </h1>
30
+ <p className="text-gray-600 dark:text-gray-300 mb-4">
31
+ We encountered an unexpected error. This has been logged and our team will look into it.
32
+ </p>
33
+
34
+ {process.env.NODE_ENV === 'development' && (
35
+ <details className="mt-4 text-left">
36
+ <summary className="cursor-pointer text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200">
37
+ Error details (development only)
38
+ </summary>
39
+ <div className="mt-2 p-3 bg-gray-100 dark:bg-gray-800 rounded text-xs font-mono text-gray-700 dark:text-gray-300 overflow-auto max-h-40">
40
+ <div className="mb-2">
41
+ <strong>Message:</strong> {error.message}
42
+ </div>
43
+ {error.digest && (
44
+ <div className="mb-2">
45
+ <strong>Digest:</strong> {error.digest}
46
+ </div>
47
+ )}
48
+ {error.stack && (
49
+ <div>
50
+ <strong>Stack:</strong>
51
+ <pre className="whitespace-pre-wrap mt-1">{error.stack}</pre>
52
+ </div>
53
+ )}
54
+ </div>
55
+ </details>
56
+ )}
57
+ </div>
58
+
59
+ <div className="flex flex-col sm:flex-row gap-3 w-full">
60
+ <Button onClick={reset} className="flex-1" size="lg">
61
+ <RefreshCw className="w-4 h-4 mr-2" />
62
+ Try again
63
+ </Button>
64
+ <Link href="/" className="flex-1">
65
+ <Button variant="outline" className="w-full" size="lg">
66
+ <Home className="w-4 h-4 mr-2" />
67
+ Go home
68
+ </Button>
69
+ </Link>
70
+ </div>
71
+ </div>
72
+ </Card>
73
+ </div>
74
+ )
75
+ }
@@ -0,0 +1,57 @@
1
+ import { Card, SkeletonCard, SkeletonText } from '@digilogiclabs/saas-factory-ui'
2
+
3
+ export default function Loading() {
4
+ return (
5
+ <div className="min-h-screen bg-gray-50 dark:bg-gray-900">
6
+ {/* Header skeleton */}
7
+ <div className="bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-4 py-4">
8
+ <div className="max-w-7xl mx-auto flex items-center justify-between">
9
+ <SkeletonText className="h-8 w-48" />
10
+ <SkeletonText className="h-10 w-64" />
11
+ <div className="flex gap-2">
12
+ <SkeletonText className="h-8 w-20" />
13
+ <SkeletonText className="h-8 w-20" />
14
+ </div>
15
+ </div>
16
+ </div>
17
+
18
+ <div className="max-w-7xl mx-auto px-4 py-8">
19
+ {/* Hero skeleton */}
20
+ <div className="text-center mb-12">
21
+ <SkeletonText className="h-12 w-80 mx-auto mb-4" />
22
+ <SkeletonText className="h-6 w-96 mx-auto" />
23
+ </div>
24
+
25
+ {/* Category cards skeleton */}
26
+ <div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-12">
27
+ {Array.from({ length: 4 }).map((_, i) => (
28
+ <SkeletonCard key={i} />
29
+ ))}
30
+ </div>
31
+
32
+ {/* Products skeleton */}
33
+ <div className="mb-12">
34
+ <SkeletonText className="h-8 w-48 mb-6" />
35
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
36
+ {Array.from({ length: 4 }).map((_, i) => (
37
+ <SkeletonCard key={i} />
38
+ ))}
39
+ </div>
40
+ </div>
41
+
42
+ {/* Loading indicator */}
43
+ <div className="flex justify-center">
44
+ <Card className="p-6">
45
+ <div className="flex items-center gap-3">
46
+ <div className="relative">
47
+ <div className="w-8 h-8 border-4 border-gray-200 dark:border-gray-700 rounded-full"></div>
48
+ <div className="absolute top-0 left-0 w-8 h-8 border-4 border-blue-600 border-t-transparent rounded-full animate-spin"></div>
49
+ </div>
50
+ <p className="text-sm text-gray-600 dark:text-gray-300">Loading marketplace...</p>
51
+ </div>
52
+ </Card>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ )
57
+ }
@@ -1,6 +1,6 @@
1
1
  'use client'
2
2
 
3
- import { Button, Card } from '@digilogiclabs/saas-factory-ui'
3
+ import { Button, Card, GradientBorderCard } from '@digilogiclabs/saas-factory-ui'
4
4
  import { useAuth } from '@digilogiclabs/app-sdk'
5
5
  import { ShoppingCart, Store, Search, Star, ArrowRight, User, LogOut } from 'lucide-react'
6
6
  import Link from 'next/link'
@@ -151,16 +151,18 @@ export default function Home() {
151
151
  </div>
152
152
 
153
153
  {/* Become a Vendor CTA */}
154
- <Card className="p-8 bg-gradient-to-r from-blue-600 to-purple-600 text-white text-center">
155
- <Store className="w-12 h-12 mx-auto mb-4" />
156
- <h2 className="text-2xl font-bold mb-2">Become a Vendor</h2>
157
- <p className="mb-6 opacity-90 max-w-md mx-auto">
158
- Start selling your products to thousands of customers. Low fees, powerful tools.
159
- </p>
160
- <Link href="/vendors/apply">
161
- <Button variant="secondary" size="lg">Apply Now</Button>
162
- </Link>
163
- </Card>
154
+ <GradientBorderCard gradientColors="from-blue-500 via-purple-500 to-blue-500" borderWidth={2}>
155
+ <div className="text-center">
156
+ <Store className="w-12 h-12 mx-auto mb-4 text-blue-600 dark:text-blue-400" />
157
+ <h2 className="text-2xl font-bold text-gray-900 dark:text-white mb-2">Become a Vendor</h2>
158
+ <p className="mb-6 text-gray-600 dark:text-gray-300 max-w-md mx-auto">
159
+ Start selling your products to thousands of customers. Low fees, powerful tools.
160
+ </p>
161
+ <Link href="/vendors/apply">
162
+ <Button size="lg">Apply Now</Button>
163
+ </Link>
164
+ </div>
165
+ </GradientBorderCard>
164
166
  </div>
165
167
  </main>
166
168
  )