@digilogiclabs/create-saas-app 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +975 -891
- package/dist/.tsbuildinfo +1 -1
- package/dist/generators/template-generator.d.ts +11 -0
- package/dist/generators/template-generator.d.ts.map +1 -1
- package/dist/generators/template-generator.js +389 -18
- package/dist/generators/template-generator.js.map +1 -1
- package/dist/index.js +1837 -0
- package/dist/index.js.map +1 -0
- package/dist/templates/infrastructure/kubernetes/base/template/README.md +253 -0
- package/dist/templates/infrastructure/kubernetes/base/template/configmap.yaml +12 -0
- package/dist/templates/infrastructure/kubernetes/base/template/deployment.yaml +123 -0
- package/dist/templates/infrastructure/kubernetes/base/template/hpa.yaml +45 -0
- package/dist/templates/infrastructure/kubernetes/base/template/ingress.yaml +31 -0
- package/dist/templates/infrastructure/kubernetes/base/template/kustomization.yaml +25 -0
- package/dist/templates/infrastructure/kubernetes/base/template/namespace.yaml +8 -0
- package/dist/templates/infrastructure/kubernetes/base/template/networkpolicy.yaml +48 -0
- package/dist/templates/infrastructure/kubernetes/base/template/pdb.yaml +14 -0
- package/dist/templates/infrastructure/kubernetes/base/template/secret.yaml +17 -0
- package/dist/templates/infrastructure/kubernetes/base/template/service.yaml +19 -0
- package/dist/templates/infrastructure/kubernetes/base/template/serviceaccount.yaml +9 -0
- package/dist/templates/infrastructure/kubernetes/production/template/kustomization.yaml +92 -0
- package/dist/templates/infrastructure/terraform/aws/template/README.md +156 -0
- package/dist/templates/infrastructure/terraform/aws/template/main.tf +343 -0
- package/dist/templates/infrastructure/terraform/aws/template/outputs.tf +66 -0
- package/dist/templates/infrastructure/terraform/aws/template/terraform.tfvars.example +28 -0
- package/dist/templates/infrastructure/terraform/aws/template/variables.tf +110 -0
- package/dist/templates/infrastructure/terraform/gcp/template/README.md +165 -0
- package/dist/templates/infrastructure/terraform/gcp/template/main.tf +397 -0
- package/dist/templates/infrastructure/terraform/gcp/template/outputs.tf +51 -0
- package/dist/templates/infrastructure/terraform/gcp/template/terraform.tfvars.example +29 -0
- package/dist/templates/infrastructure/terraform/gcp/template/variables.tf +115 -0
- package/dist/templates/shared/admin/web/app/admin/layout.tsx +34 -0
- package/dist/templates/shared/admin/web/components/admin-nav.tsx +48 -0
- package/dist/templates/shared/audit/web/lib/audit.ts +24 -0
- package/dist/templates/shared/auth/keycloak/web/app/api/auth/federated-logout/route.ts +173 -0
- package/dist/templates/shared/auth/keycloak/web/auth.config.ts +84 -0
- package/dist/templates/shared/auth/keycloak/web/auth.ts +26 -0
- package/dist/templates/shared/beta/web/app/api/beta-settings/route.ts +25 -0
- package/dist/templates/shared/beta/web/app/api/validate-beta-code/route.ts +67 -0
- package/dist/templates/shared/beta/web/lib/beta/settings.ts +31 -0
- package/dist/templates/shared/cache/web/lib/cache.ts +44 -0
- package/dist/templates/shared/config/web/lib/config.ts +112 -0
- package/dist/templates/shared/config/web/next.config.mjs +62 -0
- package/dist/templates/shared/contact/web/app/api/contact/route.ts +113 -0
- package/dist/templates/shared/contact/web/app/contact/page.tsx +195 -0
- package/dist/templates/shared/cookie-consent/web/components/cookie-consent.tsx +54 -0
- package/dist/templates/shared/database/postgresql/web/drizzle.config.ts +16 -0
- package/dist/templates/shared/database/postgresql/web/lib/db/drizzle.ts +39 -0
- package/dist/templates/shared/database/postgresql/web/lib/db/schema.ts +33 -0
- package/dist/templates/shared/database/supabase/web/lib/supabase/client.ts +12 -0
- package/dist/templates/shared/database/supabase/web/lib/supabase/server.ts +31 -0
- package/dist/templates/shared/database/supabase/web/lib/supabase/service.ts +15 -0
- package/dist/templates/shared/email/web/lib/email/branding.ts +18 -0
- package/dist/templates/shared/email/web/lib/email/client.ts +96 -0
- package/dist/templates/shared/error-pages/web/app/error.tsx +70 -0
- package/dist/templates/shared/error-pages/web/app/global-error.tsx +102 -0
- package/dist/templates/shared/error-pages/web/app/not-found.tsx +39 -0
- package/dist/templates/shared/health/web/app/api/health/route.ts +68 -0
- package/dist/templates/shared/legal/web/app/(legal)/privacy/page.tsx +205 -0
- package/dist/templates/shared/legal/web/app/(legal)/terms/page.tsx +154 -0
- package/dist/templates/shared/legal/web/lib/legal-config.ts +50 -0
- package/dist/templates/shared/loading/web/app/loading.tsx +5 -0
- package/dist/templates/shared/loading/web/components/skeleton.tsx +95 -0
- package/dist/templates/shared/middleware/web/middleware.ts +68 -0
- package/dist/templates/shared/observability/web/lib/observability.ts +135 -0
- package/dist/templates/shared/payments/web/app/api/webhooks/stripe/route.ts +109 -0
- package/dist/templates/shared/platform/web/lib/platform.ts +37 -0
- package/dist/templates/shared/redis/web/lib/rate-limit-store.ts +18 -0
- package/dist/templates/shared/redis/web/lib/redis.ts +48 -0
- package/dist/templates/shared/security/web/lib/api-security.ts +318 -0
- package/dist/templates/shared/seo/web/app/api/og/route.tsx +97 -0
- package/dist/templates/shared/seo/web/app/robots.ts +53 -0
- package/dist/templates/shared/seo/web/app/sitemap.ts +53 -0
- package/dist/templates/shared/utils/web/lib/api-response.ts +71 -0
- package/dist/templates/shared/utils/web/lib/utils.ts +85 -0
- package/dist/templates/web/ai-platform/template/.env.example +16 -0
- package/dist/templates/web/ai-platform/template/README.md +84 -0
- package/dist/templates/web/ai-platform/template/middleware.ts +55 -0
- package/dist/templates/web/ai-platform/template/next.config.js +14 -0
- package/dist/templates/web/ai-platform/template/package.json +55 -0
- package/dist/templates/web/ai-platform/template/src/app/api/chat/route.ts +54 -0
- package/dist/templates/web/ai-platform/template/src/app/chat/page.tsx +235 -0
- package/dist/templates/web/ai-platform/template/src/app/dashboard/page.tsx +142 -0
- package/dist/templates/web/ai-platform/template/src/app/globals.css +34 -0
- package/dist/templates/web/ai-platform/template/src/app/layout.tsx +27 -0
- package/dist/templates/web/ai-platform/template/src/app/page.tsx +203 -0
- package/dist/templates/web/ai-platform/template/src/components/providers/app-providers.tsx +27 -0
- package/dist/templates/web/ai-platform/template/src/lib/auth-server.ts +33 -0
- package/dist/templates/web/ai-platform/template/src/lib/supabase/client.ts +8 -0
- package/dist/templates/web/ai-platform/template/src/lib/supabase/server.ts +27 -0
- package/dist/templates/web/ai-platform/template/src/lib/utils.ts +6 -0
- package/dist/templates/web/ai-platform/template/tsconfig.json +27 -0
- package/dist/templates/web/iot-dashboard/template/.env.example +12 -0
- package/dist/templates/web/iot-dashboard/template/README.md +101 -0
- package/dist/templates/web/iot-dashboard/template/middleware.ts +56 -0
- package/dist/templates/web/iot-dashboard/template/next.config.js +14 -0
- package/dist/templates/web/iot-dashboard/template/package.json +49 -0
- package/dist/templates/web/iot-dashboard/template/src/app/dashboard/page.tsx +229 -0
- package/dist/templates/web/iot-dashboard/template/src/app/globals.css +20 -0
- package/dist/templates/web/iot-dashboard/template/src/app/layout.tsx +27 -0
- package/dist/templates/web/iot-dashboard/template/src/app/page.tsx +191 -0
- package/dist/templates/web/iot-dashboard/template/src/components/providers/app-providers.tsx +24 -0
- package/dist/templates/web/iot-dashboard/template/src/lib/auth-server.ts +33 -0
- package/dist/templates/web/iot-dashboard/template/src/lib/supabase/client.ts +8 -0
- package/dist/templates/web/iot-dashboard/template/src/lib/supabase/server.ts +27 -0
- package/dist/templates/web/iot-dashboard/template/src/lib/utils.ts +25 -0
- package/dist/templates/web/iot-dashboard/template/tsconfig.json +27 -0
- package/dist/templates/web/marketplace/template/.env.example +12 -0
- package/dist/templates/web/marketplace/template/README.md +66 -0
- package/dist/templates/web/marketplace/template/middleware.ts +56 -0
- package/dist/templates/web/marketplace/template/next.config.js +14 -0
- package/dist/templates/web/marketplace/template/package.json +51 -0
- package/dist/templates/web/marketplace/template/src/app/cart/page.tsx +147 -0
- package/dist/templates/web/marketplace/template/src/app/dashboard/page.tsx +149 -0
- package/dist/templates/web/marketplace/template/src/app/globals.css +20 -0
- package/dist/templates/web/marketplace/template/src/app/layout.tsx +27 -0
- package/dist/templates/web/marketplace/template/src/app/page.tsx +167 -0
- package/dist/templates/web/marketplace/template/src/app/products/page.tsx +129 -0
- package/dist/templates/web/marketplace/template/src/components/providers/app-providers.tsx +27 -0
- package/dist/templates/web/marketplace/template/src/lib/auth-server.ts +33 -0
- package/dist/templates/web/marketplace/template/src/lib/supabase/client.ts +8 -0
- package/dist/templates/web/marketplace/template/src/lib/supabase/server.ts +27 -0
- package/dist/templates/web/marketplace/template/src/lib/utils.ts +19 -0
- package/dist/templates/web/marketplace/template/tsconfig.json +27 -0
- package/dist/templates/web/micro-saas/template/.env.example +10 -0
- package/dist/templates/web/micro-saas/template/README.md +63 -0
- package/dist/templates/web/micro-saas/template/middleware.ts +53 -0
- package/dist/templates/web/micro-saas/template/next.config.js +14 -0
- package/dist/templates/web/micro-saas/template/package.json +41 -0
- package/dist/templates/web/micro-saas/template/src/app/dashboard/page.tsx +117 -0
- package/dist/templates/web/micro-saas/template/src/app/globals.css +20 -0
- package/dist/templates/web/micro-saas/template/src/app/layout.tsx +27 -0
- package/dist/templates/web/micro-saas/template/src/app/login/page.tsx +87 -0
- package/dist/templates/web/micro-saas/template/src/app/page.tsx +137 -0
- package/dist/templates/web/micro-saas/template/src/app/signup/page.tsx +108 -0
- package/dist/templates/web/micro-saas/template/src/components/providers/app-providers.tsx +24 -0
- package/dist/templates/web/micro-saas/template/src/lib/auth-server.ts +33 -0
- package/dist/templates/web/micro-saas/template/src/lib/supabase/client.ts +8 -0
- package/dist/templates/web/micro-saas/template/src/lib/supabase/server.ts +29 -0
- package/dist/templates/web/micro-saas/template/src/lib/utils.ts +6 -0
- package/dist/templates/web/micro-saas/template/tsconfig.json +27 -0
- package/package.json +5 -4
- package/src/templates/infrastructure/kubernetes/base/template/README.md +253 -0
- package/src/templates/infrastructure/kubernetes/base/template/configmap.yaml +12 -0
- package/src/templates/infrastructure/kubernetes/base/template/deployment.yaml +123 -0
- package/src/templates/infrastructure/kubernetes/base/template/hpa.yaml +45 -0
- package/src/templates/infrastructure/kubernetes/base/template/ingress.yaml +31 -0
- package/src/templates/infrastructure/kubernetes/base/template/kustomization.yaml +25 -0
- package/src/templates/infrastructure/kubernetes/base/template/namespace.yaml +8 -0
- package/src/templates/infrastructure/kubernetes/base/template/networkpolicy.yaml +48 -0
- package/src/templates/infrastructure/kubernetes/base/template/pdb.yaml +14 -0
- package/src/templates/infrastructure/kubernetes/base/template/secret.yaml +17 -0
- package/src/templates/infrastructure/kubernetes/base/template/service.yaml +19 -0
- package/src/templates/infrastructure/kubernetes/base/template/serviceaccount.yaml +9 -0
- package/src/templates/infrastructure/kubernetes/production/template/kustomization.yaml +92 -0
- package/src/templates/infrastructure/terraform/aws/template/README.md +156 -0
- package/src/templates/infrastructure/terraform/aws/template/main.tf +343 -0
- package/src/templates/infrastructure/terraform/aws/template/outputs.tf +66 -0
- package/src/templates/infrastructure/terraform/aws/template/terraform.tfvars.example +28 -0
- package/src/templates/infrastructure/terraform/aws/template/variables.tf +110 -0
- package/src/templates/infrastructure/terraform/gcp/template/README.md +165 -0
- package/src/templates/infrastructure/terraform/gcp/template/main.tf +397 -0
- package/src/templates/infrastructure/terraform/gcp/template/outputs.tf +51 -0
- package/src/templates/infrastructure/terraform/gcp/template/terraform.tfvars.example +29 -0
- package/src/templates/infrastructure/terraform/gcp/template/variables.tf +115 -0
- package/src/templates/shared/admin/web/app/admin/layout.tsx +34 -0
- package/src/templates/shared/admin/web/components/admin-nav.tsx +48 -0
- package/src/templates/shared/audit/web/lib/audit.ts +24 -0
- package/src/templates/shared/auth/keycloak/web/app/api/auth/federated-logout/route.ts +173 -0
- package/src/templates/shared/auth/keycloak/web/auth.config.ts +84 -0
- package/src/templates/shared/auth/keycloak/web/auth.ts +26 -0
- package/src/templates/shared/beta/web/app/api/beta-settings/route.ts +25 -0
- package/src/templates/shared/beta/web/app/api/validate-beta-code/route.ts +67 -0
- package/src/templates/shared/beta/web/lib/beta/settings.ts +31 -0
- package/src/templates/shared/cache/web/lib/cache.ts +44 -0
- package/src/templates/shared/config/web/lib/config.ts +112 -0
- package/src/templates/shared/config/web/next.config.mjs +62 -0
- package/src/templates/shared/contact/web/app/api/contact/route.ts +113 -0
- package/src/templates/shared/contact/web/app/contact/page.tsx +195 -0
- package/src/templates/shared/cookie-consent/web/components/cookie-consent.tsx +54 -0
- package/src/templates/shared/database/postgresql/web/drizzle.config.ts +16 -0
- package/src/templates/shared/database/postgresql/web/lib/db/drizzle.ts +39 -0
- package/src/templates/shared/database/postgresql/web/lib/db/schema.ts +33 -0
- package/src/templates/shared/database/supabase/web/lib/supabase/client.ts +12 -0
- package/src/templates/shared/database/supabase/web/lib/supabase/server.ts +31 -0
- package/src/templates/shared/database/supabase/web/lib/supabase/service.ts +15 -0
- package/src/templates/shared/email/web/lib/email/branding.ts +18 -0
- package/src/templates/shared/email/web/lib/email/client.ts +96 -0
- package/src/templates/shared/error-pages/web/app/error.tsx +70 -0
- package/src/templates/shared/error-pages/web/app/global-error.tsx +102 -0
- package/src/templates/shared/error-pages/web/app/not-found.tsx +39 -0
- package/src/templates/shared/health/web/app/api/health/route.ts +68 -0
- package/src/templates/shared/legal/web/app/(legal)/privacy/page.tsx +205 -0
- package/src/templates/shared/legal/web/app/(legal)/terms/page.tsx +154 -0
- package/src/templates/shared/legal/web/lib/legal-config.ts +50 -0
- package/src/templates/shared/loading/web/app/loading.tsx +5 -0
- package/src/templates/shared/loading/web/components/skeleton.tsx +95 -0
- package/src/templates/shared/middleware/web/middleware.ts +68 -0
- package/src/templates/shared/observability/web/lib/observability.ts +135 -0
- package/src/templates/shared/payments/web/app/api/webhooks/stripe/route.ts +109 -0
- package/src/templates/shared/platform/web/lib/platform.ts +37 -0
- package/src/templates/shared/redis/web/lib/rate-limit-store.ts +18 -0
- package/src/templates/shared/redis/web/lib/redis.ts +48 -0
- package/src/templates/shared/security/web/lib/api-security.ts +318 -0
- package/src/templates/shared/seo/web/app/api/og/route.tsx +97 -0
- package/src/templates/shared/seo/web/app/robots.ts +53 -0
- package/src/templates/shared/seo/web/app/sitemap.ts +53 -0
- package/src/templates/shared/utils/web/lib/api-response.ts +71 -0
- package/src/templates/shared/utils/web/lib/utils.ts +85 -0
- package/src/templates/web/ai-platform/template/.env.example +16 -0
- package/src/templates/web/ai-platform/template/README.md +84 -0
- package/src/templates/web/ai-platform/template/middleware.ts +55 -0
- package/src/templates/web/ai-platform/template/next.config.js +14 -0
- package/src/templates/web/ai-platform/template/package.json +55 -0
- package/src/templates/web/ai-platform/template/src/app/api/chat/route.ts +54 -0
- package/src/templates/web/ai-platform/template/src/app/chat/page.tsx +235 -0
- package/src/templates/web/ai-platform/template/src/app/dashboard/page.tsx +142 -0
- package/src/templates/web/ai-platform/template/src/app/globals.css +34 -0
- package/src/templates/web/ai-platform/template/src/app/layout.tsx +27 -0
- package/src/templates/web/ai-platform/template/src/app/page.tsx +203 -0
- package/src/templates/web/ai-platform/template/src/components/providers/app-providers.tsx +27 -0
- package/src/templates/web/ai-platform/template/src/lib/auth-server.ts +33 -0
- package/src/templates/web/ai-platform/template/src/lib/supabase/client.ts +8 -0
- package/src/templates/web/ai-platform/template/src/lib/supabase/server.ts +27 -0
- package/src/templates/web/ai-platform/template/src/lib/utils.ts +6 -0
- package/src/templates/web/ai-platform/template/tsconfig.json +27 -0
- package/src/templates/web/iot-dashboard/template/.env.example +12 -0
- package/src/templates/web/iot-dashboard/template/README.md +101 -0
- package/src/templates/web/iot-dashboard/template/middleware.ts +56 -0
- package/src/templates/web/iot-dashboard/template/next.config.js +14 -0
- package/src/templates/web/iot-dashboard/template/package.json +49 -0
- package/src/templates/web/iot-dashboard/template/src/app/dashboard/page.tsx +229 -0
- package/src/templates/web/iot-dashboard/template/src/app/globals.css +20 -0
- package/src/templates/web/iot-dashboard/template/src/app/layout.tsx +27 -0
- package/src/templates/web/iot-dashboard/template/src/app/page.tsx +191 -0
- package/src/templates/web/iot-dashboard/template/src/components/providers/app-providers.tsx +24 -0
- package/src/templates/web/iot-dashboard/template/src/lib/auth-server.ts +33 -0
- package/src/templates/web/iot-dashboard/template/src/lib/supabase/client.ts +8 -0
- package/src/templates/web/iot-dashboard/template/src/lib/supabase/server.ts +27 -0
- package/src/templates/web/iot-dashboard/template/src/lib/utils.ts +25 -0
- package/src/templates/web/iot-dashboard/template/tsconfig.json +27 -0
- package/src/templates/web/marketplace/template/.env.example +12 -0
- package/src/templates/web/marketplace/template/README.md +66 -0
- package/src/templates/web/marketplace/template/middleware.ts +56 -0
- package/src/templates/web/marketplace/template/next.config.js +14 -0
- package/src/templates/web/marketplace/template/package.json +51 -0
- package/src/templates/web/marketplace/template/src/app/cart/page.tsx +147 -0
- package/src/templates/web/marketplace/template/src/app/dashboard/page.tsx +149 -0
- package/src/templates/web/marketplace/template/src/app/globals.css +20 -0
- package/src/templates/web/marketplace/template/src/app/layout.tsx +27 -0
- package/src/templates/web/marketplace/template/src/app/page.tsx +167 -0
- package/src/templates/web/marketplace/template/src/app/products/page.tsx +129 -0
- package/src/templates/web/marketplace/template/src/components/providers/app-providers.tsx +27 -0
- package/src/templates/web/marketplace/template/src/lib/auth-server.ts +33 -0
- package/src/templates/web/marketplace/template/src/lib/supabase/client.ts +8 -0
- package/src/templates/web/marketplace/template/src/lib/supabase/server.ts +27 -0
- package/src/templates/web/marketplace/template/src/lib/utils.ts +19 -0
- package/src/templates/web/marketplace/template/tsconfig.json +27 -0
- package/src/templates/web/micro-saas/template/.env.example +10 -0
- package/src/templates/web/micro-saas/template/README.md +63 -0
- package/src/templates/web/micro-saas/template/middleware.ts +53 -0
- package/src/templates/web/micro-saas/template/next.config.js +14 -0
- package/src/templates/web/micro-saas/template/package.json +41 -0
- package/src/templates/web/micro-saas/template/src/app/dashboard/page.tsx +117 -0
- package/src/templates/web/micro-saas/template/src/app/globals.css +20 -0
- package/src/templates/web/micro-saas/template/src/app/layout.tsx +27 -0
- package/src/templates/web/micro-saas/template/src/app/login/page.tsx +87 -0
- package/src/templates/web/micro-saas/template/src/app/page.tsx +137 -0
- package/src/templates/web/micro-saas/template/src/app/signup/page.tsx +108 -0
- package/src/templates/web/micro-saas/template/src/components/providers/app-providers.tsx +24 -0
- package/src/templates/web/micro-saas/template/src/lib/auth-server.ts +33 -0
- package/src/templates/web/micro-saas/template/src/lib/supabase/client.ts +8 -0
- package/src/templates/web/micro-saas/template/src/lib/supabase/server.ts +29 -0
- package/src/templates/web/micro-saas/template/src/lib/utils.ts +6 -0
- package/src/templates/web/micro-saas/template/tsconfig.json +27 -0
- package/dist/cli/commands/add.d.ts +0 -6
- package/dist/cli/commands/add.d.ts.map +0 -1
- package/dist/cli/commands/add.js +0 -39
- package/dist/cli/commands/add.js.map +0 -1
- package/dist/cli/commands/create.d.ts +0 -45
- package/dist/cli/commands/create.d.ts.map +0 -1
- package/dist/cli/commands/create.js +0 -175
- package/dist/cli/commands/create.js.map +0 -1
- package/dist/cli/commands/index.d.ts +0 -4
- package/dist/cli/commands/index.d.ts.map +0 -1
- package/dist/cli/commands/index.js +0 -20
- package/dist/cli/commands/index.js.map +0 -1
- package/dist/cli/commands/update.d.ts +0 -6
- package/dist/cli/commands/update.d.ts.map +0 -1
- package/dist/cli/commands/update.js +0 -68
- package/dist/cli/commands/update.js.map +0 -1
- package/dist/cli/index.d.ts +0 -4
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -61
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/prompts/index.d.ts +0 -2
- package/dist/cli/prompts/index.d.ts.map +0 -1
- package/dist/cli/prompts/index.js +0 -18
- package/dist/cli/prompts/index.js.map +0 -1
- package/dist/cli/prompts/project-setup.d.ts +0 -5
- package/dist/cli/prompts/project-setup.d.ts.map +0 -1
- package/dist/cli/prompts/project-setup.js +0 -316
- package/dist/cli/prompts/project-setup.js.map +0 -1
- package/dist/cli/utils/git.d.ts +0 -9
- package/dist/cli/utils/git.d.ts.map +0 -1
- package/dist/cli/utils/git.js +0 -77
- package/dist/cli/utils/git.js.map +0 -1
- package/dist/cli/utils/index.d.ts +0 -5
- package/dist/cli/utils/index.d.ts.map +0 -1
- package/dist/cli/utils/index.js +0 -21
- package/dist/cli/utils/index.js.map +0 -1
- package/dist/cli/utils/logger.d.ts +0 -16
- package/dist/cli/utils/logger.d.ts.map +0 -1
- package/dist/cli/utils/logger.js +0 -55
- package/dist/cli/utils/logger.js.map +0 -1
- package/dist/cli/utils/package-manager.d.ts +0 -8
- package/dist/cli/utils/package-manager.d.ts.map +0 -1
- package/dist/cli/utils/package-manager.js +0 -92
- package/dist/cli/utils/package-manager.js.map +0 -1
- package/dist/cli/utils/spinner.d.ts +0 -7
- package/dist/cli/utils/spinner.d.ts.map +0 -1
- package/dist/cli/utils/spinner.js +0 -48
- package/dist/cli/utils/spinner.js.map +0 -1
- package/dist/cli/validators/dependencies.d.ts +0 -15
- package/dist/cli/validators/dependencies.d.ts.map +0 -1
- package/dist/cli/validators/dependencies.js +0 -108
- package/dist/cli/validators/dependencies.js.map +0 -1
- package/dist/cli/validators/index.d.ts +0 -3
- package/dist/cli/validators/index.d.ts.map +0 -1
- package/dist/cli/validators/index.js +0 -19
- package/dist/cli/validators/index.js.map +0 -1
- package/dist/cli/validators/project-name.d.ts +0 -5
- package/dist/cli/validators/project-name.d.ts.map +0 -1
- package/dist/cli/validators/project-name.js +0 -151
- package/dist/cli/validators/project-name.js.map +0 -1
- package/dist/generators/file-processor.d.ts +0 -28
- package/dist/generators/file-processor.d.ts.map +0 -1
- package/dist/generators/file-processor.js +0 -224
- package/dist/generators/file-processor.js.map +0 -1
- package/dist/generators/index.d.ts +0 -4
- package/dist/generators/index.d.ts.map +0 -1
- package/dist/generators/index.js +0 -20
- package/dist/generators/index.js.map +0 -1
- package/dist/generators/package-installer.d.ts +0 -29
- package/dist/generators/package-installer.d.ts.map +0 -1
- package/dist/generators/package-installer.js +0 -177
- package/dist/generators/package-installer.js.map +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Suspense } from 'react'
|
|
2
|
+
import { Button, Card } from '@digilogiclabs/saas-factory-ui'
|
|
3
|
+
import { User, Settings, Activity, Home, BarChart } from 'lucide-react'
|
|
4
|
+
import { requireAuth } from '@/lib/auth-server'
|
|
5
|
+
import Link from 'next/link'
|
|
6
|
+
|
|
7
|
+
async function getStats(userId: string) {
|
|
8
|
+
await new Promise(resolve => setTimeout(resolve, 100))
|
|
9
|
+
return {
|
|
10
|
+
activeUsers: 42,
|
|
11
|
+
totalActions: 1337,
|
|
12
|
+
weeklyGrowth: '+12%',
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function StatCard({ title, value, icon: Icon }: {
|
|
17
|
+
title: string
|
|
18
|
+
value: string | number
|
|
19
|
+
icon: React.ComponentType<{ className?: string }>
|
|
20
|
+
}) {
|
|
21
|
+
return (
|
|
22
|
+
<Card className="p-6">
|
|
23
|
+
<div className="flex items-center justify-between">
|
|
24
|
+
<div>
|
|
25
|
+
<p className="text-sm font-medium text-gray-600 dark:text-gray-400">{title}</p>
|
|
26
|
+
<p className="text-2xl font-bold text-gray-900 dark:text-white">{value}</p>
|
|
27
|
+
</div>
|
|
28
|
+
<Icon className="h-8 w-8 text-blue-600 dark:text-blue-400" />
|
|
29
|
+
</div>
|
|
30
|
+
</Card>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async function Stats({ userId }: { userId: string }) {
|
|
35
|
+
const stats = await getStats(userId)
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
|
|
39
|
+
<StatCard title="Active Users" value={stats.activeUsers} icon={User} />
|
|
40
|
+
<StatCard title="Total Actions" value={stats.totalActions.toLocaleString()} icon={Activity} />
|
|
41
|
+
<StatCard title="Weekly Growth" value={stats.weeklyGrowth} icon={BarChart} />
|
|
42
|
+
</div>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function StatsSkeleton() {
|
|
47
|
+
return (
|
|
48
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
|
|
49
|
+
{[...Array(3)].map((_, i) => (
|
|
50
|
+
<Card key={i} className="p-6">
|
|
51
|
+
<div className="animate-pulse">
|
|
52
|
+
<div className="h-4 bg-gray-200 dark:bg-gray-700 rounded w-1/2 mb-2"></div>
|
|
53
|
+
<div className="h-8 bg-gray-200 dark:bg-gray-700 rounded w-1/3"></div>
|
|
54
|
+
</div>
|
|
55
|
+
</Card>
|
|
56
|
+
))}
|
|
57
|
+
</div>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export default async function DashboardPage() {
|
|
62
|
+
const user = await requireAuth()
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<div className="min-h-screen bg-gray-50 dark:bg-gray-900">
|
|
66
|
+
<div className="max-w-6xl mx-auto px-4 py-8">
|
|
67
|
+
{/* Header */}
|
|
68
|
+
<div className="flex items-center justify-between mb-8">
|
|
69
|
+
<div>
|
|
70
|
+
<h1 className="text-3xl font-bold text-gray-900 dark:text-white">
|
|
71
|
+
Dashboard
|
|
72
|
+
</h1>
|
|
73
|
+
<p className="text-gray-600 dark:text-gray-300 mt-1">
|
|
74
|
+
Welcome back, {user.name || user.email}
|
|
75
|
+
</p>
|
|
76
|
+
</div>
|
|
77
|
+
<Link href="/">
|
|
78
|
+
<Button variant="outline" size="sm">
|
|
79
|
+
<Home className="w-4 h-4 mr-2" />
|
|
80
|
+
Home
|
|
81
|
+
</Button>
|
|
82
|
+
</Link>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
{/* Stats */}
|
|
86
|
+
<Suspense fallback={<StatsSkeleton />}>
|
|
87
|
+
<Stats userId={user.id} />
|
|
88
|
+
</Suspense>
|
|
89
|
+
|
|
90
|
+
{/* Quick Actions */}
|
|
91
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
92
|
+
<Card className="p-6">
|
|
93
|
+
<div className="flex items-center mb-4">
|
|
94
|
+
<User className="h-6 w-6 text-blue-600 mr-3" />
|
|
95
|
+
<h3 className="text-lg font-semibold">Your Profile</h3>
|
|
96
|
+
</div>
|
|
97
|
+
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
|
98
|
+
Manage your account settings and preferences.
|
|
99
|
+
</p>
|
|
100
|
+
<Button className="w-full">Edit Profile</Button>
|
|
101
|
+
</Card>
|
|
102
|
+
|
|
103
|
+
<Card className="p-6">
|
|
104
|
+
<div className="flex items-center mb-4">
|
|
105
|
+
<Settings className="h-6 w-6 text-blue-600 mr-3" />
|
|
106
|
+
<h3 className="text-lg font-semibold">Settings</h3>
|
|
107
|
+
</div>
|
|
108
|
+
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
|
109
|
+
Configure your application preferences.
|
|
110
|
+
</p>
|
|
111
|
+
<Button variant="outline" className="w-full">Open Settings</Button>
|
|
112
|
+
</Card>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
)
|
|
117
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
@theme {
|
|
4
|
+
--color-primary: oklch(24% 0.15 256);
|
|
5
|
+
--color-background: oklch(100% 0 0);
|
|
6
|
+
--color-foreground: oklch(10% 0 0);
|
|
7
|
+
--font-sans: 'Inter', system-ui, sans-serif;
|
|
8
|
+
--radius: 0.5rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.dark {
|
|
12
|
+
--color-background: oklch(15% 0.02 256);
|
|
13
|
+
--color-foreground: oklch(95% 0 0);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
body {
|
|
17
|
+
font-family: var(--font-sans);
|
|
18
|
+
background-color: var(--color-background);
|
|
19
|
+
color: var(--color-foreground);
|
|
20
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Metadata } from 'next'
|
|
2
|
+
import { Inter } from 'next/font/google'
|
|
3
|
+
import './globals.css'
|
|
4
|
+
import { AppProviders } from '@/components/providers/app-providers'
|
|
5
|
+
|
|
6
|
+
const inter = Inter({ subsets: ['latin'] })
|
|
7
|
+
|
|
8
|
+
export const metadata: Metadata = {
|
|
9
|
+
title: '{{titleCaseName}} - Micro SaaS',
|
|
10
|
+
description: '{{description}}',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default function RootLayout({
|
|
14
|
+
children,
|
|
15
|
+
}: {
|
|
16
|
+
children: React.ReactNode
|
|
17
|
+
}) {
|
|
18
|
+
return (
|
|
19
|
+
<html lang="en" suppressHydrationWarning>
|
|
20
|
+
<body className={inter.className}>
|
|
21
|
+
<AppProviders>
|
|
22
|
+
{children}
|
|
23
|
+
</AppProviders>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react'
|
|
4
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
5
|
+
import { Button, Card } from '@digilogiclabs/saas-factory-ui'
|
|
6
|
+
import { useRouter } from 'next/navigation'
|
|
7
|
+
import Link from 'next/link'
|
|
8
|
+
|
|
9
|
+
export default function LoginPage() {
|
|
10
|
+
const [email, setEmail] = useState('')
|
|
11
|
+
const [password, setPassword] = useState('')
|
|
12
|
+
const [error, setError] = useState('')
|
|
13
|
+
const { signIn, loading } = useAuth()
|
|
14
|
+
const router = useRouter()
|
|
15
|
+
|
|
16
|
+
const handleSubmit = async (e: React.FormEvent) => {
|
|
17
|
+
e.preventDefault()
|
|
18
|
+
setError('')
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
await signIn(email, password)
|
|
22
|
+
router.push('/dashboard')
|
|
23
|
+
} catch (err) {
|
|
24
|
+
setError(err instanceof Error ? err.message : 'Failed to sign in')
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className="min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 px-4">
|
|
30
|
+
<Card className="w-full max-w-md p-8">
|
|
31
|
+
<div className="text-center mb-8">
|
|
32
|
+
<h1 className="text-2xl font-bold text-gray-900 dark:text-white">Welcome Back</h1>
|
|
33
|
+
<p className="text-gray-600 dark:text-gray-300 mt-2">Sign in to your account</p>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
{error && (
|
|
37
|
+
<div className="bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 p-3 rounded-lg mb-6 text-sm">
|
|
38
|
+
{error}
|
|
39
|
+
</div>
|
|
40
|
+
)}
|
|
41
|
+
|
|
42
|
+
<form onSubmit={handleSubmit} className="space-y-4">
|
|
43
|
+
<div>
|
|
44
|
+
<label htmlFor="email" className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
45
|
+
Email
|
|
46
|
+
</label>
|
|
47
|
+
<input
|
|
48
|
+
id="email"
|
|
49
|
+
type="email"
|
|
50
|
+
value={email}
|
|
51
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
52
|
+
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-800 dark:text-white"
|
|
53
|
+
required
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div>
|
|
58
|
+
<label htmlFor="password" className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
59
|
+
Password
|
|
60
|
+
</label>
|
|
61
|
+
<input
|
|
62
|
+
id="password"
|
|
63
|
+
type="password"
|
|
64
|
+
value={password}
|
|
65
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
66
|
+
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-800 dark:text-white"
|
|
67
|
+
required
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<Button type="submit" className="w-full" disabled={loading}>
|
|
72
|
+
{loading ? 'Signing in...' : 'Sign In'}
|
|
73
|
+
</Button>
|
|
74
|
+
</form>
|
|
75
|
+
|
|
76
|
+
<div className="mt-6 text-center">
|
|
77
|
+
<p className="text-gray-600 dark:text-gray-300 text-sm">
|
|
78
|
+
Don't have an account?{' '}
|
|
79
|
+
<Link href="/signup" className="text-blue-600 hover:underline">
|
|
80
|
+
Sign up
|
|
81
|
+
</Link>
|
|
82
|
+
</p>
|
|
83
|
+
</div>
|
|
84
|
+
</Card>
|
|
85
|
+
</div>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { Button, Card } from '@digilogiclabs/saas-factory-ui'
|
|
4
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
5
|
+
import { ArrowRight, Zap, Shield, Rocket, LogOut, User } from 'lucide-react'
|
|
6
|
+
import Link from 'next/link'
|
|
7
|
+
|
|
8
|
+
export default function Home() {
|
|
9
|
+
const { user, signOut, loading } = useAuth()
|
|
10
|
+
|
|
11
|
+
const projectName = "{{titleCaseName}}"
|
|
12
|
+
|
|
13
|
+
const handleSignOut = async () => {
|
|
14
|
+
try {
|
|
15
|
+
await signOut()
|
|
16
|
+
} catch (err) {
|
|
17
|
+
console.error('Sign out error:', err)
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<main className="min-h-screen bg-gradient-to-br from-slate-50 to-slate-100 dark:from-slate-900 dark:to-slate-800">
|
|
23
|
+
<div className="max-w-4xl mx-auto px-4 py-16">
|
|
24
|
+
{/* Auth Status */}
|
|
25
|
+
<div className="flex justify-end mb-8">
|
|
26
|
+
{loading ? (
|
|
27
|
+
<div className="text-sm text-gray-600">Loading...</div>
|
|
28
|
+
) : user ? (
|
|
29
|
+
<div className="flex items-center gap-4">
|
|
30
|
+
<span className="text-sm text-gray-600 dark:text-gray-300 flex items-center gap-2">
|
|
31
|
+
<User className="w-4 h-4" />
|
|
32
|
+
{user.email}
|
|
33
|
+
</span>
|
|
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
|
+
<div className="flex gap-2">
|
|
41
|
+
<Link href="/login">
|
|
42
|
+
<Button variant="outline" size="sm">Sign In</Button>
|
|
43
|
+
</Link>
|
|
44
|
+
<Link href="/signup">
|
|
45
|
+
<Button size="sm">Get Started</Button>
|
|
46
|
+
</Link>
|
|
47
|
+
</div>
|
|
48
|
+
)}
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
{/* Hero Section */}
|
|
52
|
+
<div className="text-center mb-16">
|
|
53
|
+
<div className="inline-flex items-center px-3 py-1 rounded-full bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300 text-sm mb-6">
|
|
54
|
+
<Zap className="w-4 h-4 mr-2" />
|
|
55
|
+
Micro SaaS MVP
|
|
56
|
+
</div>
|
|
57
|
+
<h1 className="text-5xl font-bold text-gray-900 dark:text-white mb-6">
|
|
58
|
+
{projectName}
|
|
59
|
+
</h1>
|
|
60
|
+
<p className="text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-2xl mx-auto">
|
|
61
|
+
A focused, single-feature SaaS application built for rapid validation.
|
|
62
|
+
Ship fast, learn faster.
|
|
63
|
+
</p>
|
|
64
|
+
{!user && (
|
|
65
|
+
<div className="flex gap-4 justify-center">
|
|
66
|
+
<Link href="/signup">
|
|
67
|
+
<Button size="lg">
|
|
68
|
+
Start Free Trial
|
|
69
|
+
<ArrowRight className="w-5 h-5 ml-2" />
|
|
70
|
+
</Button>
|
|
71
|
+
</Link>
|
|
72
|
+
<Link href="/login">
|
|
73
|
+
<Button variant="outline" size="lg">
|
|
74
|
+
Sign In
|
|
75
|
+
</Button>
|
|
76
|
+
</Link>
|
|
77
|
+
</div>
|
|
78
|
+
)}
|
|
79
|
+
{user && (
|
|
80
|
+
<Link href="/dashboard">
|
|
81
|
+
<Button size="lg">
|
|
82
|
+
Go to Dashboard
|
|
83
|
+
<ArrowRight className="w-5 h-5 ml-2" />
|
|
84
|
+
</Button>
|
|
85
|
+
</Link>
|
|
86
|
+
)}
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
{/* Features */}
|
|
90
|
+
<div className="grid md:grid-cols-3 gap-6 mb-16">
|
|
91
|
+
<Card className="p-6 text-center">
|
|
92
|
+
<div className="w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mx-auto mb-4">
|
|
93
|
+
<Zap className="w-6 h-6 text-blue-600 dark:text-blue-400" />
|
|
94
|
+
</div>
|
|
95
|
+
<h3 className="text-lg font-semibold mb-2">Fast Launch</h3>
|
|
96
|
+
<p className="text-gray-600 dark:text-gray-300 text-sm">
|
|
97
|
+
Minimal setup, maximum velocity. Built to validate your idea quickly.
|
|
98
|
+
</p>
|
|
99
|
+
</Card>
|
|
100
|
+
|
|
101
|
+
<Card className="p-6 text-center">
|
|
102
|
+
<div className="w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mx-auto mb-4">
|
|
103
|
+
<Shield className="w-6 h-6 text-green-600 dark:text-green-400" />
|
|
104
|
+
</div>
|
|
105
|
+
<h3 className="text-lg font-semibold mb-2">Secure Auth</h3>
|
|
106
|
+
<p className="text-gray-600 dark:text-gray-300 text-sm">
|
|
107
|
+
Production-ready authentication with Supabase or Firebase.
|
|
108
|
+
</p>
|
|
109
|
+
</Card>
|
|
110
|
+
|
|
111
|
+
<Card className="p-6 text-center">
|
|
112
|
+
<div className="w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mx-auto mb-4">
|
|
113
|
+
<Rocket className="w-6 h-6 text-purple-600 dark:text-purple-400" />
|
|
114
|
+
</div>
|
|
115
|
+
<h3 className="text-lg font-semibold mb-2">Scale Ready</h3>
|
|
116
|
+
<p className="text-gray-600 dark:text-gray-300 text-sm">
|
|
117
|
+
Built on DLL Platform for easy scaling when you're ready.
|
|
118
|
+
</p>
|
|
119
|
+
</Card>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
{/* CTA */}
|
|
123
|
+
<Card className="p-8 text-center bg-gradient-to-r from-blue-600 to-purple-600 text-white">
|
|
124
|
+
<h2 className="text-2xl font-bold mb-4">Ready to Launch?</h2>
|
|
125
|
+
<p className="mb-6 opacity-90">
|
|
126
|
+
Start building your micro SaaS today. No credit card required.
|
|
127
|
+
</p>
|
|
128
|
+
<Link href="/signup">
|
|
129
|
+
<Button variant="secondary" size="lg">
|
|
130
|
+
Get Started Free
|
|
131
|
+
</Button>
|
|
132
|
+
</Link>
|
|
133
|
+
</Card>
|
|
134
|
+
</div>
|
|
135
|
+
</main>
|
|
136
|
+
)
|
|
137
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react'
|
|
4
|
+
import { useAuth } from '@digilogiclabs/app-sdk'
|
|
5
|
+
import { Button, Card } from '@digilogiclabs/saas-factory-ui'
|
|
6
|
+
import { useRouter } from 'next/navigation'
|
|
7
|
+
import Link from 'next/link'
|
|
8
|
+
|
|
9
|
+
export default function SignupPage() {
|
|
10
|
+
const [email, setEmail] = useState('')
|
|
11
|
+
const [password, setPassword] = useState('')
|
|
12
|
+
const [confirmPassword, setConfirmPassword] = useState('')
|
|
13
|
+
const [error, setError] = useState('')
|
|
14
|
+
const { signUp, loading } = useAuth()
|
|
15
|
+
const router = useRouter()
|
|
16
|
+
|
|
17
|
+
const handleSubmit = async (e: React.FormEvent) => {
|
|
18
|
+
e.preventDefault()
|
|
19
|
+
setError('')
|
|
20
|
+
|
|
21
|
+
if (password !== confirmPassword) {
|
|
22
|
+
setError('Passwords do not match')
|
|
23
|
+
return
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
await signUp(email, password)
|
|
28
|
+
router.push('/dashboard')
|
|
29
|
+
} catch (err) {
|
|
30
|
+
setError(err instanceof Error ? err.message : 'Failed to sign up')
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div className="min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 px-4">
|
|
36
|
+
<Card className="w-full max-w-md p-8">
|
|
37
|
+
<div className="text-center mb-8">
|
|
38
|
+
<h1 className="text-2xl font-bold text-gray-900 dark:text-white">Get Started</h1>
|
|
39
|
+
<p className="text-gray-600 dark:text-gray-300 mt-2">Create your free account</p>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
{error && (
|
|
43
|
+
<div className="bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 p-3 rounded-lg mb-6 text-sm">
|
|
44
|
+
{error}
|
|
45
|
+
</div>
|
|
46
|
+
)}
|
|
47
|
+
|
|
48
|
+
<form onSubmit={handleSubmit} className="space-y-4">
|
|
49
|
+
<div>
|
|
50
|
+
<label htmlFor="email" className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
51
|
+
Email
|
|
52
|
+
</label>
|
|
53
|
+
<input
|
|
54
|
+
id="email"
|
|
55
|
+
type="email"
|
|
56
|
+
value={email}
|
|
57
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
58
|
+
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-800 dark:text-white"
|
|
59
|
+
required
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div>
|
|
64
|
+
<label htmlFor="password" className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
65
|
+
Password
|
|
66
|
+
</label>
|
|
67
|
+
<input
|
|
68
|
+
id="password"
|
|
69
|
+
type="password"
|
|
70
|
+
value={password}
|
|
71
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
72
|
+
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-800 dark:text-white"
|
|
73
|
+
required
|
|
74
|
+
minLength={8}
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div>
|
|
79
|
+
<label htmlFor="confirmPassword" className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
80
|
+
Confirm Password
|
|
81
|
+
</label>
|
|
82
|
+
<input
|
|
83
|
+
id="confirmPassword"
|
|
84
|
+
type="password"
|
|
85
|
+
value={confirmPassword}
|
|
86
|
+
onChange={(e) => setConfirmPassword(e.target.value)}
|
|
87
|
+
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-800 dark:text-white"
|
|
88
|
+
required
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<Button type="submit" className="w-full" disabled={loading}>
|
|
93
|
+
{loading ? 'Creating account...' : 'Create Account'}
|
|
94
|
+
</Button>
|
|
95
|
+
</form>
|
|
96
|
+
|
|
97
|
+
<div className="mt-6 text-center">
|
|
98
|
+
<p className="text-gray-600 dark:text-gray-300 text-sm">
|
|
99
|
+
Already have an account?{' '}
|
|
100
|
+
<Link href="/login" className="text-blue-600 hover:underline">
|
|
101
|
+
Sign in
|
|
102
|
+
</Link>
|
|
103
|
+
</p>
|
|
104
|
+
</div>
|
|
105
|
+
</Card>
|
|
106
|
+
</div>
|
|
107
|
+
)
|
|
108
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { ThemeProvider } from 'next-themes'
|
|
4
|
+
import { DLLProvider } from '@digilogiclabs/app-sdk'
|
|
5
|
+
|
|
6
|
+
interface AppProvidersProps {
|
|
7
|
+
children: React.ReactNode
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function AppProviders({ children }: AppProvidersProps) {
|
|
11
|
+
return (
|
|
12
|
+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
|
13
|
+
<DLLProvider
|
|
14
|
+
config={{
|
|
15
|
+
auth: {
|
|
16
|
+
provider: 'supabase',
|
|
17
|
+
},
|
|
18
|
+
}}
|
|
19
|
+
>
|
|
20
|
+
{children}
|
|
21
|
+
</DLLProvider>
|
|
22
|
+
</ThemeProvider>
|
|
23
|
+
)
|
|
24
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { redirect } from 'next/navigation'
|
|
2
|
+
import { createClient } from './supabase/server'
|
|
3
|
+
|
|
4
|
+
export interface AuthUser {
|
|
5
|
+
id: string
|
|
6
|
+
email: string | null
|
|
7
|
+
name?: string | null
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export async function getUser(): Promise<AuthUser | null> {
|
|
11
|
+
const supabase = await createClient()
|
|
12
|
+
const { data: { user }, error } = await supabase.auth.getUser()
|
|
13
|
+
|
|
14
|
+
if (error || !user) {
|
|
15
|
+
return null
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
id: user.id,
|
|
20
|
+
email: user.email ?? null,
|
|
21
|
+
name: user.user_metadata?.name ?? user.user_metadata?.full_name ?? null,
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export async function requireAuth(): Promise<AuthUser> {
|
|
26
|
+
const user = await getUser()
|
|
27
|
+
|
|
28
|
+
if (!user) {
|
|
29
|
+
redirect('/login')
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return user
|
|
33
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createServerClient } from '@supabase/ssr'
|
|
2
|
+
import { cookies } from 'next/headers'
|
|
3
|
+
|
|
4
|
+
export async function createClient() {
|
|
5
|
+
const cookieStore = await cookies()
|
|
6
|
+
|
|
7
|
+
return createServerClient(
|
|
8
|
+
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
|
9
|
+
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
|
10
|
+
{
|
|
11
|
+
cookies: {
|
|
12
|
+
getAll() {
|
|
13
|
+
return cookieStore.getAll()
|
|
14
|
+
},
|
|
15
|
+
setAll(cookiesToSet) {
|
|
16
|
+
try {
|
|
17
|
+
cookiesToSet.forEach(({ name, value, options }) =>
|
|
18
|
+
cookieStore.set(name, value, options)
|
|
19
|
+
)
|
|
20
|
+
} catch {
|
|
21
|
+
// The `setAll` method was called from a Server Component.
|
|
22
|
+
// This can be ignored if you have middleware refreshing
|
|
23
|
+
// user sessions.
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "preserve",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": ["./src/*"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
26
|
+
"exclude": ["node_modules"]
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digilogiclabs/create-saas-app",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Create modern SaaS applications with DLL Platform - tier-aware scaffolding with platform-core and app-sdk",
|
|
5
5
|
"main": "dist/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -38,12 +38,13 @@
|
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"repository": {
|
|
40
40
|
"type": "git",
|
|
41
|
-
"url": "git+https://github.com/DigiLogicLabs/
|
|
41
|
+
"url": "git+https://github.com/DigiLogicLabs/dll-platform.git",
|
|
42
|
+
"directory": "packages/cli"
|
|
42
43
|
},
|
|
43
44
|
"bugs": {
|
|
44
|
-
"url": "https://github.com/DigiLogicLabs/
|
|
45
|
+
"url": "https://github.com/DigiLogicLabs/dll-platform/issues"
|
|
45
46
|
},
|
|
46
|
-
"homepage": "https://github.com/DigiLogicLabs/
|
|
47
|
+
"homepage": "https://github.com/DigiLogicLabs/dll-platform/tree/main/packages/cli#readme",
|
|
47
48
|
"files": [
|
|
48
49
|
"dist",
|
|
49
50
|
"bin",
|