@sibyllinesoft/arbiter 0.1.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.
Files changed (302) hide show
  1. package/README.md +222 -0
  2. package/dist/cli.js +28718 -0
  3. package/dist/templates/plopfiles/__tests__/build-systems.test.ts +730 -0
  4. package/dist/templates/plopfiles/__tests__/e2e.test.ts +451 -0
  5. package/dist/templates/plopfiles/__tests__/generation.test.ts +384 -0
  6. package/dist/templates/plopfiles/__tests__/linting.test.ts +854 -0
  7. package/dist/templates/plopfiles/__tests__/modules.test.ts +278 -0
  8. package/dist/templates/plopfiles/__tests__/smoke.test.ts +619 -0
  9. package/dist/templates/plopfiles/__tests__/templates.test.ts +341 -0
  10. package/dist/templates/plopfiles/_modules/backends/go-chi/module.js +43 -0
  11. package/dist/templates/plopfiles/_modules/backends/go-chi/templates/.air.toml.hbs +30 -0
  12. package/dist/templates/plopfiles/_modules/backends/go-chi/templates/cmd/server/main.go.hbs +50 -0
  13. package/dist/templates/plopfiles/_modules/backends/go-chi/templates/go.mod.hbs +9 -0
  14. package/dist/templates/plopfiles/_modules/backends/go-chi/templates/internal/handlers/health.go.hbs +51 -0
  15. package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/module.js +38 -0
  16. package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/build.gradle.kts.hbs +37 -0
  17. package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/settings.gradle.kts.hbs +1 -0
  18. package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/src/main/kotlin/Application.kt.hbs +44 -0
  19. package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/src/main/kotlin/routes/Health.kt.hbs +41 -0
  20. package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/src/main/resources/logback.xml.hbs +11 -0
  21. package/dist/templates/plopfiles/_modules/backends/node-express/module.js +54 -0
  22. package/dist/templates/plopfiles/_modules/backends/node-express/templates/src/index.ts.hbs +37 -0
  23. package/dist/templates/plopfiles/_modules/backends/node-express/templates/src/routes/health.ts.hbs +21 -0
  24. package/dist/templates/plopfiles/_modules/backends/node-express/templates/tsconfig.json.hbs +18 -0
  25. package/dist/templates/plopfiles/_modules/backends/node-hono/module.js +56 -0
  26. package/dist/templates/plopfiles/_modules/backends/node-hono/templates/src/index.ts.hbs +30 -0
  27. package/dist/templates/plopfiles/_modules/backends/node-hono/templates/src/routes/health.ts.hbs +64 -0
  28. package/dist/templates/plopfiles/_modules/backends/node-hono/templates/src/routes/index.ts.hbs +38 -0
  29. package/dist/templates/plopfiles/_modules/backends/node-hono/templates/tsconfig.json.hbs +20 -0
  30. package/dist/templates/plopfiles/_modules/backends/node-hono/templates/typedoc.json.hbs +25 -0
  31. package/dist/templates/plopfiles/_modules/backends/python-fastapi/module.js +65 -0
  32. package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/__init__.py.hbs +1 -0
  33. package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/config.py.hbs +28 -0
  34. package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/main.py.hbs +40 -0
  35. package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/routers/__init__.py.hbs +1 -0
  36. package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/routers/health.py.hbs +24 -0
  37. package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/pyproject.toml.hbs +40 -0
  38. package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/requirements.txt.hbs +6 -0
  39. package/dist/templates/plopfiles/_modules/backends/rust-axum/module.js +44 -0
  40. package/dist/templates/plopfiles/_modules/backends/rust-axum/templates/Cargo.toml.hbs +23 -0
  41. package/dist/templates/plopfiles/_modules/backends/rust-axum/templates/src/health.rs.hbs +41 -0
  42. package/dist/templates/plopfiles/_modules/backends/rust-axum/templates/src/main.rs.hbs +57 -0
  43. package/dist/templates/plopfiles/_modules/cloud/aws/module.js +33 -0
  44. package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws-alb.tf.hbs +92 -0
  45. package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws-ecs.tf.hbs +84 -0
  46. package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws-iam.tf.hbs +60 -0
  47. package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws-vpc.tf.hbs +106 -0
  48. package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws.tf.hbs +56 -0
  49. package/dist/templates/plopfiles/_modules/cloud/azure/module.js +31 -0
  50. package/dist/templates/plopfiles/_modules/cloud/azure/templates/azure-container-apps.tf.hbs +99 -0
  51. package/dist/templates/plopfiles/_modules/cloud/azure/templates/azure.tf.hbs +54 -0
  52. package/dist/templates/plopfiles/_modules/cloud/cloudflare/module.js +43 -0
  53. package/dist/templates/plopfiles/_modules/cloud/cloudflare/templates/src/types.d.ts.hbs +6 -0
  54. package/dist/templates/plopfiles/_modules/cloud/cloudflare/templates/src/worker.ts.hbs +51 -0
  55. package/dist/templates/plopfiles/_modules/cloud/cloudflare/templates/wrangler.toml.hbs +36 -0
  56. package/dist/templates/plopfiles/_modules/cloud/gcp/module.js +31 -0
  57. package/dist/templates/plopfiles/_modules/cloud/gcp/templates/gcp-cloudrun.tf.hbs +89 -0
  58. package/dist/templates/plopfiles/_modules/cloud/gcp/templates/gcp.tf.hbs +62 -0
  59. package/dist/templates/plopfiles/_modules/cloud/supabase/module.js +51 -0
  60. package/dist/templates/plopfiles/_modules/cloud/supabase/templates/src/lib/supabase.ts.hbs +25 -0
  61. package/dist/templates/plopfiles/_modules/cloud/supabase/templates/src/types/supabase.ts.hbs +52 -0
  62. package/dist/templates/plopfiles/_modules/cloud/supabase/templates/supabase/config.toml.hbs +71 -0
  63. package/dist/templates/plopfiles/_modules/cloud/supabase/templates/supabase/functions/hello/index.ts.hbs +34 -0
  64. package/dist/templates/plopfiles/_modules/cloud/supabase/templates/supabase/migrations/00000000000000_init.sql.hbs +60 -0
  65. package/dist/templates/plopfiles/_modules/composer.js +180 -0
  66. package/dist/templates/plopfiles/_modules/databases/postgres-drizzle/drizzle.config.ts.hbs +10 -0
  67. package/dist/templates/plopfiles/_modules/databases/postgres-drizzle/module.js +53 -0
  68. package/dist/templates/plopfiles/_modules/databases/postgres-drizzle/templates/index.ts.hbs +15 -0
  69. package/dist/templates/plopfiles/_modules/databases/postgres-drizzle/templates/schema.ts.hbs +21 -0
  70. package/dist/templates/plopfiles/_modules/desktop/electron/module.js +51 -0
  71. package/dist/templates/plopfiles/_modules/desktop/electron/templates/forge.config.ts.hbs +38 -0
  72. package/dist/templates/plopfiles/_modules/desktop/electron/templates/package.json.hbs +22 -0
  73. package/dist/templates/plopfiles/_modules/desktop/electron/templates/src/main.ts.hbs +48 -0
  74. package/dist/templates/plopfiles/_modules/desktop/electron/templates/src/preload.ts.hbs +18 -0
  75. package/dist/templates/plopfiles/_modules/desktop/electron/templates/tsconfig.json.hbs +14 -0
  76. package/dist/templates/plopfiles/_modules/desktop/tauri/module.js +38 -0
  77. package/dist/templates/plopfiles/_modules/desktop/tauri/templates/src-tauri/Cargo.toml.hbs +20 -0
  78. package/dist/templates/plopfiles/_modules/desktop/tauri/templates/src-tauri/build.rs.hbs +3 -0
  79. package/dist/templates/plopfiles/_modules/desktop/tauri/templates/src-tauri/src/main.rs.hbs +30 -0
  80. package/dist/templates/plopfiles/_modules/desktop/tauri/templates/src-tauri/tauri.conf.json.hbs +44 -0
  81. package/dist/templates/plopfiles/_modules/docs/mkdocs/module.js +61 -0
  82. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/architecture/components.md.hbs +37 -0
  83. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/architecture/overview.md.hbs +43 -0
  84. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/contributing/development.md.hbs +164 -0
  85. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/contributing/guidelines.md.hbs +50 -0
  86. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/getting-started/configuration.md.hbs +37 -0
  87. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/getting-started/installation.md.hbs +53 -0
  88. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/getting-started/quickstart.md.hbs +39 -0
  89. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/index.md.hbs +44 -0
  90. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/javascripts/extra.js.hbs +23 -0
  91. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/stylesheets/extra.css.hbs +51 -0
  92. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/mkdocs.yml.hbs +141 -0
  93. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/requirements-docs.txt.hbs +15 -0
  94. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/scripts/aggregate-docs.mjs.hbs +188 -0
  95. package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/scripts/gen_ref_pages.py.hbs +54 -0
  96. package/dist/templates/plopfiles/_modules/frontends/react-vite/module.js +60 -0
  97. package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/index.html.hbs +13 -0
  98. package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/nginx.conf.hbs +31 -0
  99. package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/postcss.config.js.hbs +6 -0
  100. package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/App.tsx.hbs +12 -0
  101. package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/index.css.hbs +25 -0
  102. package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/lib/api.ts.hbs +52 -0
  103. package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/main.tsx.hbs +18 -0
  104. package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/pages/Home.tsx.hbs +31 -0
  105. package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/tailwind.config.js.hbs +8 -0
  106. package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/tsconfig.json.hbs +25 -0
  107. package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/tsconfig.node.json.hbs +10 -0
  108. package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/vite.config.ts.hbs +21 -0
  109. package/dist/templates/plopfiles/_modules/frontends/solid-vite/module.js +51 -0
  110. package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/index.html.hbs +13 -0
  111. package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/postcss.config.js.hbs +6 -0
  112. package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/App.tsx.hbs +12 -0
  113. package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/index.css.hbs +3 -0
  114. package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/index.tsx.hbs +21 -0
  115. package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/lib/api.ts.hbs +52 -0
  116. package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/pages/Home.tsx.hbs +34 -0
  117. package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/tailwind.config.js.hbs +8 -0
  118. package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/tsconfig.json.hbs +24 -0
  119. package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/vite.config.ts.hbs +21 -0
  120. package/dist/templates/plopfiles/_modules/frontends/vue-vite/module.js +54 -0
  121. package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/index.html.hbs +13 -0
  122. package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/postcss.config.js.hbs +6 -0
  123. package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/App.vue.hbs +9 -0
  124. package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/index.css.hbs +3 -0
  125. package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/lib/api.ts.hbs +52 -0
  126. package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/main.ts.hbs +14 -0
  127. package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/pages/Home.vue.hbs +27 -0
  128. package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/router.ts.hbs +13 -0
  129. package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/tailwind.config.js.hbs +8 -0
  130. package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/tsconfig.json.hbs +25 -0
  131. package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/vite.config.ts.hbs +21 -0
  132. package/dist/templates/plopfiles/_modules/infra/docker-compose/module.js +52 -0
  133. package/dist/templates/plopfiles/_modules/infra/docker-compose/templates/Dockerfile.backend.hbs +32 -0
  134. package/dist/templates/plopfiles/_modules/infra/docker-compose/templates/Dockerfile.frontend.hbs +31 -0
  135. package/dist/templates/plopfiles/_modules/infra/docker-compose/templates/docker-compose.yml.hbs +97 -0
  136. package/dist/templates/plopfiles/_modules/infra/github-actions/module.js +24 -0
  137. package/dist/templates/plopfiles/_modules/infra/github-actions/templates/.github/workflows/ci.yml.hbs +78 -0
  138. package/dist/templates/plopfiles/_modules/infra/github-actions/templates/.github/workflows/deploy.yml.hbs +60 -0
  139. package/dist/templates/plopfiles/_modules/infra/just/module.js +26 -0
  140. package/dist/templates/plopfiles/_modules/infra/just/templates/justfile.hbs +205 -0
  141. package/dist/templates/plopfiles/_modules/infra/kubernetes/module.js +30 -0
  142. package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/base/deployment.yaml.hbs +48 -0
  143. package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/base/ingress.yaml.hbs +23 -0
  144. package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/base/kustomization.yaml.hbs +11 -0
  145. package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/base/service.yaml.hbs +15 -0
  146. package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/overlays/dev/deployment-patch.yaml.hbs +17 -0
  147. package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/overlays/dev/kustomization.yaml.hbs +15 -0
  148. package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/overlays/prod/deployment-patch.yaml.hbs +17 -0
  149. package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/overlays/prod/kustomization.yaml.hbs +15 -0
  150. package/dist/templates/plopfiles/_modules/infra/pulumi/module.js +30 -0
  151. package/dist/templates/plopfiles/_modules/infra/pulumi/templates/.gitignore.hbs +5 -0
  152. package/dist/templates/plopfiles/_modules/infra/pulumi/templates/Pulumi.dev.yaml.hbs +3 -0
  153. package/dist/templates/plopfiles/_modules/infra/pulumi/templates/Pulumi.yaml.hbs +7 -0
  154. package/dist/templates/plopfiles/_modules/infra/pulumi/templates/index.ts.hbs +26 -0
  155. package/dist/templates/plopfiles/_modules/infra/pulumi/templates/package.json.hbs +12 -0
  156. package/dist/templates/plopfiles/_modules/infra/pulumi/templates/tsconfig.json.hbs +16 -0
  157. package/dist/templates/plopfiles/_modules/infra/terraform/module.js +31 -0
  158. package/dist/templates/plopfiles/_modules/infra/terraform/templates/.gitignore.hbs +12 -0
  159. package/dist/templates/plopfiles/_modules/infra/terraform/templates/main.tf.hbs +34 -0
  160. package/dist/templates/plopfiles/_modules/infra/terraform/templates/outputs.tf.hbs +15 -0
  161. package/dist/templates/plopfiles/_modules/infra/terraform/templates/terraform.tfvars.example.hbs +6 -0
  162. package/dist/templates/plopfiles/_modules/infra/terraform/templates/variables.tf.hbs +30 -0
  163. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/module.js +38 -0
  164. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/build.gradle.kts.hbs +102 -0
  165. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/proguard-rules.pro.hbs +20 -0
  166. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/AndroidManifest.xml.hbs +25 -0
  167. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/ApiClient.kt.hbs +38 -0
  168. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/App.kt.hbs +116 -0
  169. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/MainActivity.kt.hbs +28 -0
  170. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/ui/theme/Color.kt.hbs +11 -0
  171. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/ui/theme/Theme.kt.hbs +55 -0
  172. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/ui/theme/Type.kt.hbs +31 -0
  173. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/res/values/strings.xml.hbs +3 -0
  174. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/res/values/themes.xml.hbs +4 -0
  175. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/build.gradle.kts.hbs +6 -0
  176. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/gradle.properties.hbs +4 -0
  177. package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/settings.gradle.kts.hbs +18 -0
  178. package/dist/templates/plopfiles/_modules/mobile/flutter/module.js +36 -0
  179. package/dist/templates/plopfiles/_modules/mobile/flutter/templates/.env.hbs +1 -0
  180. package/dist/templates/plopfiles/_modules/mobile/flutter/templates/lib/main.dart.hbs +29 -0
  181. package/dist/templates/plopfiles/_modules/mobile/flutter/templates/lib/screens/home_screen.dart.hbs +88 -0
  182. package/dist/templates/plopfiles/_modules/mobile/flutter/templates/lib/services/api_service.dart.hbs +61 -0
  183. package/dist/templates/plopfiles/_modules/mobile/flutter/templates/pubspec.yaml.hbs +25 -0
  184. package/dist/templates/plopfiles/_modules/mobile/ios-swift/module.js +39 -0
  185. package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/App.swift.hbs +10 -0
  186. package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Assets.xcassets/AccentColor.colorset/Contents.json.hbs +11 -0
  187. package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Assets.xcassets/AppIcon.appiconset/Contents.json.hbs +13 -0
  188. package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Assets.xcassets/Contents.json.hbs +6 -0
  189. package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/ContentView.swift.hbs +13 -0
  190. package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Services/APIClient.swift.hbs +58 -0
  191. package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Views/DetailsView.swift.hbs +22 -0
  192. package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Views/HomeView.swift.hbs +62 -0
  193. package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App.xcodeproj/project.pbxproj.hbs +363 -0
  194. package/dist/templates/plopfiles/_modules/mobile/react-native/module.js +36 -0
  195. package/dist/templates/plopfiles/_modules/mobile/react-native/templates/app/_layout.tsx.hbs +16 -0
  196. package/dist/templates/plopfiles/_modules/mobile/react-native/templates/app/index.tsx.hbs +66 -0
  197. package/dist/templates/plopfiles/_modules/mobile/react-native/templates/app.json.hbs +37 -0
  198. package/dist/templates/plopfiles/_modules/mobile/react-native/templates/package.json.hbs +29 -0
  199. package/dist/templates/plopfiles/_modules/mobile/react-native/templates/src/lib/api.ts.hbs +52 -0
  200. package/dist/templates/plopfiles/_modules/mobile/react-native/templates/tsconfig.json.hbs +11 -0
  201. package/dist/templates/plopfiles/_modules/quality/biome/module.js +44 -0
  202. package/dist/templates/plopfiles/_modules/quality/biome/templates/biome.json.hbs +126 -0
  203. package/dist/templates/plopfiles/_modules/quality/clippy/module.js +40 -0
  204. package/dist/templates/plopfiles/_modules/quality/clippy/templates/clippy.toml.hbs +29 -0
  205. package/dist/templates/plopfiles/_modules/quality/clippy/templates/rustfmt.toml.hbs +44 -0
  206. package/dist/templates/plopfiles/_modules/quality/golangci-lint/module.js +40 -0
  207. package/dist/templates/plopfiles/_modules/quality/golangci-lint/templates/.golangci.yml.hbs +199 -0
  208. package/dist/templates/plopfiles/_modules/quality/ruff/module.js +43 -0
  209. package/dist/templates/plopfiles/_modules/quality/ruff/templates/mypy.ini.hbs +48 -0
  210. package/dist/templates/plopfiles/_modules/quality/ruff/templates/ruff.toml.hbs +111 -0
  211. package/dist/templates/plopfiles/_modules/storybook/react-storybook/module.js +54 -0
  212. package/dist/templates/plopfiles/_modules/storybook/react-storybook/templates/.storybook/main.ts.hbs +44 -0
  213. package/dist/templates/plopfiles/_modules/storybook/react-storybook/templates/.storybook/preview.ts.hbs +68 -0
  214. package/dist/templates/plopfiles/_modules/storybook/react-storybook/templates/src/stories/Button.stories.tsx.hbs +158 -0
  215. package/dist/templates/plopfiles/_modules/types.ts +98 -0
  216. package/dist/templates/plopfiles/full-stack/plopfile.js +132 -0
  217. package/dist/templates/plopfiles/full-stack/templates/gitignore.hbs +44 -0
  218. package/dist/templates/plopfiles/full-stack/templates/package.json.hbs +21 -0
  219. package/dist/templates/plopfiles/presets/cli-go/module.js +43 -0
  220. package/dist/templates/plopfiles/presets/cli-go/templates/README.md.hbs +42 -0
  221. package/dist/templates/plopfiles/presets/cli-go/templates/config.json.hbs +9 -0
  222. package/dist/templates/plopfiles/presets/cli-node/module.js +45 -0
  223. package/dist/templates/plopfiles/presets/cli-node/templates/README.md.hbs +42 -0
  224. package/dist/templates/plopfiles/presets/cli-node/templates/config.json.hbs +9 -0
  225. package/dist/templates/plopfiles/presets/cli-python/module.js +43 -0
  226. package/dist/templates/plopfiles/presets/cli-python/templates/README.md.hbs +42 -0
  227. package/dist/templates/plopfiles/presets/cli-python/templates/config.json.hbs +9 -0
  228. package/dist/templates/plopfiles/presets/cli-rust/module.js +43 -0
  229. package/dist/templates/plopfiles/presets/cli-rust/templates/README.md.hbs +42 -0
  230. package/dist/templates/plopfiles/presets/cli-rust/templates/config.json.hbs +9 -0
  231. package/dist/templates/plopfiles/presets/loader.js +125 -0
  232. package/dist/templates/plopfiles/typescript-service/plopfile.js +186 -0
  233. package/dist/templates/plopfiles/typescript-service/templates/Dockerfile.hbs +29 -0
  234. package/dist/templates/plopfiles/typescript-service/templates/README.md.hbs +85 -0
  235. package/dist/templates/plopfiles/typescript-service/templates/config.ts.hbs +15 -0
  236. package/dist/templates/plopfiles/typescript-service/templates/db/index.ts.hbs +19 -0
  237. package/dist/templates/plopfiles/typescript-service/templates/db/schema.ts.hbs +16 -0
  238. package/dist/templates/plopfiles/typescript-service/templates/index.ts.hbs +89 -0
  239. package/dist/templates/plopfiles/typescript-service/templates/package.json.hbs +36 -0
  240. package/dist/templates/plopfiles/typescript-service/templates/routes/health.ts.hbs +61 -0
  241. package/dist/templates/plopfiles/typescript-service/templates/routes/index.ts.hbs +35 -0
  242. package/dist/templates/plopfiles/typescript-service/templates/tsconfig.json.hbs +24 -0
  243. package/dist/templates/plopfiles/typescript-service/templates/types.ts.hbs +28 -0
  244. package/dist/templates/typescript/component.module.css.tpl +6 -0
  245. package/dist/templates/typescript/component.test.tsx.tpl +9 -0
  246. package/dist/templates/typescript/component.tsx.tpl +17 -0
  247. package/dist/templates/typescript/component.types.ts.tpl +3 -0
  248. package/dist/templates/typescript/project/nextjs/app/globals.css.tpl +10 -0
  249. package/dist/templates/typescript/project/nextjs/app/layout.tsx.tpl +15 -0
  250. package/dist/templates/typescript/project/nextjs/app/page.tsx.tpl +8 -0
  251. package/dist/templates/typescript/project/nextjs/babel.config.js.tpl +8 -0
  252. package/dist/templates/typescript/project/nextjs/jest.config.js.tpl +10 -0
  253. package/dist/templates/typescript/project/nextjs/jest.setup.ts.tpl +6 -0
  254. package/dist/templates/typescript/project/nextjs/next-env.d.ts.tpl +5 -0
  255. package/dist/templates/typescript/project/nextjs/next.config.js.tpl +9 -0
  256. package/dist/templates/typescript/project/nextjs/package.json.tpl +1 -0
  257. package/dist/templates/typescript/project/nextjs/tsconfig.json.tpl +1 -0
  258. package/dist/templates/typescript/project/vite/App.css.tpl +8 -0
  259. package/dist/templates/typescript/project/vite/App.tsx.tpl +17 -0
  260. package/dist/templates/typescript/project/vite/index.css.tpl +8 -0
  261. package/dist/templates/typescript/project/vite/index.html.tpl +13 -0
  262. package/dist/templates/typescript/project/vite/main.tsx.tpl +10 -0
  263. package/dist/templates/typescript/project/vite/package.json.tpl +1 -0
  264. package/dist/templates/typescript/project/vite/test-setup.ts.tpl +1 -0
  265. package/dist/templates/typescript/project/vite/tsconfig.build.json.tpl +1 -0
  266. package/dist/templates/typescript/project/vite/tsconfig.json.tpl +1 -0
  267. package/dist/templates/typescript/project/vite/tsconfig.node.json.tpl +1 -0
  268. package/dist/templates/typescript/project/vite/vite.config.ts.tpl +18 -0
  269. package/dist/templates/typescript/service.api.ts.tpl +27 -0
  270. package/dist/templates/typescript/service.class.ts.tpl +28 -0
  271. package/dist/templates/typescript/service.handler.ts.tpl +42 -0
  272. package/dist/templates/typescript/service.schema.ts.tpl +16 -0
  273. package/package.json +95 -0
  274. package/templates/typescript/component.module.css.tpl +6 -0
  275. package/templates/typescript/component.test.tsx.tpl +9 -0
  276. package/templates/typescript/component.tsx.tpl +17 -0
  277. package/templates/typescript/component.types.ts.tpl +3 -0
  278. package/templates/typescript/project/nextjs/app/globals.css.tpl +10 -0
  279. package/templates/typescript/project/nextjs/app/layout.tsx.tpl +15 -0
  280. package/templates/typescript/project/nextjs/app/page.tsx.tpl +8 -0
  281. package/templates/typescript/project/nextjs/babel.config.js.tpl +8 -0
  282. package/templates/typescript/project/nextjs/jest.config.js.tpl +10 -0
  283. package/templates/typescript/project/nextjs/jest.setup.ts.tpl +6 -0
  284. package/templates/typescript/project/nextjs/next-env.d.ts.tpl +5 -0
  285. package/templates/typescript/project/nextjs/next.config.js.tpl +9 -0
  286. package/templates/typescript/project/nextjs/package.json.tpl +1 -0
  287. package/templates/typescript/project/nextjs/tsconfig.json.tpl +1 -0
  288. package/templates/typescript/project/vite/App.css.tpl +8 -0
  289. package/templates/typescript/project/vite/App.tsx.tpl +17 -0
  290. package/templates/typescript/project/vite/index.css.tpl +8 -0
  291. package/templates/typescript/project/vite/index.html.tpl +13 -0
  292. package/templates/typescript/project/vite/main.tsx.tpl +10 -0
  293. package/templates/typescript/project/vite/package.json.tpl +1 -0
  294. package/templates/typescript/project/vite/test-setup.ts.tpl +1 -0
  295. package/templates/typescript/project/vite/tsconfig.build.json.tpl +1 -0
  296. package/templates/typescript/project/vite/tsconfig.json.tpl +1 -0
  297. package/templates/typescript/project/vite/tsconfig.node.json.tpl +1 -0
  298. package/templates/typescript/project/vite/vite.config.ts.tpl +18 -0
  299. package/templates/typescript/service.api.ts.tpl +27 -0
  300. package/templates/typescript/service.class.ts.tpl +28 -0
  301. package/templates/typescript/service.handler.ts.tpl +42 -0
  302. package/templates/typescript/service.schema.ts.tpl +16 -0
