@digilogiclabs/create-saas-app 1.0.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 +42 -0
- package/README.md +891 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/cli/commands/add.d.ts +6 -0
- package/dist/cli/commands/add.d.ts.map +1 -0
- package/dist/cli/commands/add.js +39 -0
- package/dist/cli/commands/add.js.map +1 -0
- package/dist/cli/commands/create.d.ts +35 -0
- package/dist/cli/commands/create.d.ts.map +1 -0
- package/dist/cli/commands/create.js +165 -0
- package/dist/cli/commands/create.js.map +1 -0
- package/dist/cli/commands/index.d.ts +4 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +20 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/update.d.ts +6 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +68 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +61 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/prompts/index.d.ts +2 -0
- package/dist/cli/prompts/index.d.ts.map +1 -0
- package/dist/cli/prompts/index.js +18 -0
- package/dist/cli/prompts/index.js.map +1 -0
- package/dist/cli/prompts/project-setup.d.ts +5 -0
- package/dist/cli/prompts/project-setup.d.ts.map +1 -0
- package/dist/cli/prompts/project-setup.js +288 -0
- package/dist/cli/prompts/project-setup.js.map +1 -0
- package/dist/cli/utils/git.d.ts +9 -0
- package/dist/cli/utils/git.d.ts.map +1 -0
- package/dist/cli/utils/git.js +77 -0
- package/dist/cli/utils/git.js.map +1 -0
- package/dist/cli/utils/index.d.ts +5 -0
- package/dist/cli/utils/index.d.ts.map +1 -0
- package/dist/cli/utils/index.js +21 -0
- package/dist/cli/utils/index.js.map +1 -0
- package/dist/cli/utils/logger.d.ts +16 -0
- package/dist/cli/utils/logger.d.ts.map +1 -0
- package/dist/cli/utils/logger.js +55 -0
- package/dist/cli/utils/logger.js.map +1 -0
- package/dist/cli/utils/package-manager.d.ts +8 -0
- package/dist/cli/utils/package-manager.d.ts.map +1 -0
- package/dist/cli/utils/package-manager.js +92 -0
- package/dist/cli/utils/package-manager.js.map +1 -0
- package/dist/cli/utils/spinner.d.ts +7 -0
- package/dist/cli/utils/spinner.d.ts.map +1 -0
- package/dist/cli/utils/spinner.js +48 -0
- package/dist/cli/utils/spinner.js.map +1 -0
- package/dist/cli/validators/dependencies.d.ts +15 -0
- package/dist/cli/validators/dependencies.d.ts.map +1 -0
- package/dist/cli/validators/dependencies.js +108 -0
- package/dist/cli/validators/dependencies.js.map +1 -0
- package/dist/cli/validators/index.d.ts +3 -0
- package/dist/cli/validators/index.d.ts.map +1 -0
- package/dist/cli/validators/index.js +19 -0
- package/dist/cli/validators/index.js.map +1 -0
- package/dist/cli/validators/project-name.d.ts +5 -0
- package/dist/cli/validators/project-name.d.ts.map +1 -0
- package/dist/cli/validators/project-name.js +151 -0
- package/dist/cli/validators/project-name.js.map +1 -0
- package/dist/generators/file-processor.d.ts +28 -0
- package/dist/generators/file-processor.d.ts.map +1 -0
- package/dist/generators/file-processor.js +224 -0
- package/dist/generators/file-processor.js.map +1 -0
- package/dist/generators/index.d.ts +4 -0
- package/dist/generators/index.d.ts.map +1 -0
- package/dist/generators/index.js +20 -0
- package/dist/generators/index.js.map +1 -0
- package/dist/generators/package-installer.d.ts +29 -0
- package/dist/generators/package-installer.d.ts.map +1 -0
- package/dist/generators/package-installer.js +177 -0
- package/dist/generators/package-installer.js.map +1 -0
- package/dist/generators/template-generator.d.ts +61 -0
- package/dist/generators/template-generator.d.ts.map +1 -0
- package/dist/generators/template-generator.js +457 -0
- package/dist/generators/template-generator.js.map +1 -0
- package/dist/templates/mobile/base/template/.env.example +15 -0
- package/dist/templates/mobile/base/template/App.tsx +186 -0
- package/dist/templates/mobile/base/template/app/(auth)/login.tsx +44 -0
- package/dist/templates/mobile/base/template/app/(auth)/signup.tsx +43 -0
- package/dist/templates/mobile/base/template/app/checkout.tsx +20 -0
- package/dist/templates/mobile/base/template/app.json +44 -0
- package/dist/templates/mobile/base/template/babel.config.js +6 -0
- package/dist/templates/mobile/base/template/eas.json +19 -0
- package/dist/templates/mobile/base/template/package.json +54 -0
- package/dist/templates/mobile/ui-auth-payments/template/.env.example +20 -0
- package/dist/templates/mobile/ui-auth-payments/template/README.md +218 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/_layout.tsx +153 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/analytics.tsx +668 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/billing.tsx +743 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +757 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/orders.tsx +402 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/(tabs)/profile.tsx +580 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/_layout.tsx +134 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/auth/login.tsx +246 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/auth/signup.tsx +362 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/onboarding/index.tsx +193 -0
- package/dist/templates/mobile/ui-auth-payments/template/app/tour/index.tsx +272 -0
- package/dist/templates/mobile/ui-auth-payments/template/app.json +94 -0
- package/dist/templates/mobile/ui-auth-payments/template/babel.config.js +23 -0
- package/dist/templates/mobile/ui-auth-payments/template/eas.json +45 -0
- package/dist/templates/mobile/ui-auth-payments/template/expo-env.d.ts +3 -0
- package/dist/templates/mobile/ui-auth-payments/template/jest-setup.ts +74 -0
- package/dist/templates/mobile/ui-auth-payments/template/metro.config.js +11 -0
- package/dist/templates/mobile/ui-auth-payments/template/package.json +117 -0
- package/dist/templates/mobile/ui-auth-payments/template/tsconfig.json +31 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/.env.example +23 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/README.md +254 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/_layout.tsx +169 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/ai.tsx +522 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/analytics.tsx +668 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/billing.tsx +743 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/index.tsx +676 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/orders.tsx +402 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/profile.tsx +580 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/_layout.tsx +134 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/auth/login.tsx +246 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/auth/signup.tsx +362 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/onboarding/index.tsx +193 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app/tour/index.tsx +272 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/app.json +94 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/babel.config.js +23 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/eas.json +45 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/expo-env.d.ts +3 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/jest-setup.ts +74 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/metro.config.js +11 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/package.json +119 -0
- package/dist/templates/mobile/ui-auth-payments-ai/template/tsconfig.json +31 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/README.md +655 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/app/(tabs)/ai.tsx +683 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/app/_layout.tsx +134 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/app.json +74 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/babel.config.js +25 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/docs/MOBILE-SETUP.md +787 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/eas.json +25 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/expo-env.d.ts +3 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/hooks/useRAGSystem.ts +346 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/jest-setup.ts +37 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/lib/rag/config.ts +180 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/metro.config.js +11 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/package.json +124 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/scripts/setup-rag.js +599 -0
- package/dist/templates/mobile/ui-auth-payments-ai-rag/template/tsconfig.json +32 -0
- package/dist/templates/shared/auth/firebase/web/config.ts +23 -0
- package/dist/templates/shared/auth/supabase/web/config.ts +8 -0
- package/dist/templates/web/base/template/.env.example +15 -0
- package/dist/templates/web/base/template/.eslintrc.js +8 -0
- package/dist/templates/web/base/template/README.md +68 -0
- package/dist/templates/web/base/template/next.config.js +15 -0
- package/dist/templates/web/base/template/package.json +59 -0
- package/dist/templates/web/base/template/postcss.config.js +7 -0
- package/dist/templates/web/base/template/src/app/auth/callback/route.ts +18 -0
- package/dist/templates/web/base/template/src/app/checkout/page.tsx +119 -0
- package/dist/templates/web/base/template/src/app/dashboard/page.tsx +366 -0
- package/dist/templates/web/base/template/src/app/error.tsx +97 -0
- package/dist/templates/web/base/template/src/app/globals.css +157 -0
- package/dist/templates/web/base/template/src/app/layout.tsx +35 -0
- package/dist/templates/web/base/template/src/app/loading.tsx +52 -0
- package/dist/templates/web/base/template/src/app/login/page.tsx +67 -0
- package/dist/templates/web/base/template/src/app/page.tsx +193 -0
- package/dist/templates/web/base/template/src/app/signup/page.tsx +67 -0
- package/dist/templates/web/base/template/src/components/__tests__/example.test.tsx +49 -0
- package/dist/templates/web/base/template/src/components/providers/app-providers.tsx +35 -0
- package/dist/templates/web/base/template/src/components/providers/theme-provider.tsx +94 -0
- package/dist/templates/web/base/template/src/components/shared/footer.tsx +36 -0
- package/dist/templates/web/base/template/src/components/shared/header.tsx +63 -0
- package/dist/templates/web/base/template/src/components/ui/badge.tsx +36 -0
- package/dist/templates/web/base/template/src/components/ui/button.tsx +56 -0
- package/dist/templates/web/base/template/src/components/ui/card.tsx +71 -0
- package/dist/templates/web/base/template/src/components/ui/theme-toggle.tsx +34 -0
- package/dist/templates/web/base/template/src/lib/auth-server.ts +177 -0
- package/dist/templates/web/base/template/src/lib/env.ts +46 -0
- package/dist/templates/web/base/template/src/lib/platform.ts +146 -0
- package/dist/templates/web/base/template/src/lib/utils.ts +140 -0
- package/dist/templates/web/base/template/src/test/setup.ts +79 -0
- package/dist/templates/web/base/template/tailwind.config.js +77 -0
- package/dist/templates/web/base/template/tsconfig.json +33 -0
- package/dist/templates/web/base/template/vitest.config.ts +17 -0
- package/dist/templates/web/base/template.backup/.env.example +15 -0
- package/dist/templates/web/base/template.backup.20250817/.env.example +15 -0
- package/dist/templates/web/ui-auth/template/.claude +21 -0
- package/dist/templates/web/ui-auth/template/.env.example +15 -0
- package/dist/templates/web/ui-auth/template/.eslintrc.js +8 -0
- package/dist/templates/web/ui-auth/template/README.md +68 -0
- package/dist/templates/web/ui-auth/template/context.md +105 -0
- package/dist/templates/web/ui-auth/template/next.config.js +12 -0
- package/dist/templates/web/ui-auth/template/package.json +51 -0
- package/dist/templates/web/ui-auth/template/postcss.config.js +7 -0
- package/dist/templates/web/ui-auth/template/src/app/auth/callback/route.ts +12 -0
- package/dist/templates/web/ui-auth/template/src/app/checkout/page.tsx +25 -0
- package/dist/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +801 -0
- package/dist/templates/web/ui-auth/template/src/app/error.tsx +67 -0
- package/dist/templates/web/ui-auth/template/src/app/globals.css +95 -0
- package/dist/templates/web/ui-auth/template/src/app/layout.tsx +33 -0
- package/dist/templates/web/ui-auth/template/src/app/loading.tsx +38 -0
- package/dist/templates/web/ui-auth/template/src/app/login/page.tsx +109 -0
- package/dist/templates/web/ui-auth/template/src/app/page.tsx +305 -0
- package/dist/templates/web/ui-auth/template/src/app/setup/page.tsx +403 -0
- package/dist/templates/web/ui-auth/template/src/app/signup/page.tsx +128 -0
- package/dist/templates/web/ui-auth/template/src/components/__tests__/example.test.tsx +49 -0
- package/dist/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +31 -0
- package/dist/templates/web/ui-auth/template/src/components/providers/theme-provider.tsx +94 -0
- package/dist/templates/web/ui-auth/template/src/components/shared/footer.tsx +36 -0
- package/dist/templates/web/ui-auth/template/src/components/shared/header.tsx +94 -0
- package/dist/templates/web/ui-auth/template/src/components/ui/badge.tsx +36 -0
- package/dist/templates/web/ui-auth/template/src/components/ui/theme-toggle.tsx +34 -0
- package/dist/templates/web/ui-auth/template/src/lib/env.ts +49 -0
- package/dist/templates/web/ui-auth/template/src/lib/platform.ts +137 -0
- package/dist/templates/web/ui-auth/template/src/lib/utils.ts +140 -0
- package/dist/templates/web/ui-auth/template/src/test/setup.ts +79 -0
- package/dist/templates/web/ui-auth/template/tailwind.config.js +77 -0
- package/dist/templates/web/ui-auth/template/tsconfig.json +33 -0
- package/dist/templates/web/ui-auth/template/vitest.config.ts +17 -0
- package/dist/templates/web/ui-auth/template.backup/.env.example +15 -0
- package/dist/templates/web/ui-auth/template.backup.20250817/.env.example +15 -0
- package/dist/templates/web/ui-auth-ai/template/.env.example +18 -0
- package/dist/templates/web/ui-auth-ai/template/README.md +170 -0
- package/dist/templates/web/ui-auth-ai/template/next.config.js +13 -0
- package/dist/templates/web/ui-auth-ai/template/package.json +39 -0
- package/dist/templates/web/ui-auth-ai/template/postcss.config.js +6 -0
- package/dist/templates/web/ui-auth-ai/template/src/app/globals.css +40 -0
- package/dist/templates/web/ui-auth-ai/template/src/app/layout.tsx +41 -0
- package/dist/templates/web/ui-auth-ai/template/src/app/page.tsx +193 -0
- package/dist/templates/web/ui-auth-ai/template/src/components/ai/audio-generator.tsx +141 -0
- package/dist/templates/web/ui-auth-ai/template/src/components/ai/video-generator.tsx +158 -0
- package/dist/templates/web/ui-auth-ai/template/src/components/auth/login-form.tsx +106 -0
- package/dist/templates/web/ui-auth-ai/template/src/components/ui/button.tsx +44 -0
- package/dist/templates/web/ui-auth-ai/template/src/components/ui/input.tsx +24 -0
- package/dist/templates/web/ui-auth-ai/template/src/components/ui/label.tsx +21 -0
- package/dist/templates/web/ui-auth-ai/template/src/components/ui/select.tsx +37 -0
- package/dist/templates/web/ui-auth-ai/template/src/components/ui/textarea.tsx +23 -0
- package/dist/templates/web/ui-auth-ai/template/src/hooks/useAuth.ts +1 -0
- package/dist/templates/web/ui-auth-ai/template/src/lib/supabase.ts +8 -0
- package/dist/templates/web/ui-auth-ai/template/src/lib/utils.ts +5 -0
- package/dist/templates/web/ui-auth-ai/template/src/providers/auth-provider.tsx +55 -0
- package/dist/templates/web/ui-auth-ai/template/tailwind.config.js +22 -0
- package/dist/templates/web/ui-auth-ai/template/tsconfig.json +28 -0
- package/dist/templates/web/ui-auth-payments/template/.env.example +51 -0
- package/dist/templates/web/ui-auth-payments/template/README.md +165 -0
- package/dist/templates/web/ui-auth-payments/template/middleware.ts +68 -0
- package/dist/templates/web/ui-auth-payments/template/next.config.js +12 -0
- package/dist/templates/web/ui-auth-payments/template/package-lock.json +12240 -0
- package/dist/templates/web/ui-auth-payments/template/package.json +55 -0
- package/dist/templates/web/ui-auth-payments/template/postcss.config.js +7 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/auth/callback/route.ts +12 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/billing/page.tsx +211 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +318 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/dashboard/layout.tsx +22 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +235 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +801 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/error.tsx +67 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/globals.css +211 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/layout.tsx +33 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/loading.tsx +20 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/login/loading.tsx +38 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/login/page.tsx +109 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +350 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +507 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/signup/loading.tsx +50 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +128 -0
- package/dist/templates/web/ui-auth-payments/template/src/components/__tests__/example.test.tsx +49 -0
- package/dist/templates/web/ui-auth-payments/template/src/components/client/auth-status.tsx +52 -0
- package/dist/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +144 -0
- package/dist/templates/web/ui-auth-payments/template/src/components/client/newsletter-signup.tsx +68 -0
- package/dist/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +185 -0
- package/dist/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx +34 -0
- package/dist/templates/web/ui-auth-payments/template/src/components/providers/theme-provider.tsx +94 -0
- package/dist/templates/web/ui-auth-payments/template/src/components/shared/footer.tsx +36 -0
- package/dist/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +230 -0
- package/dist/templates/web/ui-auth-payments/template/src/components/ui/badge.tsx +36 -0
- package/dist/templates/web/ui-auth-payments/template/src/components/ui/theme-toggle.tsx +34 -0
- package/dist/templates/web/ui-auth-payments/template/src/lib/actions/auth.ts +246 -0
- package/dist/templates/web/ui-auth-payments/template/src/lib/actions/index.ts +340 -0
- package/dist/templates/web/ui-auth-payments/template/src/lib/auth-server.ts +177 -0
- package/dist/templates/web/ui-auth-payments/template/src/lib/env.ts +49 -0
- package/dist/templates/web/ui-auth-payments/template/src/lib/platform.ts +146 -0
- package/dist/templates/web/ui-auth-payments/template/src/lib/utils.ts +140 -0
- package/dist/templates/web/ui-auth-payments/template/src/test/setup.ts +79 -0
- package/dist/templates/web/ui-auth-payments/template/tailwind.config.js +77 -0
- package/dist/templates/web/ui-auth-payments/template/tsconfig.json +33 -0
- package/dist/templates/web/ui-auth-payments/template/tsconfig.tsbuildinfo +1 -0
- package/dist/templates/web/ui-auth-payments/template/vitest.config.ts +17 -0
- package/dist/templates/web/ui-auth-payments-ai/template/.claude +21 -0
- package/dist/templates/web/ui-auth-payments-ai/template/.env.example +60 -0
- package/dist/templates/web/ui-auth-payments-ai/template/README.md +207 -0
- package/dist/templates/web/ui-auth-payments-ai/template/context.md +169 -0
- package/dist/templates/web/ui-auth-payments-ai/template/middleware.ts +68 -0
- package/dist/templates/web/ui-auth-payments-ai/template/next.config.js +12 -0
- package/dist/templates/web/ui-auth-payments-ai/template/package-lock.json +12241 -0
- package/dist/templates/web/ui-auth-payments-ai/template/package.json +58 -0
- package/dist/templates/web/ui-auth-payments-ai/template/postcss.config.js +7 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/ai/page.tsx +310 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/api/ai/audio/route.ts +56 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/api/ai/chat/route.ts +49 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/api/ai/text/route.ts +64 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/api/ai/video/route.ts +73 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/auth/callback/route.ts +12 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +422 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/checkout/page.tsx +142 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/dashboard/layout.tsx +22 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +236 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +801 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/error.tsx +67 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/globals.css +96 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/layout.tsx +35 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/loading.tsx +20 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/login/page.tsx +6 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +364 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +394 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/page.tsx.backup +391 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/page.tsx.bak +391 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +532 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +645 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/signup/page.tsx +6 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/__tests__/example.test.tsx +49 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/auth-status.tsx +52 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +163 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +201 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +38 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/providers/theme-provider.tsx +96 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/shared/footer.tsx +36 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +252 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/ui/badge.tsx +36 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/ui/theme-toggle.tsx +34 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/lib/actions/auth.ts +246 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/lib/actions/index.ts +14 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/lib/auth-server.ts +177 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/lib/env.ts +49 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/lib/platform.ts +155 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/lib/supabase/server.ts +72 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/lib/utils.ts +140 -0
- package/dist/templates/web/ui-auth-payments-ai/template/src/test/setup.ts +79 -0
- package/dist/templates/web/ui-auth-payments-ai/template/tailwind.config.js +77 -0
- package/dist/templates/web/ui-auth-payments-ai/template/tsconfig.json +33 -0
- package/dist/templates/web/ui-auth-payments-ai/template/tsconfig.tsbuildinfo +1 -0
- package/dist/templates/web/ui-auth-payments-ai/template/vitest.config.ts +17 -0
- package/dist/templates/web/ui-auth-payments-ai-rag/template/README.md +434 -0
- package/dist/templates/web/ui-auth-payments-ai-rag/template/components/rag/KnowledgeManager.tsx +642 -0
- package/dist/templates/web/ui-auth-payments-ai-rag/template/components/rag/RAGAnalytics.tsx +466 -0
- package/dist/templates/web/ui-auth-payments-ai-rag/template/components/rag/RAGChatInterface.tsx +393 -0
- package/dist/templates/web/ui-auth-payments-ai-rag/template/docs/GETTING-STARTED.md +457 -0
- package/dist/templates/web/ui-auth-payments-ai-rag/template/hooks/useRAGSystem.ts +478 -0
- package/dist/templates/web/ui-auth-payments-ai-rag/template/lib/rag/config.ts +250 -0
- package/dist/templates/web/ui-auth-payments-ai-rag/template/package.json +76 -0
- package/dist/templates/web/ui-auth-payments-ai-rag/template/scripts/setup-rag.js +622 -0
- package/dist/templates/web/ui-auth-payments-ai-rag/template/src/app/ai/page.tsx +396 -0
- package/dist/templates/web/ui-auth-payments-audio/template/.env.example +15 -0
- package/dist/templates/web/ui-auth-payments-audio/template/README.md +207 -0
- package/dist/templates/web/ui-auth-payments-audio/template/middleware.ts +68 -0
- package/dist/templates/web/ui-auth-payments-audio/template/next.config.js +12 -0
- package/dist/templates/web/ui-auth-payments-audio/template/package-lock.json +12241 -0
- package/dist/templates/web/ui-auth-payments-audio/template/package.json +55 -0
- package/dist/templates/web/ui-auth-payments-audio/template/postcss.config.js +7 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/auth/callback/route.ts +12 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/billing/page.tsx +211 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/checkout/page.tsx +142 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/dashboard/layout.tsx +22 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +237 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/error.tsx +67 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/globals.css +96 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/layout.tsx +35 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/loading.tsx +20 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/login/page.tsx +6 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +403 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx.backup +391 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx.bak +391 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/setup/page.tsx +345 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/signup/page.tsx +6 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/__tests__/example.test.tsx +49 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/auth-status.tsx +52 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +144 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +185 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +38 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/providers/theme-provider.tsx +96 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/footer.tsx +36 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +252 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/ui/badge.tsx +36 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/ui/theme-toggle.tsx +34 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/lib/actions/auth.ts +246 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/lib/actions/index.ts +14 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/lib/auth-server.ts +177 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/lib/env.ts +49 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/lib/utils.ts +140 -0
- package/dist/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +79 -0
- package/dist/templates/web/ui-auth-payments-audio/template/tailwind.config.js +77 -0
- package/dist/templates/web/ui-auth-payments-audio/template/tsconfig.json +33 -0
- package/dist/templates/web/ui-auth-payments-audio/template/tsconfig.tsbuildinfo +1 -0
- package/dist/templates/web/ui-auth-payments-audio/template/vitest.config.ts +17 -0
- package/dist/templates/web/ui-auth-payments-video/template/.env.example +15 -0
- package/dist/templates/web/ui-auth-payments-video/template/README.md +190 -0
- package/dist/templates/web/ui-auth-payments-video/template/next.config.js +12 -0
- package/dist/templates/web/ui-auth-payments-video/template/package.json +55 -0
- package/dist/templates/web/ui-auth-payments-video/template/postcss.config.js +7 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/auth/callback/route.ts +12 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/billing/page.tsx +211 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/checkout/page.tsx +142 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/error.tsx +67 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/globals.css +228 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/layout.tsx +33 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/loading.tsx +20 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +109 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +395 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/setup/page.tsx +351 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +128 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/components/__tests__/example.test.tsx +49 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +34 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/components/providers/theme-provider.tsx +94 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/footer.tsx +36 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +246 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/components/ui/badge.tsx +36 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/components/ui/theme-toggle.tsx +34 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/lib/env.ts +49 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/lib/utils.ts +140 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/test/setup.ts +79 -0
- package/dist/templates/web/ui-auth-payments-video/template/tailwind.config.js +77 -0
- package/dist/templates/web/ui-auth-payments-video/template/tsconfig.json +33 -0
- package/dist/templates/web/ui-auth-payments-video/template/vitest.config.ts +17 -0
- package/dist/templates/web/ui-only/template/.env.example +15 -0
- package/dist/templates/web/ui-only/template/.eslintrc.js +8 -0
- package/dist/templates/web/ui-only/template/README.md +68 -0
- package/dist/templates/web/ui-only/template/next.config.js +12 -0
- package/dist/templates/web/ui-only/template/package.json +49 -0
- package/dist/templates/web/ui-only/template/postcss.config.js +7 -0
- package/dist/templates/web/ui-only/template/src/app/auth/callback/route.ts +12 -0
- package/dist/templates/web/ui-only/template/src/app/checkout/page.tsx +25 -0
- package/dist/templates/web/ui-only/template/src/app/error.tsx +67 -0
- package/dist/templates/web/ui-only/template/src/app/globals.css +42 -0
- package/dist/templates/web/ui-only/template/src/app/layout.tsx +33 -0
- package/dist/templates/web/ui-only/template/src/app/loading.tsx +20 -0
- package/dist/templates/web/ui-only/template/src/app/login/page.tsx +63 -0
- package/dist/templates/web/ui-only/template/src/app/page.tsx +91 -0
- package/dist/templates/web/ui-only/template/src/app/signup/page.tsx +79 -0
- package/dist/templates/web/ui-only/template/src/components/__tests__/example.test.tsx +49 -0
- package/dist/templates/web/ui-only/template/src/components/providers/app-providers.tsx +26 -0
- package/dist/templates/web/ui-only/template/src/components/providers/theme-provider.tsx +94 -0
- package/dist/templates/web/ui-only/template/src/components/shared/footer.tsx +36 -0
- package/dist/templates/web/ui-only/template/src/components/shared/header.tsx +53 -0
- package/dist/templates/web/ui-only/template/src/components/ui/badge.tsx +36 -0
- package/dist/templates/web/ui-only/template/src/components/ui/theme-toggle.tsx +34 -0
- package/dist/templates/web/ui-only/template/src/lib/env.ts +49 -0
- package/dist/templates/web/ui-only/template/src/lib/utils.ts +140 -0
- package/dist/templates/web/ui-only/template/src/test/setup.ts +79 -0
- package/dist/templates/web/ui-only/template/tailwind.config.js +77 -0
- package/dist/templates/web/ui-only/template/tsconfig.json +33 -0
- package/dist/templates/web/ui-only/template/vitest.config.ts +17 -0
- package/dist/templates/web/ui-only/template.backup/.env.example +15 -0
- package/dist/templates/web/ui-only/template.backup.20250817/.env.example +15 -0
- package/dist/templates/web/ui-package-test/template/next-env.d.ts +5 -0
- package/dist/templates/web/ui-package-test/template/package.json +42 -0
- package/dist/templates/web/ui-package-test/template/src/app/page.tsx +106 -0
- package/dist/templates/web/ui-package-test/template/tsconfig.json +41 -0
- package/package.json +106 -0
- package/src/templates/mobile/base/template/.env.example +15 -0
- package/src/templates/mobile/base/template/App.tsx +186 -0
- package/src/templates/mobile/base/template/app/(auth)/login.tsx +44 -0
- package/src/templates/mobile/base/template/app/(auth)/signup.tsx +43 -0
- package/src/templates/mobile/base/template/app/checkout.tsx +20 -0
- package/src/templates/mobile/base/template/app.json +44 -0
- package/src/templates/mobile/base/template/babel.config.js +6 -0
- package/src/templates/mobile/base/template/eas.json +19 -0
- package/src/templates/mobile/base/template/package.json +54 -0
- package/src/templates/mobile/ui-auth-payments/template/.env.example +20 -0
- package/src/templates/mobile/ui-auth-payments/template/README.md +218 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/_layout.tsx +153 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/analytics.tsx +668 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/billing.tsx +743 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/index.tsx +757 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/orders.tsx +402 -0
- package/src/templates/mobile/ui-auth-payments/template/app/(tabs)/profile.tsx +580 -0
- package/src/templates/mobile/ui-auth-payments/template/app/_layout.tsx +134 -0
- package/src/templates/mobile/ui-auth-payments/template/app/auth/login.tsx +246 -0
- package/src/templates/mobile/ui-auth-payments/template/app/auth/signup.tsx +362 -0
- package/src/templates/mobile/ui-auth-payments/template/app/onboarding/index.tsx +193 -0
- package/src/templates/mobile/ui-auth-payments/template/app/tour/index.tsx +272 -0
- package/src/templates/mobile/ui-auth-payments/template/app.json +94 -0
- package/src/templates/mobile/ui-auth-payments/template/babel.config.js +23 -0
- package/src/templates/mobile/ui-auth-payments/template/eas.json +45 -0
- package/src/templates/mobile/ui-auth-payments/template/expo-env.d.ts +3 -0
- package/src/templates/mobile/ui-auth-payments/template/jest-setup.ts +74 -0
- package/src/templates/mobile/ui-auth-payments/template/metro.config.js +11 -0
- package/src/templates/mobile/ui-auth-payments/template/package.json +117 -0
- package/src/templates/mobile/ui-auth-payments/template/tsconfig.json +31 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/.env.example +23 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/README.md +254 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/_layout.tsx +169 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/ai.tsx +522 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/analytics.tsx +668 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/billing.tsx +743 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/index.tsx +676 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/orders.tsx +402 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/(tabs)/profile.tsx +580 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/_layout.tsx +134 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/auth/login.tsx +246 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/auth/signup.tsx +362 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/onboarding/index.tsx +193 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app/tour/index.tsx +272 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/app.json +94 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/babel.config.js +23 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/eas.json +45 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/expo-env.d.ts +3 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/jest-setup.ts +74 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/metro.config.js +11 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/package.json +119 -0
- package/src/templates/mobile/ui-auth-payments-ai/template/tsconfig.json +31 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/README.md +655 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/app/(tabs)/ai.tsx +683 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/app/_layout.tsx +134 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/app.json +74 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/babel.config.js +25 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/docs/MOBILE-SETUP.md +787 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/eas.json +25 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/expo-env.d.ts +3 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/hooks/useRAGSystem.ts +346 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/jest-setup.ts +37 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/lib/rag/config.ts +180 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/metro.config.js +11 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/package.json +124 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/scripts/setup-rag.js +599 -0
- package/src/templates/mobile/ui-auth-payments-ai-rag/template/tsconfig.json +32 -0
- package/src/templates/shared/auth/firebase/web/config.ts +23 -0
- package/src/templates/shared/auth/supabase/web/config.ts +8 -0
- package/src/templates/web/base/template/.env.example +15 -0
- package/src/templates/web/base/template/.eslintrc.js +8 -0
- package/src/templates/web/base/template/README.md +68 -0
- package/src/templates/web/base/template/next.config.js +15 -0
- package/src/templates/web/base/template/package.json +59 -0
- package/src/templates/web/base/template/postcss.config.js +7 -0
- package/src/templates/web/base/template/src/app/auth/callback/route.ts +18 -0
- package/src/templates/web/base/template/src/app/checkout/page.tsx +119 -0
- package/src/templates/web/base/template/src/app/dashboard/page.tsx +366 -0
- package/src/templates/web/base/template/src/app/error.tsx +97 -0
- package/src/templates/web/base/template/src/app/globals.css +157 -0
- package/src/templates/web/base/template/src/app/layout.tsx +35 -0
- package/src/templates/web/base/template/src/app/loading.tsx +52 -0
- package/src/templates/web/base/template/src/app/login/page.tsx +67 -0
- package/src/templates/web/base/template/src/app/page.tsx +193 -0
- package/src/templates/web/base/template/src/app/signup/page.tsx +67 -0
- package/src/templates/web/base/template/src/components/__tests__/example.test.tsx +49 -0
- package/src/templates/web/base/template/src/components/providers/app-providers.tsx +35 -0
- package/src/templates/web/base/template/src/components/providers/theme-provider.tsx +94 -0
- package/src/templates/web/base/template/src/components/shared/footer.tsx +36 -0
- package/src/templates/web/base/template/src/components/shared/header.tsx +63 -0
- package/src/templates/web/base/template/src/components/ui/badge.tsx +36 -0
- package/src/templates/web/base/template/src/components/ui/button.tsx +56 -0
- package/src/templates/web/base/template/src/components/ui/card.tsx +71 -0
- package/src/templates/web/base/template/src/components/ui/theme-toggle.tsx +34 -0
- package/src/templates/web/base/template/src/lib/auth-server.ts +177 -0
- package/src/templates/web/base/template/src/lib/env.ts +46 -0
- package/src/templates/web/base/template/src/lib/platform.ts +146 -0
- package/src/templates/web/base/template/src/lib/utils.ts +140 -0
- package/src/templates/web/base/template/src/test/setup.ts +79 -0
- package/src/templates/web/base/template/tailwind.config.js +77 -0
- package/src/templates/web/base/template/tsconfig.json +33 -0
- package/src/templates/web/base/template/vitest.config.ts +17 -0
- package/src/templates/web/base/template.backup/.env.example +15 -0
- package/src/templates/web/base/template.backup.20250817/.env.example +15 -0
- package/src/templates/web/ui-auth/template/.claude +21 -0
- package/src/templates/web/ui-auth/template/.env.example +15 -0
- package/src/templates/web/ui-auth/template/.eslintrc.js +8 -0
- package/src/templates/web/ui-auth/template/README.md +68 -0
- package/src/templates/web/ui-auth/template/context.md +105 -0
- package/src/templates/web/ui-auth/template/next.config.js +12 -0
- package/src/templates/web/ui-auth/template/package.json +51 -0
- package/src/templates/web/ui-auth/template/postcss.config.js +7 -0
- package/src/templates/web/ui-auth/template/src/app/auth/callback/route.ts +12 -0
- package/src/templates/web/ui-auth/template/src/app/checkout/page.tsx +25 -0
- package/src/templates/web/ui-auth/template/src/app/dev-setup/page.tsx +801 -0
- package/src/templates/web/ui-auth/template/src/app/error.tsx +67 -0
- package/src/templates/web/ui-auth/template/src/app/globals.css +95 -0
- package/src/templates/web/ui-auth/template/src/app/layout.tsx +33 -0
- package/src/templates/web/ui-auth/template/src/app/loading.tsx +38 -0
- package/src/templates/web/ui-auth/template/src/app/login/page.tsx +109 -0
- package/src/templates/web/ui-auth/template/src/app/page.tsx +305 -0
- package/src/templates/web/ui-auth/template/src/app/setup/page.tsx +403 -0
- package/src/templates/web/ui-auth/template/src/app/signup/page.tsx +128 -0
- package/src/templates/web/ui-auth/template/src/components/__tests__/example.test.tsx +49 -0
- package/src/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +31 -0
- package/src/templates/web/ui-auth/template/src/components/providers/theme-provider.tsx +94 -0
- package/src/templates/web/ui-auth/template/src/components/shared/footer.tsx +36 -0
- package/src/templates/web/ui-auth/template/src/components/shared/header.tsx +94 -0
- package/src/templates/web/ui-auth/template/src/components/ui/badge.tsx +36 -0
- package/src/templates/web/ui-auth/template/src/components/ui/theme-toggle.tsx +34 -0
- package/src/templates/web/ui-auth/template/src/lib/env.ts +49 -0
- package/src/templates/web/ui-auth/template/src/lib/platform.ts +137 -0
- package/src/templates/web/ui-auth/template/src/lib/utils.ts +140 -0
- package/src/templates/web/ui-auth/template/src/test/setup.ts +79 -0
- package/src/templates/web/ui-auth/template/tailwind.config.js +77 -0
- package/src/templates/web/ui-auth/template/tsconfig.json +33 -0
- package/src/templates/web/ui-auth/template/vitest.config.ts +17 -0
- package/src/templates/web/ui-auth/template.backup/.env.example +15 -0
- package/src/templates/web/ui-auth/template.backup.20250817/.env.example +15 -0
- package/src/templates/web/ui-auth-ai/template/.env.example +18 -0
- package/src/templates/web/ui-auth-ai/template/README.md +170 -0
- package/src/templates/web/ui-auth-ai/template/next.config.js +13 -0
- package/src/templates/web/ui-auth-ai/template/package.json +39 -0
- package/src/templates/web/ui-auth-ai/template/postcss.config.js +6 -0
- package/src/templates/web/ui-auth-ai/template/src/app/globals.css +40 -0
- package/src/templates/web/ui-auth-ai/template/src/app/layout.tsx +41 -0
- package/src/templates/web/ui-auth-ai/template/src/app/page.tsx +193 -0
- package/src/templates/web/ui-auth-ai/template/src/components/ai/audio-generator.tsx +141 -0
- package/src/templates/web/ui-auth-ai/template/src/components/ai/video-generator.tsx +158 -0
- package/src/templates/web/ui-auth-ai/template/src/components/auth/login-form.tsx +106 -0
- package/src/templates/web/ui-auth-ai/template/src/components/ui/button.tsx +44 -0
- package/src/templates/web/ui-auth-ai/template/src/components/ui/input.tsx +24 -0
- package/src/templates/web/ui-auth-ai/template/src/components/ui/label.tsx +21 -0
- package/src/templates/web/ui-auth-ai/template/src/components/ui/select.tsx +37 -0
- package/src/templates/web/ui-auth-ai/template/src/components/ui/textarea.tsx +23 -0
- package/src/templates/web/ui-auth-ai/template/src/hooks/useAuth.ts +1 -0
- package/src/templates/web/ui-auth-ai/template/src/lib/supabase.ts +8 -0
- package/src/templates/web/ui-auth-ai/template/src/lib/utils.ts +5 -0
- package/src/templates/web/ui-auth-ai/template/src/providers/auth-provider.tsx +55 -0
- package/src/templates/web/ui-auth-ai/template/tailwind.config.js +22 -0
- package/src/templates/web/ui-auth-ai/template/tsconfig.json +28 -0
- package/src/templates/web/ui-auth-payments/template/.env.example +51 -0
- package/src/templates/web/ui-auth-payments/template/README.md +165 -0
- package/src/templates/web/ui-auth-payments/template/middleware.ts +68 -0
- package/src/templates/web/ui-auth-payments/template/next.config.js +12 -0
- package/src/templates/web/ui-auth-payments/template/package-lock.json +12240 -0
- package/src/templates/web/ui-auth-payments/template/package.json +55 -0
- package/src/templates/web/ui-auth-payments/template/postcss.config.js +7 -0
- package/src/templates/web/ui-auth-payments/template/src/app/auth/callback/route.ts +12 -0
- package/src/templates/web/ui-auth-payments/template/src/app/billing/page.tsx +211 -0
- package/src/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +318 -0
- package/src/templates/web/ui-auth-payments/template/src/app/dashboard/layout.tsx +22 -0
- package/src/templates/web/ui-auth-payments/template/src/app/dashboard/page.tsx +235 -0
- package/src/templates/web/ui-auth-payments/template/src/app/dev-setup/page.tsx +801 -0
- package/src/templates/web/ui-auth-payments/template/src/app/error.tsx +67 -0
- package/src/templates/web/ui-auth-payments/template/src/app/globals.css +211 -0
- package/src/templates/web/ui-auth-payments/template/src/app/layout.tsx +33 -0
- package/src/templates/web/ui-auth-payments/template/src/app/loading.tsx +20 -0
- package/src/templates/web/ui-auth-payments/template/src/app/login/loading.tsx +38 -0
- package/src/templates/web/ui-auth-payments/template/src/app/login/page.tsx +109 -0
- package/src/templates/web/ui-auth-payments/template/src/app/page.tsx +350 -0
- package/src/templates/web/ui-auth-payments/template/src/app/setup/page.tsx +507 -0
- package/src/templates/web/ui-auth-payments/template/src/app/signup/loading.tsx +50 -0
- package/src/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +128 -0
- package/src/templates/web/ui-auth-payments/template/src/components/__tests__/example.test.tsx +49 -0
- package/src/templates/web/ui-auth-payments/template/src/components/client/auth-status.tsx +52 -0
- package/src/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +144 -0
- package/src/templates/web/ui-auth-payments/template/src/components/client/newsletter-signup.tsx +68 -0
- package/src/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +185 -0
- package/src/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx +34 -0
- package/src/templates/web/ui-auth-payments/template/src/components/providers/theme-provider.tsx +94 -0
- package/src/templates/web/ui-auth-payments/template/src/components/shared/footer.tsx +36 -0
- package/src/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +230 -0
- package/src/templates/web/ui-auth-payments/template/src/components/ui/badge.tsx +36 -0
- package/src/templates/web/ui-auth-payments/template/src/components/ui/theme-toggle.tsx +34 -0
- package/src/templates/web/ui-auth-payments/template/src/lib/actions/auth.ts +246 -0
- package/src/templates/web/ui-auth-payments/template/src/lib/actions/index.ts +340 -0
- package/src/templates/web/ui-auth-payments/template/src/lib/auth-server.ts +177 -0
- package/src/templates/web/ui-auth-payments/template/src/lib/env.ts +49 -0
- package/src/templates/web/ui-auth-payments/template/src/lib/platform.ts +146 -0
- package/src/templates/web/ui-auth-payments/template/src/lib/utils.ts +140 -0
- package/src/templates/web/ui-auth-payments/template/src/test/setup.ts +79 -0
- package/src/templates/web/ui-auth-payments/template/tailwind.config.js +77 -0
- package/src/templates/web/ui-auth-payments/template/tsconfig.json +33 -0
- package/src/templates/web/ui-auth-payments/template/tsconfig.tsbuildinfo +1 -0
- package/src/templates/web/ui-auth-payments/template/vitest.config.ts +17 -0
- package/src/templates/web/ui-auth-payments-ai/template/.claude +21 -0
- package/src/templates/web/ui-auth-payments-ai/template/.env.example +60 -0
- package/src/templates/web/ui-auth-payments-ai/template/README.md +207 -0
- package/src/templates/web/ui-auth-payments-ai/template/context.md +169 -0
- package/src/templates/web/ui-auth-payments-ai/template/middleware.ts +68 -0
- package/src/templates/web/ui-auth-payments-ai/template/next.config.js +12 -0
- package/src/templates/web/ui-auth-payments-ai/template/package-lock.json +12241 -0
- package/src/templates/web/ui-auth-payments-ai/template/package.json +58 -0
- package/src/templates/web/ui-auth-payments-ai/template/postcss.config.js +7 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/ai/page.tsx +310 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/api/ai/audio/route.ts +56 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/api/ai/chat/route.ts +49 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/api/ai/text/route.ts +64 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/api/ai/video/route.ts +73 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/auth/callback/route.ts +12 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/billing/page.tsx +422 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/checkout/page.tsx +142 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/dashboard/layout.tsx +22 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/dashboard/page.tsx +236 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/dev-setup/page.tsx +801 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/error.tsx +67 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/globals.css +96 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/layout.tsx +35 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/loading.tsx +20 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/login/page.tsx +6 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/onboarding/page.tsx +364 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx +394 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx.backup +391 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/page.tsx.bak +391 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/settings/page.tsx +532 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/setup/page.tsx +645 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/app/signup/page.tsx +6 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/components/__tests__/example.test.tsx +49 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/auth-status.tsx +52 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/login-form.tsx +163 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/components/client/signup-form.tsx +201 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +38 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/components/providers/theme-provider.tsx +96 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/components/shared/footer.tsx +36 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/components/shared/header.tsx +252 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/components/ui/badge.tsx +36 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/components/ui/theme-toggle.tsx +34 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/lib/actions/auth.ts +246 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/lib/actions/index.ts +14 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/lib/auth-server.ts +177 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/lib/env.ts +49 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/lib/platform.ts +155 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/lib/supabase/server.ts +72 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/lib/utils.ts +140 -0
- package/src/templates/web/ui-auth-payments-ai/template/src/test/setup.ts +79 -0
- package/src/templates/web/ui-auth-payments-ai/template/tailwind.config.js +77 -0
- package/src/templates/web/ui-auth-payments-ai/template/tsconfig.json +33 -0
- package/src/templates/web/ui-auth-payments-ai/template/tsconfig.tsbuildinfo +1 -0
- package/src/templates/web/ui-auth-payments-ai/template/vitest.config.ts +17 -0
- package/src/templates/web/ui-auth-payments-ai-rag/template/README.md +434 -0
- package/src/templates/web/ui-auth-payments-ai-rag/template/components/rag/KnowledgeManager.tsx +642 -0
- package/src/templates/web/ui-auth-payments-ai-rag/template/components/rag/RAGAnalytics.tsx +466 -0
- package/src/templates/web/ui-auth-payments-ai-rag/template/components/rag/RAGChatInterface.tsx +393 -0
- package/src/templates/web/ui-auth-payments-ai-rag/template/docs/GETTING-STARTED.md +457 -0
- package/src/templates/web/ui-auth-payments-ai-rag/template/hooks/useRAGSystem.ts +478 -0
- package/src/templates/web/ui-auth-payments-ai-rag/template/lib/rag/config.ts +250 -0
- package/src/templates/web/ui-auth-payments-ai-rag/template/package.json +76 -0
- package/src/templates/web/ui-auth-payments-ai-rag/template/scripts/setup-rag.js +622 -0
- package/src/templates/web/ui-auth-payments-ai-rag/template/src/app/ai/page.tsx +396 -0
- package/src/templates/web/ui-auth-payments-audio/template/.env.example +15 -0
- package/src/templates/web/ui-auth-payments-audio/template/README.md +207 -0
- package/src/templates/web/ui-auth-payments-audio/template/middleware.ts +68 -0
- package/src/templates/web/ui-auth-payments-audio/template/next.config.js +12 -0
- package/src/templates/web/ui-auth-payments-audio/template/package-lock.json +12241 -0
- package/src/templates/web/ui-auth-payments-audio/template/package.json +55 -0
- package/src/templates/web/ui-auth-payments-audio/template/postcss.config.js +7 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/auth/callback/route.ts +12 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/billing/page.tsx +211 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/checkout/page.tsx +142 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/dashboard/layout.tsx +22 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/dashboard/page.tsx +237 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/error.tsx +67 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/globals.css +96 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/layout.tsx +35 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/loading.tsx +20 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/login/page.tsx +6 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +403 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx.backup +391 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx.bak +391 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/setup/page.tsx +345 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/app/signup/page.tsx +6 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/components/__tests__/example.test.tsx +49 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/components/client/auth-status.tsx +52 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/components/client/login-form.tsx +144 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/components/client/signup-form.tsx +185 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +38 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/components/providers/theme-provider.tsx +96 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/footer.tsx +36 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +252 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/components/ui/badge.tsx +36 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/components/ui/theme-toggle.tsx +34 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/lib/actions/auth.ts +246 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/lib/actions/index.ts +14 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/lib/auth-server.ts +177 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/lib/env.ts +49 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/lib/utils.ts +140 -0
- package/src/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +79 -0
- package/src/templates/web/ui-auth-payments-audio/template/tailwind.config.js +77 -0
- package/src/templates/web/ui-auth-payments-audio/template/tsconfig.json +33 -0
- package/src/templates/web/ui-auth-payments-audio/template/tsconfig.tsbuildinfo +1 -0
- package/src/templates/web/ui-auth-payments-audio/template/vitest.config.ts +17 -0
- package/src/templates/web/ui-auth-payments-video/template/.env.example +15 -0
- package/src/templates/web/ui-auth-payments-video/template/README.md +190 -0
- package/src/templates/web/ui-auth-payments-video/template/next.config.js +12 -0
- package/src/templates/web/ui-auth-payments-video/template/package.json +55 -0
- package/src/templates/web/ui-auth-payments-video/template/postcss.config.js +7 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/auth/callback/route.ts +12 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/billing/page.tsx +211 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/checkout/page.tsx +142 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/error.tsx +67 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/globals.css +228 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/layout.tsx +33 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/loading.tsx +20 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +109 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +395 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/setup/page.tsx +351 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +128 -0
- package/src/templates/web/ui-auth-payments-video/template/src/components/__tests__/example.test.tsx +49 -0
- package/src/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +34 -0
- package/src/templates/web/ui-auth-payments-video/template/src/components/providers/theme-provider.tsx +94 -0
- package/src/templates/web/ui-auth-payments-video/template/src/components/shared/footer.tsx +36 -0
- package/src/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +246 -0
- package/src/templates/web/ui-auth-payments-video/template/src/components/ui/badge.tsx +36 -0
- package/src/templates/web/ui-auth-payments-video/template/src/components/ui/theme-toggle.tsx +34 -0
- package/src/templates/web/ui-auth-payments-video/template/src/lib/env.ts +49 -0
- package/src/templates/web/ui-auth-payments-video/template/src/lib/utils.ts +140 -0
- package/src/templates/web/ui-auth-payments-video/template/src/test/setup.ts +79 -0
- package/src/templates/web/ui-auth-payments-video/template/tailwind.config.js +77 -0
- package/src/templates/web/ui-auth-payments-video/template/tsconfig.json +33 -0
- package/src/templates/web/ui-auth-payments-video/template/vitest.config.ts +17 -0
- package/src/templates/web/ui-only/template/.env.example +15 -0
- package/src/templates/web/ui-only/template/.eslintrc.js +8 -0
- package/src/templates/web/ui-only/template/README.md +68 -0
- package/src/templates/web/ui-only/template/next.config.js +12 -0
- package/src/templates/web/ui-only/template/package.json +49 -0
- package/src/templates/web/ui-only/template/postcss.config.js +7 -0
- package/src/templates/web/ui-only/template/src/app/auth/callback/route.ts +12 -0
- package/src/templates/web/ui-only/template/src/app/checkout/page.tsx +25 -0
- package/src/templates/web/ui-only/template/src/app/error.tsx +67 -0
- package/src/templates/web/ui-only/template/src/app/globals.css +42 -0
- package/src/templates/web/ui-only/template/src/app/layout.tsx +33 -0
- package/src/templates/web/ui-only/template/src/app/loading.tsx +20 -0
- package/src/templates/web/ui-only/template/src/app/login/page.tsx +63 -0
- package/src/templates/web/ui-only/template/src/app/page.tsx +91 -0
- package/src/templates/web/ui-only/template/src/app/signup/page.tsx +79 -0
- package/src/templates/web/ui-only/template/src/components/__tests__/example.test.tsx +49 -0
- package/src/templates/web/ui-only/template/src/components/providers/app-providers.tsx +26 -0
- package/src/templates/web/ui-only/template/src/components/providers/theme-provider.tsx +94 -0
- package/src/templates/web/ui-only/template/src/components/shared/footer.tsx +36 -0
- package/src/templates/web/ui-only/template/src/components/shared/header.tsx +53 -0
- package/src/templates/web/ui-only/template/src/components/ui/badge.tsx +36 -0
- package/src/templates/web/ui-only/template/src/components/ui/theme-toggle.tsx +34 -0
- package/src/templates/web/ui-only/template/src/lib/env.ts +49 -0
- package/src/templates/web/ui-only/template/src/lib/utils.ts +140 -0
- package/src/templates/web/ui-only/template/src/test/setup.ts +79 -0
- package/src/templates/web/ui-only/template/tailwind.config.js +77 -0
- package/src/templates/web/ui-only/template/tsconfig.json +33 -0
- package/src/templates/web/ui-only/template/vitest.config.ts +17 -0
- package/src/templates/web/ui-only/template.backup/.env.example +15 -0
- package/src/templates/web/ui-only/template.backup.20250817/.env.example +15 -0
- package/src/templates/web/ui-package-test/template/next-env.d.ts +5 -0
- package/src/templates/web/ui-package-test/template/package.json +42 -0
- package/src/templates/web/ui-package-test/template/src/app/page.tsx +106 -0
- package/src/templates/web/ui-package-test/template/tsconfig.json +41 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Example test file demonstrating testing patterns for SaaS Factory components
|
|
3
|
+
*
|
|
4
|
+
* This is optional and serves as a reference for testing your components.
|
|
5
|
+
* You can delete this file if you don't need example tests.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { render, screen } from '@testing-library/react'
|
|
9
|
+
import { Button } from '@digilogiclabs/saas-factory-ui'
|
|
10
|
+
|
|
11
|
+
// Example: Testing UI components
|
|
12
|
+
describe('UI Components', () => {
|
|
13
|
+
it('renders button with correct text', () => {
|
|
14
|
+
render(<Button>Click me</Button>)
|
|
15
|
+
expect(screen.getByRole('button', { name: /click me/i })).toBeInTheDocument()
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('button can be disabled', () => {
|
|
19
|
+
render(<Button disabled>Disabled button</Button>)
|
|
20
|
+
expect(screen.getByRole('button')).toBeDisabled()
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
// Example: Testing custom components
|
|
25
|
+
function MockComponent({ title }: { title: string }) {
|
|
26
|
+
return <h1>{title}</h1>
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
describe('Custom Components', () => {
|
|
30
|
+
it('renders with correct title', () => {
|
|
31
|
+
render(<MockComponent title="Test Title" />)
|
|
32
|
+
expect(screen.getByRole('heading', { level: 1 })).toHaveTextContent('Test Title')
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
// Example: Testing utilities
|
|
37
|
+
function formatCurrency(amount: number): string {
|
|
38
|
+
return new Intl.NumberFormat('en-US', {
|
|
39
|
+
style: 'currency',
|
|
40
|
+
currency: 'USD',
|
|
41
|
+
}).format(amount)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
describe('Utilities', () => {
|
|
45
|
+
it('formats currency correctly', () => {
|
|
46
|
+
expect(formatCurrency(1000)).toBe('$1,000.00')
|
|
47
|
+
expect(formatCurrency(0)).toBe('$0.00')
|
|
48
|
+
})
|
|
49
|
+
})
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { Button } from '@digilogiclabs/saas-factory-ui'
|
|
4
|
+
import { LogOut, User } from 'lucide-react'
|
|
5
|
+
import { useAuth } from '@digilogiclabs/saas-factory-auth'
|
|
6
|
+
import Link from 'next/link'
|
|
7
|
+
|
|
8
|
+
export function AuthStatus() {
|
|
9
|
+
const { user, signOut, loading } = useAuth()
|
|
10
|
+
|
|
11
|
+
const handleSignOut = async () => {
|
|
12
|
+
try {
|
|
13
|
+
await signOut()
|
|
14
|
+
} catch (err) {
|
|
15
|
+
console.error('Sign out error:', err)
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (loading) {
|
|
20
|
+
return (
|
|
21
|
+
<div className="text-sm text-gray-600 dark:text-gray-300">
|
|
22
|
+
Loading...
|
|
23
|
+
</div>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (user) {
|
|
28
|
+
return (
|
|
29
|
+
<div className="flex items-center gap-4">
|
|
30
|
+
<div className="flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300">
|
|
31
|
+
<User className="w-4 h-4" />
|
|
32
|
+
Welcome, {user.email}
|
|
33
|
+
</div>
|
|
34
|
+
<Button variant="outline" size="sm" onClick={handleSignOut}>
|
|
35
|
+
<LogOut className="w-4 h-4 mr-2" />
|
|
36
|
+
Sign Out
|
|
37
|
+
</Button>
|
|
38
|
+
</div>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<div className="flex gap-2">
|
|
44
|
+
<Link href="/login">
|
|
45
|
+
<Button variant="outline" size="sm">Sign In</Button>
|
|
46
|
+
</Link>
|
|
47
|
+
<Link href="/signup">
|
|
48
|
+
<Button size="sm">Sign Up</Button>
|
|
49
|
+
</Link>
|
|
50
|
+
</div>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import React, { useState, useActionState } from 'react'
|
|
4
|
+
import { Button, Card, Input, Label } from '@digilogiclabs/saas-factory-ui'
|
|
5
|
+
import { useAuth } from '@digilogiclabs/saas-factory-auth'
|
|
6
|
+
import { useRouter } from 'next/navigation'
|
|
7
|
+
import { signInAction } from '@/lib/actions/auth'
|
|
8
|
+
|
|
9
|
+
export function LoginForm() {
|
|
10
|
+
const [email, setEmail] = useState('')
|
|
11
|
+
const [password, setPassword] = useState('')
|
|
12
|
+
const { signIn, signInWithOAuth, loading, error, user } = useAuth()
|
|
13
|
+
const [actionState, formAction] = useActionState(signInAction, { success: false })
|
|
14
|
+
const router = useRouter()
|
|
15
|
+
|
|
16
|
+
// Redirect if already logged in
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
if (user) {
|
|
19
|
+
router.push('/')
|
|
20
|
+
}
|
|
21
|
+
}, [user, router])
|
|
22
|
+
|
|
23
|
+
const handleLogin = async (e: React.FormEvent) => {
|
|
24
|
+
e.preventDefault()
|
|
25
|
+
try {
|
|
26
|
+
await signIn(email, password)
|
|
27
|
+
router.push('/')
|
|
28
|
+
} catch (err) {
|
|
29
|
+
console.error('Login error:', err)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const handleGoogleLogin = async () => {
|
|
34
|
+
try {
|
|
35
|
+
await signInWithOAuth('google', window.location.origin)
|
|
36
|
+
} catch (err) {
|
|
37
|
+
console.error('Google login error:', err)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Enhanced form action that uses both server action validation and client auth
|
|
42
|
+
const handleServerAction = async (formData: FormData) => {
|
|
43
|
+
const result = await formAction(formData)
|
|
44
|
+
|
|
45
|
+
if (result?.success) {
|
|
46
|
+
// If server validation passes, proceed with client auth
|
|
47
|
+
const emailValue = formData.get('email') as string
|
|
48
|
+
const passwordValue = formData.get('password') as string
|
|
49
|
+
|
|
50
|
+
try {
|
|
51
|
+
await signIn(emailValue, passwordValue)
|
|
52
|
+
router.push('/')
|
|
53
|
+
} catch (err) {
|
|
54
|
+
console.error('Login error:', err)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (loading) {
|
|
60
|
+
return (
|
|
61
|
+
<div className="flex items-center justify-center min-h-screen bg-gray-100 dark:bg-gray-900">
|
|
62
|
+
<div>Loading...</div>
|
|
63
|
+
</div>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<div className="flex items-center justify-center min-h-screen bg-gray-100 dark:bg-gray-900">
|
|
69
|
+
<Card className="w-full max-w-md p-8">
|
|
70
|
+
<h1 className="text-2xl font-bold text-center mb-6">Sign In</h1>
|
|
71
|
+
|
|
72
|
+
{/* Server action errors */}
|
|
73
|
+
{actionState?.error && (
|
|
74
|
+
<div className="mb-4 p-3 bg-red-100 border border-red-400 text-red-700 rounded">
|
|
75
|
+
{actionState.error}
|
|
76
|
+
</div>
|
|
77
|
+
)}
|
|
78
|
+
|
|
79
|
+
{/* Client auth errors */}
|
|
80
|
+
{error && (
|
|
81
|
+
<div className="mb-4 p-3 bg-red-100 border border-red-400 text-red-700 rounded">
|
|
82
|
+
{error.message}
|
|
83
|
+
</div>
|
|
84
|
+
)}
|
|
85
|
+
|
|
86
|
+
<form action={handleServerAction} className="space-y-4">
|
|
87
|
+
<div>
|
|
88
|
+
<Label htmlFor="email">Email</Label>
|
|
89
|
+
<Input
|
|
90
|
+
id="email"
|
|
91
|
+
name="email"
|
|
92
|
+
type="email"
|
|
93
|
+
value={email}
|
|
94
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
95
|
+
placeholder="Enter your email"
|
|
96
|
+
required
|
|
97
|
+
disabled={loading}
|
|
98
|
+
/>
|
|
99
|
+
{actionState?.fieldErrors?.email && (
|
|
100
|
+
<p className="text-sm text-red-600 mt-1">{actionState.fieldErrors.email[0]}</p>
|
|
101
|
+
)}
|
|
102
|
+
</div>
|
|
103
|
+
<div>
|
|
104
|
+
<Label htmlFor="password">Password</Label>
|
|
105
|
+
<Input
|
|
106
|
+
id="password"
|
|
107
|
+
name="password"
|
|
108
|
+
type="password"
|
|
109
|
+
value={password}
|
|
110
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
111
|
+
placeholder="Enter your password"
|
|
112
|
+
required
|
|
113
|
+
disabled={loading}
|
|
114
|
+
/>
|
|
115
|
+
{actionState?.fieldErrors?.password && (
|
|
116
|
+
<p className="text-sm text-red-600 mt-1">{actionState.fieldErrors.password[0]}</p>
|
|
117
|
+
)}
|
|
118
|
+
</div>
|
|
119
|
+
<Button type="submit" className="w-full" disabled={loading}>
|
|
120
|
+
{loading ? 'Signing In...' : 'Sign In'}
|
|
121
|
+
</Button>
|
|
122
|
+
<Button
|
|
123
|
+
type="button"
|
|
124
|
+
variant="outline"
|
|
125
|
+
className="w-full"
|
|
126
|
+
onClick={handleGoogleLogin}
|
|
127
|
+
disabled={loading}
|
|
128
|
+
>
|
|
129
|
+
Sign in with Google
|
|
130
|
+
</Button>
|
|
131
|
+
</form>
|
|
132
|
+
|
|
133
|
+
<div className="mt-4 text-center">
|
|
134
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
135
|
+
Don't have an account?{' '}
|
|
136
|
+
<a href="/signup" className="text-blue-600 hover:underline dark:text-blue-400">
|
|
137
|
+
Sign up
|
|
138
|
+
</a>
|
|
139
|
+
</p>
|
|
140
|
+
</div>
|
|
141
|
+
</Card>
|
|
142
|
+
</div>
|
|
143
|
+
)
|
|
144
|
+
}
|
package/src/templates/web/ui-auth-payments/template/src/components/client/newsletter-signup.tsx
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { useState, useActionState } from 'react'
|
|
4
|
+
import { Button, Input, Label } from '@digilogiclabs/saas-factory-ui'
|
|
5
|
+
import { subscribeToNewsletter } from '@/lib/actions'
|
|
6
|
+
|
|
7
|
+
export function NewsletterSignup() {
|
|
8
|
+
const [email, setEmail] = useState('')
|
|
9
|
+
const [state, formAction, isPending] = useActionState(subscribeToNewsletter, null)
|
|
10
|
+
|
|
11
|
+
const handleSubmit = async (formData: FormData) => {
|
|
12
|
+
await formAction(formData)
|
|
13
|
+
if (state?.success) {
|
|
14
|
+
setEmail('') // Clear form on success
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div className="bg-blue-600 dark:bg-blue-800 rounded-lg p-6 text-white">
|
|
20
|
+
<h3 className="text-lg font-semibold mb-2">Stay Updated</h3>
|
|
21
|
+
<p className="text-blue-100 dark:text-blue-200 mb-4 text-sm">
|
|
22
|
+
Get the latest updates and features delivered to your inbox
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
{state?.success && (
|
|
26
|
+
<div className="mb-4 p-3 bg-green-100 border border-green-400 text-green-700 rounded">
|
|
27
|
+
{state.data?.message}
|
|
28
|
+
</div>
|
|
29
|
+
)}
|
|
30
|
+
|
|
31
|
+
{state?.error && (
|
|
32
|
+
<div className="mb-4 p-3 bg-red-100 border border-red-400 text-red-700 rounded">
|
|
33
|
+
{state.error}
|
|
34
|
+
</div>
|
|
35
|
+
)}
|
|
36
|
+
|
|
37
|
+
<form action={handleSubmit} className="flex gap-2">
|
|
38
|
+
<div className="flex-1">
|
|
39
|
+
<Label htmlFor="newsletter-email" className="sr-only">
|
|
40
|
+
Email address
|
|
41
|
+
</Label>
|
|
42
|
+
<Input
|
|
43
|
+
id="newsletter-email"
|
|
44
|
+
name="email"
|
|
45
|
+
type="email"
|
|
46
|
+
value={email}
|
|
47
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
48
|
+
placeholder="Enter your email"
|
|
49
|
+
required
|
|
50
|
+
disabled={isPending}
|
|
51
|
+
className="bg-white dark:bg-gray-800 text-gray-900 dark:text-white"
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
<Button
|
|
55
|
+
type="submit"
|
|
56
|
+
variant="secondary"
|
|
57
|
+
disabled={isPending}
|
|
58
|
+
>
|
|
59
|
+
{isPending ? 'Subscribing...' : 'Subscribe'}
|
|
60
|
+
</Button>
|
|
61
|
+
</form>
|
|
62
|
+
|
|
63
|
+
<p className="text-xs text-blue-200 dark:text-blue-300 mt-2">
|
|
64
|
+
We respect your privacy. Unsubscribe at any time.
|
|
65
|
+
</p>
|
|
66
|
+
</div>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import React, { useState, useActionState } from 'react'
|
|
4
|
+
import { Button, Card, Input, Label } from '@digilogiclabs/saas-factory-ui'
|
|
5
|
+
import { useAuth } from '@digilogiclabs/saas-factory-auth'
|
|
6
|
+
import { useRouter } from 'next/navigation'
|
|
7
|
+
import { signUpAction } from '@/lib/actions/auth'
|
|
8
|
+
|
|
9
|
+
export function SignupForm() {
|
|
10
|
+
const [name, setName] = useState('')
|
|
11
|
+
const [email, setEmail] = useState('')
|
|
12
|
+
const [password, setPassword] = useState('')
|
|
13
|
+
const [confirmPassword, setConfirmPassword] = useState('')
|
|
14
|
+
const { signUp, signInWithOAuth, loading, error, user } = useAuth()
|
|
15
|
+
const [actionState, formAction] = useActionState(signUpAction, { success: false })
|
|
16
|
+
const router = useRouter()
|
|
17
|
+
|
|
18
|
+
// Redirect if already logged in
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
if (user) {
|
|
21
|
+
router.push('/')
|
|
22
|
+
}
|
|
23
|
+
}, [user, router])
|
|
24
|
+
|
|
25
|
+
const handleSignUp = async (e: React.FormEvent) => {
|
|
26
|
+
e.preventDefault()
|
|
27
|
+
|
|
28
|
+
if (password !== confirmPassword) {
|
|
29
|
+
console.error('Passwords do not match')
|
|
30
|
+
return
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
try {
|
|
34
|
+
await signUp(email, password)
|
|
35
|
+
router.push('/')
|
|
36
|
+
} catch (err) {
|
|
37
|
+
console.error('Sign up error:', err)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const handleGoogleSignUp = async () => {
|
|
42
|
+
try {
|
|
43
|
+
await signInWithOAuth('google', window.location.origin)
|
|
44
|
+
} catch (err) {
|
|
45
|
+
console.error('Google sign up error:', err)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Enhanced form action that uses both server action validation and client auth
|
|
50
|
+
const handleServerAction = async (formData: FormData) => {
|
|
51
|
+
const result = await formAction(formData)
|
|
52
|
+
|
|
53
|
+
if (result?.success) {
|
|
54
|
+
// If server validation passes, proceed with client auth
|
|
55
|
+
const emailValue = formData.get('email') as string
|
|
56
|
+
const passwordValue = formData.get('password') as string
|
|
57
|
+
const nameValue = formData.get('name') as string
|
|
58
|
+
|
|
59
|
+
try {
|
|
60
|
+
await signUp(emailValue, passwordValue)
|
|
61
|
+
router.push('/')
|
|
62
|
+
} catch (err) {
|
|
63
|
+
console.error('Sign up error:', err)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (loading) {
|
|
69
|
+
return (
|
|
70
|
+
<div className="flex items-center justify-center min-h-screen bg-gray-100 dark:bg-gray-900">
|
|
71
|
+
<div>Loading...</div>
|
|
72
|
+
</div>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<div className="flex items-center justify-center min-h-screen bg-gray-100 dark:bg-gray-900">
|
|
78
|
+
<Card className="w-full max-w-md p-8">
|
|
79
|
+
<h1 className="text-2xl font-bold text-center mb-6">Sign Up</h1>
|
|
80
|
+
|
|
81
|
+
{/* Server action errors */}
|
|
82
|
+
{actionState?.error && (
|
|
83
|
+
<div className="mb-4 p-3 bg-red-100 border border-red-400 text-red-700 rounded">
|
|
84
|
+
{actionState.error}
|
|
85
|
+
</div>
|
|
86
|
+
)}
|
|
87
|
+
|
|
88
|
+
{/* Client auth errors */}
|
|
89
|
+
{error && (
|
|
90
|
+
<div className="mb-4 p-3 bg-red-100 border border-red-400 text-red-700 rounded">
|
|
91
|
+
{error.message}
|
|
92
|
+
</div>
|
|
93
|
+
)}
|
|
94
|
+
|
|
95
|
+
<form action={handleServerAction} className="space-y-4">
|
|
96
|
+
<div>
|
|
97
|
+
<Label htmlFor="name">Name</Label>
|
|
98
|
+
<Input
|
|
99
|
+
id="name"
|
|
100
|
+
name="name"
|
|
101
|
+
type="text"
|
|
102
|
+
value={name}
|
|
103
|
+
onChange={(e) => setName(e.target.value)}
|
|
104
|
+
placeholder="Enter your name"
|
|
105
|
+
required
|
|
106
|
+
disabled={loading}
|
|
107
|
+
/>
|
|
108
|
+
{actionState?.fieldErrors?.name && (
|
|
109
|
+
<p className="text-sm text-red-600 mt-1">{actionState.fieldErrors.name[0]}</p>
|
|
110
|
+
)}
|
|
111
|
+
</div>
|
|
112
|
+
<div>
|
|
113
|
+
<Label htmlFor="email">Email</Label>
|
|
114
|
+
<Input
|
|
115
|
+
id="email"
|
|
116
|
+
name="email"
|
|
117
|
+
type="email"
|
|
118
|
+
value={email}
|
|
119
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
120
|
+
placeholder="Enter your email"
|
|
121
|
+
required
|
|
122
|
+
disabled={loading}
|
|
123
|
+
/>
|
|
124
|
+
{actionState?.fieldErrors?.email && (
|
|
125
|
+
<p className="text-sm text-red-600 mt-1">{actionState.fieldErrors.email[0]}</p>
|
|
126
|
+
)}
|
|
127
|
+
</div>
|
|
128
|
+
<div>
|
|
129
|
+
<Label htmlFor="password">Password</Label>
|
|
130
|
+
<Input
|
|
131
|
+
id="password"
|
|
132
|
+
name="password"
|
|
133
|
+
type="password"
|
|
134
|
+
value={password}
|
|
135
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
136
|
+
placeholder="Enter your password"
|
|
137
|
+
required
|
|
138
|
+
disabled={loading}
|
|
139
|
+
/>
|
|
140
|
+
{actionState?.fieldErrors?.password && (
|
|
141
|
+
<p className="text-sm text-red-600 mt-1">{actionState.fieldErrors.password[0]}</p>
|
|
142
|
+
)}
|
|
143
|
+
</div>
|
|
144
|
+
<div>
|
|
145
|
+
<Label htmlFor="confirmPassword">Confirm Password</Label>
|
|
146
|
+
<Input
|
|
147
|
+
id="confirmPassword"
|
|
148
|
+
name="confirmPassword"
|
|
149
|
+
type="password"
|
|
150
|
+
value={confirmPassword}
|
|
151
|
+
onChange={(e) => setConfirmPassword(e.target.value)}
|
|
152
|
+
placeholder="Confirm your password"
|
|
153
|
+
required
|
|
154
|
+
disabled={loading}
|
|
155
|
+
/>
|
|
156
|
+
{actionState?.fieldErrors?.confirmPassword && (
|
|
157
|
+
<p className="text-sm text-red-600 mt-1">{actionState.fieldErrors.confirmPassword[0]}</p>
|
|
158
|
+
)}
|
|
159
|
+
</div>
|
|
160
|
+
<Button type="submit" className="w-full" disabled={loading}>
|
|
161
|
+
{loading ? 'Signing Up...' : 'Sign Up'}
|
|
162
|
+
</Button>
|
|
163
|
+
<Button
|
|
164
|
+
type="button"
|
|
165
|
+
variant="outline"
|
|
166
|
+
className="w-full"
|
|
167
|
+
onClick={handleGoogleSignUp}
|
|
168
|
+
disabled={loading}
|
|
169
|
+
>
|
|
170
|
+
Sign up with Google
|
|
171
|
+
</Button>
|
|
172
|
+
</form>
|
|
173
|
+
|
|
174
|
+
<div className="mt-4 text-center">
|
|
175
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
176
|
+
Already have an account?{' '}
|
|
177
|
+
<a href="/login" className="text-blue-600 hover:underline dark:text-blue-400">
|
|
178
|
+
Sign in
|
|
179
|
+
</a>
|
|
180
|
+
</p>
|
|
181
|
+
</div>
|
|
182
|
+
</Card>
|
|
183
|
+
</div>
|
|
184
|
+
)
|
|
185
|
+
}
|
package/src/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import React from 'react'
|
|
4
|
+
import { ThemeProvider } from 'next-themes'
|
|
5
|
+
import { AuthProvider } from '@digilogiclabs/saas-factory-auth'
|
|
6
|
+
import { PaymentsProvider } from '@digilogiclabs/saas-factory-payments'
|
|
7
|
+
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
8
|
+
import { AppThemeProvider } from './theme-provider'
|
|
9
|
+
|
|
10
|
+
interface AppProvidersProps {
|
|
11
|
+
children: React.ReactNode
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function AppProviders({ children }: AppProvidersProps) {
|
|
15
|
+
return (
|
|
16
|
+
<ThemeProvider
|
|
17
|
+
attribute="class"
|
|
18
|
+
defaultTheme="{{defaultTheme}}"
|
|
19
|
+
enableSystem
|
|
20
|
+
disableTransitionOnChange
|
|
21
|
+
storageKey="{{packageName}}-theme"
|
|
22
|
+
>
|
|
23
|
+
<AuthProvider>
|
|
24
|
+
<PaymentsProvider>
|
|
25
|
+
<AppThemeProvider themeColor="{{themeColor}}">
|
|
26
|
+
{children}
|
|
27
|
+
<Toaster />
|
|
28
|
+
</AppThemeProvider>
|
|
29
|
+
</PaymentsProvider>
|
|
30
|
+
</AuthProvider>
|
|
31
|
+
</ThemeProvider>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
package/src/templates/web/ui-auth-payments/template/src/components/providers/theme-provider.tsx
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import React, { createContext, useContext, useEffect } from 'react'
|
|
4
|
+
|
|
5
|
+
interface ThemeContextType {
|
|
6
|
+
themeColor: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const ThemeContext = createContext<ThemeContextType | undefined>(undefined)
|
|
10
|
+
|
|
11
|
+
interface AppThemeProviderProps {
|
|
12
|
+
children: React.ReactNode
|
|
13
|
+
themeColor: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const THEME_COLORS = {
|
|
17
|
+
blue: {
|
|
18
|
+
primary: '221.2 83.2% 53.3%',
|
|
19
|
+
primaryForeground: '210 40% 98%',
|
|
20
|
+
secondary: '210 40% 96%',
|
|
21
|
+
accent: '210 40% 96%',
|
|
22
|
+
ring: '221.2 83.2% 53.3%',
|
|
23
|
+
},
|
|
24
|
+
green: {
|
|
25
|
+
primary: '142.1 76.2% 36.3%',
|
|
26
|
+
primaryForeground: '355.7 100% 97.3%',
|
|
27
|
+
secondary: '138.5 76.2% 96.7%',
|
|
28
|
+
accent: '138.5 76.2% 96.7%',
|
|
29
|
+
ring: '142.1 76.2% 36.3%',
|
|
30
|
+
},
|
|
31
|
+
purple: {
|
|
32
|
+
primary: '262.1 83.3% 57.8%',
|
|
33
|
+
primaryForeground: '210 40% 98%',
|
|
34
|
+
secondary: '270 3.18% 96.5%',
|
|
35
|
+
accent: '270 3.18% 96.5%',
|
|
36
|
+
ring: '262.1 83.3% 57.8%',
|
|
37
|
+
},
|
|
38
|
+
orange: {
|
|
39
|
+
primary: '24.6 95% 53.1%',
|
|
40
|
+
primaryForeground: '60 9.1% 97.8%',
|
|
41
|
+
secondary: '60 4.8% 95.9%',
|
|
42
|
+
accent: '60 4.8% 95.9%',
|
|
43
|
+
ring: '24.6 95% 53.1%',
|
|
44
|
+
},
|
|
45
|
+
red: {
|
|
46
|
+
primary: '0 72.2% 50.6%',
|
|
47
|
+
primaryForeground: '0 85.7% 97.3%',
|
|
48
|
+
secondary: '0 0% 96.3%',
|
|
49
|
+
accent: '0 0% 96.3%',
|
|
50
|
+
ring: '0 72.2% 50.6%',
|
|
51
|
+
},
|
|
52
|
+
slate: {
|
|
53
|
+
primary: '215 27.9% 16.9%',
|
|
54
|
+
primaryForeground: '0 0% 98%',
|
|
55
|
+
secondary: '210 40% 96%',
|
|
56
|
+
accent: '210 40% 96%',
|
|
57
|
+
ring: '215 27.9% 16.9%',
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function AppThemeProvider({ children, themeColor }: AppThemeProviderProps) {
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
const colorScheme = THEME_COLORS[themeColor as keyof typeof THEME_COLORS] || THEME_COLORS.blue
|
|
64
|
+
|
|
65
|
+
// Apply theme colors to CSS custom properties
|
|
66
|
+
const root = document.documentElement
|
|
67
|
+
root.style.setProperty('--primary', colorScheme.primary)
|
|
68
|
+
root.style.setProperty('--primary-foreground', colorScheme.primaryForeground)
|
|
69
|
+
root.style.setProperty('--secondary', colorScheme.secondary)
|
|
70
|
+
root.style.setProperty('--accent', colorScheme.accent)
|
|
71
|
+
root.style.setProperty('--ring', colorScheme.ring)
|
|
72
|
+
|
|
73
|
+
// Store theme color preference
|
|
74
|
+
localStorage.setItem('{{packageName}}-theme-color', themeColor)
|
|
75
|
+
}, [themeColor])
|
|
76
|
+
|
|
77
|
+
const contextValue: ThemeContextType = {
|
|
78
|
+
themeColor,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<ThemeContext.Provider value={contextValue}>
|
|
83
|
+
{children}
|
|
84
|
+
</ThemeContext.Provider>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function useAppTheme() {
|
|
89
|
+
const context = useContext(ThemeContext)
|
|
90
|
+
if (context === undefined) {
|
|
91
|
+
throw new Error('useAppTheme must be used within a AppThemeProvider')
|
|
92
|
+
}
|
|
93
|
+
return context
|
|
94
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import React from 'react'
|
|
4
|
+
|
|
5
|
+
interface FooterProps {
|
|
6
|
+
className?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function Footer({ className = '' }: FooterProps) {
|
|
10
|
+
return (
|
|
11
|
+
<footer className={`border-t bg-background py-4 ${className}`}>
|
|
12
|
+
<div className="container mx-auto px-4">
|
|
13
|
+
<div className="flex flex-col sm:flex-row justify-between items-center gap-4 text-sm text-muted-foreground">
|
|
14
|
+
<div className="flex items-center gap-2">
|
|
15
|
+
<span>© {new Date().getFullYear()} {{titleCaseName}}</span>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div className="flex items-center gap-2 text-xs">
|
|
19
|
+
<span>Generated with</span>
|
|
20
|
+
<a
|
|
21
|
+
href="https://docs.digilogiclabs.com"
|
|
22
|
+
target="_blank"
|
|
23
|
+
rel="noopener noreferrer"
|
|
24
|
+
className="hover:text-foreground transition-colors"
|
|
25
|
+
>
|
|
26
|
+
Digi Logic Labs
|
|
27
|
+
</a>
|
|
28
|
+
<span className="text-muted-foreground/60">
|
|
29
|
+
• UI v{{uiVersion}} • Auth v{{authVersion}} • Payments v{{paymentsVersion}} • {{generatedDate}}
|
|
30
|
+
</span>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</footer>
|
|
35
|
+
)
|
|
36
|
+
}
|