@digilogiclabs/create-saas-app 2.3.0 → 2.5.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/CHANGELOG.md +9 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/generators/template-generator.d.ts.map +1 -1
- package/dist/generators/template-generator.js +6 -15
- package/dist/generators/template-generator.js.map +1 -1
- package/dist/templates/mobile/base/template/App.tsx +8 -13
- package/dist/templates/mobile/base/template/app/(auth)/login.tsx +1 -2
- package/dist/templates/mobile/base/template/app/(auth)/signup.tsx +1 -2
- package/dist/templates/mobile/base/template/app/checkout.tsx +2 -2
- package/dist/templates/mobile/base/template/package.json +1 -3
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/_layout.tsx +1 -1
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/billing.tsx +1 -1
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +1 -1
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/profile.tsx +1 -1
- package/dist/templates/mobile/ui-auth-payments/template/app/_layout.tsx +4 -14
- package/dist/templates/mobile/ui-auth-payments/template/app/auth/login.tsx +1 -1
- package/dist/templates/mobile/ui-auth-payments/template/app/auth/signup.tsx +1 -1
- package/dist/templates/mobile/ui-auth-payments/template/package.json +2 -4
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/_layout.tsx +1 -1
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/billing.tsx +1 -1
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/index.tsx +1 -1
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/profile.tsx +1 -1
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/_layout.tsx +4 -14
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/auth/login.tsx +1 -1
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/auth/signup.tsx +1 -1
- package/dist/templates/mobile/ui-auth-payments-ai/template/package.json +1 -3
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/app/_layout.tsx +5 -15
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/package.json +1 -3
- package/dist/templates/web/ai-platform/template/package.json +2 -4
- package/dist/templates/web/ai-platform/template/src/app/error.tsx +75 -0
- package/dist/templates/web/ai-platform/template/src/app/loading.tsx +71 -0
- package/dist/templates/web/ai-platform/template/src/app/page.tsx +24 -20
- package/dist/templates/web/base/template/package.json +2 -4
- package/dist/templates/web/base/template/src/app/checkout/page.tsx +2 -2
- package/dist/templates/web/base/template/src/app/dashboard/page.tsx +1 -1
- package/dist/templates/web/base/template/src/app/login/page.tsx +1 -2
- package/dist/templates/web/base/template/src/app/page.tsx +1 -1
- package/dist/templates/web/base/template/src/app/signup/page.tsx +1 -2
- package/dist/templates/web/base/template/src/components/providers/app-providers.tsx +14 -19
- package/dist/templates/web/base/template/src/components/shared/header.tsx +1 -1
- package/dist/templates/web/base/template/src/lib/platform.ts +0 -25
- package/dist/templates/web/base/template/src/test/setup.ts +3 -8
- package/dist/templates/web/iot-dashboard/template/package.json +2 -3
- package/dist/templates/web/iot-dashboard/template/src/app/dashboard/page.tsx +6 -11
- package/dist/templates/web/iot-dashboard/template/src/app/error.tsx +75 -0
- package/dist/templates/web/iot-dashboard/template/src/app/loading.tsx +78 -0
- package/dist/templates/web/iot-dashboard/template/src/app/page.tsx +6 -8
- package/dist/templates/web/marketplace/template/package.json +2 -4
- package/dist/templates/web/marketplace/template/src/app/error.tsx +75 -0
- package/dist/templates/web/marketplace/template/src/app/loading.tsx +57 -0
- package/dist/templates/web/marketplace/template/src/app/page.tsx +13 -11
- package/dist/templates/web/micro-saas/template/package.json +2 -3
- package/dist/templates/web/micro-saas/template/src/app/error.tsx +75 -0
- package/dist/templates/web/micro-saas/template/src/app/loading.tsx +39 -0
- package/dist/templates/web/ui-auth/template/.claude +1 -1
- package/dist/templates/web/ui-auth/template/context.md +5 -5
- package/dist/templates/web/ui-auth/template/package.json +2 -3
- package/dist/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +3 -3
- package/dist/templates/web/ui-auth/template/src/app/login/page.tsx +1 -1
- package/dist/templates/web/ui-auth/template/src/app/page.tsx +1 -1
- package/dist/templates/web/ui-auth/template/src/app/signup/page.tsx +1 -1
- package/dist/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +3 -3
- package/dist/templates/web/ui-auth/template/src/lib/platform.ts +0 -16
- package/dist/templates/web/ui-auth/template/src/test/setup.ts +3 -8
- package/dist/templates/web/ui-auth-ai/template/package.json +1 -2
- package/dist/templates/web/ui-auth-payments/template/package.json +2 -4
- package/dist/templates/web/ui-auth-payments/template/src/app/billing/page.tsx +2 -1
- package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +2 -1
- package/dist/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +3 -3
- package/dist/templates/web/ui-auth-payments/template/src/app/login/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments/template/src/components/client/auth-status.tsx +1 -1
- package/dist/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +1 -1
- package/dist/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +1 -1
- package/dist/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx +7 -10
- package/dist/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +1 -1
- package/dist/templates/web/ui-auth-payments/template/src/lib/platform.ts +0 -25
- package/dist/templates/web/ui-auth-payments/template/src/test/setup.ts +3 -8
- package/dist/templates/web/ui-auth-payments-ai/template/.claude +1 -1
- package/dist/templates/web/ui-auth-payments-ai/template/context.md +11 -11
- package/dist/templates/web/ui-auth-payments-ai/template/package.json +2 -4
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/ai/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +2 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/checkout/page.tsx +2 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +3 -3
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/auth-status.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +7 -10
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-ai/template/src/lib/platform.ts +0 -18
- package/dist/templates/web/ui-auth-payments-ai/template/src/test/setup.ts +3 -8
- package/dist/templates/web/ui-auth-payments-ai-rag/template/package.json +1 -3
- package/dist/templates/web/ui-auth-payments-ai-rag/template/src/app/ai/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-audio/template/package.json +1 -3
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/billing/page.tsx +2 -1
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/checkout/page.tsx +2 -1
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/auth-status.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +7 -10
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +3 -8
- package/dist/templates/web/ui-auth-payments-video/template/package.json +1 -3
- package/dist/templates/web/ui-auth-payments-video/template/src/app/billing/page.tsx +2 -1
- package/dist/templates/web/ui-auth-payments-video/template/src/app/checkout/page.tsx +2 -1
- package/dist/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +7 -10
- package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +1 -1
- package/dist/templates/web/ui-auth-payments-video/template/src/test/setup.ts +3 -8
- package/dist/templates/web/ui-only/template/package.json +1 -1
- package/dist/templates/web/ui-only/template/src/test/setup.ts +3 -8
- package/dist/templates/web/ui-package-test/template/package.json +1 -1
- package/package.json +1 -1
- package/src/templates/mobile/base/template/App.tsx +8 -13
- package/src/templates/mobile/base/template/app/(auth)/login.tsx +1 -2
- package/src/templates/mobile/base/template/app/(auth)/signup.tsx +1 -2
- package/src/templates/mobile/base/template/app/checkout.tsx +2 -2
- package/src/templates/mobile/base/template/package.json +1 -3
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/_layout.tsx +1 -1
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/billing.tsx +1 -1
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +1 -1
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/profile.tsx +1 -1
- package/src/templates/mobile/ui-auth-payments/template/app/_layout.tsx +4 -14
- package/src/templates/mobile/ui-auth-payments/template/app/auth/login.tsx +1 -1
- package/src/templates/mobile/ui-auth-payments/template/app/auth/signup.tsx +1 -1
- package/src/templates/mobile/ui-auth-payments/template/package.json +2 -4
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/_layout.tsx +1 -1
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/billing.tsx +1 -1
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/index.tsx +1 -1
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/profile.tsx +1 -1
- package/src/templates/mobile/ui-auth-payments-ai/template/app/_layout.tsx +4 -14
- package/src/templates/mobile/ui-auth-payments-ai/template/app/auth/login.tsx +1 -1
- package/src/templates/mobile/ui-auth-payments-ai/template/app/auth/signup.tsx +1 -1
- package/src/templates/mobile/ui-auth-payments-ai/template/package.json +1 -3
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/app/_layout.tsx +5 -15
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/package.json +1 -3
- package/src/templates/web/ai-platform/template/package.json +2 -4
- package/src/templates/web/ai-platform/template/src/app/error.tsx +75 -0
- package/src/templates/web/ai-platform/template/src/app/loading.tsx +71 -0
- package/src/templates/web/ai-platform/template/src/app/page.tsx +24 -20
- package/src/templates/web/base/template/package.json +2 -4
- package/src/templates/web/base/template/src/app/checkout/page.tsx +2 -2
- package/src/templates/web/base/template/src/app/dashboard/page.tsx +1 -1
- package/src/templates/web/base/template/src/app/login/page.tsx +1 -2
- package/src/templates/web/base/template/src/app/page.tsx +1 -1
- package/src/templates/web/base/template/src/app/signup/page.tsx +1 -2
- package/src/templates/web/base/template/src/components/providers/app-providers.tsx +14 -19
- package/src/templates/web/base/template/src/components/shared/header.tsx +1 -1
- package/src/templates/web/base/template/src/lib/platform.ts +0 -25
- package/src/templates/web/base/template/src/test/setup.ts +3 -8
- package/src/templates/web/iot-dashboard/template/package.json +2 -3
- package/src/templates/web/iot-dashboard/template/src/app/dashboard/page.tsx +6 -11
- package/src/templates/web/iot-dashboard/template/src/app/error.tsx +75 -0
- package/src/templates/web/iot-dashboard/template/src/app/loading.tsx +78 -0
- package/src/templates/web/iot-dashboard/template/src/app/page.tsx +6 -8
- package/src/templates/web/marketplace/template/package.json +2 -4
- package/src/templates/web/marketplace/template/src/app/error.tsx +75 -0
- package/src/templates/web/marketplace/template/src/app/loading.tsx +57 -0
- package/src/templates/web/marketplace/template/src/app/page.tsx +13 -11
- package/src/templates/web/micro-saas/template/package.json +2 -3
- package/src/templates/web/micro-saas/template/src/app/error.tsx +75 -0
- package/src/templates/web/micro-saas/template/src/app/loading.tsx +39 -0
- package/src/templates/web/ui-auth/template/.claude +1 -1
- package/src/templates/web/ui-auth/template/context.md +5 -5
- package/src/templates/web/ui-auth/template/package.json +2 -3
- package/src/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +3 -3
- package/src/templates/web/ui-auth/template/src/app/login/page.tsx +1 -1
- package/src/templates/web/ui-auth/template/src/app/page.tsx +1 -1
- package/src/templates/web/ui-auth/template/src/app/signup/page.tsx +1 -1
- package/src/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +3 -3
- package/src/templates/web/ui-auth/template/src/lib/platform.ts +0 -16
- package/src/templates/web/ui-auth/template/src/test/setup.ts +3 -8
- package/src/templates/web/ui-auth-ai/template/package.json +1 -2
- package/src/templates/web/ui-auth-payments/template/package.json +2 -4
- package/src/templates/web/ui-auth-payments/template/src/app/billing/page.tsx +2 -1
- package/src/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +2 -1
- package/src/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +3 -3
- package/src/templates/web/ui-auth-payments/template/src/app/login/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments/template/src/app/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments/template/src/components/client/auth-status.tsx +1 -1
- package/src/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +1 -1
- package/src/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +1 -1
- package/src/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx +7 -10
- package/src/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +1 -1
- package/src/templates/web/ui-auth-payments/template/src/lib/platform.ts +0 -25
- package/src/templates/web/ui-auth-payments/template/src/test/setup.ts +3 -8
- package/src/templates/web/ui-auth-payments-ai/template/.claude +1 -1
- package/src/templates/web/ui-auth-payments-ai/template/context.md +11 -11
- package/src/templates/web/ui-auth-payments-ai/template/package.json +2 -4
- package/src/templates/web/ui-auth-payments-ai/template/src/app/ai/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +2 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/app/checkout/page.tsx +2 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +3 -3
- package/src/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/auth-status.tsx +1 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +1 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +1 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +7 -10
- package/src/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +1 -1
- package/src/templates/web/ui-auth-payments-ai/template/src/lib/platform.ts +0 -18
- package/src/templates/web/ui-auth-payments-ai/template/src/test/setup.ts +3 -8
- package/src/templates/web/ui-auth-payments-ai-rag/template/package.json +1 -3
- package/src/templates/web/ui-auth-payments-ai-rag/template/src/app/ai/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments-audio/template/package.json +1 -3
- package/src/templates/web/ui-auth-payments-audio/template/src/app/billing/page.tsx +2 -1
- package/src/templates/web/ui-auth-payments-audio/template/src/app/checkout/page.tsx +2 -1
- package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments-audio/template/src/components/client/auth-status.tsx +1 -1
- package/src/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +1 -1
- package/src/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +1 -1
- package/src/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +7 -10
- package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +1 -1
- package/src/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +3 -8
- package/src/templates/web/ui-auth-payments-video/template/package.json +1 -3
- package/src/templates/web/ui-auth-payments-video/template/src/app/billing/page.tsx +2 -1
- package/src/templates/web/ui-auth-payments-video/template/src/app/checkout/page.tsx +2 -1
- package/src/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +1 -1
- package/src/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +7 -10
- package/src/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +1 -1
- package/src/templates/web/ui-auth-payments-video/template/src/test/setup.ts +3 -8
- package/src/templates/web/ui-only/template/package.json +1 -1
- package/src/templates/web/ui-only/template/src/test/setup.ts +3 -8
- package/src/templates/web/ui-package-test/template/package.json +1 -1
- package/src/templates/web/base/template.backup/.env.example +0 -15
- package/src/templates/web/ui-auth/template.backup/.env.example +0 -15
- package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx.backup +0 -391
- package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx.bak +0 -391
- package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx.backup +0 -391
- package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx.bak +0 -391
- package/src/templates/web/ui-only/template.backup/.env.example +0 -15
|
@@ -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
|
-
<
|
|
144
|
-
device.status === 'online'
|
|
145
|
-
|
|
146
|
-
|
|
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>
|
|
@@ -16,11 +16,9 @@
|
|
|
16
16
|
"next": "^15.0.0",
|
|
17
17
|
"react": "^19.0.0",
|
|
18
18
|
"react-dom": "^19.0.0",
|
|
19
|
-
"@digilogiclabs/platform-core": "^1.
|
|
19
|
+
"@digilogiclabs/platform-core": "^1.13.0",
|
|
20
20
|
"@digilogiclabs/app-sdk": "^1.0.0",
|
|
21
|
-
"@digilogiclabs/saas-factory-
|
|
22
|
-
"@digilogiclabs/saas-factory-payments": "^1.2.9",
|
|
23
|
-
"@digilogiclabs/saas-factory-ui": "^1.0.1",
|
|
21
|
+
"@digilogiclabs/saas-factory-ui": "^1.4.0",
|
|
24
22
|
"stripe": "^16.12.0",
|
|
25
23
|
"@stripe/react-stripe-js": "^2.8.0",
|
|
26
24
|
"@stripe/stripe-js": "^4.10.0",
|
|
@@ -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
|
-
<
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
<
|
|
162
|
-
|
|
163
|
-
|
|
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
|
)
|
|
@@ -14,10 +14,9 @@
|
|
|
14
14
|
"next": "^15.0.0",
|
|
15
15
|
"react": "^19.0.0",
|
|
16
16
|
"react-dom": "^19.0.0",
|
|
17
|
-
"@digilogiclabs/platform-core": "^1.
|
|
17
|
+
"@digilogiclabs/platform-core": "^1.13.0",
|
|
18
18
|
"@digilogiclabs/app-sdk": "^1.0.0",
|
|
19
|
-
"@digilogiclabs/saas-factory-
|
|
20
|
-
"@digilogiclabs/saas-factory-ui": "^1.0.1",
|
|
19
|
+
"@digilogiclabs/saas-factory-ui": "^1.4.0",
|
|
21
20
|
"tailwindcss": "^4.0.0",
|
|
22
21
|
"clsx": "^2.0.0",
|
|
23
22
|
"class-variance-authority": "^0.7.0",
|
|
@@ -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-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,39 @@
|
|
|
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-gradient-to-br from-slate-50 to-slate-100 dark:from-slate-900 dark:to-slate-800">
|
|
6
|
+
<div className="max-w-4xl mx-auto px-4 py-16">
|
|
7
|
+
{/* Header skeleton */}
|
|
8
|
+
<div className="flex justify-end mb-8">
|
|
9
|
+
<SkeletonText className="h-8 w-24" />
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
{/* Hero skeleton */}
|
|
13
|
+
<div className="text-center mb-16">
|
|
14
|
+
<SkeletonText className="h-6 w-32 mx-auto mb-6" />
|
|
15
|
+
<SkeletonText className="h-12 w-64 mx-auto mb-6" />
|
|
16
|
+
<SkeletonText className="h-6 w-96 mx-auto mb-8" />
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
{/* Feature cards skeleton */}
|
|
20
|
+
<div className="grid md:grid-cols-3 gap-6 mb-16">
|
|
21
|
+
{Array.from({ length: 3 }).map((_, i) => (
|
|
22
|
+
<SkeletonCard key={i} />
|
|
23
|
+
))}
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
{/* CTA skeleton */}
|
|
27
|
+
<Card className="p-8">
|
|
28
|
+
<div className="flex flex-col items-center space-y-4">
|
|
29
|
+
<div className="relative">
|
|
30
|
+
<div className="w-12 h-12 border-4 border-gray-200 dark:border-gray-700 rounded-full animate-spin"></div>
|
|
31
|
+
<div className="absolute top-0 left-0 w-12 h-12 border-4 border-blue-600 border-t-transparent rounded-full animate-spin"></div>
|
|
32
|
+
</div>
|
|
33
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">Loading...</p>
|
|
34
|
+
</div>
|
|
35
|
+
</Card>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"*.log",
|
|
18
18
|
".claude"
|
|
19
19
|
],
|
|
20
|
-
"instructions": "You are helping develop an Authentication Platform using Next.js 15, TypeScript, and Digi Logic Labs packages.\n\n## Project Architecture\n- **Framework**: Next.js 15.3 with App Router\n- **Database**: Supabase (PostgreSQL with real-time features)\n- **Styling**: Tailwind CSS v4 with glassmorphism design system\n- **Authentication**: Supabase Auth with @digilogiclabs/
|
|
20
|
+
"instructions": "You are helping develop an Authentication Platform using Next.js 15, TypeScript, and Digi Logic Labs packages.\n\n## Project Architecture\n- **Framework**: Next.js 15.3 with App Router\n- **Database**: Supabase (PostgreSQL with real-time features)\n- **Styling**: Tailwind CSS v4 with glassmorphism design system\n- **Authentication**: Supabase Auth with @digilogiclabs/app-sdk\n\n## Key Packages\n- **@digilogiclabs/app-sdk**: Authentication components and hooks with Supabase integration\n- **@digilogiclabs/saas-factory-ui**: Modern UI components with glassmorphism and responsive design\n\n## Development Guidelines\n1. Follow Next.js 15 best practices with Server Components by default\n2. Use TypeScript strictly - all components should be typed\n3. Implement proper error boundaries and loading states\n4. Follow the glassmorphism design system from saas-factory-ui\n5. Use Server Actions for mutations and API routes for complex logic\n6. Always check authentication state with useAuth hook\n\n## File Organization\n- Components in /src/components with feature-based folders\n- Server actions in /src/server/actions\n- API routes in /src/app/api\n- Database queries in /src/server/queries\n- Types in /src/types\n\n## Testing\n- Use Vitest for unit tests\n- Test business logic and error states\n- Mock external services (Supabase)\n\nRemember to consult the context.md file for detailed package documentation and examples."
|
|
21
21
|
}
|
|
@@ -12,11 +12,11 @@ This project is an Authentication Platform built with modern technologies and Di
|
|
|
12
12
|
|
|
13
13
|
### Package Integration
|
|
14
14
|
|
|
15
|
-
#### @digilogiclabs/
|
|
16
|
-
|
|
15
|
+
#### @digilogiclabs/app-sdk
|
|
16
|
+
Unified application SDK with auth and payments hooks
|
|
17
17
|
|
|
18
|
-
**Key Exports**: useAuth,
|
|
19
|
-
**Documentation**: https://docs.digilogiclabs.com/packages/
|
|
18
|
+
**Key Exports**: useAuth, usePayments, DLLProvider, usePlatform
|
|
19
|
+
**Documentation**: https://docs.digilogiclabs.com/packages/app-sdk
|
|
20
20
|
|
|
21
21
|
#### @digilogiclabs/saas-factory-ui
|
|
22
22
|
Modern UI components with glassmorphism and responsive design
|
|
@@ -42,7 +42,7 @@ Key tables:
|
|
|
42
42
|
|
|
43
43
|
### Authentication Flow
|
|
44
44
|
```typescript
|
|
45
|
-
import { useAuth } from '@digilogiclabs/
|
|
45
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
46
46
|
|
|
47
47
|
export function ProtectedComponent() {
|
|
48
48
|
const { user, loading } = useAuth()
|
|
@@ -17,9 +17,8 @@
|
|
|
17
17
|
"next": "^15.0.0",
|
|
18
18
|
"react": "^19.0.0",
|
|
19
19
|
"react-dom": "^19.0.0",
|
|
20
|
-
"@digilogiclabs/platform-core": "^1.
|
|
21
|
-
"@digilogiclabs/saas-factory-ui": "^
|
|
22
|
-
"@digilogiclabs/saas-factory-auth": "^1.0.6",
|
|
20
|
+
"@digilogiclabs/platform-core": "^1.13.0",
|
|
21
|
+
"@digilogiclabs/saas-factory-ui": "^1.4.0",
|
|
23
22
|
"tailwindcss": "^3.3.0",
|
|
24
23
|
"autoprefixer": "^10.4.16",
|
|
25
24
|
"postcss": "^8.4.31",
|
|
@@ -201,7 +201,7 @@ ${hasVideo ? '- **video_content**: Generated video files and metadata' : ''}
|
|
|
201
201
|
|
|
202
202
|
### Authentication Flow
|
|
203
203
|
${hasAuth ? `\`\`\`typescript
|
|
204
|
-
import { useAuth } from '@digilogiclabs/
|
|
204
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
205
205
|
|
|
206
206
|
export function ProtectedComponent() {
|
|
207
207
|
const { user, loading } = useAuth()
|
|
@@ -237,10 +237,10 @@ export function ExampleComponent() {
|
|
|
237
237
|
|
|
238
238
|
${hasPayments ? `### Payment Integration
|
|
239
239
|
\`\`\`typescript
|
|
240
|
-
import {
|
|
240
|
+
import { usePayments } from '@digilogiclabs/app-sdk'
|
|
241
241
|
|
|
242
242
|
export function CheckoutPage() {
|
|
243
|
-
const { createCheckoutSession, loading } =
|
|
243
|
+
const { createCheckoutSession, loading } = usePayments()
|
|
244
244
|
|
|
245
245
|
const handlePayment = async (priceId: string) => {
|
|
246
246
|
const { url } = await createCheckoutSession({ priceId })
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import { Button, Card, Input, Label } from '@digilogiclabs/saas-factory-ui';
|
|
5
|
-
import { useAuth } from '@digilogiclabs/
|
|
5
|
+
import { useAuth } from '@digilogiclabs/app-sdk';
|
|
6
6
|
import { useRouter } from 'next/navigation';
|
|
7
7
|
|
|
8
8
|
export default function LoginPage() {
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
useOfflineState
|
|
15
15
|
} from '@digilogiclabs/saas-factory-ui'
|
|
16
16
|
import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Wifi, WifiOff, Smartphone } from 'lucide-react'
|
|
17
|
-
import { useAuth } from '@digilogiclabs/
|
|
17
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
18
18
|
import Link from 'next/link'
|
|
19
19
|
|
|
20
20
|
export default function Home() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import { Button, Card, Input, Label } from '@digilogiclabs/saas-factory-ui';
|
|
5
|
-
import { useAuth } from '@digilogiclabs/
|
|
5
|
+
import { useAuth } from '@digilogiclabs/app-sdk';
|
|
6
6
|
import { useRouter } from 'next/navigation';
|
|
7
7
|
|
|
8
8
|
export default function SignupPage() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { ThemeProvider } from 'next-themes'
|
|
5
|
-
import {
|
|
5
|
+
import { DLLProvider } from '@digilogiclabs/app-sdk'
|
|
6
6
|
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
7
7
|
import { AppThemeProvider } from './theme-provider'
|
|
8
8
|
|
|
@@ -19,12 +19,12 @@ export function AppProviders({ children }: AppProvidersProps) {
|
|
|
19
19
|
disableTransitionOnChange
|
|
20
20
|
storageKey="{{packageName}}-theme"
|
|
21
21
|
>
|
|
22
|
-
<
|
|
22
|
+
<DLLProvider>
|
|
23
23
|
<AppThemeProvider themeColor="{{themeColor}}">
|
|
24
24
|
{children}
|
|
25
25
|
<Toaster />
|
|
26
26
|
</AppThemeProvider>
|
|
27
|
-
</
|
|
27
|
+
</DLLProvider>
|
|
28
28
|
</ThemeProvider>
|
|
29
29
|
)
|
|
30
30
|
}
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { createPlatform, createPlatformAsync, type IPlatform } from '@digilogiclabs/platform-core';
|
|
18
|
-
import { setPlatform as setAuthPlatform } from '@digilogiclabs/saas-factory-auth';
|
|
19
18
|
|
|
20
19
|
// Singleton platform instance
|
|
21
20
|
let platformInstance: IPlatform | null = null;
|
|
@@ -35,7 +34,6 @@ let platformInstance: IPlatform | null = null;
|
|
|
35
34
|
export function getPlatform(): IPlatform {
|
|
36
35
|
if (!platformInstance) {
|
|
37
36
|
platformInstance = createPlatform();
|
|
38
|
-
initializePackageIntegrations(platformInstance);
|
|
39
37
|
}
|
|
40
38
|
return platformInstance;
|
|
41
39
|
}
|
|
@@ -60,24 +58,10 @@ export async function initializePlatform(): Promise<IPlatform> {
|
|
|
60
58
|
// Use createPlatformAsync for production adapters
|
|
61
59
|
// Falls back to memory adapters if env vars are not set
|
|
62
60
|
platformInstance = await createPlatformAsync();
|
|
63
|
-
initializePackageIntegrations(platformInstance);
|
|
64
61
|
|
|
65
62
|
return platformInstance;
|
|
66
63
|
}
|
|
67
64
|
|
|
68
|
-
/**
|
|
69
|
-
* Initialize package integrations with platform services
|
|
70
|
-
*/
|
|
71
|
-
function initializePackageIntegrations(platform: IPlatform): void {
|
|
72
|
-
// Connect saas-factory-auth to platform-core
|
|
73
|
-
// Enables: logging, metrics, and email for auth events
|
|
74
|
-
setAuthPlatform({
|
|
75
|
-
email: platform.email,
|
|
76
|
-
logger: platform.logger,
|
|
77
|
-
metrics: platform.metrics,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
65
|
/**
|
|
82
66
|
* Reset platform instance (useful for testing)
|
|
83
67
|
*/
|
|
@@ -15,8 +15,8 @@ vi.mock('next/navigation', () => ({
|
|
|
15
15
|
usePathname: () => '/',
|
|
16
16
|
}))
|
|
17
17
|
|
|
18
|
-
// Mock
|
|
19
|
-
vi.mock('@digilogiclabs/
|
|
18
|
+
// Mock App SDK (optional - only if testing auth/payment components)
|
|
19
|
+
vi.mock('@digilogiclabs/app-sdk', () => ({
|
|
20
20
|
useAuth: () => ({
|
|
21
21
|
user: null,
|
|
22
22
|
loading: false,
|
|
@@ -26,18 +26,13 @@ vi.mock('@digilogiclabs/saas-factory-auth', () => ({
|
|
|
26
26
|
signOut: vi.fn(),
|
|
27
27
|
signInWithOAuth: vi.fn(),
|
|
28
28
|
}),
|
|
29
|
-
AuthProvider: ({ children }: { children: React.ReactNode }) => children,
|
|
30
|
-
}))
|
|
31
|
-
|
|
32
|
-
// Mock SaaS Factory Payments (optional - only if testing payment components)
|
|
33
|
-
vi.mock('@digilogiclabs/saas-factory-payments', () => ({
|
|
34
29
|
usePayments: () => ({
|
|
35
30
|
createCheckoutSession: vi.fn(),
|
|
36
31
|
createPortalSession: vi.fn(),
|
|
37
32
|
subscription: null,
|
|
38
33
|
loading: false,
|
|
39
34
|
}),
|
|
40
|
-
|
|
35
|
+
DLLProvider: ({ children }: { children: React.ReactNode }) => children,
|
|
41
36
|
}))
|
|
42
37
|
|
|
43
38
|
// Global test utilities
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"lint": "next lint"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@digilogiclabs/saas-factory-ui": "^
|
|
13
|
-
"@digilogiclabs/saas-factory-auth": "^1.0.3",
|
|
12
|
+
"@digilogiclabs/saas-factory-ui": "^1.4.0",
|
|
14
13
|
"next": "^15.0.0",
|
|
15
14
|
"react": "^19.0.0",
|
|
16
15
|
"react-dom": "^19.0.0",
|
|
@@ -17,10 +17,8 @@
|
|
|
17
17
|
"next": "^15.0.0",
|
|
18
18
|
"react": "^19.0.0",
|
|
19
19
|
"react-dom": "^19.0.0",
|
|
20
|
-
"@digilogiclabs/platform-core": "^1.
|
|
21
|
-
"@digilogiclabs/saas-factory-ui": "^
|
|
22
|
-
"@digilogiclabs/saas-factory-auth": "^1.0.6",
|
|
23
|
-
"@digilogiclabs/saas-factory-payments": "^1.2.8",
|
|
20
|
+
"@digilogiclabs/platform-core": "^1.13.0",
|
|
21
|
+
"@digilogiclabs/saas-factory-ui": "^1.4.0",
|
|
24
22
|
"stripe": "^14.0.0",
|
|
25
23
|
"@stripe/react-stripe-js": "^2.0.0",
|
|
26
24
|
"@stripe/stripe-js": "^2.0.0",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { usePayments
|
|
4
|
+
import { usePayments } from '@digilogiclabs/app-sdk';
|
|
5
|
+
import { formatCurrency, formatDate } from '@/lib/utils';
|
|
5
6
|
import { Button, Card } from '@digilogiclabs/saas-factory-ui';
|
|
6
7
|
|
|
7
8
|
export default function BillingPage() {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
|
-
import { usePayments
|
|
4
|
+
import { usePayments } from '@digilogiclabs/app-sdk';
|
|
5
|
+
import { formatCurrency } from '@/lib/utils';
|
|
5
6
|
import {
|
|
6
7
|
Button,
|
|
7
8
|
Card,
|
|
@@ -201,7 +201,7 @@ ${hasVideo ? '- **video_content**: Generated video files and metadata' : ''}
|
|
|
201
201
|
|
|
202
202
|
### Authentication Flow
|
|
203
203
|
${hasAuth ? `\`\`\`typescript
|
|
204
|
-
import { useAuth } from '@digilogiclabs/
|
|
204
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
205
205
|
|
|
206
206
|
export function ProtectedComponent() {
|
|
207
207
|
const { user, loading } = useAuth()
|
|
@@ -237,10 +237,10 @@ export function ExampleComponent() {
|
|
|
237
237
|
|
|
238
238
|
${hasPayments ? `### Payment Integration
|
|
239
239
|
\`\`\`typescript
|
|
240
|
-
import {
|
|
240
|
+
import { usePayments } from '@digilogiclabs/app-sdk'
|
|
241
241
|
|
|
242
242
|
export function CheckoutPage() {
|
|
243
|
-
const { createCheckoutSession, loading } =
|
|
243
|
+
const { createCheckoutSession, loading } = usePayments()
|
|
244
244
|
|
|
245
245
|
const handlePayment = async (priceId: string) => {
|
|
246
246
|
const { url } = await createCheckoutSession({ priceId })
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import { Button, Card, Input, Label } from '@digilogiclabs/saas-factory-ui';
|
|
5
|
-
import { useAuth } from '@digilogiclabs/
|
|
5
|
+
import { useAuth } from '@digilogiclabs/app-sdk';
|
|
6
6
|
import { useRouter } from 'next/navigation';
|
|
7
7
|
|
|
8
8
|
export default function LoginPage() {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
useOfflineState
|
|
17
17
|
} from '@digilogiclabs/saas-factory-ui'
|
|
18
18
|
import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Wifi, WifiOff, CreditCard, Smartphone } from 'lucide-react'
|
|
19
|
-
import { useAuth } from '@digilogiclabs/
|
|
19
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
20
20
|
import Link from 'next/link'
|
|
21
21
|
import { useState } from 'react'
|
|
22
22
|
|