@@ -0,0 +1,78 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint-and-test:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Setup Bun
17
+ uses: oven-sh/setup-bun@v1
18
+ with:
19
+ bun-version: latest
20
+
21
+ - name: Install dependencies
22
+ run: bun install
23
+
24
+ - name: Lint
25
+ run: bun run lint
26
+ continue-on-error: true
27
+
28
+ - name: Type check
29
+ run: bun run typecheck
30
+ continue-on-error: true
31
+
32
+ - name: Test
33
+ run: bun test
34
+ continue-on-error: true
35
+
36
+ {{#if backend}}
37
+ {{#unless (eq backend "none")}}
38
+ build-backend:
39
+ runs-on: ubuntu-latest
40
+ needs: lint-and-test
41
+
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+
45
+ - name: Setup Bun
46
+ uses: oven-sh/setup-bun@v1
47
+ with:
48
+ bun-version: latest
49
+
50
+ - name: Install dependencies
51
+ run: bun install
52
+
53
+ - name: Build backend
54
+ run: bun run build:backend
55
+ {{/unless}}
56
+ {{/if}}
57
+
58
+ {{#if frontend}}
59
+ {{#unless (eq frontend "none")}}
60
+ build-frontend:
61
+ runs-on: ubuntu-latest
62
+ needs: lint-and-test
63
+
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+
67
+ - name: Setup Bun
68
+ uses: oven-sh/setup-bun@v1
69
+ with:
70
+ bun-version: latest
71
+
72
+ - name: Install dependencies
73
+ run: bun install
74
+
75
+ - name: Build frontend
76
+ run: bun run build:frontend
77
+ {{/unless}}
78
+ {{/if}}
@@ -0,0 +1,60 @@
1
+ name: Deploy
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ env:
9
+ REGISTRY: ghcr.io
10
+ IMAGE_NAME: ${{ github.repository }}
11
+
12
+ jobs:
13
+ build-and-push:
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: read
17
+ packages: write
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Log in to Container Registry
23
+ uses: docker/login-action@v3
24
+ with:
25
+ registry: ${{ env.REGISTRY }}
26
+ username: ${{ github.actor }}
27
+ password: ${{ secrets.GITHUB_TOKEN }}
28
+
29
+ - name: Extract metadata
30
+ id: meta
31
+ uses: docker/metadata-action@v5
32
+ with:
33
+ images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
34
+ tags: |
35
+ type=ref,event=branch
36
+ type=sha,prefix=
37
+
38
+ {{#if backend}}
39
+ {{#unless (eq backend "none")}}
40
+ - name: Build and push backend
41
+ uses: docker/build-push-action@v5
42
+ with:
43
+ context: ./{{backendDir}}
44
+ push: true
45
+ tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-backend:${{ steps.meta.outputs.version }}
46
+ target: production
47
+ {{/unless}}
48
+ {{/if}}
49
+
50
+ {{#if frontend}}
51
+ {{#unless (eq frontend "none")}}
52
+ - name: Build and push frontend
53
+ uses: docker/build-push-action@v5
54
+ with:
55
+ context: ./{{frontendDir}}
56
+ push: true
57
+ tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-frontend:${{ steps.meta.outputs.version }}
58
+ target: production
59
+ {{/unless}}
60
+ {{/if}}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Just Command Runner Module
3
+ */
4
+
5
+ import { dirname, resolve } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+ const templatesDir = resolve(__dirname, "templates");
10
+
11
+ export default function (data) {
12
+ return [
13
+ {
14
+ type: "add",
15
+ path: "{{projectDir}}/justfile",
16
+ templateFile: `${templatesDir}/justfile.hbs`,
17
+ data,
18
+ },
19
+ ];
20
+ }
21
+
22
+ export const description = "Just command runner recipes";
23
+
24
+ export const scripts = {
25
+ just: "just",
26
+ };
@@ -0,0 +1,205 @@
1
+ # {{titleCase name}} - Project Commands
2
+ # Run `just` to see available recipes
3
+
4
+ set dotenv-load
5
+
6
+ # Default recipe: show help
7
+ default:
8
+ @just --list
9
+
10
+ # Development
11
+ # -----------
12
+
13
+ # Start development server
14
+ dev:
15
+ {{#if (eq backend "node-hono")}}
16
+ bun run --watch {{backendDir}}/src/index.ts
17
+ {{else if (eq backend "node-express")}}
18
+ bun run --watch {{backendDir}}/src/index.ts
19
+ {{else if (eq backend "python-fastapi")}}
20
+ cd {{backendDir}} && uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
21
+ {{else if (eq backend "rust-axum")}}
22
+ cd {{backendDir}} && cargo watch -x run
23
+ {{else if (eq backend "go-chi")}}
24
+ cd {{backendDir}} && air
25
+ {{else if (eq backend "kotlin-ktor")}}
26
+ cd {{backendDir}} && ./gradlew run --continuous
27
+ {{else}}
28
+ @echo "Starting development server..."
29
+ bun run dev
30
+ {{/if}}
31
+
32
+ # Run tests
33
+ test *args:
34
+ {{#if (eq backend "python-fastapi")}}
35
+ cd {{backendDir}} && pytest {{{{raw}}}}{{args}}{{{{/raw}}}}
36
+ {{else if (eq backend "rust-axum")}}
37
+ cd {{backendDir}} && cargo test {{{{raw}}}}{{args}}{{{{/raw}}}}
38
+ {{else if (eq backend "go-chi")}}
39
+ cd {{backendDir}} && go test ./... {{{{raw}}}}{{args}}{{{{/raw}}}}
40
+ {{else if (eq backend "kotlin-ktor")}}
41
+ cd {{backendDir}} && ./gradlew test {{{{raw}}}}{{args}}{{{{/raw}}}}
42
+ {{else}}
43
+ bun test {{{{raw}}}}{{args}}{{{{/raw}}}}
44
+ {{/if}}
45
+
46
+ # Run linter
47
+ lint:
48
+ {{#if (eq backend "python-fastapi")}}
49
+ cd {{backendDir}} && ruff check . && ruff format --check .
50
+ {{else if (eq backend "rust-axum")}}
51
+ cd {{backendDir}} && cargo clippy -- -D warnings
52
+ {{else if (eq backend "go-chi")}}
53
+ cd {{backendDir}} && golangci-lint run
54
+ {{else}}
55
+ bun run lint
56
+ {{/if}}
57
+
58
+ # Format code
59
+ fmt:
60
+ {{#if (eq backend "python-fastapi")}}
61
+ cd {{backendDir}} && ruff format .
62
+ {{else if (eq backend "rust-axum")}}
63
+ cd {{backendDir}} && cargo fmt
64
+ {{else if (eq backend "go-chi")}}
65
+ cd {{backendDir}} && gofmt -w .
66
+ {{else}}
67
+ bun run format
68
+ {{/if}}
69
+
70
+ # Build
71
+ # -----
72
+
73
+ # Build for production
74
+ build:
75
+ {{#if (eq backend "rust-axum")}}
76
+ cd {{backendDir}} && cargo build --release
77
+ {{else if (eq backend "go-chi")}}
78
+ cd {{backendDir}} && go build -o bin/server ./cmd/server
79
+ {{else if (eq backend "kotlin-ktor")}}
80
+ cd {{backendDir}} && ./gradlew build
81
+ {{else}}
82
+ bun run build
83
+ {{/if}}
84
+
85
+ # Clean build artifacts
86
+ clean:
87
+ {{#if (eq backend "rust-axum")}}
88
+ cd {{backendDir}} && cargo clean
89
+ {{else if (eq backend "go-chi")}}
90
+ rm -rf {{backendDir}}/bin
91
+ {{else if (eq backend "kotlin-ktor")}}
92
+ cd {{backendDir}} && ./gradlew clean
93
+ {{else}}
94
+ rm -rf dist node_modules/.cache
95
+ {{/if}}
96
+
97
+ # Docker
98
+ # ------
99
+
100
+ # Start all services with docker-compose
101
+ up *args:
102
+ docker compose up -d {{{{raw}}}}{{args}}{{{{/raw}}}}
103
+
104
+ # Stop all services
105
+ down:
106
+ docker compose down
107
+
108
+ # View logs
109
+ logs *service:
110
+ docker compose logs -f {{{{raw}}}}{{service}}{{{{/raw}}}}
111
+
112
+ # Rebuild and restart containers
113
+ rebuild *service:
114
+ docker compose up -d --build {{{{raw}}}}{{service}}{{{{/raw}}}}
115
+
116
+ {{#if database}}
117
+ # Database
118
+ # --------
119
+
120
+ # Run database migrations
121
+ db-migrate:
122
+ {{#if (eq database "postgres-drizzle")}}
123
+ bun run drizzle-kit push
124
+ {{else}}
125
+ @echo "Run database migrations"
126
+ {{/if}}
127
+
128
+ # Generate migration from schema changes
129
+ db-generate:
130
+ {{#if (eq database "postgres-drizzle")}}
131
+ bun run drizzle-kit generate
132
+ {{else}}
133
+ @echo "Generate database migration"
134
+ {{/if}}
135
+
136
+ # Open database studio/UI
137
+ db-studio:
138
+ {{#if (eq database "postgres-drizzle")}}
139
+ bun run drizzle-kit studio
140
+ {{else}}
141
+ @echo "Open database UI"
142
+ {{/if}}
143
+
144
+ # Reset database (drop and recreate)
145
+ db-reset:
146
+ docker compose down -v
147
+ docker compose up -d db
148
+ @echo "Waiting for database to be ready..."
149
+ sleep 3
150
+ just db-migrate
151
+ {{/if}}
152
+
153
+ {{#if (has infra "kubernetes")}}
154
+ # Kubernetes
155
+ # ----------
156
+
157
+ # Apply kubernetes manifests (dev)
158
+ k8s-apply:
159
+ kubectl apply -k k8s/overlays/dev
160
+
161
+ # Delete kubernetes resources (dev)
162
+ k8s-delete:
163
+ kubectl delete -k k8s/overlays/dev
164
+
165
+ # View pod logs
166
+ k8s-logs:
167
+ kubectl logs -l app={{kebabCase name}} -f
168
+
169
+ # Get pod status
170
+ k8s-status:
171
+ kubectl get pods -l app={{kebabCase name}}
172
+ {{/if}}
173
+
174
+ # Utilities
175
+ # ---------
176
+
177
+ # Install dependencies
178
+ install:
179
+ {{#if (eq backend "python-fastapi")}}
180
+ cd {{backendDir}} && pip install -r requirements.txt -r requirements-dev.txt
181
+ {{else if (eq backend "rust-axum")}}
182
+ cd {{backendDir}} && cargo fetch
183
+ {{else if (eq backend "go-chi")}}
184
+ cd {{backendDir}} && go mod download
185
+ {{else if (eq backend "kotlin-ktor")}}
186
+ cd {{backendDir}} && ./gradlew dependencies
187
+ {{else}}
188
+ bun install
189
+ {{/if}}
190
+
191
+ # Check for outdated dependencies
192
+ outdated:
193
+ {{#if (eq backend "python-fastapi")}}
194
+ cd {{backendDir}} && pip list --outdated
195
+ {{else if (eq backend "rust-axum")}}
196
+ cd {{backendDir}} && cargo outdated
197
+ {{else if (eq backend "go-chi")}}
198
+ cd {{backendDir}} && go list -u -m all
199
+ {{else}}
200
+ bun outdated
201
+ {{/if}}
202
+
203
+ # Run a shell in the backend container
204
+ shell:
205
+ docker compose exec backend sh
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Kubernetes Infrastructure Module
3
+ */
4
+
5
+ import { dirname, resolve } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+ const templatesDir = resolve(__dirname, "templates");
10
+
11
+ export default function (data) {
12
+ return [
13
+ {
14
+ type: "addMany",
15
+ destination: "{{projectDir}}",
16
+ base: templatesDir,
17
+ templateFiles: `${templatesDir}/**/*.hbs`,
18
+ stripExtensions: ["hbs"],
19
+ data,
20
+ },
21
+ ];
22
+ }
23
+
24
+ export const description = "Kubernetes deployment manifests";
25
+
26
+ export const scripts = {
27
+ "k8s:apply": "kubectl apply -k k8s/overlays/dev",
28
+ "k8s:delete": "kubectl delete -k k8s/overlays/dev",
29
+ "k8s:logs": "kubectl logs -l app={{kebabCase name}} -f",
30
+ };
@@ -0,0 +1,48 @@
1
+ apiVersion: apps/v1
2
+ kind: Deployment
3
+ metadata:
4
+ name: {{kebabCase name}}
5
+ labels:
6
+ app: {{kebabCase name}}
7
+ spec:
8
+ replicas: 2
9
+ selector:
10
+ matchLabels:
11
+ app: {{kebabCase name}}
12
+ template:
13
+ metadata:
14
+ labels:
15
+ app: {{kebabCase name}}
16
+ spec:
17
+ containers:
18
+ - name: {{kebabCase name}}
19
+ image: {{kebabCase name}}:latest
20
+ ports:
21
+ - containerPort: 3000
22
+ env:
23
+ - name: NODE_ENV
24
+ value: "production"
25
+ - name: PORT
26
+ value: "3000"
27
+ envFrom:
28
+ - secretRef:
29
+ name: {{kebabCase name}}-secrets
30
+ resources:
31
+ requests:
32
+ memory: "128Mi"
33
+ cpu: "100m"
34
+ limits:
35
+ memory: "256Mi"
36
+ cpu: "500m"
37
+ livenessProbe:
38
+ httpGet:
39
+ path: /health/live
40
+ port: 3000
41
+ initialDelaySeconds: 10
42
+ periodSeconds: 10
43
+ readinessProbe:
44
+ httpGet:
45
+ path: /health/ready
46
+ port: 3000
47
+ initialDelaySeconds: 5
48
+ periodSeconds: 5
@@ -0,0 +1,23 @@
1
+ apiVersion: networking.k8s.io/v1
2
+ kind: Ingress
3
+ metadata:
4
+ name: {{kebabCase name}}
5
+ annotations:
6
+ kubernetes.io/ingress.class: nginx
7
+ cert-manager.io/cluster-issuer: letsencrypt-prod
8
+ spec:
9
+ tls:
10
+ - hosts:
11
+ - {{kebabCase name}}.example.com
12
+ secretName: {{kebabCase name}}-tls
13
+ rules:
14
+ - host: {{kebabCase name}}.example.com
15
+ http:
16
+ paths:
17
+ - path: /
18
+ pathType: Prefix
19
+ backend:
20
+ service:
21
+ name: {{kebabCase name}}
22
+ port:
23
+ number: 80
@@ -0,0 +1,11 @@
1
+ apiVersion: kustomize.config.k8s.io/v1beta1
2
+ kind: Kustomization
3
+
4
+ resources:
5
+ - deployment.yaml
6
+ - service.yaml
7
+ - ingress.yaml
8
+
9
+ commonLabels:
10
+ app.kubernetes.io/name: {{kebabCase name}}
11
+ app.kubernetes.io/managed-by: kustomize
@@ -0,0 +1,15 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: {{kebabCase name}}
5
+ labels:
6
+ app: {{kebabCase name}}
7
+ spec:
8
+ type: ClusterIP
9
+ ports:
10
+ - port: 80
11
+ targetPort: 3000
12
+ protocol: TCP
13
+ name: http
14
+ selector:
15
+ app: {{kebabCase name}}
@@ -0,0 +1,17 @@
1
+ apiVersion: apps/v1
2
+ kind: Deployment
3
+ metadata:
4
+ name: {{kebabCase name}}
5
+ spec:
6
+ replicas: 1
7
+ template:
8
+ spec:
9
+ containers:
10
+ - name: {{kebabCase name}}
11
+ resources:
12
+ requests:
13
+ memory: "64Mi"
14
+ cpu: "50m"
15
+ limits:
16
+ memory: "128Mi"
17
+ cpu: "200m"
@@ -0,0 +1,15 @@
1
+ apiVersion: kustomize.config.k8s.io/v1beta1
2
+ kind: Kustomization
3
+
4
+ namespace: {{kebabCase name}}-dev
5
+
6
+ resources:
7
+ - ../../base
8
+
9
+ patches:
10
+ - path: deployment-patch.yaml
11
+
12
+ configMapGenerator:
13
+ - name: {{kebabCase name}}-config
14
+ literals:
15
+ - NODE_ENV=development
@@ -0,0 +1,17 @@
1
+ apiVersion: apps/v1
2
+ kind: Deployment
3
+ metadata:
4
+ name: {{kebabCase name}}
5
+ spec:
6
+ replicas: 3
7
+ template:
8
+ spec:
9
+ containers:
10
+ - name: {{kebabCase name}}
11
+ resources:
12
+ requests:
13
+ memory: "256Mi"
14
+ cpu: "200m"
15
+ limits:
16
+ memory: "512Mi"
17
+ cpu: "1000m"
@@ -0,0 +1,15 @@
1
+ apiVersion: kustomize.config.k8s.io/v1beta1
2
+ kind: Kustomization
3
+
4
+ namespace: {{kebabCase name}}-prod
5
+
6
+ resources:
7
+ - ../../base
8
+
9
+ patches:
10
+ - path: deployment-patch.yaml
11
+
12
+ configMapGenerator:
13
+ - name: {{kebabCase name}}-config
14
+ literals:
15
+ - NODE_ENV=production
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Pulumi Infrastructure Module
3
+ */
4
+
5
+ import { dirname, resolve } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+ const templatesDir = resolve(__dirname, "templates");
10
+
11
+ export default function (data) {
12
+ return [
13
+ {
14
+ type: "addMany",
15
+ destination: "{{projectDir}}/infra/pulumi",
16
+ base: templatesDir,
17
+ templateFiles: `${templatesDir}/**/*.hbs`,
18
+ stripExtensions: ["hbs"],
19
+ data,
20
+ },
21
+ ];
22
+ }
23
+
24
+ export const description = "Pulumi infrastructure as code (TypeScript)";
25
+
26
+ export const scripts = {
27
+ "pulumi:preview": "cd infra/pulumi && pulumi preview",
28
+ "pulumi:up": "cd infra/pulumi && pulumi up",
29
+ "pulumi:destroy": "cd infra/pulumi && pulumi destroy",
30
+ };
@@ -0,0 +1,5 @@
1
+ # Pulumi
2
+ bin/
3
+ node_modules/
4
+ Pulumi.*.yaml
5
+ !Pulumi.dev.yaml
@@ -0,0 +1,3 @@
1
+ config:
2
+ {{kebabCase name}}-infra:environment: dev
3
+ {{kebabCase name}}-infra:appPort: "3000"
@@ -0,0 +1,7 @@
1
+ name: {{kebabCase name}}-infra
2
+ runtime: nodejs
3
+ description: Infrastructure for {{titleCase name}}
4
+ config:
5
+ pulumi:tags:
6
+ value:
7
+ pulumi:template: ""
@@ -0,0 +1,26 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+
3
+ // Configuration
4
+ const config = new pulumi.Config();
5
+ const environment = config.get("environment") || "dev";
6
+ const appPort = config.getNumber("appPort") || 3000;
7
+
8
+ // Common tags for all resources
9
+ const commonTags = {
10
+ Project: "{{kebabCase name}}",
11
+ Environment: environment,
12
+ ManagedBy: "pulumi",
13
+ };
14
+
15
+ // Export stack outputs
16
+ export const projectName = "{{kebabCase name}}";
17
+ export const env = environment;
18
+
19
+ // Example: Create resources based on your cloud provider
20
+ // import * as aws from "@pulumi/aws";
21
+ //
22
+ // const bucket = new aws.s3.Bucket("{{kebabCase name}}-bucket", {
23
+ // tags: commonTags,
24
+ // });
25
+ //
26
+ // export const bucketName = bucket.bucket;
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "{{kebabCase name}}-infra",
3
+ "version": "0.1.0",
4
+ "main": "index.ts",
5
+ "devDependencies": {
6
+ "@types/node": "^20.0.0",
7
+ "typescript": "^5.0.0"
8
+ },
9
+ "dependencies": {
10
+ "@pulumi/pulumi": "^3.0.0"
11
+ }
12
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "outDir": "bin",
5
+ "target": "ES2020",
6
+ "module": "commonjs",
7
+ "moduleResolution": "node",
8
+ "sourceMap": true,
9
+ "experimentalDecorators": true,
10
+ "pretty": true,
11
+ "noFallthroughCasesInSwitch": true,
12
+ "noImplicitReturns": true,
13
+ "forceConsistentCasingInFileNames": true
14
+ },
15
+ "files": ["index.ts"]
16
+ }