@digilogiclabs/create-saas-app 2.11.0 → 2.12.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 +6 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/generators/template-generator.d.ts.map +1 -1
- package/dist/generators/template-generator.js +15 -8
- package/dist/generators/template-generator.js.map +1 -1
- package/dist/templates/shared/admin/web/src/components/admin-nav.tsx +3 -3
- package/dist/templates/shared/auth/supabase/web/src/lib/auth-session.ts +36 -16
- package/dist/templates/shared/auth/supabase/web/src/middleware.ts +6 -0
- package/dist/templates/shared/cookie-consent/web/components/cookie-consent.tsx +5 -5
- package/dist/templates/shared/design/web/src/components/ui/button.tsx +56 -0
- package/dist/templates/shared/email/web/src/lib/email/client.ts +1 -1
- package/dist/templates/shared/error-pages/web/src/app/error.tsx +13 -11
- package/dist/templates/shared/error-pages/web/src/app/global-error.tsx +2 -0
- package/dist/templates/shared/error-pages/web/src/app/not-found.tsx +6 -6
- package/dist/templates/shared/legal/web/src/app/(legal)/privacy/page.tsx +4 -4
- package/dist/templates/shared/legal/web/src/app/(legal)/terms/page.tsx +4 -4
- package/dist/templates/shared/loading/web/components/skeleton.tsx +4 -4
- package/dist/templates/shared/mock/web/.env.local +55 -0
- package/dist/templates/shared/mock/web/src/components/mock-auth-provider.tsx +72 -0
- package/dist/templates/shared/mock/web/src/components/mock-banner.tsx +29 -0
- package/dist/templates/shared/mock/web/src/lib/mock.ts +147 -0
- package/dist/templates/shared/payments/web/src/app/api/webhooks/stripe/route.ts +10 -4
- package/dist/templates/shared/redis/web/src/lib/redis.ts +1 -1
- package/dist/templates/web/base/template/eslint.config.mjs +14 -0
- package/dist/templates/web/base/template/src/app/auth/callback/route.ts +1 -1
- package/dist/templates/web/base/template/src/app/checkout/page.tsx +76 -103
- package/dist/templates/web/base/template/src/app/dashboard/page.tsx +145 -329
- package/dist/templates/web/base/template/src/app/layout.tsx +40 -38
- package/dist/templates/web/base/template/src/app/login/page.tsx +116 -66
- package/dist/templates/web/base/template/src/app/page.tsx +97 -193
- package/dist/templates/web/base/template/src/app/settings/page.tsx +154 -0
- package/dist/templates/web/base/template/src/app/signup/page.tsx +117 -66
- package/dist/templates/web/base/template/src/components/providers/app-providers.tsx +8 -3
- package/dist/templates/web/base/template/src/components/shared/header.tsx +229 -63
- package/dist/templates/web/ui-auth/template/eslint.config.mjs +14 -0
- package/dist/templates/web/ui-auth/template/src/app/checkout/page.tsx +3 -3
- package/dist/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +81 -91
- package/dist/templates/web/ui-auth/template/src/app/layout.tsx +38 -36
- package/dist/templates/web/ui-auth/template/src/app/login/page.tsx +22 -45
- package/dist/templates/web/ui-auth/template/src/app/page.tsx +106 -306
- package/dist/templates/web/ui-auth/template/src/app/setup/page.tsx +387 -402
- package/dist/templates/web/ui-auth/template/src/app/signup/page.tsx +24 -47
- package/dist/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +8 -3
- package/dist/templates/web/ui-auth/template/src/components/shared/header.tsx +229 -94
- package/dist/templates/web/ui-auth-ai/template/src/app/layout.tsx +38 -45
- package/dist/templates/web/ui-auth-ai/template/src/app/login/page.tsx +86 -0
- package/dist/templates/web/ui-auth-ai/template/src/app/page.tsx +107 -193
- package/dist/templates/web/ui-auth-ai/template/src/app/signup/page.tsx +105 -0
- package/dist/templates/web/ui-auth-ai/template/src/components/ai/audio-generator.tsx +144 -140
- package/dist/templates/web/ui-auth-ai/template/src/components/ai/video-generator.tsx +156 -157
- package/dist/templates/web/ui-auth-ai/template/src/components/auth/login-form.tsx +7 -3
- package/dist/templates/web/ui-auth-ai/template/src/components/providers/app-providers.tsx +25 -0
- package/dist/templates/web/ui-auth-ai/template/src/components/shared/footer.tsx +36 -0
- package/dist/templates/web/ui-auth-ai/template/src/components/shared/header.tsx +228 -0
- package/dist/templates/web/ui-auth-ai/template/src/components/ui/button.tsx +5 -5
- package/dist/templates/web/ui-auth-ai/template/src/components/ui/input.tsx +1 -1
- package/dist/templates/web/ui-auth-ai/template/src/components/ui/select.tsx +1 -1
- package/dist/templates/web/ui-auth-ai/template/src/components/ui/textarea.tsx +1 -1
- package/dist/templates/web/ui-auth-ai/template/src/components/ui/theme-toggle.tsx +34 -0
- package/dist/templates/web/ui-auth-ai/template/src/lib/supabase.ts +6 -4
- package/dist/templates/web/ui-auth-ai/template/src/providers/auth-provider.tsx +7 -5
- package/dist/templates/web/ui-auth-payments/template/src/app/billing/page.tsx +63 -192
- package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +104 -296
- package/dist/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +27 -27
- package/dist/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +70 -81
- package/dist/templates/web/ui-auth-payments/template/src/app/layout.tsx +38 -36
- package/dist/templates/web/ui-auth-payments/template/src/app/login/loading.tsx +9 -9
- package/dist/templates/web/ui-auth-payments/template/src/app/login/page.tsx +4 -104
- package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +69 -337
- package/dist/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +55 -68
- package/dist/templates/web/ui-auth-payments/template/src/app/signup/loading.tsx +13 -13
- package/dist/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +4 -123
- package/dist/templates/web/ui-auth-payments/template/src/components/client/auth-status.tsx +37 -52
- package/dist/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +49 -103
- package/dist/templates/web/ui-auth-payments/template/src/components/client/newsletter-signup.tsx +4 -4
- package/dist/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +60 -140
- package/dist/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx +25 -28
- package/dist/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +229 -230
- package/dist/templates/web/ui-auth-payments/template/src/lib/actions/auth.ts +245 -245
- package/dist/templates/web/ui-auth-payments/template/src/lib/actions/index.ts +339 -339
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/ai/page.tsx +305 -309
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +62 -312
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/checkout/page.tsx +109 -125
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +27 -27
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +68 -83
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/layout.tsx +40 -38
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +20 -20
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +140 -394
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +28 -27
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +51 -66
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/auth-status.tsx +37 -52
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +50 -79
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +58 -111
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +8 -3
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +229 -252
- package/dist/templates/web/ui-auth-payments-ai/template/src/lib/actions/auth.ts +245 -245
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/billing/page.tsx +63 -192
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/checkout/page.tsx +109 -125
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +27 -27
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/layout.tsx +40 -38
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +122 -385
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/setup/page.tsx +340 -344
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/auth-status.tsx +37 -52
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +49 -103
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +60 -140
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +8 -3
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +229 -252
- package/dist/templates/web/ui-auth-payments-audio/template/src/lib/actions/auth.ts +3 -3
- package/dist/templates/web/ui-auth-payments-video/template/src/app/billing/page.tsx +63 -192
- package/dist/templates/web/ui-auth-payments-video/template/src/app/checkout/page.tsx +109 -125
- package/dist/templates/web/ui-auth-payments-video/template/src/app/layout.tsx +38 -36
- package/dist/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +9 -109
- package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +132 -392
- package/dist/templates/web/ui-auth-payments-video/template/src/app/setup/page.tsx +346 -350
- package/dist/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +9 -128
- package/dist/templates/web/ui-auth-payments-video/template/src/components/client/login-form.tsx +90 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/components/client/signup-form.tsx +105 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +8 -3
- package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +229 -246
- package/dist/templates/web/ui-only/template/eslint.config.mjs +14 -0
- package/dist/templates/web/ui-only/template/src/app/checkout/page.tsx +2 -2
- package/dist/templates/web/ui-only/template/src/app/login/page.tsx +69 -63
- package/dist/templates/web/ui-only/template/src/app/page.tsx +69 -91
- package/dist/templates/web/ui-only/template/src/app/signup/page.tsx +94 -79
- package/dist/templates/web/ui-only/template/src/components/providers/app-providers.tsx +1 -6
- package/dist/templates/web/ui-only/template/src/components/shared/header.tsx +90 -53
- package/dist/templates/web/ui-package-test/template/package.json +19 -23
- package/dist/templates/web/ui-package-test/template/postcss.config.mjs +8 -0
- package/dist/templates/web/ui-package-test/template/src/app/globals.css +88 -0
- package/dist/templates/web/ui-package-test/template/src/app/layout.tsx +27 -0
- package/dist/templates/web/ui-package-test/template/src/app/page.tsx +46 -106
- package/package.json +1 -1
- package/src/templates/shared/admin/web/src/components/admin-nav.tsx +3 -3
- package/src/templates/shared/auth/supabase/web/src/lib/auth-session.ts +36 -16
- package/src/templates/shared/auth/supabase/web/src/middleware.ts +6 -0
- package/src/templates/shared/cookie-consent/web/components/cookie-consent.tsx +5 -5
- package/src/templates/shared/design/web/src/components/ui/button.tsx +56 -0
- package/src/templates/shared/email/web/src/lib/email/client.ts +1 -1
- package/src/templates/shared/error-pages/web/src/app/error.tsx +13 -11
- package/src/templates/shared/error-pages/web/src/app/global-error.tsx +2 -0
- package/src/templates/shared/error-pages/web/src/app/not-found.tsx +6 -6
- package/src/templates/shared/legal/web/src/app/(legal)/privacy/page.tsx +4 -4
- package/src/templates/shared/legal/web/src/app/(legal)/terms/page.tsx +4 -4
- package/src/templates/shared/loading/web/components/skeleton.tsx +4 -4
- package/src/templates/shared/mock/web/.env.local +55 -0
- package/src/templates/shared/mock/web/src/components/mock-auth-provider.tsx +72 -0
- package/src/templates/shared/mock/web/src/components/mock-banner.tsx +29 -0
- package/src/templates/shared/mock/web/src/lib/mock.ts +147 -0
- package/src/templates/shared/payments/web/src/app/api/webhooks/stripe/route.ts +10 -4
- package/src/templates/shared/redis/web/src/lib/redis.ts +1 -1
- package/src/templates/web/base/template/eslint.config.mjs +14 -0
- package/src/templates/web/base/template/src/app/auth/callback/route.ts +1 -1
- package/src/templates/web/base/template/src/app/checkout/page.tsx +76 -103
- package/src/templates/web/base/template/src/app/dashboard/page.tsx +145 -329
- package/src/templates/web/base/template/src/app/layout.tsx +40 -38
- package/src/templates/web/base/template/src/app/login/page.tsx +116 -66
- package/src/templates/web/base/template/src/app/page.tsx +97 -193
- package/src/templates/web/base/template/src/app/settings/page.tsx +154 -0
- package/src/templates/web/base/template/src/app/signup/page.tsx +117 -66
- package/src/templates/web/base/template/src/components/providers/app-providers.tsx +8 -3
- package/src/templates/web/base/template/src/components/shared/header.tsx +229 -63
- package/src/templates/web/ui-auth/template/eslint.config.mjs +14 -0
- package/src/templates/web/ui-auth/template/src/app/checkout/page.tsx +3 -3
- package/src/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +81 -91
- package/src/templates/web/ui-auth/template/src/app/layout.tsx +38 -36
- package/src/templates/web/ui-auth/template/src/app/login/page.tsx +22 -45
- package/src/templates/web/ui-auth/template/src/app/page.tsx +106 -306
- package/src/templates/web/ui-auth/template/src/app/setup/page.tsx +387 -402
- package/src/templates/web/ui-auth/template/src/app/signup/page.tsx +24 -47
- package/src/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +8 -3
- package/src/templates/web/ui-auth/template/src/components/shared/header.tsx +229 -94
- package/src/templates/web/ui-auth-ai/template/src/app/layout.tsx +38 -45
- package/src/templates/web/ui-auth-ai/template/src/app/login/page.tsx +86 -0
- package/src/templates/web/ui-auth-ai/template/src/app/page.tsx +107 -193
- package/src/templates/web/ui-auth-ai/template/src/app/signup/page.tsx +105 -0
- package/src/templates/web/ui-auth-ai/template/src/components/ai/audio-generator.tsx +144 -140
- package/src/templates/web/ui-auth-ai/template/src/components/ai/video-generator.tsx +156 -157
- package/src/templates/web/ui-auth-ai/template/src/components/auth/login-form.tsx +7 -3
- package/src/templates/web/ui-auth-ai/template/src/components/providers/app-providers.tsx +25 -0
- package/src/templates/web/ui-auth-ai/template/src/components/shared/footer.tsx +36 -0
- package/src/templates/web/ui-auth-ai/template/src/components/shared/header.tsx +228 -0
- package/src/templates/web/ui-auth-ai/template/src/components/ui/button.tsx +5 -5
- package/src/templates/web/ui-auth-ai/template/src/components/ui/input.tsx +1 -1
- package/src/templates/web/ui-auth-ai/template/src/components/ui/select.tsx +1 -1
- package/src/templates/web/ui-auth-ai/template/src/components/ui/textarea.tsx +1 -1
- package/src/templates/web/ui-auth-ai/template/src/components/ui/theme-toggle.tsx +34 -0
- package/src/templates/web/ui-auth-ai/template/src/lib/supabase.ts +6 -4
- package/src/templates/web/ui-auth-ai/template/src/providers/auth-provider.tsx +7 -5
- package/src/templates/web/ui-auth-payments/template/src/app/billing/page.tsx +63 -192
- package/src/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +104 -296
- package/src/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +27 -27
- package/src/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +70 -81
- package/src/templates/web/ui-auth-payments/template/src/app/layout.tsx +38 -36
- package/src/templates/web/ui-auth-payments/template/src/app/login/loading.tsx +9 -9
- package/src/templates/web/ui-auth-payments/template/src/app/login/page.tsx +4 -104
- package/src/templates/web/ui-auth-payments/template/src/app/page.tsx +69 -337
- package/src/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +55 -68
- package/src/templates/web/ui-auth-payments/template/src/app/signup/loading.tsx +13 -13
- package/src/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +4 -123
- package/src/templates/web/ui-auth-payments/template/src/components/client/auth-status.tsx +37 -52
- package/src/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +49 -103
- package/src/templates/web/ui-auth-payments/template/src/components/client/newsletter-signup.tsx +4 -4
- package/src/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +60 -140
- package/src/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx +25 -28
- package/src/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +229 -230
- package/src/templates/web/ui-auth-payments/template/src/lib/actions/auth.ts +245 -245
- package/src/templates/web/ui-auth-payments/template/src/lib/actions/index.ts +339 -339
- package/src/templates/web/ui-auth-payments-ai/template/src/app/ai/page.tsx +305 -309
- package/src/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +62 -312
- package/src/templates/web/ui-auth-payments-ai/template/src/app/checkout/page.tsx +109 -125
- package/src/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +27 -27
- package/src/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +68 -83
- package/src/templates/web/ui-auth-payments-ai/template/src/app/layout.tsx +40 -38
- package/src/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +20 -20
- package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +140 -394
- package/src/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +28 -27
- package/src/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +51 -66
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/auth-status.tsx +37 -52
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +50 -79
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +58 -111
- package/src/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +8 -3
- package/src/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +229 -252
- package/src/templates/web/ui-auth-payments-ai/template/src/lib/actions/auth.ts +245 -245
- package/src/templates/web/ui-auth-payments-audio/template/src/app/billing/page.tsx +63 -192
- package/src/templates/web/ui-auth-payments-audio/template/src/app/checkout/page.tsx +109 -125
- package/src/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +27 -27
- package/src/templates/web/ui-auth-payments-audio/template/src/app/layout.tsx +40 -38
- package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +122 -385
- package/src/templates/web/ui-auth-payments-audio/template/src/app/setup/page.tsx +340 -344
- package/src/templates/web/ui-auth-payments-audio/template/src/components/client/auth-status.tsx +37 -52
- package/src/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +49 -103
- package/src/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +60 -140
- package/src/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +8 -3
- package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +229 -252
- package/src/templates/web/ui-auth-payments-audio/template/src/lib/actions/auth.ts +3 -3
- package/src/templates/web/ui-auth-payments-video/template/src/app/billing/page.tsx +63 -192
- package/src/templates/web/ui-auth-payments-video/template/src/app/checkout/page.tsx +109 -125
- package/src/templates/web/ui-auth-payments-video/template/src/app/layout.tsx +38 -36
- package/src/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +9 -109
- package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +132 -392
- package/src/templates/web/ui-auth-payments-video/template/src/app/setup/page.tsx +346 -350
- package/src/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +9 -128
- package/src/templates/web/ui-auth-payments-video/template/src/components/client/login-form.tsx +90 -0
- package/src/templates/web/ui-auth-payments-video/template/src/components/client/signup-form.tsx +105 -0
- package/src/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +8 -3
- package/src/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +229 -246
- package/src/templates/web/ui-only/template/eslint.config.mjs +14 -0
- package/src/templates/web/ui-only/template/src/app/checkout/page.tsx +2 -2
- package/src/templates/web/ui-only/template/src/app/login/page.tsx +69 -63
- package/src/templates/web/ui-only/template/src/app/page.tsx +69 -91
- package/src/templates/web/ui-only/template/src/app/signup/page.tsx +94 -79
- package/src/templates/web/ui-only/template/src/components/providers/app-providers.tsx +1 -6
- package/src/templates/web/ui-only/template/src/components/shared/header.tsx +90 -53
- package/src/templates/web/ui-package-test/template/package.json +19 -23
- package/src/templates/web/ui-package-test/template/postcss.config.mjs +8 -0
- package/src/templates/web/ui-package-test/template/src/app/globals.css +88 -0
- package/src/templates/web/ui-package-test/template/src/app/layout.tsx +27 -0
- package/src/templates/web/ui-package-test/template/src/app/page.tsx +46 -106
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/README.md +0 -655
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/app/(tabs)/ai.tsx +0 -683
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/app/_layout.tsx +0 -124
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/app.json +0 -74
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/babel.config.js +0 -25
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/docs/MOBILE-SETUP.md +0 -787
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/eas.json +0 -25
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/expo-env.d.ts +0 -3
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/hooks/useRAGSystem.ts +0 -346
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/jest-setup.ts +0 -37
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/lib/rag/config.ts +0 -180
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/metro.config.js +0 -11
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/package.json +0 -122
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/scripts/setup-rag.js +0 -599
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/tsconfig.json +0 -32
- package/dist/templates/web/base/template/.eslintrc.js +0 -8
- package/dist/templates/web/base/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/base/template/src/test/setup.ts +0 -74
- package/dist/templates/web/base/template/vitest.config.ts +0 -17
- package/dist/templates/web/ui-auth/template/.eslintrc.js +0 -8
- package/dist/templates/web/ui-auth/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/ui-auth/template/src/test/setup.ts +0 -74
- package/dist/templates/web/ui-auth/template/vitest.config.ts +0 -17
- package/dist/templates/web/ui-auth-payments/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/ui-auth-payments/template/src/test/setup.ts +0 -74
- package/dist/templates/web/ui-auth-payments/template/vitest.config.ts +0 -17
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/ui-auth-payments-ai/template/src/test/setup.ts +0 -74
- package/dist/templates/web/ui-auth-payments-ai/template/vitest.config.ts +0 -17
- package/dist/templates/web/ui-auth-payments-ai-rag/template/README.md +0 -434
- package/dist/templates/web/ui-auth-payments-ai-rag/template/components/rag/KnowledgeManager.tsx +0 -642
- package/dist/templates/web/ui-auth-payments-ai-rag/template/components/rag/RAGAnalytics.tsx +0 -466
- package/dist/templates/web/ui-auth-payments-ai-rag/template/components/rag/RAGChatInterface.tsx +0 -393
- package/dist/templates/web/ui-auth-payments-ai-rag/template/docs/GETTING-STARTED.md +0 -457
- package/dist/templates/web/ui-auth-payments-ai-rag/template/hooks/useRAGSystem.ts +0 -478
- package/dist/templates/web/ui-auth-payments-ai-rag/template/lib/rag/config.ts +0 -250
- package/dist/templates/web/ui-auth-payments-ai-rag/template/package.json +0 -73
- package/dist/templates/web/ui-auth-payments-ai-rag/template/scripts/setup-rag.js +0 -622
- package/dist/templates/web/ui-auth-payments-ai-rag/template/src/app/ai/page.tsx +0 -396
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +0 -74
- package/dist/templates/web/ui-auth-payments-audio/template/vitest.config.ts +0 -17
- package/dist/templates/web/ui-auth-payments-video/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/ui-auth-payments-video/template/src/test/setup.ts +0 -74
- package/dist/templates/web/ui-auth-payments-video/template/vitest.config.ts +0 -17
- package/dist/templates/web/ui-only/template/.eslintrc.js +0 -8
- package/dist/templates/web/ui-only/template/src/components/__tests__/example.test.tsx +0 -49
- package/dist/templates/web/ui-only/template/src/test/setup.ts +0 -74
- package/dist/templates/web/ui-only/template/vitest.config.ts +0 -17
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/README.md +0 -655
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/app/(tabs)/ai.tsx +0 -683
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/app/_layout.tsx +0 -124
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/app.json +0 -74
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/babel.config.js +0 -25
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/docs/MOBILE-SETUP.md +0 -787
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/eas.json +0 -25
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/expo-env.d.ts +0 -3
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/hooks/useRAGSystem.ts +0 -346
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/jest-setup.ts +0 -37
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/lib/rag/config.ts +0 -180
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/metro.config.js +0 -11
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/package.json +0 -122
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/scripts/setup-rag.js +0 -599
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/tsconfig.json +0 -32
- package/src/templates/web/base/template/.eslintrc.js +0 -8
- package/src/templates/web/base/template/src/components/__tests__/example.test.tsx +0 -49
- package/src/templates/web/base/template/src/test/setup.ts +0 -74
- package/src/templates/web/base/template/vitest.config.ts +0 -17
- package/src/templates/web/ui-auth/template/.eslintrc.js +0 -8
- package/src/templates/web/ui-auth/template/src/components/__tests__/example.test.tsx +0 -49
- package/src/templates/web/ui-auth/template/src/test/setup.ts +0 -74
- package/src/templates/web/ui-auth/template/vitest.config.ts +0 -17
- package/src/templates/web/ui-auth-payments/template/src/components/__tests__/example.test.tsx +0 -49
- package/src/templates/web/ui-auth-payments/template/src/test/setup.ts +0 -74
- package/src/templates/web/ui-auth-payments/template/vitest.config.ts +0 -17
- package/src/templates/web/ui-auth-payments-ai/template/src/components/__tests__/example.test.tsx +0 -49
- package/src/templates/web/ui-auth-payments-ai/template/src/test/setup.ts +0 -74
- package/src/templates/web/ui-auth-payments-ai/template/vitest.config.ts +0 -17
- package/src/templates/web/ui-auth-payments-ai-rag/template/README.md +0 -434
- package/src/templates/web/ui-auth-payments-ai-rag/template/components/rag/KnowledgeManager.tsx +0 -642
- package/src/templates/web/ui-auth-payments-ai-rag/template/components/rag/RAGAnalytics.tsx +0 -466
- package/src/templates/web/ui-auth-payments-ai-rag/template/components/rag/RAGChatInterface.tsx +0 -393
- package/src/templates/web/ui-auth-payments-ai-rag/template/docs/GETTING-STARTED.md +0 -457
- package/src/templates/web/ui-auth-payments-ai-rag/template/hooks/useRAGSystem.ts +0 -478
- package/src/templates/web/ui-auth-payments-ai-rag/template/lib/rag/config.ts +0 -250
- package/src/templates/web/ui-auth-payments-ai-rag/template/package.json +0 -73
- package/src/templates/web/ui-auth-payments-ai-rag/template/scripts/setup-rag.js +0 -622
- package/src/templates/web/ui-auth-payments-ai-rag/template/src/app/ai/page.tsx +0 -396
- package/src/templates/web/ui-auth-payments-audio/template/src/components/__tests__/example.test.tsx +0 -49
- package/src/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +0 -74
- package/src/templates/web/ui-auth-payments-audio/template/vitest.config.ts +0 -17
- package/src/templates/web/ui-auth-payments-video/template/src/components/__tests__/example.test.tsx +0 -49
- package/src/templates/web/ui-auth-payments-video/template/src/test/setup.ts +0 -74
- package/src/templates/web/ui-auth-payments-video/template/vitest.config.ts +0 -17
- package/src/templates/web/ui-only/template/.eslintrc.js +0 -8
- package/src/templates/web/ui-only/template/src/components/__tests__/example.test.tsx +0 -49
- package/src/templates/web/ui-only/template/src/test/setup.ts +0 -74
- package/src/templates/web/ui-only/template/vitest.config.ts +0 -17
|
@@ -1,319 +1,127 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
Button,
|
|
8
|
-
Card,
|
|
9
|
-
PageTransition,
|
|
10
|
-
MobileContainer,
|
|
11
|
-
ResponsiveGrid,
|
|
12
|
-
SwipeableCard,
|
|
13
|
-
NetworkAwareContent,
|
|
14
|
-
OfflineWrapper,
|
|
15
|
-
TouchInput,
|
|
16
|
-
MobileForm,
|
|
17
|
-
useNetworkInfo,
|
|
18
|
-
useOfflineState
|
|
19
|
-
} from '@digilogiclabs/saas-factory-ui';
|
|
20
|
-
import { CreditCard, Check, Star, Wifi, WifiOff, ArrowLeft, ArrowRight } from 'lucide-react';
|
|
4
|
+
import { Button, Card, CardContent, CardHeader, CardTitle } from '@digilogiclabs/saas-factory-ui';
|
|
5
|
+
import { CreditCard, Check, ArrowLeft } from 'lucide-react';
|
|
6
|
+
import Link from 'next/link';
|
|
21
7
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
8
|
+
const PLANS = [
|
|
9
|
+
{
|
|
10
|
+
id: 'starter',
|
|
11
|
+
name: 'Starter',
|
|
12
|
+
price: '$9',
|
|
13
|
+
period: '/month',
|
|
14
|
+
features: ['Up to 1,000 users', 'Basic analytics', 'Email support', 'API access'],
|
|
15
|
+
featured: false,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 'pro',
|
|
19
|
+
name: 'Pro',
|
|
20
|
+
price: '$29',
|
|
21
|
+
period: '/month',
|
|
22
|
+
features: ['Unlimited users', 'Advanced analytics', 'Priority support', 'Custom domains', 'Team management'],
|
|
23
|
+
featured: true,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'enterprise',
|
|
27
|
+
name: 'Enterprise',
|
|
28
|
+
price: '$99',
|
|
29
|
+
period: '/month',
|
|
30
|
+
features: ['Everything in Pro', 'SSO/SAML', 'Dedicated support', 'SLA guarantee', 'Custom integrations'],
|
|
31
|
+
featured: false,
|
|
32
|
+
},
|
|
33
|
+
];
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
35
|
+
export default function CheckoutPage() {
|
|
36
|
+
const [selectedPlan, setSelectedPlan] = useState('pro');
|
|
37
|
+
const [loading, setLoading] = useState(false);
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
features: ['All Basic features', 'Feature 4', 'Feature 5', 'Priority support'],
|
|
55
|
-
popular: true,
|
|
56
|
-
stripePriceId: 'price_pro_monthly'
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
id: 'enterprise',
|
|
60
|
-
name: 'Enterprise Plan',
|
|
61
|
-
price: 4999, // in cents
|
|
62
|
-
interval: 'month',
|
|
63
|
-
features: ['All Pro features', 'Custom integrations', 'Dedicated support', 'SLA guarantee'],
|
|
64
|
-
stripePriceId: 'price_enterprise_monthly'
|
|
39
|
+
const onCheckout = async () => {
|
|
40
|
+
setLoading(true);
|
|
41
|
+
try {
|
|
42
|
+
// TODO: Create Stripe checkout session
|
|
43
|
+
const res = await fetch('/api/checkout', {
|
|
44
|
+
method: 'POST',
|
|
45
|
+
headers: { 'Content-Type': 'application/json' },
|
|
46
|
+
body: JSON.stringify({ planId: selectedPlan }),
|
|
47
|
+
});
|
|
48
|
+
const data = await res.json();
|
|
49
|
+
if (data.url) {
|
|
50
|
+
window.location.href = data.url;
|
|
51
|
+
}
|
|
52
|
+
} finally {
|
|
53
|
+
setLoading(false);
|
|
65
54
|
}
|
|
66
|
-
];
|
|
67
|
-
const gridConfig = {
|
|
68
|
-
columns_1_2: { base: 1, md: 2 },
|
|
69
|
-
columns_1_3: { base: 1, md: 3 },
|
|
70
|
-
columns_1_sm2: { base: 1, sm: 2 },
|
|
71
|
-
columns_1_sm2_md3: { base: 1, sm: 2, md: 3 },
|
|
72
|
-
columns_1_sm2_md4: { base: 1, sm: 2, md: 4 },
|
|
73
|
-
columns_2: { base: 2 },
|
|
74
|
-
columns_2_md3: { base: 2, md: 3 }
|
|
75
55
|
};
|
|
76
56
|
|
|
77
|
-
|
|
78
57
|
return (
|
|
79
|
-
<
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
<span className="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">
|
|
95
|
-
{networkInfo.effectiveType.toUpperCase()}
|
|
96
|
-
</span>
|
|
97
|
-
)}
|
|
98
|
-
</>
|
|
99
|
-
) : (
|
|
100
|
-
<>
|
|
101
|
-
<WifiOff className="w-4 h-4 text-red-600" />
|
|
102
|
-
<span>Offline - Plans cached</span>
|
|
103
|
-
</>
|
|
104
|
-
)}
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
58
|
+
<div className="min-h-screen bg-background py-12">
|
|
59
|
+
<div className="mx-auto max-w-5xl px-4">
|
|
60
|
+
<div className="mb-8">
|
|
61
|
+
<Link
|
|
62
|
+
href="/dashboard"
|
|
63
|
+
className="inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-4"
|
|
64
|
+
>
|
|
65
|
+
<ArrowLeft className="h-3 w-3" />
|
|
66
|
+
Back to Dashboard
|
|
67
|
+
</Link>
|
|
68
|
+
<h1 className="text-3xl font-bold text-foreground">Choose Your Plan</h1>
|
|
69
|
+
<p className="text-muted-foreground mt-1">
|
|
70
|
+
Select the plan that best fits your needs.
|
|
71
|
+
</p>
|
|
72
|
+
</div>
|
|
107
73
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
{/* Subscription Plans */}
|
|
114
|
-
<NetworkAwareContent
|
|
115
|
-
showOnSlow={
|
|
116
|
-
<ResponsiveGrid columns={gridConfig.columns_1_2} gap={6} className="mb-8">
|
|
117
|
-
{plans.slice(0, 2).map((plan) => (
|
|
118
|
-
<Card key={plan.id} className={`p-6 relative ${plan.popular ? 'ring-2 ring-blue-500' : ''}`}>
|
|
119
|
-
{plan.popular && (
|
|
120
|
-
<div className="absolute -top-3 left-1/2 transform -translate-x-1/2">
|
|
121
|
-
<span className="bg-blue-500 text-white px-3 py-1 rounded-full text-sm font-medium flex items-center gap-1">
|
|
122
|
-
<Star className="w-3 h-3" />
|
|
123
|
-
Most Popular
|
|
124
|
-
</span>
|
|
125
|
-
</div>
|
|
126
|
-
)}
|
|
127
|
-
<h3 className="text-xl font-bold mb-2">{plan.name}</h3>
|
|
128
|
-
<div className="text-3xl font-bold mb-4">
|
|
129
|
-
{formatCurrency(plan.price)}
|
|
130
|
-
<span className="text-sm font-normal">/{plan.interval}</span>
|
|
131
|
-
</div>
|
|
132
|
-
<ul className="mb-6 space-y-2">
|
|
133
|
-
{plan.features.slice(0, 3).map((feature, index) => (
|
|
134
|
-
<li key={index} className="flex items-center">
|
|
135
|
-
<Check className="text-green-500 mr-2 w-4 h-4" />
|
|
136
|
-
{feature}
|
|
137
|
-
</li>
|
|
138
|
-
))}
|
|
139
|
-
</ul>
|
|
140
|
-
<Button
|
|
141
|
-
onClick={() => handlePlanSelect(plan.id)}
|
|
142
|
-
disabled={loading}
|
|
143
|
-
className="w-full"
|
|
144
|
-
variant={plan.popular ? "default" : "outline"}
|
|
145
|
-
size="lg"
|
|
146
|
-
>
|
|
147
|
-
{loading ? 'Processing...' : 'Select Plan'}
|
|
148
|
-
</Button>
|
|
149
|
-
</Card>
|
|
150
|
-
))}
|
|
151
|
-
</ResponsiveGrid>
|
|
152
|
-
}
|
|
153
|
-
>
|
|
154
|
-
<ResponsiveGrid columns={gridConfig.columns_1_3} gap={6} className="mb-8">
|
|
155
|
-
{plans.map((plan) => (
|
|
156
|
-
<SwipeableCard
|
|
74
|
+
<div className="grid gap-6 md:grid-cols-3 mb-8">
|
|
75
|
+
{PLANS.map((plan) => (
|
|
76
|
+
<Card
|
|
157
77
|
key={plan.id}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
]}
|
|
166
|
-
rightActions={[
|
|
167
|
-
{
|
|
168
|
-
id: 'select',
|
|
169
|
-
label: 'Quick Select',
|
|
170
|
-
onAction: () => handlePlanSelect(plan.id),
|
|
171
|
-
color: 'green',
|
|
172
|
-
icon: ArrowRight
|
|
173
|
-
}
|
|
174
|
-
]}
|
|
175
|
-
threshold={60}
|
|
176
|
-
hapticFeedback={true}
|
|
177
|
-
showActionLabels={true}
|
|
78
|
+
className={`cursor-pointer transition-all ${
|
|
79
|
+
selectedPlan === plan.id
|
|
80
|
+
? 'ring-2 ring-primary border-primary'
|
|
81
|
+
: 'hover:border-primary/50'
|
|
82
|
+
} ${plan.featured ? 'shadow-lg' : ''}`}
|
|
83
|
+
onClick={() => setSelectedPlan(plan.id)}
|
|
178
84
|
>
|
|
179
|
-
<
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
85
|
+
<CardHeader>
|
|
86
|
+
<CardTitle className="flex items-center justify-between">
|
|
87
|
+
{plan.name}
|
|
88
|
+
{plan.featured && (
|
|
89
|
+
<span className="text-xs font-medium bg-primary text-primary-foreground px-2 py-0.5 rounded-full">
|
|
90
|
+
Popular
|
|
185
91
|
</span>
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
{
|
|
191
|
-
<span className="text-sm font-normal">/{plan.interval}</span>
|
|
92
|
+
)}
|
|
93
|
+
</CardTitle>
|
|
94
|
+
<div>
|
|
95
|
+
<span className="text-3xl font-bold text-foreground">{plan.price}</span>
|
|
96
|
+
<span className="text-muted-foreground">{plan.period}</span>
|
|
192
97
|
</div>
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
98
|
+
</CardHeader>
|
|
99
|
+
<CardContent>
|
|
100
|
+
<ul className="space-y-2">
|
|
101
|
+
{plan.features.map((feat) => (
|
|
102
|
+
<li key={feat} className="flex items-center gap-2 text-sm text-muted-foreground">
|
|
103
|
+
<Check className="h-4 w-4 text-primary shrink-0" />
|
|
104
|
+
{feat}
|
|
198
105
|
</li>
|
|
199
106
|
))}
|
|
200
107
|
</ul>
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
disabled={loading}
|
|
204
|
-
className="w-full"
|
|
205
|
-
variant={selectedPlan === plan.id ? "default" : plan.popular ? "default" : "outline"}
|
|
206
|
-
size="lg"
|
|
207
|
-
>
|
|
208
|
-
{loading ? 'Processing...' : selectedPlan === plan.id ? 'Selected' : 'Select Plan'}
|
|
209
|
-
</Button>
|
|
210
|
-
<p className="text-xs text-center text-gray-500 mt-2">
|
|
211
|
-
Swipe left for details • Swipe right to select
|
|
212
|
-
</p>
|
|
213
|
-
</Card>
|
|
214
|
-
</SwipeableCard>
|
|
108
|
+
</CardContent>
|
|
109
|
+
</Card>
|
|
215
110
|
))}
|
|
216
|
-
|
|
217
|
-
</NetworkAwareContent>
|
|
111
|
+
</div>
|
|
218
112
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
]}
|
|
230
|
-
rightActions={[
|
|
231
|
-
{
|
|
232
|
-
id: 'pay',
|
|
233
|
-
label: 'Pay Now',
|
|
234
|
-
onAction: handlePayment,
|
|
235
|
-
color: 'green',
|
|
236
|
-
icon: CreditCard
|
|
237
|
-
}
|
|
238
|
-
]}
|
|
239
|
-
threshold={60}
|
|
240
|
-
hapticFeedback={true}
|
|
241
|
-
showActionLabels={true}
|
|
242
|
-
className="max-w-md mx-auto"
|
|
243
|
-
>
|
|
244
|
-
<Card className="p-6">
|
|
245
|
-
<div className="flex items-center gap-3 mb-6">
|
|
246
|
-
<div className="p-2 bg-blue-100 rounded-full">
|
|
247
|
-
<CreditCard className="w-5 h-5 text-blue-600" />
|
|
248
|
-
</div>
|
|
249
|
-
<h2 className="text-2xl font-bold">Payment Details</h2>
|
|
250
|
-
</div>
|
|
251
|
-
|
|
252
|
-
<MobileForm className="space-y-4">
|
|
253
|
-
<div>
|
|
254
|
-
<label className="block text-sm font-medium mb-2">Card Number</label>
|
|
255
|
-
<TouchInput
|
|
256
|
-
type="text"
|
|
257
|
-
placeholder="1234 5678 9012 3456"
|
|
258
|
-
disabled
|
|
259
|
-
mobileOptimized={true}
|
|
260
|
-
hapticFeedback={true}
|
|
261
|
-
/>
|
|
262
|
-
</div>
|
|
263
|
-
<ResponsiveGrid columns={gridConfig.columns_2} gap={4}>
|
|
264
|
-
<div>
|
|
265
|
-
<label className="block text-sm font-medium mb-2">Expiry Date</label>
|
|
266
|
-
<TouchInput
|
|
267
|
-
type="text"
|
|
268
|
-
placeholder="MM/YY"
|
|
269
|
-
disabled
|
|
270
|
-
mobileOptimized={true}
|
|
271
|
-
hapticFeedback={true}
|
|
272
|
-
/>
|
|
273
|
-
</div>
|
|
274
|
-
<div>
|
|
275
|
-
<label className="block text-sm font-medium mb-2">CVC</label>
|
|
276
|
-
<TouchInput
|
|
277
|
-
type="text"
|
|
278
|
-
placeholder="123"
|
|
279
|
-
disabled
|
|
280
|
-
mobileOptimized={true}
|
|
281
|
-
hapticFeedback={true}
|
|
282
|
-
/>
|
|
283
|
-
</div>
|
|
284
|
-
</ResponsiveGrid>
|
|
285
|
-
|
|
286
|
-
{selectedPlan && (
|
|
287
|
-
<div className="bg-blue-50 p-4 rounded-lg border border-blue-200">
|
|
288
|
-
<div className="flex items-center justify-between">
|
|
289
|
-
<span className="font-medium">Selected Plan:</span>
|
|
290
|
-
<span className="text-blue-600 font-bold">
|
|
291
|
-
{plans.find(p => p.id === selectedPlan)?.name}
|
|
292
|
-
</span>
|
|
293
|
-
</div>
|
|
294
|
-
</div>
|
|
295
|
-
)}
|
|
296
|
-
|
|
297
|
-
<Button
|
|
298
|
-
onClick={handlePayment}
|
|
299
|
-
disabled={loading || !isOnline}
|
|
300
|
-
className="w-full"
|
|
301
|
-
size="lg"
|
|
302
|
-
>
|
|
303
|
-
{loading ? 'Processing...' : !isOnline ? 'Offline - Cannot Process' : 'Complete Payment'}
|
|
304
|
-
</Button>
|
|
305
|
-
|
|
306
|
-
<div className="space-y-2 text-sm text-gray-600 text-center">
|
|
307
|
-
<p>This is a demo. Payment processing requires Stripe integration.</p>
|
|
308
|
-
<p className="text-xs">Swipe left to go back • Swipe right to pay now</p>
|
|
309
|
-
</div>
|
|
310
|
-
</MobileForm>
|
|
311
|
-
</Card>
|
|
312
|
-
</SwipeableCard>
|
|
313
|
-
</MobileContainer>
|
|
113
|
+
<div className="flex justify-center">
|
|
114
|
+
<Button
|
|
115
|
+
onClick={onCheckout}
|
|
116
|
+
size="lg"
|
|
117
|
+
disabled={loading}
|
|
118
|
+
className="min-w-[200px]"
|
|
119
|
+
>
|
|
120
|
+
<CreditCard className="mr-2 h-4 w-4" />
|
|
121
|
+
{loading ? 'Processing...' : 'Continue to Payment'}
|
|
122
|
+
</Button>
|
|
314
123
|
</div>
|
|
315
|
-
</
|
|
316
|
-
</
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
317
126
|
);
|
|
318
127
|
}
|
|
319
|
-
|
|
@@ -36,10 +36,10 @@ function StatsCard({ title, value, icon: Icon, href }: {
|
|
|
36
36
|
<Card className="p-6 hover:shadow-lg transition-shadow">
|
|
37
37
|
<div className="flex items-center justify-between">
|
|
38
38
|
<div>
|
|
39
|
-
<p className="text-sm font-medium text-
|
|
40
|
-
<p className="text-2xl font-bold text-
|
|
39
|
+
<p className="text-sm font-medium text-muted-foreground">{title}</p>
|
|
40
|
+
<p className="text-2xl font-bold text-foreground">{value}</p>
|
|
41
41
|
</div>
|
|
42
|
-
<Icon className="h-8 w-8 text-
|
|
42
|
+
<Icon className="h-8 w-8 text-primary" />
|
|
43
43
|
</div>
|
|
44
44
|
</Card>
|
|
45
45
|
)
|
|
@@ -86,8 +86,8 @@ function UserStatsSkeleton() {
|
|
|
86
86
|
{[...Array(4)].map((_, i) => (
|
|
87
87
|
<Card key={i} className="p-6">
|
|
88
88
|
<div className="animate-pulse">
|
|
89
|
-
<div className="h-4 bg-
|
|
90
|
-
<div className="h-8 bg-
|
|
89
|
+
<div className="h-4 bg-muted rounded w-1/2 mb-2"></div>
|
|
90
|
+
<div className="h-8 bg-muted rounded w-1/3"></div>
|
|
91
91
|
</div>
|
|
92
92
|
</Card>
|
|
93
93
|
))}
|
|
@@ -101,14 +101,14 @@ export default async function DashboardPage() {
|
|
|
101
101
|
|
|
102
102
|
return (
|
|
103
103
|
<DashboardLayout>
|
|
104
|
-
<div className="min-h-screen bg-
|
|
104
|
+
<div className="min-h-screen bg-muted">
|
|
105
105
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
106
106
|
{/* Header */}
|
|
107
107
|
<div className="mb-8" data-tour="overview">
|
|
108
|
-
<h1 className="text-3xl font-bold text-
|
|
108
|
+
<h1 className="text-3xl font-bold text-foreground">
|
|
109
109
|
Welcome back, {user.name || user.email}!
|
|
110
110
|
</h1>
|
|
111
|
-
<p className="text-
|
|
111
|
+
<p className="text-muted-foreground mt-2">
|
|
112
112
|
Here's what's happening with your account today.
|
|
113
113
|
</p>
|
|
114
114
|
</div>
|
|
@@ -124,10 +124,10 @@ export default async function DashboardPage() {
|
|
|
124
124
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8" data-tour="actions">
|
|
125
125
|
<Card className="p-6">
|
|
126
126
|
<div className="flex items-center mb-4">
|
|
127
|
-
<User className="h-6 w-6 text-
|
|
128
|
-
<h3 className="text-lg font-semibold text-
|
|
127
|
+
<User className="h-6 w-6 text-primary mr-3" />
|
|
128
|
+
<h3 className="text-lg font-semibold text-foreground">Profile</h3>
|
|
129
129
|
</div>
|
|
130
|
-
<p className="text-
|
|
130
|
+
<p className="text-muted-foreground mb-4">
|
|
131
131
|
Update your personal information and preferences
|
|
132
132
|
</p>
|
|
133
133
|
<Link href="/profile">
|
|
@@ -137,10 +137,10 @@ export default async function DashboardPage() {
|
|
|
137
137
|
|
|
138
138
|
<Card className="p-6">
|
|
139
139
|
<div className="flex items-center mb-4">
|
|
140
|
-
<Settings className="h-6 w-6 text-
|
|
141
|
-
<h3 className="text-lg font-semibold text-
|
|
140
|
+
<Settings className="h-6 w-6 text-primary mr-3" />
|
|
141
|
+
<h3 className="text-lg font-semibold text-foreground">Settings</h3>
|
|
142
142
|
</div>
|
|
143
|
-
<p className="text-
|
|
143
|
+
<p className="text-muted-foreground mb-4">
|
|
144
144
|
Configure your account settings and security options
|
|
145
145
|
</p>
|
|
146
146
|
<Link href="/settings">
|
|
@@ -150,10 +150,10 @@ export default async function DashboardPage() {
|
|
|
150
150
|
|
|
151
151
|
<Card className="p-6">
|
|
152
152
|
<div className="flex items-center mb-4">
|
|
153
|
-
<CreditCard className="h-6 w-6 text-
|
|
154
|
-
<h3 className="text-lg font-semibold text-
|
|
153
|
+
<CreditCard className="h-6 w-6 text-primary mr-3" />
|
|
154
|
+
<h3 className="text-lg font-semibold text-foreground">Billing</h3>
|
|
155
155
|
</div>
|
|
156
|
-
<p className="text-
|
|
156
|
+
<p className="text-muted-foreground mb-4">
|
|
157
157
|
View your subscription and payment information
|
|
158
158
|
</p>
|
|
159
159
|
<Link href="/billing">
|
|
@@ -164,28 +164,28 @@ export default async function DashboardPage() {
|
|
|
164
164
|
|
|
165
165
|
{/* Recent Activity */}
|
|
166
166
|
<Card className="p-6">
|
|
167
|
-
<h3 className="text-lg font-semibold text-
|
|
167
|
+
<h3 className="text-lg font-semibold text-foreground mb-4">Recent Activity</h3>
|
|
168
168
|
<div className="space-y-4">
|
|
169
|
-
<div className="flex items-center justify-between py-3 border-b border-
|
|
169
|
+
<div className="flex items-center justify-between py-3 border-b border-border">
|
|
170
170
|
<div className="flex items-center">
|
|
171
171
|
<div className="w-2 h-2 bg-green-500 rounded-full mr-3"></div>
|
|
172
|
-
<span className="text-
|
|
172
|
+
<span className="text-foreground">Account created</span>
|
|
173
173
|
</div>
|
|
174
|
-
<span className="text-sm text-
|
|
174
|
+
<span className="text-sm text-muted-foreground">2 days ago</span>
|
|
175
175
|
</div>
|
|
176
|
-
<div className="flex items-center justify-between py-3 border-b border-
|
|
176
|
+
<div className="flex items-center justify-between py-3 border-b border-border">
|
|
177
177
|
<div className="flex items-center">
|
|
178
|
-
<div className="w-2 h-2 bg-
|
|
179
|
-
<span className="text-
|
|
178
|
+
<div className="w-2 h-2 bg-primary rounded-full mr-3"></div>
|
|
179
|
+
<span className="text-foreground">Profile updated</span>
|
|
180
180
|
</div>
|
|
181
|
-
<span className="text-sm text-
|
|
181
|
+
<span className="text-sm text-muted-foreground">1 week ago</span>
|
|
182
182
|
</div>
|
|
183
183
|
<div className="flex items-center justify-between py-3">
|
|
184
184
|
<div className="flex items-center">
|
|
185
185
|
<div className="w-2 h-2 bg-purple-500 rounded-full mr-3"></div>
|
|
186
|
-
<span className="text-
|
|
186
|
+
<span className="text-foreground">Subscription started</span>
|
|
187
187
|
</div>
|
|
188
|
-
<span className="text-sm text-
|
|
188
|
+
<span className="text-sm text-muted-foreground">2 weeks ago</span>
|
|
189
189
|
</div>
|
|
190
190
|
</div>
|
|
191
191
|
</Card>
|