@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,253 @@
|
|
|
1
|
+
# {{titleCaseName}} - Kubernetes Manifests
|
|
2
|
+
|
|
3
|
+
Kubernetes manifests for deploying {{titleCaseName}} with Kustomize.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
9
|
+
│ Kubernetes Cluster │
|
|
10
|
+
├─────────────────────────────────────────────────────────────┤
|
|
11
|
+
│ │
|
|
12
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
13
|
+
│ │ Ingress │───►│ Service │───►│ Deployment │ │
|
|
14
|
+
│ │ (nginx) │ │ (ClusterIP) │ │ (3 pods) │ │
|
|
15
|
+
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
|
16
|
+
│ │ │ │ │
|
|
17
|
+
│ │ ┌──────┴──────┐ │ │
|
|
18
|
+
│ │ ▼ ▼ │ │
|
|
19
|
+
│ ┌──────┴─────┐ ┌─────────┐ ┌─────────┐ ┌─────┴────┐ │
|
|
20
|
+
│ │ TLS Secret │ │ Config │ │ Secrets │ │ HPA │ │
|
|
21
|
+
│ │(cert-mgr) │ │ Map │ │ │ │(autoscale)│ │
|
|
22
|
+
│ └────────────┘ └─────────┘ └─────────┘ └──────────┘ │
|
|
23
|
+
│ │
|
|
24
|
+
│ ┌──────────────┐ ┌──────────────┐ │
|
|
25
|
+
│ │ PDB │ │ NetworkPolicy│ │
|
|
26
|
+
│ │(disruption) │ │ (security) │ │
|
|
27
|
+
│ └──────────────┘ └──────────────┘ │
|
|
28
|
+
│ │
|
|
29
|
+
└─────────────────────────────────────────────────────────────┘
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Prerequisites
|
|
33
|
+
|
|
34
|
+
1. **Kubernetes Cluster** (1.26+)
|
|
35
|
+
2. **kubectl** configured
|
|
36
|
+
3. **Kustomize** installed (or kubectl with -k flag)
|
|
37
|
+
4. **cert-manager** for TLS certificates
|
|
38
|
+
5. **nginx-ingress** controller
|
|
39
|
+
|
|
40
|
+
## Directory Structure
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
kubernetes/
|
|
44
|
+
├── base/template/ # Base manifests
|
|
45
|
+
│ ├── namespace.yaml
|
|
46
|
+
│ ├── serviceaccount.yaml
|
|
47
|
+
│ ├── configmap.yaml
|
|
48
|
+
│ ├── secret.yaml
|
|
49
|
+
│ ├── deployment.yaml
|
|
50
|
+
│ ├── service.yaml
|
|
51
|
+
│ ├── ingress.yaml
|
|
52
|
+
│ ├── hpa.yaml
|
|
53
|
+
│ ├── pdb.yaml
|
|
54
|
+
│ ├── networkpolicy.yaml
|
|
55
|
+
│ └── kustomization.yaml
|
|
56
|
+
└── production/template/ # Production overlay
|
|
57
|
+
└── kustomization.yaml
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Quick Start
|
|
61
|
+
|
|
62
|
+
### Deploy to Staging
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Preview manifests
|
|
66
|
+
kubectl kustomize base/template
|
|
67
|
+
|
|
68
|
+
# Apply to cluster
|
|
69
|
+
kubectl apply -k base/template
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Deploy to Production
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Preview manifests
|
|
76
|
+
kubectl kustomize production/template
|
|
77
|
+
|
|
78
|
+
# Apply to cluster
|
|
79
|
+
kubectl apply -k production/template
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Configuration
|
|
83
|
+
|
|
84
|
+
### Update Secrets
|
|
85
|
+
|
|
86
|
+
Before deploying, update the secrets with actual values:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Using kubectl
|
|
90
|
+
kubectl create secret generic {{projectName}}-secrets \
|
|
91
|
+
--namespace={{projectName}} \
|
|
92
|
+
--from-literal=SUPABASE_ANON_KEY="your-key" \
|
|
93
|
+
--from-literal=SUPABASE_SERVICE_ROLE_KEY="your-key" \
|
|
94
|
+
--from-literal=STRIPE_SECRET_KEY="your-key" \
|
|
95
|
+
--dry-run=client -o yaml | kubectl apply -f -
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
For production, consider using:
|
|
99
|
+
- **Sealed Secrets**: https://github.com/bitnami-labs/sealed-secrets
|
|
100
|
+
- **External Secrets**: https://external-secrets.io/
|
|
101
|
+
|
|
102
|
+
### Update ConfigMap
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
kubectl edit configmap {{projectName}}-config -n {{projectName}}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Update Image
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Using kustomize
|
|
112
|
+
cd production/template
|
|
113
|
+
kustomize edit set image {{projectName}}=ghcr.io/your-org/{{projectName}}:v1.2.3
|
|
114
|
+
kubectl apply -k .
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Scaling
|
|
118
|
+
|
|
119
|
+
### Manual Scaling
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
kubectl scale deployment {{projectName}} -n {{projectName}} --replicas=5
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### HPA Configuration
|
|
126
|
+
|
|
127
|
+
The HPA automatically scales based on:
|
|
128
|
+
- CPU utilization (target: 70%)
|
|
129
|
+
- Memory utilization (target: 80%)
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Check HPA status
|
|
133
|
+
kubectl get hpa {{projectName}} -n {{projectName}}
|
|
134
|
+
|
|
135
|
+
# Watch scaling events
|
|
136
|
+
kubectl describe hpa {{projectName}} -n {{projectName}}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Monitoring
|
|
140
|
+
|
|
141
|
+
### Check Pod Status
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
kubectl get pods -n {{projectName}} -l app.kubernetes.io/name={{projectName}}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Check Logs
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# All pods
|
|
151
|
+
kubectl logs -n {{projectName}} -l app.kubernetes.io/name={{projectName}} -f
|
|
152
|
+
|
|
153
|
+
# Specific pod
|
|
154
|
+
kubectl logs -n {{projectName}} {{projectName}}-xxx-xxx -f
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Check Events
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
kubectl get events -n {{projectName}} --sort-by='.lastTimestamp'
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Health Checks
|
|
164
|
+
|
|
165
|
+
The deployment includes three probes:
|
|
166
|
+
|
|
167
|
+
| Probe | Path | Purpose |
|
|
168
|
+
|-------|------|---------|
|
|
169
|
+
| Startup | /api/health | Initial container startup |
|
|
170
|
+
| Liveness | /api/health | Container health |
|
|
171
|
+
| Readiness | /api/health | Traffic routing |
|
|
172
|
+
|
|
173
|
+
## Security
|
|
174
|
+
|
|
175
|
+
### Network Policy
|
|
176
|
+
|
|
177
|
+
The NetworkPolicy restricts:
|
|
178
|
+
- **Ingress**: Only from ingress-nginx and monitoring namespaces
|
|
179
|
+
- **Egress**: Only DNS and HTTPS (443)
|
|
180
|
+
|
|
181
|
+
### Pod Security
|
|
182
|
+
|
|
183
|
+
- Runs as non-root user (UID 1000)
|
|
184
|
+
- Read-only root filesystem
|
|
185
|
+
- All capabilities dropped
|
|
186
|
+
- No privilege escalation
|
|
187
|
+
|
|
188
|
+
### Service Account
|
|
189
|
+
|
|
190
|
+
- Dedicated service account
|
|
191
|
+
- No auto-mounted service account token
|
|
192
|
+
|
|
193
|
+
## Troubleshooting
|
|
194
|
+
|
|
195
|
+
### Pod Not Starting
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# Check pod events
|
|
199
|
+
kubectl describe pod {{projectName}}-xxx -n {{projectName}}
|
|
200
|
+
|
|
201
|
+
# Check container logs
|
|
202
|
+
kubectl logs {{projectName}}-xxx -n {{projectName}} --previous
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Ingress Not Working
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Check ingress status
|
|
209
|
+
kubectl get ingress {{projectName}} -n {{projectName}}
|
|
210
|
+
|
|
211
|
+
# Check TLS certificate
|
|
212
|
+
kubectl describe certificate {{projectName}}-tls -n {{projectName}}
|
|
213
|
+
|
|
214
|
+
# Check ingress controller logs
|
|
215
|
+
kubectl logs -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### HPA Not Scaling
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# Check metrics server
|
|
222
|
+
kubectl get --raw /apis/metrics.k8s.io/v1beta1/pods
|
|
223
|
+
|
|
224
|
+
# Check HPA status
|
|
225
|
+
kubectl describe hpa {{projectName}} -n {{projectName}}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Rollback
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Check rollout history
|
|
232
|
+
kubectl rollout history deployment/{{projectName}} -n {{projectName}}
|
|
233
|
+
|
|
234
|
+
# Rollback to previous
|
|
235
|
+
kubectl rollout undo deployment/{{projectName}} -n {{projectName}}
|
|
236
|
+
|
|
237
|
+
# Rollback to specific revision
|
|
238
|
+
kubectl rollout undo deployment/{{projectName}} -n {{projectName}} --to-revision=2
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Clean Up
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
# Delete all resources
|
|
245
|
+
kubectl delete -k base/template
|
|
246
|
+
|
|
247
|
+
# Or for production
|
|
248
|
+
kubectl delete -k production/template
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## License
|
|
252
|
+
|
|
253
|
+
MIT - Built with DLL Platform
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# {{titleCaseName}} - Kubernetes ConfigMap
|
|
2
|
+
apiVersion: v1
|
|
3
|
+
kind: ConfigMap
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{projectName}}-config
|
|
6
|
+
namespace: {{projectName}}
|
|
7
|
+
labels:
|
|
8
|
+
app.kubernetes.io/name: {{projectName}}
|
|
9
|
+
data:
|
|
10
|
+
APP_URL: "https://{{projectName}}.example.com"
|
|
11
|
+
SUPABASE_URL: "https://xxx.supabase.co"
|
|
12
|
+
LOG_LEVEL: "info"
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# {{titleCaseName}} - Kubernetes Deployment
|
|
2
|
+
apiVersion: apps/v1
|
|
3
|
+
kind: Deployment
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{projectName}}
|
|
6
|
+
namespace: {{projectName}}
|
|
7
|
+
labels:
|
|
8
|
+
app.kubernetes.io/name: {{projectName}}
|
|
9
|
+
app.kubernetes.io/component: web
|
|
10
|
+
spec:
|
|
11
|
+
replicas: 2
|
|
12
|
+
selector:
|
|
13
|
+
matchLabels:
|
|
14
|
+
app.kubernetes.io/name: {{projectName}}
|
|
15
|
+
app.kubernetes.io/component: web
|
|
16
|
+
template:
|
|
17
|
+
metadata:
|
|
18
|
+
labels:
|
|
19
|
+
app.kubernetes.io/name: {{projectName}}
|
|
20
|
+
app.kubernetes.io/component: web
|
|
21
|
+
annotations:
|
|
22
|
+
prometheus.io/scrape: "true"
|
|
23
|
+
prometheus.io/port: "3000"
|
|
24
|
+
prometheus.io/path: "/metrics"
|
|
25
|
+
spec:
|
|
26
|
+
serviceAccountName: {{projectName}}
|
|
27
|
+
securityContext:
|
|
28
|
+
runAsNonRoot: true
|
|
29
|
+
runAsUser: 1000
|
|
30
|
+
fsGroup: 1000
|
|
31
|
+
containers:
|
|
32
|
+
- name: app
|
|
33
|
+
image: {{projectName}}:latest
|
|
34
|
+
imagePullPolicy: Always
|
|
35
|
+
ports:
|
|
36
|
+
- name: http
|
|
37
|
+
containerPort: 3000
|
|
38
|
+
protocol: TCP
|
|
39
|
+
env:
|
|
40
|
+
- name: NODE_ENV
|
|
41
|
+
value: "production"
|
|
42
|
+
- name: NEXT_PUBLIC_SUPABASE_URL
|
|
43
|
+
valueFrom:
|
|
44
|
+
configMapKeyRef:
|
|
45
|
+
name: {{projectName}}-config
|
|
46
|
+
key: SUPABASE_URL
|
|
47
|
+
- name: NEXT_PUBLIC_SUPABASE_ANON_KEY
|
|
48
|
+
valueFrom:
|
|
49
|
+
secretKeyRef:
|
|
50
|
+
name: {{projectName}}-secrets
|
|
51
|
+
key: SUPABASE_ANON_KEY
|
|
52
|
+
- name: SUPABASE_SERVICE_ROLE_KEY
|
|
53
|
+
valueFrom:
|
|
54
|
+
secretKeyRef:
|
|
55
|
+
name: {{projectName}}-secrets
|
|
56
|
+
key: SUPABASE_SERVICE_ROLE_KEY
|
|
57
|
+
- name: NEXT_PUBLIC_APP_URL
|
|
58
|
+
valueFrom:
|
|
59
|
+
configMapKeyRef:
|
|
60
|
+
name: {{projectName}}-config
|
|
61
|
+
key: APP_URL
|
|
62
|
+
resources:
|
|
63
|
+
requests:
|
|
64
|
+
cpu: 100m
|
|
65
|
+
memory: 256Mi
|
|
66
|
+
limits:
|
|
67
|
+
cpu: 500m
|
|
68
|
+
memory: 512Mi
|
|
69
|
+
livenessProbe:
|
|
70
|
+
httpGet:
|
|
71
|
+
path: /api/health
|
|
72
|
+
port: http
|
|
73
|
+
initialDelaySeconds: 30
|
|
74
|
+
periodSeconds: 10
|
|
75
|
+
timeoutSeconds: 5
|
|
76
|
+
failureThreshold: 3
|
|
77
|
+
readinessProbe:
|
|
78
|
+
httpGet:
|
|
79
|
+
path: /api/health
|
|
80
|
+
port: http
|
|
81
|
+
initialDelaySeconds: 5
|
|
82
|
+
periodSeconds: 5
|
|
83
|
+
timeoutSeconds: 3
|
|
84
|
+
failureThreshold: 3
|
|
85
|
+
startupProbe:
|
|
86
|
+
httpGet:
|
|
87
|
+
path: /api/health
|
|
88
|
+
port: http
|
|
89
|
+
initialDelaySeconds: 10
|
|
90
|
+
periodSeconds: 5
|
|
91
|
+
failureThreshold: 30
|
|
92
|
+
securityContext:
|
|
93
|
+
allowPrivilegeEscalation: false
|
|
94
|
+
readOnlyRootFilesystem: true
|
|
95
|
+
capabilities:
|
|
96
|
+
drop:
|
|
97
|
+
- ALL
|
|
98
|
+
volumeMounts:
|
|
99
|
+
- name: tmp
|
|
100
|
+
mountPath: /tmp
|
|
101
|
+
- name: nextjs-cache
|
|
102
|
+
mountPath: /app/.next/cache
|
|
103
|
+
volumes:
|
|
104
|
+
- name: tmp
|
|
105
|
+
emptyDir: {}
|
|
106
|
+
- name: nextjs-cache
|
|
107
|
+
emptyDir: {}
|
|
108
|
+
affinity:
|
|
109
|
+
podAntiAffinity:
|
|
110
|
+
preferredDuringSchedulingIgnoredDuringExecution:
|
|
111
|
+
- weight: 100
|
|
112
|
+
podAffinityTerm:
|
|
113
|
+
labelSelector:
|
|
114
|
+
matchLabels:
|
|
115
|
+
app.kubernetes.io/name: {{projectName}}
|
|
116
|
+
topologyKey: kubernetes.io/hostname
|
|
117
|
+
topologySpreadConstraints:
|
|
118
|
+
- maxSkew: 1
|
|
119
|
+
topologyKey: topology.kubernetes.io/zone
|
|
120
|
+
whenUnsatisfiable: ScheduleAnyway
|
|
121
|
+
labelSelector:
|
|
122
|
+
matchLabels:
|
|
123
|
+
app.kubernetes.io/name: {{projectName}}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# {{titleCaseName}} - Horizontal Pod Autoscaler
|
|
2
|
+
apiVersion: autoscaling/v2
|
|
3
|
+
kind: HorizontalPodAutoscaler
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{projectName}}
|
|
6
|
+
namespace: {{projectName}}
|
|
7
|
+
labels:
|
|
8
|
+
app.kubernetes.io/name: {{projectName}}
|
|
9
|
+
spec:
|
|
10
|
+
scaleTargetRef:
|
|
11
|
+
apiVersion: apps/v1
|
|
12
|
+
kind: Deployment
|
|
13
|
+
name: {{projectName}}
|
|
14
|
+
minReplicas: 2
|
|
15
|
+
maxReplicas: 10
|
|
16
|
+
metrics:
|
|
17
|
+
- type: Resource
|
|
18
|
+
resource:
|
|
19
|
+
name: cpu
|
|
20
|
+
target:
|
|
21
|
+
type: Utilization
|
|
22
|
+
averageUtilization: 70
|
|
23
|
+
- type: Resource
|
|
24
|
+
resource:
|
|
25
|
+
name: memory
|
|
26
|
+
target:
|
|
27
|
+
type: Utilization
|
|
28
|
+
averageUtilization: 80
|
|
29
|
+
behavior:
|
|
30
|
+
scaleDown:
|
|
31
|
+
stabilizationWindowSeconds: 300
|
|
32
|
+
policies:
|
|
33
|
+
- type: Percent
|
|
34
|
+
value: 50
|
|
35
|
+
periodSeconds: 60
|
|
36
|
+
scaleUp:
|
|
37
|
+
stabilizationWindowSeconds: 0
|
|
38
|
+
policies:
|
|
39
|
+
- type: Percent
|
|
40
|
+
value: 100
|
|
41
|
+
periodSeconds: 15
|
|
42
|
+
- type: Pods
|
|
43
|
+
value: 4
|
|
44
|
+
periodSeconds: 15
|
|
45
|
+
selectPolicy: Max
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# {{titleCaseName}} - Kubernetes Ingress
|
|
2
|
+
apiVersion: networking.k8s.io/v1
|
|
3
|
+
kind: Ingress
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{projectName}}
|
|
6
|
+
namespace: {{projectName}}
|
|
7
|
+
labels:
|
|
8
|
+
app.kubernetes.io/name: {{projectName}}
|
|
9
|
+
annotations:
|
|
10
|
+
kubernetes.io/ingress.class: nginx
|
|
11
|
+
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
12
|
+
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
|
13
|
+
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
|
|
14
|
+
nginx.ingress.kubernetes.io/proxy-read-timeout: "60"
|
|
15
|
+
nginx.ingress.kubernetes.io/proxy-send-timeout: "60"
|
|
16
|
+
spec:
|
|
17
|
+
tls:
|
|
18
|
+
- hosts:
|
|
19
|
+
- "{{projectName}}.example.com"
|
|
20
|
+
secretName: {{projectName}}-tls
|
|
21
|
+
rules:
|
|
22
|
+
- host: "{{projectName}}.example.com"
|
|
23
|
+
http:
|
|
24
|
+
paths:
|
|
25
|
+
- path: /
|
|
26
|
+
pathType: Prefix
|
|
27
|
+
backend:
|
|
28
|
+
service:
|
|
29
|
+
name: {{projectName}}
|
|
30
|
+
port:
|
|
31
|
+
name: http
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# {{titleCaseName}} - Kustomize Base
|
|
2
|
+
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
3
|
+
kind: Kustomization
|
|
4
|
+
|
|
5
|
+
metadata:
|
|
6
|
+
name: {{projectName}}-base
|
|
7
|
+
|
|
8
|
+
namespace: {{projectName}}
|
|
9
|
+
|
|
10
|
+
resources:
|
|
11
|
+
- namespace.yaml
|
|
12
|
+
- serviceaccount.yaml
|
|
13
|
+
- configmap.yaml
|
|
14
|
+
- secret.yaml
|
|
15
|
+
- deployment.yaml
|
|
16
|
+
- service.yaml
|
|
17
|
+
- ingress.yaml
|
|
18
|
+
- hpa.yaml
|
|
19
|
+
- pdb.yaml
|
|
20
|
+
- networkpolicy.yaml
|
|
21
|
+
|
|
22
|
+
commonLabels:
|
|
23
|
+
app.kubernetes.io/name: {{projectName}}
|
|
24
|
+
app.kubernetes.io/version: "1.0.0"
|
|
25
|
+
app.kubernetes.io/managed-by: kustomize
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# {{titleCaseName}} - Network Policy
|
|
2
|
+
apiVersion: networking.k8s.io/v1
|
|
3
|
+
kind: NetworkPolicy
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{projectName}}
|
|
6
|
+
namespace: {{projectName}}
|
|
7
|
+
labels:
|
|
8
|
+
app.kubernetes.io/name: {{projectName}}
|
|
9
|
+
spec:
|
|
10
|
+
podSelector:
|
|
11
|
+
matchLabels:
|
|
12
|
+
app.kubernetes.io/name: {{projectName}}
|
|
13
|
+
policyTypes:
|
|
14
|
+
- Ingress
|
|
15
|
+
- Egress
|
|
16
|
+
ingress:
|
|
17
|
+
# Allow traffic from ingress controller
|
|
18
|
+
- from:
|
|
19
|
+
- namespaceSelector:
|
|
20
|
+
matchLabels:
|
|
21
|
+
name: ingress-nginx
|
|
22
|
+
ports:
|
|
23
|
+
- protocol: TCP
|
|
24
|
+
port: 3000
|
|
25
|
+
# Allow traffic from monitoring
|
|
26
|
+
- from:
|
|
27
|
+
- namespaceSelector:
|
|
28
|
+
matchLabels:
|
|
29
|
+
name: monitoring
|
|
30
|
+
ports:
|
|
31
|
+
- protocol: TCP
|
|
32
|
+
port: 3000
|
|
33
|
+
egress:
|
|
34
|
+
# Allow DNS
|
|
35
|
+
- to:
|
|
36
|
+
- namespaceSelector: {}
|
|
37
|
+
ports:
|
|
38
|
+
- protocol: UDP
|
|
39
|
+
port: 53
|
|
40
|
+
- protocol: TCP
|
|
41
|
+
port: 53
|
|
42
|
+
# Allow HTTPS (Supabase, external APIs)
|
|
43
|
+
- to:
|
|
44
|
+
- ipBlock:
|
|
45
|
+
cidr: 0.0.0.0/0
|
|
46
|
+
ports:
|
|
47
|
+
- protocol: TCP
|
|
48
|
+
port: 443
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# {{titleCaseName}} - Pod Disruption Budget
|
|
2
|
+
apiVersion: policy/v1
|
|
3
|
+
kind: PodDisruptionBudget
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{projectName}}
|
|
6
|
+
namespace: {{projectName}}
|
|
7
|
+
labels:
|
|
8
|
+
app.kubernetes.io/name: {{projectName}}
|
|
9
|
+
spec:
|
|
10
|
+
minAvailable: 1
|
|
11
|
+
selector:
|
|
12
|
+
matchLabels:
|
|
13
|
+
app.kubernetes.io/name: {{projectName}}
|
|
14
|
+
app.kubernetes.io/component: web
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# {{titleCaseName}} - Kubernetes Secret Template
|
|
2
|
+
# NOTE: This is a template. In production, use sealed-secrets or external-secrets
|
|
3
|
+
apiVersion: v1
|
|
4
|
+
kind: Secret
|
|
5
|
+
metadata:
|
|
6
|
+
name: {{projectName}}-secrets
|
|
7
|
+
namespace: {{projectName}}
|
|
8
|
+
labels:
|
|
9
|
+
app.kubernetes.io/name: {{projectName}}
|
|
10
|
+
type: Opaque
|
|
11
|
+
stringData:
|
|
12
|
+
# Replace with actual values or use sealed-secrets/external-secrets
|
|
13
|
+
SUPABASE_ANON_KEY: "your-supabase-anon-key"
|
|
14
|
+
SUPABASE_SERVICE_ROLE_KEY: "your-supabase-service-role-key"
|
|
15
|
+
STRIPE_SECRET_KEY: "your-stripe-secret-key"
|
|
16
|
+
STRIPE_WEBHOOK_SECRET: "your-stripe-webhook-secret"
|
|
17
|
+
OPENAI_API_KEY: "your-openai-api-key"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# {{titleCaseName}} - Kubernetes Service
|
|
2
|
+
apiVersion: v1
|
|
3
|
+
kind: Service
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{projectName}}
|
|
6
|
+
namespace: {{projectName}}
|
|
7
|
+
labels:
|
|
8
|
+
app.kubernetes.io/name: {{projectName}}
|
|
9
|
+
app.kubernetes.io/component: web
|
|
10
|
+
spec:
|
|
11
|
+
type: ClusterIP
|
|
12
|
+
ports:
|
|
13
|
+
- name: http
|
|
14
|
+
port: 80
|
|
15
|
+
targetPort: http
|
|
16
|
+
protocol: TCP
|
|
17
|
+
selector:
|
|
18
|
+
app.kubernetes.io/name: {{projectName}}
|
|
19
|
+
app.kubernetes.io/component: web
|