@digilogiclabs/create-saas-app 2.11.0 → 2.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -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 +0 -2
- package/dist/generators/template-generator.d.ts.map +1 -1
- package/dist/generators/template-generator.js +18 -17
- package/dist/generators/template-generator.js.map +1 -1
- package/dist/templates/mobile/base/template/App.tsx +7 -4
- package/dist/templates/mobile/base/template/app/checkout.tsx +5 -2
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/_layout.tsx +6 -2
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/billing.tsx +7 -3
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +5 -2
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/profile.tsx +7 -2
- package/dist/templates/mobile/ui-auth-payments/template/app/_layout.tsx +2 -4
- package/dist/templates/mobile/ui-auth-payments/template/app/auth/login.tsx +6 -3
- package/dist/templates/mobile/ui-auth-payments/template/app/auth/signup.tsx +6 -3
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/_layout.tsx +6 -2
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/billing.tsx +7 -3
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/index.tsx +5 -2
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/profile.tsx +7 -2
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/_layout.tsx +2 -4
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/auth/login.tsx +6 -3
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/auth/signup.tsx +6 -3
- 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/config/web/next.config.mjs +0 -1
- 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/ai-platform/template/package.json +0 -1
- package/dist/templates/web/ai-platform/template/src/app/chat/page.tsx +5 -2
- package/dist/templates/web/ai-platform/template/src/app/playground/page.tsx +5 -2
- package/dist/templates/web/ai-platform/template/src/components/providers/app-providers.tsx +2 -5
- 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/iot-dashboard/template/package.json +0 -1
- package/dist/templates/web/iot-dashboard/template/src/components/providers/app-providers.tsx +2 -5
- package/dist/templates/web/marketplace/template/package.json +0 -1
- package/dist/templates/web/marketplace/template/src/components/providers/app-providers.tsx +2 -5
- package/dist/templates/web/micro-saas/template/package.json +0 -1
- package/dist/templates/web/micro-saas/template/src/components/providers/app-providers.tsx +2 -5
- 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/mobile/base/template/App.tsx +7 -4
- package/src/templates/mobile/base/template/app/checkout.tsx +5 -2
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/_layout.tsx +6 -2
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/billing.tsx +7 -3
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +5 -2
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/profile.tsx +7 -2
- package/src/templates/mobile/ui-auth-payments/template/app/_layout.tsx +2 -4
- package/src/templates/mobile/ui-auth-payments/template/app/auth/login.tsx +6 -3
- package/src/templates/mobile/ui-auth-payments/template/app/auth/signup.tsx +6 -3
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/_layout.tsx +6 -2
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/billing.tsx +7 -3
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/index.tsx +5 -2
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/profile.tsx +7 -2
- package/src/templates/mobile/ui-auth-payments-ai/template/app/_layout.tsx +2 -4
- package/src/templates/mobile/ui-auth-payments-ai/template/app/auth/login.tsx +6 -3
- package/src/templates/mobile/ui-auth-payments-ai/template/app/auth/signup.tsx +6 -3
- 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/config/web/next.config.mjs +0 -1
- 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/ai-platform/template/package.json +0 -1
- package/src/templates/web/ai-platform/template/src/app/chat/page.tsx +5 -2
- package/src/templates/web/ai-platform/template/src/app/playground/page.tsx +5 -2
- package/src/templates/web/ai-platform/template/src/components/providers/app-providers.tsx +2 -5
- 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/iot-dashboard/template/package.json +0 -1
- package/src/templates/web/iot-dashboard/template/src/components/providers/app-providers.tsx +2 -5
- package/src/templates/web/marketplace/template/package.json +0 -1
- package/src/templates/web/marketplace/template/src/components/providers/app-providers.tsx +2 -5
- package/src/templates/web/micro-saas/template/package.json +0 -1
- package/src/templates/web/micro-saas/template/src/components/providers/app-providers.tsx +2 -5
- 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,66 +1,116 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React, { useState, useEffect } from 'react';
|
|
4
|
+
import Link from 'next/link';
|
|
5
|
+
import { useRouter } from 'next/navigation';
|
|
6
|
+
import { Button } from '@/components/ui/button';
|
|
7
|
+
import { useMockAuth } from '@/components/mock-auth-provider';
|
|
8
|
+
import { MOCK_MODE } from '@/lib/mock';
|
|
9
|
+
|
|
10
|
+
export default function LoginPage() {
|
|
11
|
+
const [email, setEmail] = useState('');
|
|
12
|
+
const [password, setPassword] = useState('');
|
|
13
|
+
const [error, setError] = useState('');
|
|
14
|
+
const [loading, setLoading] = useState(false);
|
|
15
|
+
const { signIn, isAuthenticated } = useMockAuth();
|
|
16
|
+
const router = useRouter();
|
|
17
|
+
|
|
18
|
+
// Redirect if already signed in
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (isAuthenticated) router.push('/dashboard');
|
|
21
|
+
}, [isAuthenticated, router]);
|
|
22
|
+
|
|
23
|
+
if (isAuthenticated) return null;
|
|
24
|
+
|
|
25
|
+
const handleLogin = async (e: React.FormEvent) => {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
setLoading(true);
|
|
28
|
+
setError('');
|
|
29
|
+
|
|
30
|
+
if (MOCK_MODE) {
|
|
31
|
+
// Mock mode: sign in immediately with mock user
|
|
32
|
+
signIn(email, password);
|
|
33
|
+
router.push('/dashboard');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// TODO: [REAL_DATA] Replace with your auth provider's sign in
|
|
38
|
+
// Example (Supabase):
|
|
39
|
+
// const { error } = await supabase.auth.signInWithPassword({ email, password });
|
|
40
|
+
// Example (NextAuth):
|
|
41
|
+
// const result = await signIn('credentials', { email, password, redirect: false });
|
|
42
|
+
try {
|
|
43
|
+
const res = await fetch('/api/auth/login', {
|
|
44
|
+
method: 'POST',
|
|
45
|
+
headers: { 'Content-Type': 'application/json' },
|
|
46
|
+
body: JSON.stringify({ email, password }),
|
|
47
|
+
});
|
|
48
|
+
if (!res.ok) {
|
|
49
|
+
const data = await res.json();
|
|
50
|
+
setError(data.error || 'Sign in failed');
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
router.push('/dashboard');
|
|
54
|
+
} catch {
|
|
55
|
+
setError('An unexpected error occurred');
|
|
56
|
+
} finally {
|
|
57
|
+
setLoading(false);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<div className="flex items-center justify-center min-h-screen bg-background px-4">
|
|
63
|
+
<div className="w-full max-w-sm">
|
|
64
|
+
<div className="rounded-xl border border-border bg-card p-8 shadow-sm">
|
|
65
|
+
<h1 className="text-2xl font-bold text-card-foreground mb-1">Sign In</h1>
|
|
66
|
+
<p className="text-sm text-muted-foreground mb-6">Welcome back. Sign in to continue.</p>
|
|
67
|
+
|
|
68
|
+
{MOCK_MODE && (
|
|
69
|
+
<div className="mb-4 rounded-lg bg-primary/10 p-3 text-xs text-primary">
|
|
70
|
+
<strong>Mock Mode:</strong> Any email/password will work. Click Sign In to continue.
|
|
71
|
+
</div>
|
|
72
|
+
)}
|
|
73
|
+
|
|
74
|
+
{error && (
|
|
75
|
+
<div className="mb-4 rounded-lg bg-destructive/10 p-3 text-sm text-destructive">{error}</div>
|
|
76
|
+
)}
|
|
77
|
+
|
|
78
|
+
<form onSubmit={handleLogin} className="space-y-4">
|
|
79
|
+
<div>
|
|
80
|
+
<label htmlFor="email" className="block text-sm font-medium text-foreground mb-1">Email</label>
|
|
81
|
+
<input
|
|
82
|
+
id="email"
|
|
83
|
+
type="email"
|
|
84
|
+
value={email}
|
|
85
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
86
|
+
className="w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
|
|
87
|
+
placeholder="you@example.com"
|
|
88
|
+
required
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
<div>
|
|
92
|
+
<label htmlFor="password" className="block text-sm font-medium text-foreground mb-1">Password</label>
|
|
93
|
+
<input
|
|
94
|
+
id="password"
|
|
95
|
+
type="password"
|
|
96
|
+
value={password}
|
|
97
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
98
|
+
className="w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
|
|
99
|
+
placeholder="••••••••"
|
|
100
|
+
required
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
<Button type="submit" className="w-full" disabled={loading}>
|
|
104
|
+
{loading ? 'Signing in...' : 'Sign In'}
|
|
105
|
+
</Button>
|
|
106
|
+
</form>
|
|
107
|
+
|
|
108
|
+
<p className="mt-6 text-center text-sm text-muted-foreground">
|
|
109
|
+
Don't have an account?{' '}
|
|
110
|
+
<Link href="/signup" className="text-primary hover:underline">Sign up</Link>
|
|
111
|
+
</p>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
@@ -1,193 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
|
|
99
|
-
<Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
100
|
-
</div>
|
|
101
|
-
<CardTitle>Lightning Fast</CardTitle>
|
|
102
|
-
<CardDescription>
|
|
103
|
-
Built with Next.js 15 and optimized for performance
|
|
104
|
-
</CardDescription>
|
|
105
|
-
</CardHeader>
|
|
106
|
-
</Card>
|
|
107
|
-
<Card className="text-center">
|
|
108
|
-
<CardHeader>
|
|
109
|
-
<div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
|
|
110
|
-
<Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
|
|
111
|
-
</div>
|
|
112
|
-
<CardTitle>Secure by Default</CardTitle>
|
|
113
|
-
<CardDescription>
|
|
114
|
-
{{#auth}}{{#firebase}}Firebase{{/firebase}}{{#supabase}}Supabase{{/supabase}}{{/auth}} authentication and security best practices
|
|
115
|
-
</CardDescription>
|
|
116
|
-
</CardHeader>
|
|
117
|
-
</Card>
|
|
118
|
-
</ResponsiveGrid>
|
|
119
|
-
}
|
|
120
|
-
>
|
|
121
|
-
<ResponsiveGrid columns={gridConfig.columns_1_3} gap={6} className="mb-16">
|
|
122
|
-
<Card className="text-center">
|
|
123
|
-
<CardHeader>
|
|
124
|
-
<div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
|
|
125
|
-
<Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
126
|
-
</div>
|
|
127
|
-
<CardTitle>Lightning Fast</CardTitle>
|
|
128
|
-
<CardDescription>
|
|
129
|
-
Built with Next.js 15 and optimized for performance
|
|
130
|
-
</CardDescription>
|
|
131
|
-
</CardHeader>
|
|
132
|
-
</Card>
|
|
133
|
-
|
|
134
|
-
<Card className="text-center">
|
|
135
|
-
<CardHeader>
|
|
136
|
-
<div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
|
|
137
|
-
<Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
|
|
138
|
-
</div>
|
|
139
|
-
<CardTitle>Secure by Default</CardTitle>
|
|
140
|
-
<CardDescription>
|
|
141
|
-
{{#auth}}{{#firebase}}Firebase{{/firebase}}{{#supabase}}Supabase{{/supabase}}{{/auth}} authentication and security best practices
|
|
142
|
-
</CardDescription>
|
|
143
|
-
</CardHeader>
|
|
144
|
-
</Card>
|
|
145
|
-
|
|
146
|
-
<Card className="text-center">
|
|
147
|
-
<CardHeader>
|
|
148
|
-
<div className="mx-auto w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mb-4">
|
|
149
|
-
<Rocket className="h-6 w-6 text-purple-600 dark:text-purple-400" />
|
|
150
|
-
</div>
|
|
151
|
-
<CardTitle>Ready to Scale</CardTitle>
|
|
152
|
-
<CardDescription>
|
|
153
|
-
Production-ready with TypeScript, Tailwind CSS, and modern tooling
|
|
154
|
-
</CardDescription>
|
|
155
|
-
</CardHeader>
|
|
156
|
-
</Card>
|
|
157
|
-
</ResponsiveGrid>
|
|
158
|
-
</NetworkAwareContent>
|
|
159
|
-
|
|
160
|
-
{/* Tech Stack */}
|
|
161
|
-
<Card className="max-w-4xl mx-auto">
|
|
162
|
-
<CardHeader className="text-center">
|
|
163
|
-
<CardTitle className="text-2xl">Built with Modern Technologies</CardTitle>
|
|
164
|
-
<CardDescription>
|
|
165
|
-
This template includes everything you need to build a modern SaaS application
|
|
166
|
-
</CardDescription>
|
|
167
|
-
</CardHeader>
|
|
168
|
-
<CardContent>
|
|
169
|
-
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 text-center">
|
|
170
|
-
<div className="p-4">
|
|
171
|
-
<div className="font-semibold">Next.js 15</div>
|
|
172
|
-
<div className="text-sm text-gray-600 dark:text-gray-400">React Framework</div>
|
|
173
|
-
</div>
|
|
174
|
-
<div className="p-4">
|
|
175
|
-
<div className="font-semibold">TypeScript</div>
|
|
176
|
-
<div className="text-sm text-gray-600 dark:text-gray-400">Type Safety</div>
|
|
177
|
-
</div>
|
|
178
|
-
<div className="p-4">
|
|
179
|
-
<div className="font-semibold">Tailwind CSS</div>
|
|
180
|
-
<div className="text-sm text-gray-600 dark:text-gray-400">Styling</div>
|
|
181
|
-
</div>
|
|
182
|
-
<div className="p-4">
|
|
183
|
-
<div className="font-semibold">{{#auth}}{{#firebase}}Firebase{{/firebase}}{{#supabase}}Supabase{{/supabase}}{{/auth}}</div>
|
|
184
|
-
<div className="text-sm text-gray-600 dark:text-gray-400">Authentication</div>
|
|
185
|
-
</div>
|
|
186
|
-
</div>
|
|
187
|
-
</CardContent>
|
|
188
|
-
</Card>
|
|
189
|
-
</MobileContainer>
|
|
190
|
-
</main>
|
|
191
|
-
</PageTransition>
|
|
192
|
-
)
|
|
193
|
-
}
|
|
1
|
+
import { Button } from '@/components/ui/button'
|
|
2
|
+
import { ArrowRight, Zap, Shield, Rocket } from 'lucide-react'
|
|
3
|
+
import Link from 'next/link'
|
|
4
|
+
|
|
5
|
+
export default function Home() {
|
|
6
|
+
return (
|
|
7
|
+
<main className="min-h-screen bg-background">
|
|
8
|
+
{/* Hero */}
|
|
9
|
+
<section className="mx-auto max-w-5xl px-4 py-24 text-center">
|
|
10
|
+
<div className="inline-flex items-center rounded-full border border-border bg-muted px-3 py-1 text-sm text-muted-foreground mb-6">
|
|
11
|
+
Built with Digi Logic Labs
|
|
12
|
+
</div>
|
|
13
|
+
<h1 className="text-4xl font-bold tracking-tight text-foreground sm:text-6xl mb-4">
|
|
14
|
+
Build your SaaS,{' '}
|
|
15
|
+
<span className="text-primary">faster</span>
|
|
16
|
+
</h1>
|
|
17
|
+
<p className="mx-auto max-w-2xl text-lg text-muted-foreground mb-8">
|
|
18
|
+
A production-ready starter with authentication, payments, and everything
|
|
19
|
+
you need to ship your next project.
|
|
20
|
+
</p>
|
|
21
|
+
<div className="flex items-center justify-center gap-4">
|
|
22
|
+
<Button size="lg" asChild>
|
|
23
|
+
<Link href="/signup">
|
|
24
|
+
Get Started <ArrowRight className="ml-2 h-4 w-4" />
|
|
25
|
+
</Link>
|
|
26
|
+
</Button>
|
|
27
|
+
<Button variant="outline" size="lg" asChild>
|
|
28
|
+
<Link href="/login">Sign In</Link>
|
|
29
|
+
</Button>
|
|
30
|
+
</div>
|
|
31
|
+
</section>
|
|
32
|
+
|
|
33
|
+
{/* Features */}
|
|
34
|
+
<section className="mx-auto max-w-5xl px-4 pb-24">
|
|
35
|
+
<div className="grid gap-6 md:grid-cols-3">
|
|
36
|
+
<div className="rounded-xl border border-border bg-card p-6 text-center">
|
|
37
|
+
<div className="mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-lg bg-blue-100 dark:bg-blue-900/30">
|
|
38
|
+
<Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
39
|
+
</div>
|
|
40
|
+
<h3 className="text-lg font-semibold text-card-foreground mb-2">Lightning Fast</h3>
|
|
41
|
+
<p className="text-sm text-muted-foreground">
|
|
42
|
+
Built with Next.js 15 and optimized for performance out of the box.
|
|
43
|
+
</p>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div className="rounded-xl border border-border bg-card p-6 text-center">
|
|
47
|
+
<div className="mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-lg bg-emerald-100 dark:bg-emerald-900/30">
|
|
48
|
+
<Shield className="h-6 w-6 text-emerald-600 dark:text-emerald-400" />
|
|
49
|
+
</div>
|
|
50
|
+
<h3 className="text-lg font-semibold text-card-foreground mb-2">Secure by Default</h3>
|
|
51
|
+
<p className="text-sm text-muted-foreground">
|
|
52
|
+
Authentication, security headers, and best practices baked in.
|
|
53
|
+
</p>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div className="rounded-xl border border-border bg-card p-6 text-center">
|
|
57
|
+
<div className="mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-lg bg-purple-100 dark:bg-purple-900/30">
|
|
58
|
+
<Rocket className="h-6 w-6 text-purple-600 dark:text-purple-400" />
|
|
59
|
+
</div>
|
|
60
|
+
<h3 className="text-lg font-semibold text-card-foreground mb-2">Ready to Scale</h3>
|
|
61
|
+
<p className="text-sm text-muted-foreground">
|
|
62
|
+
TypeScript, Tailwind CSS, and modern tooling for production apps.
|
|
63
|
+
</p>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</section>
|
|
67
|
+
|
|
68
|
+
{/* Tech Stack */}
|
|
69
|
+
<section className="mx-auto max-w-5xl px-4 pb-24">
|
|
70
|
+
<div className="rounded-xl border border-border bg-card p-8 text-center">
|
|
71
|
+
<h2 className="text-2xl font-bold text-card-foreground mb-2">Built with Modern Technologies</h2>
|
|
72
|
+
<p className="text-muted-foreground mb-6">
|
|
73
|
+
Everything you need to build a modern SaaS application.
|
|
74
|
+
</p>
|
|
75
|
+
<div className="grid grid-cols-2 gap-4 md:grid-cols-4">
|
|
76
|
+
<div className="p-4">
|
|
77
|
+
<div className="font-semibold text-foreground">Next.js 15</div>
|
|
78
|
+
<div className="text-sm text-muted-foreground">React Framework</div>
|
|
79
|
+
</div>
|
|
80
|
+
<div className="p-4">
|
|
81
|
+
<div className="font-semibold text-foreground">TypeScript</div>
|
|
82
|
+
<div className="text-sm text-muted-foreground">Type Safety</div>
|
|
83
|
+
</div>
|
|
84
|
+
<div className="p-4">
|
|
85
|
+
<div className="font-semibold text-foreground">Tailwind CSS</div>
|
|
86
|
+
<div className="text-sm text-muted-foreground">Styling</div>
|
|
87
|
+
</div>
|
|
88
|
+
<div className="p-4">
|
|
89
|
+
<div className="font-semibold text-foreground">Supabase</div>
|
|
90
|
+
<div className="text-sm text-muted-foreground">Authentication</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</section>
|
|
95
|
+
</main>
|
|
96
|
+
)
|
|
97
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Button } from '@/components/ui/button';
|
|
5
|
+
import { User, Bell, Shield, Palette, Save, LogIn } from 'lucide-react';
|
|
6
|
+
import Link from 'next/link';
|
|
7
|
+
import { MOCK_MODE } from '@/lib/mock';
|
|
8
|
+
import { useMockAuth } from '@/components/mock-auth-provider';
|
|
9
|
+
|
|
10
|
+
export default function SettingsPage() {
|
|
11
|
+
const [saved, setSaved] = useState(false);
|
|
12
|
+
const { user, isAuthenticated } = useMockAuth();
|
|
13
|
+
|
|
14
|
+
if (!isAuthenticated) {
|
|
15
|
+
return (
|
|
16
|
+
<div className="flex flex-col items-center justify-center min-h-[60vh] text-center px-4">
|
|
17
|
+
<LogIn className="h-12 w-12 text-muted-foreground mb-4" />
|
|
18
|
+
<h1 className="text-2xl font-bold text-foreground mb-2">Sign in required</h1>
|
|
19
|
+
<p className="text-muted-foreground mb-6">You need to be signed in to view settings.</p>
|
|
20
|
+
<Link href="/login" className="inline-flex items-center justify-center rounded-md bg-primary px-6 py-2.5 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors">
|
|
21
|
+
Sign In
|
|
22
|
+
</Link>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const handleSave = () => {
|
|
28
|
+
// TODO: [REAL_DATA] Save settings to your database
|
|
29
|
+
setSaved(true);
|
|
30
|
+
setTimeout(() => setSaved(false), 2000);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div className="mx-auto max-w-3xl px-4 py-8">
|
|
35
|
+
<div className="flex items-center justify-between mb-8">
|
|
36
|
+
<div>
|
|
37
|
+
<h1 className="text-3xl font-bold text-foreground">Settings</h1>
|
|
38
|
+
<p className="text-muted-foreground mt-1">Manage your account and preferences.</p>
|
|
39
|
+
</div>
|
|
40
|
+
{MOCK_MODE && (
|
|
41
|
+
<span className="rounded-full bg-primary/10 px-3 py-1 text-xs font-medium text-primary">
|
|
42
|
+
Mock Data
|
|
43
|
+
</span>
|
|
44
|
+
)}
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div className="space-y-6">
|
|
48
|
+
{/* Profile */}
|
|
49
|
+
<div className="rounded-xl border border-border bg-card p-6">
|
|
50
|
+
<h2 className="text-lg font-semibold text-card-foreground mb-4 flex items-center gap-2">
|
|
51
|
+
<User className="h-5 w-5" />
|
|
52
|
+
Profile
|
|
53
|
+
</h2>
|
|
54
|
+
<div className="space-y-4">
|
|
55
|
+
<div>
|
|
56
|
+
<label htmlFor="name" className="block text-sm font-medium text-foreground mb-1">Name</label>
|
|
57
|
+
<input
|
|
58
|
+
id="name"
|
|
59
|
+
type="text"
|
|
60
|
+
defaultValue={user?.name ?? ''}
|
|
61
|
+
className="w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
<div>
|
|
65
|
+
<label htmlFor="email" className="block text-sm font-medium text-foreground mb-1">Email</label>
|
|
66
|
+
<input
|
|
67
|
+
id="email"
|
|
68
|
+
type="email"
|
|
69
|
+
defaultValue={user?.email ?? ''}
|
|
70
|
+
className="w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring"
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
{/* Notifications */}
|
|
77
|
+
<div className="rounded-xl border border-border bg-card p-6">
|
|
78
|
+
<h2 className="text-lg font-semibold text-card-foreground mb-4 flex items-center gap-2">
|
|
79
|
+
<Bell className="h-5 w-5" />
|
|
80
|
+
Notifications
|
|
81
|
+
</h2>
|
|
82
|
+
{/* TODO: [REAL_DATA] Fetch notification preferences from your database */}
|
|
83
|
+
<div className="space-y-3">
|
|
84
|
+
{[
|
|
85
|
+
{ label: 'Email notifications', description: 'Receive updates via email', defaultChecked: true },
|
|
86
|
+
{ label: 'Marketing emails', description: 'News, tips, and product updates', defaultChecked: false },
|
|
87
|
+
{ label: 'Security alerts', description: 'Important account security notifications', defaultChecked: true },
|
|
88
|
+
].map((pref) => (
|
|
89
|
+
<label key={pref.label} className="flex items-center justify-between py-2">
|
|
90
|
+
<div>
|
|
91
|
+
<p className="text-sm font-medium text-foreground">{pref.label}</p>
|
|
92
|
+
<p className="text-xs text-muted-foreground">{pref.description}</p>
|
|
93
|
+
</div>
|
|
94
|
+
<input
|
|
95
|
+
type="checkbox"
|
|
96
|
+
defaultChecked={pref.defaultChecked}
|
|
97
|
+
className="h-4 w-4 rounded border-input text-primary focus:ring-ring"
|
|
98
|
+
/>
|
|
99
|
+
</label>
|
|
100
|
+
))}
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
{/* Appearance */}
|
|
105
|
+
<div className="rounded-xl border border-border bg-card p-6">
|
|
106
|
+
<h2 className="text-lg font-semibold text-card-foreground mb-4 flex items-center gap-2">
|
|
107
|
+
<Palette className="h-5 w-5" />
|
|
108
|
+
Appearance
|
|
109
|
+
</h2>
|
|
110
|
+
<p className="text-sm text-muted-foreground">
|
|
111
|
+
Theme is controlled by the toggle in the header. Your preference is saved automatically.
|
|
112
|
+
</p>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
{/* Security */}
|
|
116
|
+
<div className="rounded-xl border border-border bg-card p-6">
|
|
117
|
+
<h2 className="text-lg font-semibold text-card-foreground mb-4 flex items-center gap-2">
|
|
118
|
+
<Shield className="h-5 w-5" />
|
|
119
|
+
Security
|
|
120
|
+
</h2>
|
|
121
|
+
{/* TODO: [REAL_DATA] Wire up password change to your auth provider */}
|
|
122
|
+
<div className="space-y-4">
|
|
123
|
+
<div>
|
|
124
|
+
<label htmlFor="current-password" className="block text-sm font-medium text-foreground mb-1">Current Password</label>
|
|
125
|
+
<input
|
|
126
|
+
id="current-password"
|
|
127
|
+
type="password"
|
|
128
|
+
placeholder="••••••••"
|
|
129
|
+
className="w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring"
|
|
130
|
+
/>
|
|
131
|
+
</div>
|
|
132
|
+
<div>
|
|
133
|
+
<label htmlFor="new-password" className="block text-sm font-medium text-foreground mb-1">New Password</label>
|
|
134
|
+
<input
|
|
135
|
+
id="new-password"
|
|
136
|
+
type="password"
|
|
137
|
+
placeholder="••••••••"
|
|
138
|
+
className="w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring"
|
|
139
|
+
/>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
{/* Save */}
|
|
145
|
+
<div className="flex justify-end">
|
|
146
|
+
<Button onClick={handleSave}>
|
|
147
|
+
<Save className="mr-2 h-4 w-4" />
|
|
148
|
+
{saved ? 'Saved!' : 'Save Changes'}
|
|
149
|
+
</Button>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
);
|
|
154
|
+
}
|