@cubocicloide/stack-react-fastapi 13.0.6

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 (295) hide show
  1. package/LICENSE +33 -0
  2. package/README.md +66 -0
  3. package/dist/commands/lint/checks/BE/001.d.ts +6 -0
  4. package/dist/commands/lint/checks/BE/001.js +95 -0
  5. package/dist/commands/lint/checks/BE/001.js.map +1 -0
  6. package/dist/commands/lint/checks/BE/002.d.ts +6 -0
  7. package/dist/commands/lint/checks/BE/002.js +30 -0
  8. package/dist/commands/lint/checks/BE/002.js.map +1 -0
  9. package/dist/commands/lint/checks/BE/003.d.ts +11 -0
  10. package/dist/commands/lint/checks/BE/003.js +46 -0
  11. package/dist/commands/lint/checks/BE/003.js.map +1 -0
  12. package/dist/commands/lint/checks/BE/004.d.ts +6 -0
  13. package/dist/commands/lint/checks/BE/004.js +27 -0
  14. package/dist/commands/lint/checks/BE/004.js.map +1 -0
  15. package/dist/commands/lint/checks/BE/005.d.ts +6 -0
  16. package/dist/commands/lint/checks/BE/005.js +107 -0
  17. package/dist/commands/lint/checks/BE/005.js.map +1 -0
  18. package/dist/commands/lint/checks/BE/006.d.ts +6 -0
  19. package/dist/commands/lint/checks/BE/006.js +27 -0
  20. package/dist/commands/lint/checks/BE/006.js.map +1 -0
  21. package/dist/commands/lint/checks/BE/007.d.ts +31 -0
  22. package/dist/commands/lint/checks/BE/007.js +109 -0
  23. package/dist/commands/lint/checks/BE/007.js.map +1 -0
  24. package/dist/commands/lint/checks/BE/008.d.ts +12 -0
  25. package/dist/commands/lint/checks/BE/008.js +57 -0
  26. package/dist/commands/lint/checks/BE/008.js.map +1 -0
  27. package/dist/commands/lint/checks/BE/009.d.ts +12 -0
  28. package/dist/commands/lint/checks/BE/009.js +104 -0
  29. package/dist/commands/lint/checks/BE/009.js.map +1 -0
  30. package/dist/commands/lint/checks/BE/010.d.ts +12 -0
  31. package/dist/commands/lint/checks/BE/010.js +54 -0
  32. package/dist/commands/lint/checks/BE/010.js.map +1 -0
  33. package/dist/commands/lint/checks/BE/011.d.ts +16 -0
  34. package/dist/commands/lint/checks/BE/011.js +46 -0
  35. package/dist/commands/lint/checks/BE/011.js.map +1 -0
  36. package/dist/commands/lint/checks/E2E/001.d.ts +6 -0
  37. package/dist/commands/lint/checks/E2E/001.js +35 -0
  38. package/dist/commands/lint/checks/E2E/001.js.map +1 -0
  39. package/dist/commands/lint/checks/E2E/002.d.ts +6 -0
  40. package/dist/commands/lint/checks/E2E/002.js +37 -0
  41. package/dist/commands/lint/checks/E2E/002.js.map +1 -0
  42. package/dist/commands/lint/checks/E2E/003.d.ts +6 -0
  43. package/dist/commands/lint/checks/E2E/003.js +42 -0
  44. package/dist/commands/lint/checks/E2E/003.js.map +1 -0
  45. package/dist/commands/lint/checks/E2E/004.d.ts +6 -0
  46. package/dist/commands/lint/checks/E2E/004.js +37 -0
  47. package/dist/commands/lint/checks/E2E/004.js.map +1 -0
  48. package/dist/commands/lint/checks/E2E/005.d.ts +6 -0
  49. package/dist/commands/lint/checks/E2E/005.js +47 -0
  50. package/dist/commands/lint/checks/E2E/005.js.map +1 -0
  51. package/dist/commands/lint/checks/E2E/006.d.ts +6 -0
  52. package/dist/commands/lint/checks/E2E/006.js +28 -0
  53. package/dist/commands/lint/checks/E2E/006.js.map +1 -0
  54. package/dist/commands/lint/checks/E2E/007.d.ts +6 -0
  55. package/dist/commands/lint/checks/E2E/007.js +47 -0
  56. package/dist/commands/lint/checks/E2E/007.js.map +1 -0
  57. package/dist/commands/lint/checks/FE/001.d.ts +6 -0
  58. package/dist/commands/lint/checks/FE/001.js +56 -0
  59. package/dist/commands/lint/checks/FE/001.js.map +1 -0
  60. package/dist/commands/lint/checks/FE/002.d.ts +6 -0
  61. package/dist/commands/lint/checks/FE/002.js +80 -0
  62. package/dist/commands/lint/checks/FE/002.js.map +1 -0
  63. package/dist/commands/lint/checks/FE/003.d.ts +6 -0
  64. package/dist/commands/lint/checks/FE/003.js +65 -0
  65. package/dist/commands/lint/checks/FE/003.js.map +1 -0
  66. package/dist/commands/lint/checks/FE/004.d.ts +6 -0
  67. package/dist/commands/lint/checks/FE/004.js +72 -0
  68. package/dist/commands/lint/checks/FE/004.js.map +1 -0
  69. package/dist/commands/lint/checks/FE/005.d.ts +6 -0
  70. package/dist/commands/lint/checks/FE/005.js +103 -0
  71. package/dist/commands/lint/checks/FE/005.js.map +1 -0
  72. package/dist/commands/lint/checks/FE/006.d.ts +6 -0
  73. package/dist/commands/lint/checks/FE/006.js +102 -0
  74. package/dist/commands/lint/checks/FE/006.js.map +1 -0
  75. package/dist/commands/lint/checks/FE/007.d.ts +6 -0
  76. package/dist/commands/lint/checks/FE/007.js +60 -0
  77. package/dist/commands/lint/checks/FE/007.js.map +1 -0
  78. package/dist/commands/lint/checks/FE/008.d.ts +6 -0
  79. package/dist/commands/lint/checks/FE/008.js +115 -0
  80. package/dist/commands/lint/checks/FE/008.js.map +1 -0
  81. package/dist/commands/lint/checks/FE/009.d.ts +6 -0
  82. package/dist/commands/lint/checks/FE/009.js +83 -0
  83. package/dist/commands/lint/checks/FE/009.js.map +1 -0
  84. package/dist/commands/lint/checks/FE/010.d.ts +6 -0
  85. package/dist/commands/lint/checks/FE/010.js +105 -0
  86. package/dist/commands/lint/checks/FE/010.js.map +1 -0
  87. package/dist/commands/lint/checks/FE/011.d.ts +6 -0
  88. package/dist/commands/lint/checks/FE/011.js +43 -0
  89. package/dist/commands/lint/checks/FE/011.js.map +1 -0
  90. package/dist/commands/lint/checks/FE/012.d.ts +6 -0
  91. package/dist/commands/lint/checks/FE/012.js +150 -0
  92. package/dist/commands/lint/checks/FE/012.js.map +1 -0
  93. package/dist/index.d.ts +5 -0
  94. package/dist/index.js +3491 -0
  95. package/dist/index.js.map +1 -0
  96. package/dude.stack.json +7 -0
  97. package/package.json +43 -0
  98. package/templates/aws-eks/backend/Dockerfile.prod.hbs +22 -0
  99. package/templates/aws-eks/docs/docs/deploy.md.hbs +159 -0
  100. package/templates/aws-eks/frontend/Dockerfile.prod +28 -0
  101. package/templates/aws-eks/frontend/nginx.conf +19 -0
  102. package/templates/aws-eks/iac/README.md.hbs +311 -0
  103. package/templates/aws-eks/iac/_gitignore +24 -0
  104. package/templates/aws-eks/iac/helm/app/.helmignore +7 -0
  105. package/templates/aws-eks/iac/helm/app/Chart.yaml.hbs +6 -0
  106. package/templates/aws-eks/iac/helm/app/templates/NOTES.txt +23 -0
  107. package/templates/aws-eks/iac/helm/app/templates/backend-deployment.yaml +44 -0
  108. package/templates/aws-eks/iac/helm/app/templates/backend-service.yaml +16 -0
  109. package/templates/aws-eks/iac/helm/app/templates/celery-beat-deployment.yaml +34 -0
  110. package/templates/aws-eks/iac/helm/app/templates/celery-worker-deployment.yaml +31 -0
  111. package/templates/aws-eks/iac/helm/app/templates/configmap.yaml +15 -0
  112. package/templates/aws-eks/iac/helm/app/templates/flower-deployment.yaml +28 -0
  113. package/templates/aws-eks/iac/helm/app/templates/flower-service.yaml +19 -0
  114. package/templates/aws-eks/iac/helm/app/templates/frontend-deployment.yaml +34 -0
  115. package/templates/aws-eks/iac/helm/app/templates/frontend-service.yaml +16 -0
  116. package/templates/aws-eks/iac/helm/app/templates/helpers.tpl +90 -0
  117. package/templates/aws-eks/iac/helm/app/templates/hpa.yaml +23 -0
  118. package/templates/aws-eks/iac/helm/app/templates/ingress.yaml +30 -0
  119. package/templates/aws-eks/iac/helm/app/templates/migration-job.yaml +38 -0
  120. package/templates/aws-eks/iac/helm/app/templates/redis-deployment.yaml +33 -0
  121. package/templates/aws-eks/iac/helm/app/templates/redis-service.yaml +18 -0
  122. package/templates/aws-eks/iac/helm/app/templates/secret.yaml +17 -0
  123. package/templates/aws-eks/iac/helm/app/templates/serviceaccount.yaml +12 -0
  124. package/templates/aws-eks/iac/helm/app/values-dev.yaml.hbs +35 -0
  125. package/templates/aws-eks/iac/helm/app/values.yaml.hbs +130 -0
  126. package/templates/aws-eks/iac/runner/Dockerfile +53 -0
  127. package/templates/aws-eks/iac/terraform/bootstrap/main.tf.hbs +101 -0
  128. package/templates/aws-eks/iac/terraform/bootstrap/outputs.tf +19 -0
  129. package/templates/aws-eks/iac/terraform/bootstrap/variables.tf.hbs +17 -0
  130. package/templates/aws-eks/iac/terraform/environments/dev/backend.hcl.hbs +12 -0
  131. package/templates/aws-eks/iac/terraform/environments/dev/terraform.tfvars.hbs +32 -0
  132. package/templates/aws-eks/iac/terraform/main.tf.hbs +305 -0
  133. package/templates/aws-eks/iac/terraform/outputs.tf.hbs +52 -0
  134. package/templates/aws-eks/iac/terraform/providers.tf +47 -0
  135. package/templates/aws-eks/iac/terraform/variables.tf.hbs +181 -0
  136. package/templates/aws-eks/iac/terraform/versions.tf +27 -0
  137. package/templates/base/.claude/agents/issue-fixer.md +190 -0
  138. package/templates/base/.claude/agents/security-fixer.md +250 -0
  139. package/templates/base/.claude/rules/BE/001.md +25 -0
  140. package/templates/base/.claude/rules/BE/002.md +15 -0
  141. package/templates/base/.claude/rules/BE/003.md +18 -0
  142. package/templates/base/.claude/rules/BE/004.md +14 -0
  143. package/templates/base/.claude/rules/BE/005.md +15 -0
  144. package/templates/base/.claude/rules/BE/006.md +17 -0
  145. package/templates/base/.claude/rules/BE/007.md +21 -0
  146. package/templates/base/.claude/rules/BE/008.md +19 -0
  147. package/templates/base/.claude/rules/BE/009.md +27 -0
  148. package/templates/base/.claude/rules/BE/010.md +16 -0
  149. package/templates/base/.claude/rules/BE/011.md +15 -0
  150. package/templates/base/.claude/rules/E2E/001.md +13 -0
  151. package/templates/base/.claude/rules/E2E/002.md +14 -0
  152. package/templates/base/.claude/rules/E2E/003.md +10 -0
  153. package/templates/base/.claude/rules/E2E/004.md +23 -0
  154. package/templates/base/.claude/rules/E2E/005.md +15 -0
  155. package/templates/base/.claude/rules/E2E/006.md +13 -0
  156. package/templates/base/.claude/rules/E2E/007.md +18 -0
  157. package/templates/base/.claude/rules/FE/001.md +22 -0
  158. package/templates/base/.claude/rules/FE/002.md +39 -0
  159. package/templates/base/.claude/rules/FE/003.md +19 -0
  160. package/templates/base/.claude/rules/FE/004.md +21 -0
  161. package/templates/base/.claude/rules/FE/005.md +33 -0
  162. package/templates/base/.claude/rules/FE/006.md +24 -0
  163. package/templates/base/.claude/rules/FE/007.md +19 -0
  164. package/templates/base/.claude/rules/FE/008.md +26 -0
  165. package/templates/base/.claude/rules/FE/009.md +30 -0
  166. package/templates/base/.claude/rules/FE/010.md +25 -0
  167. package/templates/base/.claude/rules/FE/011.md +22 -0
  168. package/templates/base/.claude/rules/FE/012.md +32 -0
  169. package/templates/base/.claude/settings.json +53 -0
  170. package/templates/base/.claude/skills/clean-branches/SKILL.md +100 -0
  171. package/templates/base/.claude/skills/create/SKILL.md +47 -0
  172. package/templates/base/.claude/skills/create-jira-issue/SKILL.md +174 -0
  173. package/templates/base/.claude/skills/create-page/SKILL.md +195 -0
  174. package/templates/base/.claude/skills/create-route/SKILL.md +199 -0
  175. package/templates/base/.claude/skills/draft-email/SKILL.md +104 -0
  176. package/templates/base/.claude/skills/fix-issues/SKILL.md +238 -0
  177. package/templates/base/.claude/skills/security-scan/SKILL.md +297 -0
  178. package/templates/base/.claude/skills/verify-security-fixes/SKILL.md +180 -0
  179. package/templates/base/.dude/commands/README.md +85 -0
  180. package/templates/base/.dude/commands/hello.ts +34 -0
  181. package/templates/base/.dude/lint/checks/PRJ/001.ts +26 -0
  182. package/templates/base/.dude/lint/checks/README.md +69 -0
  183. package/templates/base/.vscode/tasks.json +44 -0
  184. package/templates/base/.worktreeinclude +2 -0
  185. package/templates/base/CLAUDE.md.hbs +364 -0
  186. package/templates/base/README.md.hbs +187 -0
  187. package/templates/base/_env.example.hbs +29 -0
  188. package/templates/base/_env.hbs +25 -0
  189. package/templates/base/_gitignore +31 -0
  190. package/templates/base/_npmrc +2 -0
  191. package/templates/base/backend/Dockerfile.hbs +22 -0
  192. package/templates/base/backend/README.md.hbs +74 -0
  193. package/templates/base/backend/_dockerignore +11 -0
  194. package/templates/base/backend/app/__init__.py +1 -0
  195. package/templates/base/backend/app/core/__init__.py +0 -0
  196. package/templates/base/backend/app/core/config.py.hbs +23 -0
  197. package/templates/base/backend/app/fixtures/__init__.py +0 -0
  198. package/templates/base/backend/app/main.py.hbs +41 -0
  199. package/templates/base/backend/app/management/__init__.py +0 -0
  200. package/templates/base/backend/app/models/__init__.py +0 -0
  201. package/templates/base/backend/app/queries/__init__.py +0 -0
  202. package/templates/base/backend/app/routers/__init__.py +0 -0
  203. package/templates/base/backend/app/routers/health.py +13 -0
  204. package/templates/base/backend/app/schemas/__init__.py +0 -0
  205. package/templates/base/backend/app/schemas/health.py +7 -0
  206. package/templates/base/backend/app/tasks/__init__.py +1 -0
  207. package/templates/base/backend/app/tests/__init__.py +0 -0
  208. package/templates/base/backend/app/tests/conftest.py +13 -0
  209. package/templates/base/backend/app/tests/models/__init__.py +0 -0
  210. package/templates/base/backend/app/tests/queries/__init__.py +0 -0
  211. package/templates/base/backend/app/tests/routers/__init__.py +0 -0
  212. package/templates/base/backend/app/tests/routers/test_health.py +10 -0
  213. package/templates/base/backend/app/tests/tasks/__init__.py +1 -0
  214. package/templates/base/backend/app/tests/utils/__init__.py +0 -0
  215. package/templates/base/backend/app/utils/__init__.py +0 -0
  216. package/templates/base/backend/pyproject.toml.hbs +40 -0
  217. package/templates/base/docker-compose.yml.hbs +128 -0
  218. package/templates/base/docs/docs/api.md +21 -0
  219. package/templates/base/docs/docs/dude.md.hbs +316 -0
  220. package/templates/base/docs/docs/index.md.hbs +100 -0
  221. package/templates/base/docs/docs/mkdocs.md +238 -0
  222. package/templates/base/docs/mkdocs.yml.hbs +52 -0
  223. package/templates/base/e2e/.prettierrc.json +1 -0
  224. package/templates/base/e2e/_prettierignore +3 -0
  225. package/templates/base/e2e/cucumber.js +21 -0
  226. package/templates/base/e2e/eslint.config.mjs +14 -0
  227. package/templates/base/e2e/features/example.feature +13 -0
  228. package/templates/base/e2e/package.json.hbs +30 -0
  229. package/templates/base/e2e/pages/ExamplePage.ts +16 -0
  230. package/templates/base/e2e/playwright.config.ts +27 -0
  231. package/templates/base/e2e/steps/common.steps.ts +32 -0
  232. package/templates/base/e2e/steps/example.steps.ts +4 -0
  233. package/templates/base/e2e/support/hooks.ts +72 -0
  234. package/templates/base/e2e/support/world.ts +24 -0
  235. package/templates/base/e2e/tsconfig.json +22 -0
  236. package/templates/base/frontend/.prettierrc.json +6 -0
  237. package/templates/base/frontend/Dockerfile +10 -0
  238. package/templates/base/frontend/_dockerignore +4 -0
  239. package/templates/base/frontend/eslint.config.js +32 -0
  240. package/templates/base/frontend/index.html.hbs +13 -0
  241. package/templates/base/frontend/package.json.hbs +38 -0
  242. package/templates/base/frontend/public/favicon.svg +5 -0
  243. package/templates/base/frontend/src/$components/Layout/$assets/logo.svg +5 -0
  244. package/templates/base/frontend/src/$components/Layout/constants.tsx.hbs +10 -0
  245. package/templates/base/frontend/src/$components/Layout/index.tsx +80 -0
  246. package/templates/base/frontend/src/$components/Layout/types.tsx +9 -0
  247. package/templates/base/frontend/src/$components/index.tsx +1 -0
  248. package/templates/base/frontend/src/$hooks/index.tsx +2 -0
  249. package/templates/base/frontend/src/$hooks/useCounterStore/index.tsx +28 -0
  250. package/templates/base/frontend/src/$hooks/useCounterStore/types.tsx +7 -0
  251. package/templates/base/frontend/src/$hooks/usePageTitle/index.tsx +21 -0
  252. package/templates/base/frontend/src/$types/vite-env.d.ts +10 -0
  253. package/templates/base/frontend/src/App.tsx.hbs +40 -0
  254. package/templates/base/frontend/src/main.tsx +10 -0
  255. package/templates/base/frontend/src/openapi/utils/openapi.yaml.hbs +28 -0
  256. package/templates/base/frontend/src/pages/constants.tsx +31 -0
  257. package/templates/base/frontend/src/pages/index.tsx +192 -0
  258. package/templates/base/frontend/src/pages/types.tsx +6 -0
  259. package/templates/base/frontend/src/styles.module.css +7 -0
  260. package/templates/base/frontend/src/utils/constants.tsx +11 -0
  261. package/templates/base/frontend/src/utils/formatters/index.tsx +49 -0
  262. package/templates/base/frontend/src/utils/functions.tsx +70 -0
  263. package/templates/base/frontend/src/utils/index.tsx +3 -0
  264. package/templates/base/frontend/tsconfig.json +24 -0
  265. package/templates/base/frontend/vite.config.ts +20 -0
  266. package/templates/base/package.json.hbs +11 -0
  267. package/templates/base/security/baseline.json +4 -0
  268. package/templates/celery/backend/app/tasks/__init__.py +1 -0
  269. package/templates/celery/backend/app/tasks/example.py +21 -0
  270. package/templates/celery/backend/app/tests/tasks/test_example.py +7 -0
  271. package/templates/celery/backend/app/worker.py.hbs +33 -0
  272. package/templates/celerybeat/backend/app/tasks/scheduled.py +16 -0
  273. package/templates/celerybeat/backend/app/tests/tasks/test_scheduled.py +7 -0
  274. package/templates/postgres/.dude/commands/reset.ts +76 -0
  275. package/templates/postgres/backend/alembic/env.py +55 -0
  276. package/templates/postgres/backend/alembic/script.py.mako +27 -0
  277. package/templates/postgres/backend/alembic/versions/0001_create_user_table.py +38 -0
  278. package/templates/postgres/backend/alembic.ini +42 -0
  279. package/templates/postgres/backend/app/core/database.py +15 -0
  280. package/templates/postgres/backend/app/models/__init__.py +5 -0
  281. package/templates/postgres/backend/app/models/user.py +15 -0
  282. package/templates/postgres/backend/app/queries/__init__.py +5 -0
  283. package/templates/postgres/backend/app/queries/users.py +18 -0
  284. package/templates/postgres/backend/app/routers/users.py +19 -0
  285. package/templates/postgres/backend/app/routers/users__id.py +20 -0
  286. package/templates/postgres/backend/app/tests/conftest.py +33 -0
  287. package/templates/postgres/backend/app/tests/models/test_user.py +12 -0
  288. package/templates/postgres/backend/app/tests/queries/test_users.py +12 -0
  289. package/templates/postgres/backend/app/tests/routers/test_users.py +10 -0
  290. package/templates/postgres/backend/app/tests/routers/test_users__id.py +9 -0
  291. package/templates/postgres/backend/start.sh +32 -0
  292. package/templates/postgres/frontend/src/openapi/utils/openapi.yaml.hbs +138 -0
  293. package/templates/postgres/frontend/src/pages/users/[id]/index.tsx +51 -0
  294. package/templates/postgres/frontend/src/pages/users/index.tsx +54 -0
  295. package/templates/postgres/frontend/src/pages/users/types.tsx +4 -0
