@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,9 @@
1
+ {
2
+ "preset": "{{presetId}}",
3
+ "language": "{{language}}",
4
+ "storage": "markdown",
5
+ "sync": {
6
+ "autoDetectPackages": true,
7
+ "createMarkdownEntities": true
8
+ }
9
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * CLI Tool Preset - Node.js/TypeScript
3
+ *
4
+ * Initializes .arbiter/ directory for a Node.js CLI tool or library.
5
+ * Creates minimal structure - use `arbiter sync` to detect packages.
6
+ */
7
+
8
+ import { dirname, resolve } from "node:path";
9
+ import { fileURLToPath } from "node:url";
10
+
11
+ const __dirname = dirname(fileURLToPath(import.meta.url));
12
+ const templatesDir = resolve(__dirname, "templates");
13
+
14
+ export default function (data) {
15
+ return [
16
+ // Create .arbiter/README.md
17
+ {
18
+ type: "add",
19
+ path: "{{projectDir}}/.arbiter/README.md",
20
+ templateFile: `${templatesDir}/README.md.hbs`,
21
+ data: {
22
+ ...data,
23
+ presetId: "cli-node",
24
+ language: "typescript",
25
+ },
26
+ },
27
+ // Create .arbiter/config.json
28
+ {
29
+ type: "add",
30
+ path: "{{projectDir}}/.arbiter/config.json",
31
+ templateFile: `${templatesDir}/config.json.hbs`,
32
+ data: {
33
+ ...data,
34
+ presetId: "cli-node",
35
+ language: "typescript",
36
+ },
37
+ },
38
+ ];
39
+ }
40
+
41
+ export const id = "cli-node";
42
+ export const name = "CLI Tool (Node.js/TypeScript)";
43
+ export const description = "Command-line tool or library using Node.js/TypeScript/Bun";
44
+ export const language = "typescript";
45
+ export const category = "cli";
@@ -0,0 +1,42 @@
1
+ ---
2
+ type: project
3
+ entityId: {{uuid}}
4
+ createdAt: {{timestamp}}
5
+ updatedAt: {{timestamp}}
6
+ preset: {{presetId}}
7
+ language: {{language}}
8
+ tags:
9
+ - cli
10
+ - {{language}}
11
+ ---
12
+
13
+ # {{name}}
14
+
15
+ Command-line tool built with {{language}}.
16
+
17
+ ## Getting Started
18
+
19
+ Run `arbiter sync` to detect packages and create service entities.
20
+
21
+ ```bash
22
+ arbiter sync
23
+ ```
24
+
25
+ ## Viewing Your Spec
26
+
27
+ - **CLI**: `arbiter list service`, `arbiter list package`
28
+ - **Browser**: `arbiter view` to start documentation server
29
+ - **Obsidian**: Open `.arbiter/` folder as a vault
30
+
31
+ ## Adding Entities
32
+
33
+ ```bash
34
+ # Add a service
35
+ arbiter add service my-service --language {{language}}
36
+
37
+ # Add a task
38
+ arbiter add task "Implement feature X"
39
+
40
+ # Add a group (milestone)
41
+ arbiter add group "v1.0 Release"
42
+ ```
@@ -0,0 +1,9 @@
1
+ {
2
+ "preset": "{{presetId}}",
3
+ "language": "{{language}}",
4
+ "storage": "markdown",
5
+ "sync": {
6
+ "autoDetectPackages": true,
7
+ "createMarkdownEntities": true
8
+ }
9
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * CLI Tool Preset - Python
3
+ *
4
+ * Initializes .arbiter/ directory for a Python CLI tool or library.
5
+ * Creates minimal structure - use `arbiter sync` to detect packages.
6
+ */
7
+
8
+ import { dirname, resolve } from "node:path";
9
+ import { fileURLToPath } from "node:url";
10
+
11
+ const __dirname = dirname(fileURLToPath(import.meta.url));
12
+ const templatesDir = resolve(__dirname, "templates");
13
+
14
+ export default function (data) {
15
+ return [
16
+ {
17
+ type: "add",
18
+ path: "{{projectDir}}/.arbiter/README.md",
19
+ templateFile: `${templatesDir}/README.md.hbs`,
20
+ data: {
21
+ ...data,
22
+ presetId: "cli-python",
23
+ language: "python",
24
+ },
25
+ },
26
+ {
27
+ type: "add",
28
+ path: "{{projectDir}}/.arbiter/config.json",
29
+ templateFile: `${templatesDir}/config.json.hbs`,
30
+ data: {
31
+ ...data,
32
+ presetId: "cli-python",
33
+ language: "python",
34
+ },
35
+ },
36
+ ];
37
+ }
38
+
39
+ export const id = "cli-python";
40
+ export const name = "CLI Tool (Python)";
41
+ export const description = "Command-line tool or library using Python";
42
+ export const language = "python";
43
+ export const category = "cli";
@@ -0,0 +1,42 @@
1
+ ---
2
+ type: project
3
+ entityId: {{uuid}}
4
+ createdAt: {{timestamp}}
5
+ updatedAt: {{timestamp}}
6
+ preset: {{presetId}}
7
+ language: {{language}}
8
+ tags:
9
+ - cli
10
+ - {{language}}
11
+ ---
12
+
13
+ # {{name}}
14
+
15
+ Command-line tool built with {{language}}.
16
+
17
+ ## Getting Started
18
+
19
+ Run `arbiter sync` to detect packages and create service entities.
20
+
21
+ ```bash
22
+ arbiter sync
23
+ ```
24
+
25
+ ## Viewing Your Spec
26
+
27
+ - **CLI**: `arbiter list service`, `arbiter list package`
28
+ - **Browser**: `arbiter view` to start documentation server
29
+ - **Obsidian**: Open `.arbiter/` folder as a vault
30
+
31
+ ## Adding Entities
32
+
33
+ ```bash
34
+ # Add a service
35
+ arbiter add service my-service --language {{language}}
36
+
37
+ # Add a task
38
+ arbiter add task "Implement feature X"
39
+
40
+ # Add a group (milestone)
41
+ arbiter add group "v1.0 Release"
42
+ ```
@@ -0,0 +1,9 @@
1
+ {
2
+ "preset": "{{presetId}}",
3
+ "language": "{{language}}",
4
+ "storage": "markdown",
5
+ "sync": {
6
+ "autoDetectPackages": true,
7
+ "createMarkdownEntities": true
8
+ }
9
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * CLI Tool Preset - Rust
3
+ *
4
+ * Initializes .arbiter/ directory for a Rust CLI tool or library.
5
+ * Creates minimal structure - use `arbiter sync` to detect packages.
6
+ */
7
+
8
+ import { dirname, resolve } from "node:path";
9
+ import { fileURLToPath } from "node:url";
10
+
11
+ const __dirname = dirname(fileURLToPath(import.meta.url));
12
+ const templatesDir = resolve(__dirname, "templates");
13
+
14
+ export default function (data) {
15
+ return [
16
+ {
17
+ type: "add",
18
+ path: "{{projectDir}}/.arbiter/README.md",
19
+ templateFile: `${templatesDir}/README.md.hbs`,
20
+ data: {
21
+ ...data,
22
+ presetId: "cli-rust",
23
+ language: "rust",
24
+ },
25
+ },
26
+ {
27
+ type: "add",
28
+ path: "{{projectDir}}/.arbiter/config.json",
29
+ templateFile: `${templatesDir}/config.json.hbs`,
30
+ data: {
31
+ ...data,
32
+ presetId: "cli-rust",
33
+ language: "rust",
34
+ },
35
+ },
36
+ ];
37
+ }
38
+
39
+ export const id = "cli-rust";
40
+ export const name = "CLI Tool (Rust)";
41
+ export const description = "Command-line tool or library using Rust";
42
+ export const language = "rust";
43
+ export const category = "cli";
@@ -0,0 +1,42 @@
1
+ ---
2
+ type: project
3
+ entityId: {{uuid}}
4
+ createdAt: {{timestamp}}
5
+ updatedAt: {{timestamp}}
6
+ preset: {{presetId}}
7
+ language: {{language}}
8
+ tags:
9
+ - cli
10
+ - {{language}}
11
+ ---
12
+
13
+ # {{name}}
14
+
15
+ Command-line tool built with {{language}}.
16
+
17
+ ## Getting Started
18
+
19
+ Run `arbiter sync` to detect packages and create service entities.
20
+
21
+ ```bash
22
+ arbiter sync
23
+ ```
24
+
25
+ ## Viewing Your Spec
26
+
27
+ - **CLI**: `arbiter list service`, `arbiter list package`
28
+ - **Browser**: `arbiter view` to start documentation server
29
+ - **Obsidian**: Open `.arbiter/` folder as a vault
30
+
31
+ ## Adding Entities
32
+
33
+ ```bash
34
+ # Add a service
35
+ arbiter add service my-service --language {{language}}
36
+
37
+ # Add a task
38
+ arbiter add task "Implement feature X"
39
+
40
+ # Add a group (milestone)
41
+ arbiter add group "v1.0 Release"
42
+ ```
@@ -0,0 +1,9 @@
1
+ {
2
+ "preset": "{{presetId}}",
3
+ "language": "{{language}}",
4
+ "storage": "markdown",
5
+ "sync": {
6
+ "autoDetectPackages": true,
7
+ "createMarkdownEntities": true
8
+ }
9
+ }
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Preset Loader
3
+ *
4
+ * Discovers and loads init presets from:
5
+ * 1. Project-level: .arbiter/presets/
6
+ * 2. User-level: ~/.arbiter/presets/
7
+ * 3. Built-in: this directory
8
+ */
9
+
10
+ import { homedir } from "node:os";
11
+ import { dirname, join, resolve } from "node:path";
12
+ import { fileURLToPath } from "node:url";
13
+ import { pathExists, readdir } from "fs-extra";
14
+
15
+ const __dirname = dirname(fileURLToPath(import.meta.url));
16
+
17
+ /**
18
+ * Get search paths for presets (project → user → builtin)
19
+ */
20
+ export function getPresetSearchPaths(projectDir) {
21
+ const paths = [];
22
+
23
+ // Project-level presets
24
+ if (projectDir) {
25
+ paths.push(join(projectDir, ".arbiter", "presets"));
26
+ }
27
+
28
+ // User-level presets
29
+ paths.push(join(homedir(), ".arbiter", "presets"));
30
+
31
+ // Built-in presets
32
+ paths.push(__dirname);
33
+
34
+ return paths;
35
+ }
36
+
37
+ /**
38
+ * List all available presets
39
+ */
40
+ export async function listPresets(projectDir) {
41
+ const presets = new Map(); // Use Map to handle overrides (first found wins)
42
+ const searchPaths = getPresetSearchPaths(projectDir);
43
+
44
+ for (const basePath of searchPaths) {
45
+ if (!(await pathExists(basePath))) continue;
46
+
47
+ try {
48
+ const entries = await readdir(basePath, { withFileTypes: true });
49
+
50
+ for (const entry of entries) {
51
+ if (!entry.isDirectory()) continue;
52
+ if (entry.name.startsWith("_") || entry.name.startsWith(".")) continue;
53
+ if (entry.name === "loader.js") continue;
54
+
55
+ // Check if module.js exists
56
+ const modulePath = join(basePath, entry.name, "module.js");
57
+ if (!(await pathExists(modulePath))) continue;
58
+
59
+ // Only add if not already found (project overrides user overrides builtin)
60
+ if (!presets.has(entry.name)) {
61
+ try {
62
+ const mod = await import(modulePath);
63
+ presets.set(entry.name, {
64
+ id: mod.id || entry.name,
65
+ name: mod.name || entry.name,
66
+ description: mod.description || "",
67
+ language: mod.language,
68
+ category: mod.category,
69
+ path: modulePath,
70
+ source:
71
+ basePath === __dirname
72
+ ? "builtin"
73
+ : basePath.includes(".arbiter/presets")
74
+ ? "project"
75
+ : "user",
76
+ });
77
+ } catch (err) {
78
+ console.warn(`Warning: Failed to load preset ${entry.name}: ${err.message}`);
79
+ }
80
+ }
81
+ }
82
+ } catch {
83
+ // Directory not readable
84
+ }
85
+ }
86
+
87
+ return Array.from(presets.values());
88
+ }
89
+
90
+ /**
91
+ * Load a preset module by ID
92
+ */
93
+ export async function loadPreset(presetId, projectDir) {
94
+ const searchPaths = getPresetSearchPaths(projectDir);
95
+
96
+ for (const basePath of searchPaths) {
97
+ const modulePath = join(basePath, presetId, "module.js");
98
+
99
+ if (await pathExists(modulePath)) {
100
+ return import(modulePath);
101
+ }
102
+ }
103
+
104
+ throw new Error(`Preset not found: ${presetId}`);
105
+ }
106
+
107
+ /**
108
+ * Execute a preset with the given context
109
+ */
110
+ export async function executePreset(presetId, context, projectDir) {
111
+ const mod = await loadPreset(presetId, projectDir);
112
+
113
+ if (typeof mod.default !== "function") {
114
+ throw new Error(`Preset ${presetId} does not export a default function`);
115
+ }
116
+
117
+ return mod.default(context);
118
+ }
119
+
120
+ export default {
121
+ getPresetSearchPaths,
122
+ listPresets,
123
+ loadPreset,
124
+ executePreset,
125
+ };
@@ -0,0 +1,186 @@
1
+ /**
2
+ * Plop Generator for TypeScript Services
3
+ *
4
+ * Generates a TypeScript service with Express/Hono structure.
5
+ */
6
+
7
+ export default function (plop) {
8
+ // Case helpers
9
+ plop.setHelper("camelCase", (str) => {
10
+ if (!str) return "";
11
+ return str
12
+ .replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ""))
13
+ .replace(/^(.)/, (c) => c.toLowerCase());
14
+ });
15
+
16
+ plop.setHelper("pascalCase", (str) => {
17
+ if (!str) return "";
18
+ return str
19
+ .replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ""))
20
+ .replace(/^(.)/, (c) => c.toUpperCase());
21
+ });
22
+
23
+ plop.setHelper("kebabCase", (str) => {
24
+ if (!str) return "";
25
+ return str
26
+ .replace(/([a-z])([A-Z])/g, "$1-$2")
27
+ .replace(/[_\s]+/g, "-")
28
+ .toLowerCase();
29
+ });
30
+
31
+ plop.setHelper("snakeCase", (str) => {
32
+ if (!str) return "";
33
+ return str
34
+ .replace(/([a-z])([A-Z])/g, "$1_$2")
35
+ .replace(/[-\s]+/g, "_")
36
+ .toLowerCase();
37
+ });
38
+
39
+ // Default generator
40
+ plop.setGenerator("default", {
41
+ description: "Generate a TypeScript service",
42
+ prompts: [
43
+ {
44
+ type: "input",
45
+ name: "name",
46
+ message: "Service name:",
47
+ when: (answers) => !answers.name,
48
+ },
49
+ {
50
+ type: "list",
51
+ name: "framework",
52
+ message: "Framework:",
53
+ choices: ["hono", "express", "fastify"],
54
+ default: "hono",
55
+ when: (answers) => !answers.framework,
56
+ },
57
+ {
58
+ type: "confirm",
59
+ name: "includeDb",
60
+ message: "Include database setup?",
61
+ default: true,
62
+ when: (answers) => answers.includeDb === undefined,
63
+ },
64
+ ],
65
+ actions: (data) => {
66
+ const actions = [];
67
+ const basePath = "{{kebabCase name}}";
68
+
69
+ // Package.json
70
+ actions.push({
71
+ type: "add",
72
+ path: `${basePath}/package.json`,
73
+ templateFile: "templates/package.json.hbs",
74
+ });
75
+
76
+ // Main entry
77
+ actions.push({
78
+ type: "add",
79
+ path: `${basePath}/src/index.ts`,
80
+ templateFile: "templates/index.ts.hbs",
81
+ });
82
+
83
+ // Routes
84
+ actions.push({
85
+ type: "add",
86
+ path: `${basePath}/src/routes/index.ts`,
87
+ templateFile: "templates/routes/index.ts.hbs",
88
+ });
89
+
90
+ // Health route
91
+ actions.push({
92
+ type: "add",
93
+ path: `${basePath}/src/routes/health.ts`,
94
+ templateFile: "templates/routes/health.ts.hbs",
95
+ });
96
+
97
+ // Config
98
+ actions.push({
99
+ type: "add",
100
+ path: `${basePath}/src/config.ts`,
101
+ templateFile: "templates/config.ts.hbs",
102
+ });
103
+
104
+ // Types
105
+ actions.push({
106
+ type: "add",
107
+ path: `${basePath}/src/types.ts`,
108
+ templateFile: "templates/types.ts.hbs",
109
+ });
110
+
111
+ // Database setup if requested
112
+ if (data.includeDb) {
113
+ actions.push({
114
+ type: "add",
115
+ path: `${basePath}/src/db/index.ts`,
116
+ templateFile: "templates/db/index.ts.hbs",
117
+ });
118
+ actions.push({
119
+ type: "add",
120
+ path: `${basePath}/src/db/schema.ts`,
121
+ templateFile: "templates/db/schema.ts.hbs",
122
+ });
123
+ }
124
+
125
+ // Dockerfile
126
+ actions.push({
127
+ type: "add",
128
+ path: `${basePath}/Dockerfile`,
129
+ templateFile: "templates/Dockerfile.hbs",
130
+ });
131
+
132
+ // TypeScript config
133
+ actions.push({
134
+ type: "add",
135
+ path: `${basePath}/tsconfig.json`,
136
+ templateFile: "templates/tsconfig.json.hbs",
137
+ });
138
+
139
+ // README
140
+ actions.push({
141
+ type: "add",
142
+ path: `${basePath}/README.md`,
143
+ templateFile: "templates/README.md.hbs",
144
+ });
145
+
146
+ return actions;
147
+ },
148
+ });
149
+
150
+ // Component generator
151
+ plop.setGenerator("component", {
152
+ description: "Generate a service component (route, middleware, etc.)",
153
+ prompts: [
154
+ {
155
+ type: "list",
156
+ name: "type",
157
+ message: "Component type:",
158
+ choices: ["route", "middleware", "service", "model"],
159
+ },
160
+ {
161
+ type: "input",
162
+ name: "name",
163
+ message: "Component name:",
164
+ },
165
+ ],
166
+ actions: (data) => {
167
+ const actions = [];
168
+ const folder =
169
+ data.type === "route"
170
+ ? "routes"
171
+ : data.type === "middleware"
172
+ ? "middleware"
173
+ : data.type === "model"
174
+ ? "db"
175
+ : "services";
176
+
177
+ actions.push({
178
+ type: "add",
179
+ path: `src/${folder}/{{kebabCase name}}.ts`,
180
+ templateFile: `templates/component/${data.type}.ts.hbs`,
181
+ });
182
+
183
+ return actions;
184
+ },
185
+ });
186
+ }
@@ -0,0 +1,29 @@
1
+ FROM oven/bun:1 AS base
2
+ WORKDIR /app
3
+
4
+ # Install dependencies
5
+ FROM base AS deps
6
+ COPY package.json bun.lockb* ./
7
+ RUN bun install --frozen-lockfile
8
+
9
+ # Build
10
+ FROM base AS builder
11
+ COPY --from=deps /app/node_modules ./node_modules
12
+ COPY . .
13
+ RUN bun run build
14
+
15
+ # Production
16
+ FROM base AS runner
17
+ ENV NODE_ENV=production
18
+
19
+ RUN addgroup --system --gid 1001 nodejs
20
+ RUN adduser --system --uid 1001 service
21
+ USER service
22
+
23
+ COPY --from=builder /app/dist ./dist
24
+ COPY --from=builder /app/package.json ./
25
+
26
+ EXPOSE 3000
27
+ ENV PORT=3000
28
+
29
+ CMD ["bun", "run", "start"]