@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,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
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/add.ts"],"names":[],"mappings":"AAGA,UAAU,UAAU;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,UAAe,iBAqC1E"}
|
package/dist/cli/commands/add.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addFeature = addFeature;
|
|
4
|
-
const logger_1 = require("../utils/logger");
|
|
5
|
-
const spinner_1 = require("../utils/spinner");
|
|
6
|
-
async function addFeature(feature, _options = {}) {
|
|
7
|
-
try {
|
|
8
|
-
logger_1.logger.title(`Adding ${feature} feature`);
|
|
9
|
-
const validFeatures = [
|
|
10
|
-
'auth',
|
|
11
|
-
'billing',
|
|
12
|
-
'analytics',
|
|
13
|
-
'teams',
|
|
14
|
-
'notifications',
|
|
15
|
-
'admin',
|
|
16
|
-
'api',
|
|
17
|
-
'docs',
|
|
18
|
-
];
|
|
19
|
-
if (!validFeatures.includes(feature)) {
|
|
20
|
-
logger_1.logger.error(`Invalid feature: ${feature}`);
|
|
21
|
-
logger_1.logger.info('Available features:');
|
|
22
|
-
logger_1.logger.list(validFeatures);
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
const addSpinner = (0, spinner_1.spinner)(`Adding ${feature} feature...`);
|
|
26
|
-
// Simulate feature addition (placeholder for now)
|
|
27
|
-
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
28
|
-
addSpinner.succeed(`${feature} feature added successfully`);
|
|
29
|
-
logger_1.logger.newLine();
|
|
30
|
-
logger_1.logger.success('Feature added successfully!');
|
|
31
|
-
logger_1.logger.info("Don't forget to update your environment variables if needed.");
|
|
32
|
-
}
|
|
33
|
-
catch (error) {
|
|
34
|
-
logger_1.logger.error('Failed to add feature:');
|
|
35
|
-
logger_1.logger.error(error instanceof Error ? error.message : String(error));
|
|
36
|
-
process.exit(1);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=add.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/cli/commands/add.ts"],"names":[],"mappings":";;AAOA,gCAqCC;AA5CD,4CAAyC;AACzC,8CAA2C;AAMpC,KAAK,UAAU,UAAU,CAAC,OAAe,EAAE,WAAuB,EAAE;IACzE,IAAI,CAAC;QACH,eAAM,CAAC,KAAK,CAAC,UAAU,OAAO,UAAU,CAAC,CAAC;QAE1C,MAAM,aAAa,GAAG;YACpB,MAAM;YACN,SAAS;YACT,WAAW;YACX,OAAO;YACP,eAAe;YACf,OAAO;YACP,KAAK;YACL,MAAM;SACP,CAAC;QAEF,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACrC,eAAM,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;YAC5C,eAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;YACnC,eAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,UAAU,GAAG,IAAA,iBAAO,EAAC,UAAU,OAAO,aAAa,CAAC,CAAC;QAE3D,kDAAkD;QAClD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;QAE1D,UAAU,CAAC,OAAO,CAAC,GAAG,OAAO,6BAA6B,CAAC,CAAC;QAE5D,eAAM,CAAC,OAAO,EAAE,CAAC;QACjB,eAAM,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC;QAC9C,eAAM,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;IAC9E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QACvC,eAAM,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
interface CreateOptions {
|
|
2
|
-
auth?: string;
|
|
3
|
-
database?: string;
|
|
4
|
-
theme?: string;
|
|
5
|
-
themeColor?: string;
|
|
6
|
-
defaultTheme?: string;
|
|
7
|
-
tier?: string;
|
|
8
|
-
withAi?: string | boolean;
|
|
9
|
-
aiProvider?: string;
|
|
10
|
-
install?: boolean;
|
|
11
|
-
git?: boolean;
|
|
12
|
-
yes?: boolean;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Project tier determines the scope and feature set of the generated project.
|
|
16
|
-
* - micro: Single feature MVP (auth only, minimal deps)
|
|
17
|
-
* - starter: Basic SaaS (auth + payments)
|
|
18
|
-
* - pro: Full SaaS (auth + payments + AI)
|
|
19
|
-
* - enterprise: Full platform (all features + observability + workers)
|
|
20
|
-
*/
|
|
21
|
-
export type ProjectTier = 'micro' | 'starter' | 'pro' | 'enterprise';
|
|
22
|
-
export interface ProjectConfig {
|
|
23
|
-
platform: 'web' | 'mobile' | 'both';
|
|
24
|
-
template: string;
|
|
25
|
-
name: string;
|
|
26
|
-
tier: ProjectTier;
|
|
27
|
-
auth: 'firebase' | 'supabase';
|
|
28
|
-
database: 'supabase' | 'firebase';
|
|
29
|
-
theme: 'default' | 'corporate' | 'startup';
|
|
30
|
-
themeColor: 'blue' | 'green' | 'purple' | 'orange' | 'red' | 'slate';
|
|
31
|
-
defaultTheme: 'light' | 'dark' | 'system';
|
|
32
|
-
ai: {
|
|
33
|
-
enabled: boolean;
|
|
34
|
-
capabilities: string[];
|
|
35
|
-
provider: 'openai' | 'anthropic' | 'gemini';
|
|
36
|
-
};
|
|
37
|
-
install: boolean;
|
|
38
|
-
git: boolean;
|
|
39
|
-
}
|
|
40
|
-
export declare function createProject(platform: string, template?: string, name?: string, options?: CreateOptions & {
|
|
41
|
-
themeColor?: string;
|
|
42
|
-
defaultTheme?: string;
|
|
43
|
-
}): Promise<void>;
|
|
44
|
-
export {};
|
|
45
|
-
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/create.ts"],"names":[],"mappings":"AAUA,UAAU,aAAa;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,YAAY,CAAC;AAErE,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9B,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAC;IAClC,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;IAC3C,UAAU,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;IACrE,YAAY,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC1C,EAAE,EAAE;QACF,OAAO,EAAE,OAAO,CAAC;QACjB,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,QAAQ,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC;KAC7C,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;CACd;AAED,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,GAAE,aAAa,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAO,iBA+K7E"}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createProject = createProject;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const logger_1 = require("../utils/logger");
|
|
9
|
-
const spinner_1 = require("../utils/spinner");
|
|
10
|
-
const project_name_1 = require("../validators/project-name");
|
|
11
|
-
const dependencies_1 = require("../validators/dependencies");
|
|
12
|
-
const project_setup_1 = require("../prompts/project-setup");
|
|
13
|
-
const template_generator_1 = require("../../generators/template-generator");
|
|
14
|
-
const package_installer_1 = require("../../generators/package-installer");
|
|
15
|
-
const git_1 = require("../utils/git");
|
|
16
|
-
async function createProject(platform, template, name, options = {}) {
|
|
17
|
-
try {
|
|
18
|
-
// Validate Node.js version
|
|
19
|
-
if (!(await (0, dependencies_1.validateNodeVersion)())) {
|
|
20
|
-
process.exit(1);
|
|
21
|
-
}
|
|
22
|
-
// Validate platform
|
|
23
|
-
const validPlatforms = ['web', 'mobile', 'both'];
|
|
24
|
-
if (!validPlatforms.includes(platform)) {
|
|
25
|
-
logger_1.logger.error(`Invalid platform: ${platform}. Must be one of: ${validPlatforms.join(', ')}`);
|
|
26
|
-
process.exit(1);
|
|
27
|
-
}
|
|
28
|
-
// Parse AI capabilities
|
|
29
|
-
const parseAiCapabilities = (withAi) => {
|
|
30
|
-
if (!withAi)
|
|
31
|
-
return { enabled: false, capabilities: [] };
|
|
32
|
-
if (withAi === true)
|
|
33
|
-
return { enabled: true, capabilities: ['text'] };
|
|
34
|
-
if (withAi === 'all')
|
|
35
|
-
return { enabled: true, capabilities: ['text', 'audio', 'video', 'rag'] };
|
|
36
|
-
return { enabled: true, capabilities: withAi.split(',').map((c) => c.trim()) };
|
|
37
|
-
};
|
|
38
|
-
const aiConfig = parseAiCapabilities(options.withAi);
|
|
39
|
-
// Auto-select template based on AI capabilities
|
|
40
|
-
const selectTemplateForAI = (capabilities, baseTemplate) => {
|
|
41
|
-
if (!aiConfig.enabled)
|
|
42
|
-
return baseTemplate || 'base';
|
|
43
|
-
const hasAudio = capabilities.includes('audio');
|
|
44
|
-
const hasVideo = capabilities.includes('video');
|
|
45
|
-
const hasText = capabilities.includes('text');
|
|
46
|
-
const hasRAG = capabilities.includes('rag') || capabilities.includes('knowledge');
|
|
47
|
-
// Use RAG template if RAG/knowledge capabilities are requested
|
|
48
|
-
if (hasRAG)
|
|
49
|
-
return 'ui-auth-payments-ai-rag';
|
|
50
|
-
// Use comprehensive AI template for other AI capabilities
|
|
51
|
-
if (hasVideo || hasAudio || hasText)
|
|
52
|
-
return 'ui-auth-payments-ai';
|
|
53
|
-
return baseTemplate || 'ui-auth-payments-ai';
|
|
54
|
-
};
|
|
55
|
-
// Determine tier from options or AI config
|
|
56
|
-
const determineTier = () => {
|
|
57
|
-
if (options.tier)
|
|
58
|
-
return options.tier;
|
|
59
|
-
if (aiConfig.enabled)
|
|
60
|
-
return 'pro';
|
|
61
|
-
return 'starter';
|
|
62
|
-
};
|
|
63
|
-
// Set up initial configuration
|
|
64
|
-
let config = {
|
|
65
|
-
platform: platform,
|
|
66
|
-
template: selectTemplateForAI(aiConfig.capabilities, template),
|
|
67
|
-
name: name || 'my-saas-app',
|
|
68
|
-
tier: determineTier(),
|
|
69
|
-
auth: options.auth || 'supabase',
|
|
70
|
-
database: options.database || 'supabase',
|
|
71
|
-
theme: options.theme || 'default',
|
|
72
|
-
themeColor: options.themeColor || 'blue',
|
|
73
|
-
defaultTheme: options.defaultTheme || 'system',
|
|
74
|
-
ai: {
|
|
75
|
-
enabled: aiConfig.enabled,
|
|
76
|
-
capabilities: aiConfig.capabilities,
|
|
77
|
-
provider: options.aiProvider || 'openai',
|
|
78
|
-
},
|
|
79
|
-
install: options.install !== false,
|
|
80
|
-
git: options.git !== false,
|
|
81
|
-
};
|
|
82
|
-
// Interactive prompts if not in yes mode
|
|
83
|
-
if (!options.yes) {
|
|
84
|
-
config = await (0, project_setup_1.getProjectPrompts)(config);
|
|
85
|
-
}
|
|
86
|
-
// Validate project name
|
|
87
|
-
if (!(0, project_name_1.validateProjectName)(config.name)) {
|
|
88
|
-
process.exit(1);
|
|
89
|
-
}
|
|
90
|
-
const projectPath = path_1.default.resolve(process.cwd(), config.name);
|
|
91
|
-
// Validate project path
|
|
92
|
-
if (!(await (0, project_name_1.validateProjectPath)(projectPath))) {
|
|
93
|
-
process.exit(1);
|
|
94
|
-
}
|
|
95
|
-
// Display configuration
|
|
96
|
-
logger_1.logger.title('🚀 Creating your SaaS application');
|
|
97
|
-
logger_1.logger.info(`Platform: ${config.platform}`);
|
|
98
|
-
logger_1.logger.info(`Tier: ${config.tier}`);
|
|
99
|
-
logger_1.logger.info(`Template: ${config.template}`);
|
|
100
|
-
logger_1.logger.info(`Project: ${config.name}`);
|
|
101
|
-
logger_1.logger.info(`Auth: ${config.auth}`);
|
|
102
|
-
logger_1.logger.info(`Database: ${config.database}`);
|
|
103
|
-
logger_1.logger.info(`Theme: ${config.theme}`);
|
|
104
|
-
logger_1.logger.info(`Theme Color: ${config.themeColor}`);
|
|
105
|
-
logger_1.logger.info(`Default Theme: ${config.defaultTheme}`);
|
|
106
|
-
if (config.ai.enabled) {
|
|
107
|
-
logger_1.logger.info(`AI: Enabled (${config.ai.capabilities.join(', ')}) - ${config.ai.provider}`);
|
|
108
|
-
}
|
|
109
|
-
logger_1.logger.newLine();
|
|
110
|
-
// Generate project structure
|
|
111
|
-
const templateSpinner = (0, spinner_1.spinner)('Generating project structure...');
|
|
112
|
-
try {
|
|
113
|
-
const generator = new template_generator_1.TemplateGenerator(config);
|
|
114
|
-
await generator.generate(projectPath);
|
|
115
|
-
templateSpinner.succeed('Project structure created');
|
|
116
|
-
}
|
|
117
|
-
catch (_error) {
|
|
118
|
-
templateSpinner.fail('Failed to generate project structure');
|
|
119
|
-
throw _error;
|
|
120
|
-
}
|
|
121
|
-
// Install dependencies
|
|
122
|
-
if (config.install) {
|
|
123
|
-
const installSpinner = (0, spinner_1.spinner)('Installing dependencies...');
|
|
124
|
-
try {
|
|
125
|
-
const installer = new package_installer_1.PackageInstaller(projectPath);
|
|
126
|
-
await installer.install();
|
|
127
|
-
installSpinner.succeed('Dependencies installed');
|
|
128
|
-
}
|
|
129
|
-
catch (_error) {
|
|
130
|
-
installSpinner.fail('Failed to install dependencies');
|
|
131
|
-
logger_1.logger.warn('You can install dependencies manually by running:');
|
|
132
|
-
logger_1.logger.code(`cd ${config.name} && npm install`);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
// Initialize git repository
|
|
136
|
-
if (config.git) {
|
|
137
|
-
const gitSpinner = (0, spinner_1.spinner)('Initializing git repository...');
|
|
138
|
-
try {
|
|
139
|
-
await (0, git_1.initializeGit)(projectPath);
|
|
140
|
-
gitSpinner.succeed('Git repository initialized');
|
|
141
|
-
}
|
|
142
|
-
catch (_error) {
|
|
143
|
-
gitSpinner.fail('Failed to initialize git repository');
|
|
144
|
-
logger_1.logger.warn('You can initialize git manually by running:');
|
|
145
|
-
logger_1.logger.code(`cd ${config.name} && git init`);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
// Success message with next steps
|
|
149
|
-
logger_1.logger.newLine();
|
|
150
|
-
logger_1.logger.success('🎉 Project created successfully!');
|
|
151
|
-
logger_1.logger.newLine();
|
|
152
|
-
logger_1.logger.title('Next steps:');
|
|
153
|
-
logger_1.logger.code(`cd ${config.name}`);
|
|
154
|
-
if (!config.install) {
|
|
155
|
-
logger_1.logger.code('npm install');
|
|
156
|
-
}
|
|
157
|
-
if (config.platform === 'web' || config.platform === 'both') {
|
|
158
|
-
logger_1.logger.code('npm run dev');
|
|
159
|
-
logger_1.logger.info('Open http://localhost:3000 in your browser');
|
|
160
|
-
}
|
|
161
|
-
if (config.platform === 'mobile' || config.platform === 'both') {
|
|
162
|
-
logger_1.logger.code('npx expo start');
|
|
163
|
-
logger_1.logger.info('Scan QR code with Expo Go app');
|
|
164
|
-
}
|
|
165
|
-
logger_1.logger.newLine();
|
|
166
|
-
logger_1.logger.info('📚 Documentation: https://docs.digilogiclabs.com');
|
|
167
|
-
logger_1.logger.info('💬 Support: https://discord.gg/digilogiclabs');
|
|
168
|
-
}
|
|
169
|
-
catch (error) {
|
|
170
|
-
logger_1.logger.error('Failed to create project:');
|
|
171
|
-
logger_1.logger.error(error instanceof Error ? error.message : String(error));
|
|
172
|
-
process.exit(1);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
//# sourceMappingURL=create.js.map
|