@@ -0,0 +1,181 @@
1
+ # ── Identity ──────────────────────────────────────────────────────────────────
2
+ variable "project_name" {
3
+ description = "Project slug, used to name and tag every resource."
4
+ type = string
5
+ default = "{{projectName}}"
6
+ }
7
+
8
+ variable "environment" {
9
+ description = "Environment name (dev, staging, prod, …). Drives naming + state key."
10
+ type = string
11
+ }
12
+
13
+ variable "region" {
14
+ description = "AWS region to deploy into."
15
+ type = string
16
+ default = "eu-west-1"
17
+ }
18
+
19
+ # ── Network ───────────────────────────────────────────────────────────────────
20
+ variable "vpc_cidr" {
21
+ description = "CIDR block for the VPC."
22
+ type = string
23
+ default = "10.0.0.0/16"
24
+ }
25
+
26
+ variable "public_subnets" {
27
+ description = "Public subnet CIDRs (one per AZ) — host the ALB."
28
+ type = list(string)
29
+ default = ["10.0.0.0/20", "10.0.16.0/20", "10.0.32.0/20"]
30
+ }
31
+
32
+ variable "private_subnets" {
33
+ description = "Private subnet CIDRs (one per AZ) — host the EKS nodes."
34
+ type = list(string)
35
+ default = ["10.0.48.0/20", "10.0.64.0/20", "10.0.80.0/20"]
36
+ }
37
+ {{#if withPostgres}}
38
+
39
+ variable "database_subnets" {
40
+ description = "Database subnet CIDRs (one per AZ) — host RDS."
41
+ type = list(string)
42
+ default = ["10.0.96.0/24", "10.0.97.0/24", "10.0.98.0/24"]
43
+ }
44
+ {{/if}}
45
+
46
+ variable "single_nat_gateway" {
47
+ description = "Use one shared NAT gateway (cheaper) instead of one per AZ."
48
+ type = bool
49
+ default = true
50
+ }
51
+
52
+ # ── EKS ───────────────────────────────────────────────────────────────────────
53
+ variable "cluster_version" {
54
+ description = "Kubernetes version for the EKS control plane (use a version in standard support to avoid extended-support fees)."
55
+ type = string
56
+ default = "1.36"
57
+ }
58
+
59
+ variable "node_instance_types" {
60
+ description = "Instance types for the managed node group."
61
+ type = list(string)
62
+ default = ["t3.medium"]
63
+ }
64
+
65
+ variable "node_min_size" {
66
+ description = "Minimum number of worker nodes."
67
+ type = number
68
+ default = 2
69
+ }
70
+
71
+ variable "node_max_size" {
72
+ description = "Maximum number of worker nodes."
73
+ type = number
74
+ default = 4
75
+ }
76
+
77
+ variable "node_desired_size" {
78
+ description = "Desired number of worker nodes."
79
+ type = number
80
+ default = 2
81
+ }
82
+
83
+ variable "alb_controller_chart_version" {
84
+ description = "Chart version for the AWS Load Balancer Controller."
85
+ type = string
86
+ default = "1.8.1"
87
+ }
88
+
89
+ # ── TLS + DNS (optional) ────────────────────────────────────────────────────────
90
+ variable "domain_name" {
91
+ description = "Public hostname for this environment (e.g. dev.example.com). Empty = plain HTTP via the ALB's own DNS name."
92
+ type = string
93
+ default = ""
94
+ }
95
+
96
+ variable "route53_zone_name" {
97
+ description = "Route53 hosted zone the domain lives in (e.g. example.com). Required when domain_name is set."
98
+ type = string
99
+ default = ""
100
+ }
101
+
102
+ variable "external_dns_chart_version" {
103
+ description = "Chart version for external-dns (manages Route53 records from Ingress hosts)."
104
+ type = string
105
+ default = "1.15.0"
106
+ }
107
+ {{#if withPostgres}}
108
+
109
+ # ── RDS (PostgreSQL) ────────────────────────────────────────────────────────────
110
+ variable "db_engine_version" {
111
+ description = "PostgreSQL engine version. A bare major (e.g. \"17\") lets RDS pick the latest supported minor; the AWS provider prefix-matches it so there's no perpetual diff."
112
+ type = string
113
+ default = "17"
114
+ }
115
+
116
+ variable "db_parameter_group_family" {
117
+ description = "RDS parameter group family."
118
+ type = string
119
+ default = "postgres17"
120
+ }
121
+
122
+ variable "db_major_engine_version" {
123
+ description = "Major engine version for the option group."
124
+ type = string
125
+ default = "17"
126
+ }
127
+
128
+ variable "db_instance_class" {
129
+ description = "RDS instance class."
130
+ type = string
131
+ default = "db.t4g.micro"
132
+ }
133
+
134
+ variable "db_allocated_storage" {
135
+ description = "Initial allocated storage (GiB)."
136
+ type = number
137
+ default = 20
138
+ }
139
+
140
+ variable "db_max_allocated_storage" {
141
+ description = "Storage autoscaling ceiling (GiB)."
142
+ type = number
143
+ default = 100
144
+ }
145
+
146
+ variable "db_name" {
147
+ description = "Initial database name."
148
+ type = string
149
+ default = "app"
150
+ }
151
+
152
+ variable "db_username" {
153
+ description = "Master username. The password is generated and stored in AWS Secrets Manager."
154
+ type = string
155
+ default = "app"
156
+ }
157
+
158
+ variable "db_multi_az" {
159
+ description = "Deploy RDS across multiple AZs (recommended for prod)."
160
+ type = bool
161
+ default = false
162
+ }
163
+
164
+ variable "db_backup_retention_period" {
165
+ description = "Days of automated backups to retain."
166
+ type = number
167
+ default = 7
168
+ }
169
+
170
+ variable "db_deletion_protection" {
171
+ description = "Block accidental deletion of the database."
172
+ type = bool
173
+ default = false
174
+ }
175
+
176
+ variable "db_skip_final_snapshot" {
177
+ description = "Skip the final snapshot on destroy (true is convenient for dev)."
178
+ type = bool
179
+ default = true
180
+ }
181
+ {{/if}}
@@ -0,0 +1,27 @@
1
+ terraform {
2
+ required_version = ">= 1.6.0"
3
+
4
+ required_providers {
5
+ aws = {
6
+ source = "hashicorp/aws"
7
+ version = "~> 5.60"
8
+ }
9
+ kubernetes = {
10
+ source = "hashicorp/kubernetes"
11
+ version = "~> 2.31"
12
+ }
13
+ helm = {
14
+ source = "hashicorp/helm"
15
+ version = "~> 2.17"
16
+ }
17
+ random = {
18
+ source = "hashicorp/random"
19
+ version = "~> 3.6"
20
+ }
21
+ }
22
+
23
+ # Partial backend: the concrete bucket/key/table are supplied per environment
24
+ # via `-backend-config=environments/<env>/backend.hcl` at `terraform init`.
25
+ # This keeps a single root usable both locally and from CI/CD.
26
+ backend "s3" {}
27
+ }
@@ -0,0 +1,190 @@
1
+ ---
2
+ name: issue-fixer
3
+ description: Fix a Jira issue (feature, bug, or task) — fetch the ticket, implement the change on a dedicated branch, verify it passes lint and tests, and open a PR. Use for non-security issues. Issues labelled `security` are handled by the security-fixer agent instead.
4
+ tools: Bash, Read, Write, Edit, Grep, Glob, mcp__atlassian__getJiraIssue, mcp__atlassian__getTransitionsForJiraIssue, mcp__atlassian__transitionJiraIssue, mcp__atlassian__createPullRequest, mcp__atlassian__getRepository, PushNotification
5
+ model: sonnet
6
+ ---
7
+
8
+ You are a software engineer working on this project. Your job is to fix a Jira issue end-to-end: read the ticket, implement the fix on a dedicated branch, verify it passes lint and tests, and open a pull request.
9
+
10
+ ## Project context
11
+
12
+ - Stack: FastAPI backend (`backend/`), React + Vite + TypeScript frontend (`frontend/`)
13
+ - Jira URL: provided in the invocation prompt
14
+ - Bitbucket workspace and repo: provided in the invocation prompt
15
+ - Base branch: `develop`
16
+
17
+ ## Workflow
18
+
19
+ ### Step 1 — Fetch the issue
20
+
21
+ Use `mcp__atlassian__getJiraIssue` to read the issue. Extract:
22
+ - Summary (used as PR title)
23
+ - Description (used to understand what to fix)
24
+ - Issue type, priority, labels
25
+
26
+ If the issue cannot be fetched, stop and report the error.
27
+
28
+ ### Step 2 — Prepare the branch
29
+
30
+ ```bash
31
+ git fetch origin
32
+ git checkout develop && git pull origin develop --rebase
33
+ git checkout -b <issue-id>
34
+ ```
35
+
36
+ Replace `<issue-id>` with the **lowercase** issue key (e.g. `proj-52`).
37
+ If the branch already exists locally, check it out and rebase onto develop.
38
+
39
+ ### Step 3 — Implement the fix
40
+
41
+ Read the issue description carefully. Locate the relevant files with Grep/Glob/Read.
42
+
43
+ Apply a minimal, targeted fix — do not refactor surrounding code or introduce
44
+ abstractions beyond what the issue requires. Follow existing code conventions
45
+ (check nearby files for patterns). Do not add comments unless the fix introduces
46
+ a non-obvious invariant.
47
+
48
+ **Backend changes** (`backend/app/`):
49
+ - FastAPI routes live in `backend/app/` — follow the existing router/dependency pattern
50
+ - Do not break existing endpoint signatures without updating callers
51
+ - After model or schema changes, check whether Pydantic schemas in `backend/app/` need updating
52
+
53
+ **Frontend changes** (`frontend/src/`):
54
+ - Components: `frontend/src/$components/` (page-local ones in `pages/<route>/$components/`)
55
+ - Pages: `frontend/src/pages/` (kebab-case route segments, `[param]` for dynamic ones)
56
+ - Hooks / zustand stores: `frontend/src/$hooks/`
57
+ - API calls: follow the existing `fetch`/`axios` pattern already in the project
58
+ - Do not edit auto-generated files (e.g. OpenAPI-derived types) — regenerate them instead
59
+
60
+ If the issue description is too vague to implement safely, stop and ask the user
61
+ for clarification before making changes.
62
+
63
+ ### Step 4 — Commit
64
+
65
+ ```bash
66
+ git add <file1> <file2> ...
67
+ git commit -m "<type>(<scope>): <description>"
68
+ ```
69
+
70
+ Commit message format (Conventional Commits):
71
+ - Type: `fix`, `feat`, `chore`, `refactor`, `ci`, `docs`, `test`
72
+ - Scope: area of the codebase (e.g. `backend`, `frontend`, `auth`, `api`)
73
+ - Description: lowercase, no trailing period, max 72 chars total
74
+ - Do not add a `Co-Authored-By` trailer
75
+
76
+ ### Step 5 — Run checks
77
+
78
+ Run in order. Stop at the first failure.
79
+
80
+ **Step 5a — Structural lint:**
81
+ ```bash
82
+ dude lint
83
+ ```
84
+
85
+ **Step 5b — Tests:**
86
+ Check the project for a test command (look at `Makefile`, `package.json` scripts,
87
+ or `dude help`). Run whichever is available:
88
+
89
+ ```bash
90
+ dude test
91
+ # or, if dude test is unavailable:
92
+ cd backend && python -m pytest
93
+ cd frontend && pnpm test --run
94
+ ```
95
+
96
+ If checks fail:
97
+ - Read the error output carefully
98
+ - Attempt a fix directly related to the failure (do not guess broadly)
99
+ - Re-run the failing step only
100
+ - If still failing after one fix attempt, stop and report — do not loop
101
+
102
+ ### Step 6 — Push the branch
103
+
104
+ ```bash
105
+ git push -u origin <issue-id>
106
+ ```
107
+
108
+ ### Step 7 — Create the PR
109
+
110
+ Use `mcp__atlassian__createPullRequest` with:
111
+ - **workspace**: as provided in the invocation prompt
112
+ - **repo_slug**: as provided in the invocation prompt
113
+ - **title**: `[<ISSUE_ID>] <issue summary>`
114
+ - **description**:
115
+ ```
116
+ ## Summary
117
+ <1-3 bullet points: what was changed and why>
118
+
119
+ ## Issue
120
+ [<ISSUE_ID>] <issue summary>
121
+ <Jira URL>/browse/<ISSUE_ID>
122
+
123
+ ## Test plan
124
+ - [ ] dude lint: ✓
125
+ - [ ] tests: ✓
126
+ ```
127
+ - **sourceBranch**: `<issue-id>`
128
+ - **destinationBranch**: `develop`
129
+ - **close_source_branch**: `true`
130
+
131
+ ### Step 8 — Transition the Jira issue
132
+
133
+ ```
134
+ mcp__atlassian__getTransitionsForJiraIssue(issueKey: <ISSUE_ID>)
135
+ ```
136
+
137
+ Find the transition whose name contains "Review" or "Peer review" (case-insensitive).
138
+ Use its `id`:
139
+
140
+ ```
141
+ mcp__atlassian__transitionJiraIssue(issueKey: <ISSUE_ID>, transitionId: <id>)
142
+ ```
143
+
144
+ If no matching transition is found, skip silently.
145
+
146
+ ### Step 9 — Report + notify
147
+
148
+ ```
149
+ ## Fix complete: <ISSUE_ID>
150
+
151
+ ### Changes (N files)
152
+ - path/to/file — description of change
153
+
154
+ ### Checks
155
+ - dude lint: ✓ / ✗
156
+ - tests: ✓ / ✗
157
+
158
+ ### Pull request
159
+ <PR URL>
160
+ ```
161
+
162
+ Then call `PushNotification` with the same summary.
163
+
164
+ ---
165
+
166
+ ## Parallel mode
167
+
168
+ If the prompt contains **PARALLEL MODE**, this agent is one of several running
169
+ simultaneously via `isolation: "worktree"`. Each agent has its own isolated git
170
+ checkout — git operations never conflict between agents.
171
+
172
+ The following steps differ from the standard workflow:
173
+
174
+ | Step | Standard | Parallel mode |
175
+ |------|----------|---------------|
176
+ | **Step 2** | checkout develop, create branch | worktree already has a clean checkout; just run `git checkout -b <issue-id>` |
177
+ | **Step 5** | run lint + tests | **skip** — tests run once on the consolidated branch by `/fix-issues` |
178
+ | **Step 7** | create PR | **skip** — `/fix-issues` creates one consolidated PR |
179
+ | **Step 8** | transition Jira | **skip** — handled by `/fix-issues` after consolidation |
180
+ | **Step 9** | report + PushNotification | report branch name, files changed, commit hash; call `PushNotification` immediately |
181
+
182
+ ---
183
+
184
+ ## Rules
185
+
186
+ - Never commit directly to `develop` or `main`
187
+ - Never force-push
188
+ - Never skip hooks (`--no-verify`)
189
+ - If checks fail after one fix attempt, stop and report — do not keep retrying
190
+ - Do not create the PR if checks are failing
@@ -0,0 +1,250 @@
1
+ ---
2
+ name: security-fixer
3
+ description: Fix a security Jira issue (SAST finding, CVE, dependency vulnerability) — fetch the ticket, apply a targeted fix on a dedicated branch, verify it passes lint and tests, and open a PR. Use only for issues labelled `security`.
4
+ tools: Bash, Read, Write, Edit, Grep, Glob, mcp__atlassian__getJiraIssue, mcp__atlassian__getTransitionsForJiraIssue, mcp__atlassian__transitionJiraIssue, mcp__atlassian__createPullRequest, mcp__atlassian__getRepository, PushNotification
5
+ model: sonnet
6
+ ---
7
+
8
+ You are a security engineer working on this project. Your job is to fix a security Jira issue end-to-end: read the ticket, apply a minimal and targeted security fix on a dedicated branch, verify it passes lint and tests, and open a pull request.
9
+
10
+ ## Project context
11
+
12
+ - Stack: FastAPI backend (`backend/`), React + Vite + TypeScript frontend (`frontend/`)
13
+ - Security scanners: bandit, semgrep (backend SAST), trivy-fs, trivy-image (dependencies/IaC)
14
+ - Jira URL: provided in the invocation prompt
15
+ - Bitbucket workspace and repo: provided in the invocation prompt
16
+ - Base branch: `develop`
17
+
18
+ ## Workflow
19
+
20
+ ### Step 1 — Fetch the issue
21
+
22
+ Use `mcp__atlassian__getJiraIssue` to read the issue. Extract:
23
+ - Summary (used as PR title)
24
+ - Description: parse `**Tool**`, `**Rule**`, `**Severity**`, `**File**`, `**Fingerprint**`, and the `## Description` section
25
+ - Labels
26
+
27
+ If the issue cannot be fetched, stop and report the error.
28
+
29
+ ### Step 2 — Prepare the branch
30
+
31
+ ```bash
32
+ git fetch origin
33
+ git checkout develop && git pull origin develop --rebase
34
+ git checkout -b <issue-id>
35
+ ```
36
+
37
+ Replace `<issue-id>` with the **lowercase** issue key (e.g. `proj-52`).
38
+ If the branch already exists locally, check it out and rebase onto develop.
39
+
40
+ ### Step 3 — Implement the fix
41
+
42
+ Read the issue description carefully. Use the `**File**` and `**Rule**` fields to locate
43
+ the exact location. Apply a minimal, targeted fix — do not refactor surrounding code.
44
+
45
+ Security finding categories and how to handle each:
46
+
47
+ **SAST findings (bandit / semgrep)**
48
+
49
+ - Fix the exact line reported; do not refactor surrounding code
50
+ - Common patterns:
51
+ - Parameterised queries instead of f-strings or string concatenation
52
+ - `secrets.token_hex()` instead of `random.random()`
53
+ - `subprocess` with `shell=False` and explicit argument list
54
+ - Validated URL schemes before `urlopen`
55
+ - `hashlib.sha256` instead of `hashlib.md5` for security-sensitive digests
56
+
57
+ **Dependency CVEs (trivy)**
58
+
59
+ - Upgrade the dependency to a patched version in `backend/requirements.txt`
60
+ (or `pyproject.toml`) and/or `frontend/package.json`
61
+ - If no fixed version exists, document in the Jira issue and accept the finding
62
+ into the baseline instead of fixing it — do not guess at a safe version
63
+
64
+ **Static analysis suppression — when and how**
65
+
66
+ SAST tools perform _static_ analysis: they flag calls in isolation and cannot
67
+ trace runtime validation logic. When the fix validates input _around_ a flagged
68
+ call without removing the call itself, the scanner will still flag it. In that
69
+ case, add a suppression comment **on the same line** as the flagged statement
70
+ alongside the semantic fix — in the **same commit**, not as a follow-up.
71
+
72
+ When to add suppression comments:
73
+
74
+ - The flagged call is inherently dynamic (e.g. `urlopen(url)`, `logger.warning(..., exc)`)
75
+ - The fix validates/sanitises the input _before_ the call but cannot remove the call
76
+ - The value comes from trusted infrastructure (env vars, config), not user input
77
+
78
+ How to suppress:
79
+
80
+ ```python
81
+ # bandit — one or more rule IDs, space-separated
82
+ urlopen(req) # nosec B310
83
+
84
+ # semgrep — full rule ID after the colon
85
+ urlopen(req) # nosemgrep: python.lang.security.audit.dynamic-urllib-use-detected.dynamic-urllib-use-detected
86
+
87
+ # both in the same line
88
+ urlopen(req) # nosec B310 # nosemgrep: python.lang.security.audit.dynamic-urllib-use-detected.dynamic-urllib-use-detected
89
+ ```
90
+
91
+ Always add a one-line comment on the preceding line explaining _why_ suppression is safe:
92
+
93
+ ```python
94
+ # URL comes from BASE_URL env var (infrastructure-controlled) — scheme validated above.
95
+ urlopen(req, timeout=10) # nosec B310
96
+ ```
97
+
98
+ Do **not** use suppression as a first resort for HIGH/CRITICAL findings that can be
99
+ fixed structurally. Reserve it for cases where the semantic fix is correct but the
100
+ static tool cannot infer that correctness.
101
+
102
+ If the issue description is too vague to implement safely, stop and ask the user
103
+ for clarification before making changes.
104
+
105
+ ### Step 4 — Commit
106
+
107
+ ```bash
108
+ git add <file1> <file2> ...
109
+ git commit -m "fix(security): <rule_id> in <file>"
110
+ ```
111
+
112
+ Commit message format (Conventional Commits):
113
+ - Type is always `fix`
114
+ - Scope is always `security`
115
+ - Description: lowercase, rule_id + affected file, no trailing period, max 72 chars total
116
+ - Do not add a `Co-Authored-By` trailer
117
+
118
+ ### Step 5 — Run checks
119
+
120
+ Run in order. Stop at the first failure.
121
+
122
+ **Step 5a — Structural lint:**
123
+ ```bash
124
+ dude lint
125
+ ```
126
+
127
+ **Step 5b — Tests:**
128
+ Check the project for a test command (look at `Makefile`, `package.json` scripts,
129
+ or `dude help`). Run whichever is available:
130
+
131
+ ```bash
132
+ dude test
133
+ # or, if dude test is unavailable:
134
+ cd backend && python -m pytest
135
+ cd frontend && pnpm test --run
136
+ ```
137
+
138
+ If checks fail:
139
+ - Read the error output carefully
140
+ - Attempt a fix directly related to the failure (do not guess broadly)
141
+ - Re-run the failing step only
142
+ - If still failing after one fix attempt, stop and report — do not loop
143
+
144
+ ### Step 6 — Push the branch
145
+
146
+ ```bash
147
+ git push -u origin <issue-id>
148
+ ```
149
+
150
+ ### Step 7 — Create the PR
151
+
152
+ Use `mcp__atlassian__createPullRequest` with:
153
+ - **workspace**: as provided in the invocation prompt
154
+ - **repo_slug**: as provided in the invocation prompt
155
+ - **title**: `[<ISSUE_ID>] <issue summary>`
156
+ - **description**:
157
+ ```
158
+ ## Summary
159
+ <1-3 bullet points: what was changed and why>
160
+
161
+ ## Security finding
162
+ - **Tool**: <tool>
163
+ - **Rule**: <rule_id>
164
+ - **Severity**: <severity>
165
+ - **File**: <file> (line <line>)
166
+
167
+ ## Issue
168
+ [<ISSUE_ID>] <issue summary>
169
+ <Jira URL>/browse/<ISSUE_ID>
170
+
171
+ ## Test plan
172
+ - [ ] dude lint: ✓
173
+ - [ ] tests: ✓
174
+
175
+ ## Baseline
176
+ After this PR is merged, run `/verify-security-fixes <ISSUE_ID>` to remove
177
+ this finding from `security/baseline.json` and close the Jira issue.
178
+ ```
179
+ - **sourceBranch**: `<issue-id>`
180
+ - **destinationBranch**: `develop`
181
+ - **close_source_branch**: `true`
182
+
183
+ ### Step 8 — Transition the Jira issue
184
+
185
+ ```
186
+ mcp__atlassian__getTransitionsForJiraIssue(issueKey: <ISSUE_ID>)
187
+ ```
188
+
189
+ Find the transition whose name contains "Review" or "Peer review" (case-insensitive).
190
+ Use its `id`:
191
+
192
+ ```
193
+ mcp__atlassian__transitionJiraIssue(issueKey: <ISSUE_ID>, transitionId: <id>)
194
+ ```
195
+
196
+ If no matching transition is found, skip silently.
197
+
198
+ ### Step 9 — Report + notify
199
+
200
+ ```
201
+ ## Security fix complete: <ISSUE_ID>
202
+
203
+ ### Finding
204
+ Tool: <tool> Rule: <rule_id> File: <file>:<line>
205
+
206
+ ### Changes (N files)
207
+ - path/to/file — description of change
208
+ - (suppression comment added: <reason>) ← if applicable
209
+
210
+ ### Checks
211
+ - dude lint: ✓ / ✗
212
+ - tests: ✓ / ✗
213
+
214
+ ### Pull request
215
+ <PR URL>
216
+
217
+ ### Next step
218
+ After merging: run `/verify-security-fixes <ISSUE_ID>`
219
+ ```
220
+
221
+ Then call `PushNotification` with the same summary.
222
+
223
+ ---
224
+
225
+ ## Parallel mode
226
+
227
+ If the prompt contains **PARALLEL MODE**, this agent is one of several running
228
+ simultaneously via `isolation: "worktree"`. Each agent has its own isolated git
229
+ checkout — git operations never conflict between agents.
230
+
231
+ The following steps differ from the standard workflow:
232
+
233
+ | Step | Standard | Parallel mode |
234
+ |------|----------|---------------|
235
+ | **Step 2** | checkout develop, create branch | worktree already has a clean checkout; just run `git checkout -b <issue-id>` |
236
+ | **Step 5** | run lint + tests | **skip** — tests run once on the consolidated branch by `/fix-issues` |
237
+ | **Step 7** | create PR | **skip** — `/fix-issues` creates one consolidated PR |
238
+ | **Step 8** | transition Jira | **skip** — handled by `/fix-issues` after consolidation |
239
+ | **Step 9** | report + PushNotification | report branch name, files changed, commit hash; call `PushNotification` immediately |
240
+
241
+ ---
242
+
243
+ ## Rules
244
+
245
+ - Never commit directly to `develop` or `main`
246
+ - Never force-push
247
+ - Never skip hooks (`--no-verify`)
248
+ - Do not suppress findings without also applying the semantic fix
249
+ - If checks fail after one fix attempt, stop and report — do not keep retrying
250
+ - Do not create the PR if checks are failing
@@ -0,0 +1,25 @@
1
+ ---
2
+ paths:
3
+ - "backend/**"
4
+ ---
5
+
6
+ # BE001 — Required `backend/app/` structure
7
+
8
+ `backend/app/` must contain **all** of the following directories and files.
9
+
10
+ **Required directories:**
11
+ ```
12
+ core/ fixtures/ management/ models/ queries/ routers/ schemas/ tasks/ tests/ utils/
13
+ ```
14
+
15
+ **Required root files:** `main.py`, `__init__.py`
16
+
17
+ **Required layout inside `tests/`:**
18
+ ```
19
+ tests/
20
+ models/ queries/ routers/ tasks/ utils/
21
+ __init__.py
22
+ conftest.py
23
+ ```
24
+
25
+ When adding a new resource, create all required files in the same PR.
@@ -0,0 +1,15 @@
1
+ ---
2
+ paths:
3
+ - "backend/app/models/**"
4
+ ---
5
+
6
+ # BE002 — Model class naming
7
+
8
+ Each `backend/app/models/foo.py` must define a class named after the file (snake_case → PascalCase).
9
+
10
+ | File | Required class |
11
+ |------|---------------|
12
+ | `models/user.py` | `class User` |
13
+ | `models/todo_item.py` | `class TodoItem` |
14
+
15
+ See also BE010 (one class per file).