@digilogiclabs/create-saas-app 2.4.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 +2 -11
- 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 +0 -2
- 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 +1 -3
- 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 +0 -2
- 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 +0 -2
- package/dist/templates/web/ai-platform/template/package.json +0 -2
- package/dist/templates/web/base/template/package.json +0 -2
- 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 +0 -1
- package/dist/templates/web/marketplace/template/package.json +0 -2
- package/dist/templates/web/micro-saas/template/package.json +0 -1
- 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 +0 -1
- 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 +0 -1
- package/dist/templates/web/ui-auth-payments/template/package.json +0 -2
- 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 +0 -2
- 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 +0 -2
- 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 +0 -2
- 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 +0 -2
- 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/src/test/setup.ts +3 -8
- 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 +0 -2
- 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 +1 -3
- 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 +0 -2
- 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 +0 -2
- package/src/templates/web/ai-platform/template/package.json +0 -2
- package/src/templates/web/base/template/package.json +0 -2
- 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 +0 -1
- package/src/templates/web/marketplace/template/package.json +0 -2
- package/src/templates/web/micro-saas/template/package.json +0 -1
- 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 +0 -1
- 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 +0 -1
- package/src/templates/web/ui-auth-payments/template/package.json +0 -2
- 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 +0 -2
- 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 +0 -2
- 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 +0 -2
- 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 +0 -2
- 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/src/test/setup.ts +3 -8
- 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
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"*.log",
|
|
18
18
|
".claude"
|
|
19
19
|
],
|
|
20
|
-
"instructions": "You are helping develop a Full-Stack AI 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 a Full-Stack AI 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- **Payments**: Stripe integration with @digilogiclabs/app-sdk\n- **AI Platform**: Multi-modal AI with @digilogiclabs/saas-factory-ai\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- **@digilogiclabs/app-sdk**: Stripe integration for subscriptions and payments\n- **@digilogiclabs/saas-factory-ai**: AI platform with text, audio, and video generation capabilities\n- **@digilogiclabs/saas-factory-ai-types**: TypeScript types and interfaces for AI operations\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\n7. Handle payment states and subscription status properly\n8. Implement proper AI generation state management and error handling\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, Stripe, AI providers)\n\nRemember to consult the context.md file for detailed package documentation and examples."
|
|
21
21
|
}
|
|
@@ -12,11 +12,11 @@ This project is a Full-Stack AI Platform built with modern technologies and Digi
|
|
|
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
|
|
@@ -24,11 +24,11 @@ Modern UI components with glassmorphism and responsive design
|
|
|
24
24
|
**Key Exports**: Button, Card, MobileContainer, PageTransition, ResponsiveGrid
|
|
25
25
|
**Documentation**: https://docs.digilogiclabs.com/packages/ui
|
|
26
26
|
|
|
27
|
-
#### @digilogiclabs/
|
|
28
|
-
|
|
27
|
+
#### @digilogiclabs/app-sdk (payments)
|
|
28
|
+
Payments hooks are also exported from the app-sdk
|
|
29
29
|
|
|
30
|
-
**Key Exports**:
|
|
31
|
-
**Documentation**: https://docs.digilogiclabs.com/packages/
|
|
30
|
+
**Key Exports**: usePayments (via app-sdk), PaymentForm, SubscriptionManager, BillingPortal
|
|
31
|
+
**Documentation**: https://docs.digilogiclabs.com/packages/app-sdk
|
|
32
32
|
|
|
33
33
|
#### @digilogiclabs/saas-factory-ai
|
|
34
34
|
AI platform with text, audio, and video generation capabilities
|
|
@@ -66,7 +66,7 @@ Key tables:
|
|
|
66
66
|
|
|
67
67
|
### Authentication Flow
|
|
68
68
|
```typescript
|
|
69
|
-
import { useAuth } from '@digilogiclabs/
|
|
69
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
70
70
|
|
|
71
71
|
export function ProtectedComponent() {
|
|
72
72
|
const { user, loading } = useAuth()
|
|
@@ -102,10 +102,10 @@ export function ExampleComponent() {
|
|
|
102
102
|
|
|
103
103
|
### Payment Integration
|
|
104
104
|
```typescript
|
|
105
|
-
import {
|
|
105
|
+
import { usePayments } from '@digilogiclabs/app-sdk'
|
|
106
106
|
|
|
107
107
|
export function CheckoutPage() {
|
|
108
|
-
const { createCheckoutSession, loading } =
|
|
108
|
+
const { createCheckoutSession, loading } = usePayments()
|
|
109
109
|
|
|
110
110
|
const handlePayment = async (priceId: string) => {
|
|
111
111
|
const { url } = await createCheckoutSession({ priceId })
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
"react-dom": "^19.0.0",
|
|
20
20
|
"@digilogiclabs/platform-core": "^1.13.0",
|
|
21
21
|
"@digilogiclabs/saas-factory-ui": "^1.4.0",
|
|
22
|
-
"@digilogiclabs/saas-factory-auth": "^1.0.6",
|
|
23
|
-
"@digilogiclabs/saas-factory-payments": "^1.2.8",
|
|
24
22
|
"@digilogiclabs/saas-factory-ai": "^4.0.4",
|
|
25
23
|
"stripe": "^14.0.0",
|
|
26
24
|
"@stripe/react-stripe-js": "^2.0.0",
|
|
@@ -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, formatDate } from '@/lib/utils';
|
|
5
6
|
import {
|
|
6
7
|
Button,
|
|
7
8
|
Card,
|
|
@@ -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 } from '@/lib/utils';
|
|
5
6
|
import { Button, Card } from '@digilogiclabs/saas-factory-ui';
|
|
6
7
|
|
|
7
8
|
export default function CheckoutPage() {
|
|
@@ -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 })
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
MobileContainer,
|
|
11
11
|
PageTransition
|
|
12
12
|
} from '@digilogiclabs/saas-factory-ui'
|
|
13
|
-
import { useAuth } from '@digilogiclabs/
|
|
13
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
14
14
|
import { useRouter } from 'next/navigation'
|
|
15
15
|
import {
|
|
16
16
|
User,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
TabsTrigger,
|
|
16
16
|
TabsContent
|
|
17
17
|
} from '@digilogiclabs/saas-factory-ui'
|
|
18
|
-
import { useAuth } from '@digilogiclabs/
|
|
18
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
19
19
|
import { useRouter } from 'next/navigation'
|
|
20
20
|
import {
|
|
21
21
|
User,
|
package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/auth-status.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Button } from '@digilogiclabs/saas-factory-ui'
|
|
4
4
|
import { LogOut, User } from 'lucide-react'
|
|
5
|
-
import { useAuth } from '@digilogiclabs/
|
|
5
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
6
6
|
import Link from 'next/link'
|
|
7
7
|
|
|
8
8
|
export function AuthStatus() {
|
package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
FormField,
|
|
11
11
|
FormProvider
|
|
12
12
|
} from '@digilogiclabs/saas-factory-ui'
|
|
13
|
-
import { useAuth } from '@digilogiclabs/
|
|
13
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
14
14
|
import { useRouter } from 'next/navigation'
|
|
15
15
|
import { signInAction } from '@/lib/actions/auth'
|
|
16
16
|
|
package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
FormField,
|
|
11
11
|
FormProvider
|
|
12
12
|
} from '@digilogiclabs/saas-factory-ui'
|
|
13
|
-
import { useAuth } from '@digilogiclabs/
|
|
13
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
14
14
|
import { useRouter } from 'next/navigation'
|
|
15
15
|
import { signUpAction } from '@/lib/actions/auth'
|
|
16
16
|
|
package/dist/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { ThemeProvider } from 'next-themes'
|
|
5
|
-
import {
|
|
6
|
-
import { PaymentsProvider } from '@digilogiclabs/saas-factory-payments'
|
|
5
|
+
import { DLLProvider } from '@digilogiclabs/app-sdk'
|
|
7
6
|
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
8
7
|
import { AppThemeProvider } from './theme-provider'
|
|
9
8
|
|
|
@@ -24,14 +23,12 @@ export function AppProviders({ children }: AppProvidersProps) {
|
|
|
24
23
|
disableTransitionOnChange
|
|
25
24
|
storageKey={`${packageName}-theme`}
|
|
26
25
|
>
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</PaymentsProvider>
|
|
34
|
-
</AuthProvider>
|
|
26
|
+
<DLLProvider>
|
|
27
|
+
<AppThemeProvider themeColor={themeColor}>
|
|
28
|
+
{children}
|
|
29
|
+
<Toaster />
|
|
30
|
+
</AppThemeProvider>
|
|
31
|
+
</DLLProvider>
|
|
35
32
|
</ThemeProvider>
|
|
36
33
|
)
|
|
37
34
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import Link from 'next/link';
|
|
5
5
|
import { LogOut, CreditCard, User, Settings, Home, Music, Headphones, Menu, X, Info } from 'lucide-react';
|
|
6
|
-
import { useAuth } from '@digilogiclabs/
|
|
6
|
+
import { useAuth } from '@digilogiclabs/app-sdk';
|
|
7
7
|
import {
|
|
8
8
|
ResponsiveHeader,
|
|
9
9
|
MobileNavigation,
|
|
@@ -15,8 +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
|
-
import { setPlatform as setPaymentsPlatform } from '@digilogiclabs/saas-factory-payments';
|
|
20
18
|
import { setPlatform as setAIPlatform } from '@digilogiclabs/saas-factory-ai';
|
|
21
19
|
|
|
22
20
|
// Singleton platform instance
|
|
@@ -71,22 +69,6 @@ export async function initializePlatform(): Promise<IPlatform> {
|
|
|
71
69
|
* Initialize package integrations with platform services
|
|
72
70
|
*/
|
|
73
71
|
function initializePackageIntegrations(platform: IPlatform): void {
|
|
74
|
-
// Connect saas-factory-auth to platform-core
|
|
75
|
-
// Enables: logging, metrics, and email for auth events
|
|
76
|
-
setAuthPlatform({
|
|
77
|
-
email: platform.email,
|
|
78
|
-
logger: platform.logger,
|
|
79
|
-
metrics: platform.metrics,
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
// Connect saas-factory-payments to platform-core
|
|
83
|
-
// Enables: logging, metrics, and caching for payment events
|
|
84
|
-
setPaymentsPlatform({
|
|
85
|
-
logger: platform.logger,
|
|
86
|
-
metrics: platform.metrics,
|
|
87
|
-
cache: platform.cache,
|
|
88
|
-
});
|
|
89
|
-
|
|
90
72
|
// Connect saas-factory-ai to platform-core
|
|
91
73
|
// Enables: logging, metrics, and caching for AI operations
|
|
92
74
|
setAIPlatform({
|
|
@@ -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
|
|
@@ -23,8 +23,6 @@
|
|
|
23
23
|
"react": "^19.0.0",
|
|
24
24
|
"react-dom": "^19.0.0",
|
|
25
25
|
"@digilogiclabs/saas-factory-ui": "^1.4.0",
|
|
26
|
-
"@digilogiclabs/saas-factory-auth": "^1.0.3",
|
|
27
|
-
"@digilogiclabs/saas-factory-payments": "^1.2.3",
|
|
28
26
|
"@digilogiclabs/saas-factory-ai": "^4.0.2",
|
|
29
27
|
"@digilogiclabs/saas-factory-ai-types": "^4.0.2",
|
|
30
28
|
"stripe": "^14.0.0",
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
CheckCircle,
|
|
35
35
|
Loader2
|
|
36
36
|
} from 'lucide-react'
|
|
37
|
-
import { useAuth } from '@digilogiclabs/
|
|
37
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
38
38
|
import Link from 'next/link'
|
|
39
39
|
import { useRAGSystem } from '../../../hooks/useRAGSystem'
|
|
40
40
|
import { RAGChatInterface } from '../../../components/rag/RAGChatInterface'
|
|
@@ -18,8 +18,6 @@
|
|
|
18
18
|
"react": "^19.0.0",
|
|
19
19
|
"react-dom": "^19.0.0",
|
|
20
20
|
"@digilogiclabs/saas-factory-ui": "^1.4.0",
|
|
21
|
-
"@digilogiclabs/saas-factory-auth": "^1.0.3",
|
|
22
|
-
"@digilogiclabs/saas-factory-payments": "^1.2.3",
|
|
23
21
|
"stripe": "^14.0.0",
|
|
24
22
|
"@stripe/react-stripe-js": "^2.0.0",
|
|
25
23
|
"@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 from 'react';
|
|
4
|
-
import { usePayments
|
|
4
|
+
import { usePayments } from '@digilogiclabs/app-sdk';
|
|
5
|
+
import { formatCurrency } from '@/lib/utils';
|
|
5
6
|
import { Button, Card } from '@digilogiclabs/saas-factory-ui';
|
|
6
7
|
|
|
7
8
|
export default function CheckoutPage() {
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
useGlassmorphism
|
|
33
33
|
} from '@digilogiclabs/saas-factory-ui'
|
|
34
34
|
import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Music, Wifi, WifiOff } from 'lucide-react'
|
|
35
|
-
import { useAuth } from '@digilogiclabs/
|
|
35
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
36
36
|
import Link from 'next/link'
|
|
37
37
|
import { useState } from 'react'
|
|
38
38
|
|
package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/auth-status.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Button } from '@digilogiclabs/saas-factory-ui'
|
|
4
4
|
import { LogOut, User } from 'lucide-react'
|
|
5
|
-
import { useAuth } from '@digilogiclabs/
|
|
5
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
6
6
|
import Link from 'next/link'
|
|
7
7
|
|
|
8
8
|
export function AuthStatus() {
|
package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useState, useActionState } 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
|
import { signInAction } from '@/lib/actions/auth'
|
|
8
8
|
|
package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useState, useActionState } 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
|
import { signUpAction } from '@/lib/actions/auth'
|
|
8
8
|
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { ThemeProvider } from 'next-themes'
|
|
5
|
-
import {
|
|
6
|
-
import { PaymentsProvider } from '@digilogiclabs/saas-factory-payments'
|
|
5
|
+
import { DLLProvider } from '@digilogiclabs/app-sdk'
|
|
7
6
|
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
8
7
|
import { AppThemeProvider } from './theme-provider'
|
|
9
8
|
|
|
@@ -24,14 +23,12 @@ export function AppProviders({ children }: AppProvidersProps) {
|
|
|
24
23
|
disableTransitionOnChange
|
|
25
24
|
storageKey={`${packageName}-theme`}
|
|
26
25
|
>
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</PaymentsProvider>
|
|
34
|
-
</AuthProvider>
|
|
26
|
+
<DLLProvider>
|
|
27
|
+
<AppThemeProvider themeColor={themeColor}>
|
|
28
|
+
{children}
|
|
29
|
+
<Toaster />
|
|
30
|
+
</AppThemeProvider>
|
|
31
|
+
</DLLProvider>
|
|
35
32
|
</ThemeProvider>
|
|
36
33
|
)
|
|
37
34
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import Link from 'next/link';
|
|
5
5
|
import { LogOut, CreditCard, User, Settings, Home, Music, Headphones, Menu, X, Info } from 'lucide-react';
|
|
6
|
-
import { useAuth } from '@digilogiclabs/
|
|
6
|
+
import { useAuth } from '@digilogiclabs/app-sdk';
|
|
7
7
|
import {
|
|
8
8
|
ResponsiveHeader,
|
|
9
9
|
MobileNavigation,
|
|
@@ -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
|
|
@@ -18,8 +18,6 @@
|
|
|
18
18
|
"react": "^19.0.0",
|
|
19
19
|
"react-dom": "^19.0.0",
|
|
20
20
|
"@digilogiclabs/saas-factory-ui": "^1.4.0",
|
|
21
|
-
"@digilogiclabs/saas-factory-auth": "^1.0.3",
|
|
22
|
-
"@digilogiclabs/saas-factory-payments": "^1.2.3",
|
|
23
21
|
"stripe": "^14.0.0",
|
|
24
22
|
"@stripe/react-stripe-js": "^2.0.0",
|
|
25
23
|
"@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 from 'react';
|
|
4
|
-
import { usePayments
|
|
4
|
+
import { usePayments } from '@digilogiclabs/app-sdk';
|
|
5
|
+
import { formatCurrency } from '@/lib/utils';
|
|
5
6
|
import { Button, Card } from '@digilogiclabs/saas-factory-ui';
|
|
6
7
|
|
|
7
8
|
export default function CheckoutPage() {
|
|
@@ -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() {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
useOfflineState
|
|
18
18
|
} from '@digilogiclabs/saas-factory-ui'
|
|
19
19
|
import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Video, Wifi, WifiOff, Play, Pause } from 'lucide-react'
|
|
20
|
-
import { useAuth } from '@digilogiclabs/
|
|
20
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
21
21
|
import Link from 'next/link'
|
|
22
22
|
import { useState } from 'react'
|
|
23
23
|
|
|
@@ -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,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { ThemeProvider } from 'next-themes'
|
|
5
|
-
import {
|
|
6
|
-
import { PaymentsProvider } from '@digilogiclabs/saas-factory-payments'
|
|
5
|
+
import { DLLProvider } from '@digilogiclabs/app-sdk'
|
|
7
6
|
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
8
7
|
import { AppThemeProvider } from './theme-provider'
|
|
9
8
|
|
|
@@ -20,14 +19,12 @@ export function AppProviders({ children }: AppProvidersProps) {
|
|
|
20
19
|
disableTransitionOnChange
|
|
21
20
|
storageKey="{{packageName}}-theme"
|
|
22
21
|
>
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</PaymentsProvider>
|
|
30
|
-
</AuthProvider>
|
|
22
|
+
<DLLProvider>
|
|
23
|
+
<AppThemeProvider themeColor="{{themeColor}}">
|
|
24
|
+
{children}
|
|
25
|
+
<Toaster />
|
|
26
|
+
</AppThemeProvider>
|
|
27
|
+
</DLLProvider>
|
|
31
28
|
</ThemeProvider>
|
|
32
29
|
)
|
|
33
30
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import Link from 'next/link';
|
|
5
5
|
import { LogOut, CreditCard, User, Settings, Home, Video, Film, Play, Menu, X } from 'lucide-react';
|
|
6
|
-
import { useAuth } from '@digilogiclabs/
|
|
6
|
+
import { useAuth } from '@digilogiclabs/app-sdk';
|
|
7
7
|
import {
|
|
8
8
|
ResponsiveHeader,
|
|
9
9
|
MobileNavigation,
|
|
@@ -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
|