@svenroth-ai/shipwright 0.25.0 → 0.26.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 (134) hide show
  1. package/client/dist/assets/{EmbeddedTerminal-5QvKe3_a.js → EmbeddedTerminal-D3wpPNZP.js} +1 -1
  2. package/client/dist/assets/{abnfDiagram-VRR7QNED-CXi9HegQ.js → abnfDiagram-VRR7QNED-BkLIltB3.js} +1 -1
  3. package/client/dist/assets/{arc-DLh4GiqR.js → arc-Sw-Gh0nI.js} +1 -1
  4. package/client/dist/assets/{architectureDiagram-ZJ3FMSHR-DUypQ8dQ.js → architectureDiagram-ZJ3FMSHR-rdxUi9Ks.js} +1 -1
  5. package/client/dist/assets/{blockDiagram-677ZJIJ3-D2cVMKJG.js → blockDiagram-677ZJIJ3-Ch_9dj8a.js} +1 -1
  6. package/client/dist/assets/{c4Diagram-LMCZKHZV-DtruBGJw.js → c4Diagram-LMCZKHZV-CkFlO65x.js} +1 -1
  7. package/client/dist/assets/channel-BYPbLjRl.js +1 -0
  8. package/client/dist/assets/{chunk-2Q5K7J3B-CAfQkFw2.js → chunk-2Q5K7J3B-CypX83xu.js} +1 -1
  9. package/client/dist/assets/{chunk-32BRIVSS-CPWXoLnQ.js → chunk-32BRIVSS-DxVLYGdl.js} +1 -1
  10. package/client/dist/assets/{chunk-5VM5RSS4-xVc3oppQ.js → chunk-5VM5RSS4-Cxk1evhx.js} +1 -1
  11. package/client/dist/assets/{chunk-EX3LRPZG-CUpl6fRR.js → chunk-EX3LRPZG-n9q5S4yJ.js} +1 -1
  12. package/client/dist/assets/{chunk-JWPE2WC7-NejUp56x.js → chunk-JWPE2WC7-jeL4xvir.js} +1 -1
  13. package/client/dist/assets/{chunk-MOJQB5TN-C9-2lLg0.js → chunk-MOJQB5TN-DDSHN0cj.js} +1 -1
  14. package/client/dist/assets/{chunk-RYQCIY6F-BAPtwABy.js → chunk-RYQCIY6F-C0bo383g.js} +1 -1
  15. package/client/dist/assets/{chunk-V7JOEXUC-Dwzihw26.js → chunk-V7JOEXUC-C0jDXXAU.js} +1 -1
  16. package/client/dist/assets/{chunk-VR4S4FIN-9-iArFJM.js → chunk-VR4S4FIN-h-Rr4Pn2.js} +1 -1
  17. package/client/dist/assets/{chunk-XXDRQBXY-DiWHOrqe.js → chunk-XXDRQBXY-BexSo0-s.js} +1 -1
  18. package/client/dist/assets/classDiagram-OUVF2IWQ-CsFIeTju.js +1 -0
  19. package/client/dist/assets/classDiagram-v2-EOCWNBFH-CsFIeTju.js +1 -0
  20. package/client/dist/assets/{cose-bilkent-JH36ORCC-Cp04EOcH.js → cose-bilkent-JH36ORCC-BQXzaioj.js} +1 -1
  21. package/client/dist/assets/{cynefin-VYW2F7L2-D--GN1v8.js → cynefin-VYW2F7L2-BJIofhfe.js} +1 -1
  22. package/client/dist/assets/{cynefinDiagram-TSTJHNR4-BGH0o_qp.js → cynefinDiagram-TSTJHNR4-DmPqTM1T.js} +1 -1
  23. package/client/dist/assets/{dagre-VKFMJZFB-DSKkIKlj.js → dagre-VKFMJZFB-1xljvw6X.js} +1 -1
  24. package/client/dist/assets/{diagram-FQU43EPY-Cs_C4lb-.js → diagram-FQU43EPY-iyL9muCG.js} +1 -1
  25. package/client/dist/assets/{diagram-G47NLZAW-oDtAA8O_.js → diagram-G47NLZAW-DREp2Th6.js} +1 -1
  26. package/client/dist/assets/{diagram-NH7WQ7WH-BiFMjqSH.js → diagram-NH7WQ7WH-h0X3Is2S.js} +1 -1
  27. package/client/dist/assets/{diagram-OA4YK3LP-Ccs3thCj.js → diagram-OA4YK3LP-Bj8YZRFJ.js} +1 -1
  28. package/client/dist/assets/{diagram-WEI45ONY-CdZNqgO3.js → diagram-WEI45ONY-BZOf805d.js} +1 -1
  29. package/client/dist/assets/{ebnfDiagram-CCIWWBDH-CapTA0VL.js → ebnfDiagram-CCIWWBDH-DO5JnXda.js} +1 -1
  30. package/client/dist/assets/{erDiagram-Q63AITRT-BcRNEP8s.js → erDiagram-Q63AITRT-DRgcqg1T.js} +1 -1
  31. package/client/dist/assets/{flowDiagram-23GEKE2U-CJ_zF7e_.js → flowDiagram-23GEKE2U-C3J9QmrW.js} +1 -1
  32. package/client/dist/assets/{ganttDiagram-NO4QXBWP-CnJdcg9A.js → ganttDiagram-NO4QXBWP-BIEl3Tkm.js} +1 -1
  33. package/client/dist/assets/{gitGraphDiagram-IHSO6WYX-YTUQ_ELk.js → gitGraphDiagram-IHSO6WYX-BNF0tFWC.js} +1 -1
  34. package/client/dist/assets/{index-irQhGNpn.js → index-BnTOrFHb.js} +203 -202
  35. package/client/dist/assets/index-CYPc6qxw.css +1 -0
  36. package/client/dist/assets/{infoDiagram-FWYZ7A6U-CLOP_ZWD.js → infoDiagram-FWYZ7A6U-DEyFxiyY.js} +1 -1
  37. package/client/dist/assets/{ishikawaDiagram-FXEZZL3T-aFTIzr7o.js → ishikawaDiagram-FXEZZL3T-B_ehlg3I.js} +1 -1
  38. package/client/dist/assets/{journeyDiagram-5HDEW3XC-CbPJB4xd.js → journeyDiagram-5HDEW3XC-Dp00FyJS.js} +1 -1
  39. package/client/dist/assets/{kanban-definition-HUTT4EX6-BoyhytIS.js → kanban-definition-HUTT4EX6-CTAf16q8.js} +1 -1
  40. package/client/dist/assets/{linear-1VXA-uBg.js → linear-9vNUgmYd.js} +1 -1
  41. package/client/dist/assets/{mermaid.core-D_lO2yK9.js → mermaid.core-A6tjaEVD.js} +4 -4
  42. package/client/dist/assets/{mindmap-definition-LN4V7U3C-iFK7LXMx.js → mindmap-definition-LN4V7U3C-DRW3bmCY.js} +1 -1
  43. package/client/dist/assets/{pegDiagram-2B236MQR-DNmcmfA-.js → pegDiagram-2B236MQR-DJFCjHp2.js} +1 -1
  44. package/client/dist/assets/{pieDiagram-ENE6RG2P-ekx83O5b.js → pieDiagram-ENE6RG2P-KRd-sGvC.js} +1 -1
  45. package/client/dist/assets/{quadrantDiagram-ABIIQ3AL-DayyD1l8.js → quadrantDiagram-ABIIQ3AL-9TLZE3Hu.js} +1 -1
  46. package/client/dist/assets/{railroadDiagram-RFXS5EU6-Bdgz7S6G.js → railroadDiagram-RFXS5EU6-y4tLtjXg.js} +1 -1
  47. package/client/dist/assets/{requirementDiagram-TGXJPOKE-szP3Muld.js → requirementDiagram-TGXJPOKE-B9EOQDQM.js} +1 -1
  48. package/client/dist/assets/{sankeyDiagram-HTMAVEWB-Ct3rzgUj.js → sankeyDiagram-HTMAVEWB-zfwiDzkT.js} +1 -1
  49. package/client/dist/assets/{sequenceDiagram-DBY2YBRQ-_69EfmOU.js → sequenceDiagram-DBY2YBRQ-DW1LWepL.js} +1 -1
  50. package/client/dist/assets/{sizeCapture-X5ZJPWSS-BSOU06J2.js → sizeCapture-X5ZJPWSS-BM81Mik0.js} +1 -1
  51. package/client/dist/assets/{stateDiagram-2N3HPSRC-HmOmFwQm.js → stateDiagram-2N3HPSRC-D0EMIw1w.js} +1 -1
  52. package/client/dist/assets/stateDiagram-v2-6OUMAXLB-B3E4_xxT.js +1 -0
  53. package/client/dist/assets/{swimlanes-5IMT3BWC-CVg_4oT7.js → swimlanes-5IMT3BWC-CKXNCX6M.js} +2 -2
  54. package/client/dist/assets/swimlanesDiagram-G3AALYLV-BegQBqnC.js +8 -0
  55. package/client/dist/assets/{timeline-definition-FHXFAJF6-CBBaDKXm.js → timeline-definition-FHXFAJF6-ByzIfvL5.js} +1 -1
  56. package/client/dist/assets/{vennDiagram-L72KCM5P-CBXiWPMc.js → vennDiagram-L72KCM5P-Xep38xBH.js} +1 -1
  57. package/client/dist/assets/{wardleyDiagram-EHGQE667-uhBCZoW0.js → wardleyDiagram-EHGQE667-DKWDpx6g.js} +1 -1
  58. package/client/dist/assets/{xychartDiagram-FW5EYKEG-xxE_wY5O.js → xychartDiagram-FW5EYKEG-BGcwZTnu.js} +1 -1
  59. package/client/dist/index.html +27 -27
  60. package/lib/claude-cli.mjs +173 -173
  61. package/lib/preflight.mjs +252 -252
  62. package/lib/probe-path.mjs +84 -84
  63. package/lib/server.mjs +369 -369
  64. package/lib/util.mjs +157 -157
  65. package/lib/win32-spawn.mjs +253 -253
  66. package/package.json +68 -68
  67. package/scripts/deploy-procs.mjs +208 -208
  68. package/scripts/deploy-swap.mjs +276 -276
  69. package/scripts/kill-targets.js +140 -140
  70. package/scripts/repair-claude-json.mjs +295 -295
  71. package/server/dist/config/default-actions.json +90 -90
  72. package/server/dist/core/mission-context/association.d.ts +46 -0
  73. package/server/dist/core/mission-context/association.d.ts.map +1 -1
  74. package/server/dist/core/mission-context/association.js +69 -0
  75. package/server/dist/core/mission-context/association.js.map +1 -1
  76. package/server/dist/core/mission-context/resolver-iterate.d.ts +6 -0
  77. package/server/dist/core/mission-context/resolver-iterate.d.ts.map +1 -0
  78. package/server/dist/core/mission-context/resolver-iterate.js +202 -0
  79. package/server/dist/core/mission-context/resolver-iterate.js.map +1 -0
  80. package/server/dist/core/mission-context/resolver-parts.d.ts +20 -0
  81. package/server/dist/core/mission-context/resolver-parts.d.ts.map +1 -1
  82. package/server/dist/core/mission-context/resolver-parts.js +92 -0
  83. package/server/dist/core/mission-context/resolver-parts.js.map +1 -1
  84. package/server/dist/core/mission-context/resolver.d.ts +1 -1
  85. package/server/dist/core/mission-context/resolver.d.ts.map +1 -1
  86. package/server/dist/core/mission-context/resolver.js +17 -199
  87. package/server/dist/core/mission-context/resolver.js.map +1 -1
  88. package/server/dist/core/mission-context/run-id-recovery.d.ts +21 -5
  89. package/server/dist/core/mission-context/run-id-recovery.d.ts.map +1 -1
  90. package/server/dist/core/mission-context/run-id-recovery.js +32 -5
  91. package/server/dist/core/mission-context/run-id-recovery.js.map +1 -1
  92. package/server/dist/core/mission-context/scenario.d.ts +18 -11
  93. package/server/dist/core/mission-context/scenario.d.ts.map +1 -1
  94. package/server/dist/core/mission-context/scenario.js +40 -3
  95. package/server/dist/core/mission-context/scenario.js.map +1 -1
  96. package/server/dist/core/path-guard.d.ts +1 -1
  97. package/server/dist/core/path-guard.d.ts.map +1 -1
  98. package/server/dist/core/path-guard.js +9 -2
  99. package/server/dist/core/path-guard.js.map +1 -1
  100. package/server/dist/core/shipslog-docs-reader.d.ts +4 -0
  101. package/server/dist/core/shipslog-docs-reader.d.ts.map +1 -0
  102. package/server/dist/core/shipslog-docs-reader.js +181 -0
  103. package/server/dist/core/shipslog-docs-reader.js.map +1 -0
  104. package/server/dist/core/shipslog-docs-types.d.ts +15 -0
  105. package/server/dist/core/shipslog-docs-types.d.ts.map +1 -0
  106. package/server/dist/core/shipslog-docs-types.js +14 -0
  107. package/server/dist/core/shipslog-docs-types.js.map +1 -0
  108. package/server/dist/external/design-review/serve.js +27 -27
  109. package/server/dist/external/mission-context/association-write.d.ts +22 -0
  110. package/server/dist/external/mission-context/association-write.d.ts.map +1 -0
  111. package/server/dist/external/mission-context/association-write.js +90 -0
  112. package/server/dist/external/mission-context/association-write.js.map +1 -0
  113. package/server/dist/external/mission-context/routes.d.ts.map +1 -1
  114. package/server/dist/external/mission-context/routes.js +18 -31
  115. package/server/dist/external/mission-context/routes.js.map +1 -1
  116. package/server/dist/external/routes.d.ts.map +1 -1
  117. package/server/dist/external/routes.js +9 -6
  118. package/server/dist/external/routes.js.map +1 -1
  119. package/server/dist/external/shipslog-docs/routes.d.ts +10 -0
  120. package/server/dist/external/shipslog-docs/routes.d.ts.map +1 -0
  121. package/server/dist/external/shipslog-docs/routes.js +41 -0
  122. package/server/dist/external/shipslog-docs/routes.js.map +1 -0
  123. package/server/package.json +1 -1
  124. package/server/profiles/PROFILE_SCHEMA_VERSION +1 -1
  125. package/server/profiles/README.md +27 -27
  126. package/server/profiles/python-plugin-monorepo.json +35 -35
  127. package/server/profiles/supabase-nextjs.json +253 -253
  128. package/server/profiles/vite-hono.json +92 -92
  129. package/client/dist/assets/channel-C_k-9jsa.js +0 -1
  130. package/client/dist/assets/classDiagram-OUVF2IWQ-CsEPq9Ac.js +0 -1
  131. package/client/dist/assets/classDiagram-v2-EOCWNBFH-CsEPq9Ac.js +0 -1
  132. package/client/dist/assets/index-6nZ1bt0a.css +0 -1
  133. package/client/dist/assets/stateDiagram-v2-6OUMAXLB-BW8H33dv.js +0 -1
  134. package/client/dist/assets/swimlanesDiagram-G3AALYLV-BaRlxcPD.js +0 -8
@@ -1,253 +1,253 @@
1
- {
2
- "name": "supabase-nextjs",
3
- "description": "Full-stack Next.js with Supabase backend, optimized for Jelastic deployment",
4
- "version": "1.0.0",
5
-
6
- "stack": {
7
- "runtime": {
8
- "node": "22.x",
9
- "typescript": "^5.9.3"
10
- },
11
- "frontend": {
12
- "next": "^16.2.0",
13
- "react": "^19.2.4",
14
- "react-dom": "^19.2.4",
15
- "tailwindcss": "^4.2.0",
16
- "zustand": "^5.0.12"
17
- },
18
- "backend": {
19
- "supabase-js": "@supabase/supabase-js@^2.99.3",
20
- "supabase-cli": "^2.82.0"
21
- },
22
- "auth": {
23
- "provider": "supabase-auth",
24
- "methods": ["email", "oauth"],
25
- "notes": "Supabase Auth with Email + OAuth. Token refresh strategy is project-specific (decision_log)."
26
- },
27
- "storage": "supabase-storage",
28
- "realtime": "supabase-realtime"
29
- },
30
-
31
- "design_system": {
32
- "name": "untitled-ui",
33
- "type": "react",
34
- "docs_url": "https://www.untitledui.com/react/components",
35
- "mockup_approach": "html-inline-css",
36
- "_comment": "Design system for shipwright-design mockups. Implementation uses component_library below."
37
- },
38
-
39
- "ui": {
40
- "component_library": "shadcn/ui",
41
- "shadcn_cli": "^4.0.0",
42
- "forms": {
43
- "react-hook-form": "^7.71.2",
44
- "zod": "^4.3.6"
45
- },
46
- "patterns": {
47
- "auth_flow": "Login/Signup page with social OAuth buttons (shadcn/ui)",
48
- "dashboard": "Sidebar navigation + header + content area",
49
- "settings": "Tab-based settings page",
50
- "lists": "Data tables with sorting, filtering, pagination (shadcn/ui)",
51
- "forms": "Multi-step forms with validation (react-hook-form + zod)",
52
- "empty_states": "Illustrated empty state with CTA",
53
- "error_pages": "404/500 with navigation back"
54
- }
55
- },
56
-
57
- "dev_server": {
58
- "command": "npm run dev",
59
- "port": 3000,
60
- "ready_timeout_seconds": 60,
61
- "ready_path": "/"
62
- },
63
-
64
- "testing": {
65
- "unit": {
66
- "framework": "vitest",
67
- "version": "^4.1.0"
68
- },
69
- "e2e": {
70
- "framework": "@playwright/test",
71
- "version": "^1.58.2"
72
- },
73
- "integration": {
74
- "framework": "vitest",
75
- "config": "vitest.integration.config.ts",
76
- "command": "npx vitest run --config vitest.integration.config.ts",
77
- "dir": "tests/integration/",
78
- "helpers_template": "integration-helpers-supabase.ts.template",
79
- "vitest_config_template": "vitest.integration.config.ts.template",
80
- "cleanup_strategy": "cascade-delete-test-user",
81
- "db_strategy": { "local": "supabase start", "ci": "supabase start", "dev": "supabase start" },
82
- "env_file": ".env.test",
83
- "url_safety_check": "localhost_only",
84
- "requires_env": ["NEXT_PUBLIC_SUPABASE_URL", "NEXT_PUBLIC_SUPABASE_ANON_KEY", "SUPABASE_SERVICE_ROLE_KEY"],
85
- "test_users": {
86
- "admin": { "env_email": "TEST_ADMIN_EMAIL", "env_password": "TEST_ADMIN_PASSWORD" },
87
- "member": { "env_email": "TEST_MEMBER_EMAIL", "env_password": "TEST_MEMBER_PASSWORD" }
88
- },
89
- "timeout_ms": 30000,
90
- "sequential": true,
91
- "autofix": {
92
- "max_retries": 3,
93
- "strategy": "structured-debugging",
94
- "fast_fail_patterns": ["ECONNREFUSED", "ETIMEDOUT", "connect ENOENT"],
95
- "fast_fail_threshold": 0.5
96
- }
97
- },
98
- "db_tests": {
99
- "framework": "pgtap",
100
- "command": "supabase test db",
101
- "dir": "supabase/tests/database/",
102
- "setup_script": "supabase/tests/database/000-setup-tests-hooks.sql",
103
- "helpers": "supabase-test-helpers"
104
- },
105
- "security": {
106
- "provider": "auto",
107
- "scope": ["sast", "sca", "secret-detection"],
108
- "_comment": "provider: 'auto' detects Aikido or OSS tools. Set 'oss' or 'aikido' to force a backend."
109
- }
110
- },
111
-
112
- "linting": {
113
- "eslint": "^10.0.3",
114
- "eslint_config": "flat",
115
- "prettier": "^3.8.1"
116
- },
117
-
118
- "error_tracking": {
119
- "provider": "sentry",
120
- "package": "@sentry/nextjs@^10.45.0",
121
- "tier": "free"
122
- },
123
-
124
- "deploy": {
125
- "target": "jelastic",
126
- "environments": {
127
- "dev": {
128
- "auto_deploy": true,
129
- "branches": ["develop", "feature/*"]
130
- },
131
- "prod": {
132
- "auto_deploy": false,
133
- "branches": ["main"],
134
- "requires_confirmation": true,
135
- "snapshot_before_deploy": true
136
- }
137
- },
138
- "next_config": {
139
- "output": "standalone"
140
- },
141
- "notes": "No ISR on Jelastic — use SSR or client-side fetch. Optional Cloudflare CDN for caching + image optimization."
142
- },
143
-
144
- "ci": {
145
- "provider": "github-actions",
146
- "pipeline": {
147
- "on_push": ["develop", "feature/*"],
148
- "on_pr": ["main"],
149
- "jobs": ["lint", "type-check", "unit-tests", "integration-tests"],
150
- "on_pr_jobs": ["aikido-scan"]
151
- }
152
- },
153
-
154
- "folder_structure": {
155
- "src/app/": "Next.js App Router pages",
156
- "src/components/": "React components",
157
- "src/lib/": "Utility functions",
158
- "src/hooks/": "Custom React hooks",
159
- "supabase/migrations/": "SQL forward migrations (managed by shipwright-build)",
160
- "supabase/migrations/_rollback/": "SQL rollback migrations (not executed by supabase db push)",
161
- "supabase/functions/": "Edge Functions",
162
- "tests/": "Vitest unit tests",
163
- "tests/integration/": "Vitest integration tests (real DB, no mocks, localhost only)",
164
- "supabase/tests/database/": "pgTAP database tests (RLS, constraints, DB functions)",
165
- "e2e/": "Playwright E2E tests",
166
- "public/": "Static assets"
167
- },
168
-
169
- "env_files": {
170
- ".env.local": "Local development (not committed)",
171
- ".env.test": "Integration test environment — localhost Supabase only (not committed)",
172
- ".env.example": "Template with all required vars (committed)",
173
- "jelastic_dashboard": "DEV/PROD secrets (SUPABASE_URL, SUPABASE_KEY, etc.)"
174
- },
175
-
176
- "required_env_vars": {
177
- "build": [
178
- {"name": "NEXT_PUBLIC_SUPABASE_URL", "description": "Supabase project URL"},
179
- {"name": "NEXT_PUBLIC_SUPABASE_ANON_KEY", "description": "Supabase anonymous key"},
180
- {"name": "SUPABASE_SERVICE_ROLE_KEY", "description": "Supabase service role key (admin operations: webhooks, role upgrades)"},
181
- {"name": "TEST_ADMIN_EMAIL", "description": "Test admin user email for integration tests", "optional": true},
182
- {"name": "TEST_ADMIN_PASSWORD", "description": "Test admin user password for integration tests", "optional": true},
183
- {"name": "TEST_MEMBER_EMAIL", "description": "Test member user email for integration tests", "optional": true},
184
- {"name": "TEST_MEMBER_PASSWORD", "description": "Test member user password for integration tests", "optional": true}
185
- ],
186
- "deploy": [
187
- {"name": "JELASTIC_TOKEN", "description": "Infomaniak Jelastic API token"},
188
- {"name": "SUPABASE_ACCESS_TOKEN", "description": "Supabase CLI access token (for migrations)", "optional": true}
189
- ],
190
- "plugin": [
191
- {"name": "OPENROUTER_API_KEY", "description": "OpenRouter API key for external plan review", "optional": true},
192
- {"name": "GEMINI_API_KEY", "description": "Google Gemini API key (alternative to OpenRouter)", "optional": true},
193
- {"name": "OPENAI_API_KEY", "description": "OpenAI API key (alternative to OpenRouter)", "optional": true},
194
- {"name": "AIKIDO_CLIENT_ID", "description": "Aikido Security API client ID", "optional": true},
195
- {"name": "AIKIDO_CLIENT_SECRET", "description": "Aikido Security API client secret", "optional": true}
196
- ]
197
- },
198
-
199
- "architecture_rules": [
200
- "Feature modules must not import from other feature modules",
201
- "All Supabase calls go through lib/supabase/ — no direct client usage in components",
202
- "All API calls go through lib/api/ — no fetch() in components",
203
- "Server Components by default — 'use client' only when needed",
204
- "No business logic in API routes — use Edge Functions",
205
- "All database changes via migrations in supabase/migrations/"
206
- ],
207
-
208
- "rules": ["tests", "integration-tests", "api", "migrations", "components", "config"],
209
-
210
- "package_manager": "npm",
211
-
212
- "migrations": {
213
- "dev": "supabase db push (automatic)",
214
- "prod": "supabase db push --dry-run first, user confirms, then apply",
215
- "rollback": "down.sql generated in supabase/migrations/_rollback/ (best-effort, never in migrations/ directly)",
216
- "destructive_protection": true,
217
- "destructive_patterns": ["DROP TABLE", "DROP COLUMN", "ALTER TYPE"],
218
- "dir": "supabase/migrations/",
219
- "preflight_cmd": "npx supabase status",
220
- "apply_cmd": "npx supabase db push --linked",
221
- "dry_run_cmd": "npx supabase db push --linked --dry-run",
222
- "list_cmd": "npx supabase migration list",
223
- "safe_nonprod_only": true,
224
- "supports_idempotent_apply": true,
225
- "supports_locking": true,
226
- "supports_dry_run": true,
227
- "apply_scope": "linked",
228
- "rollback_strategy": "manual",
229
- "post_apply_manual_steps": [
230
- {
231
- "trigger_tag": "supabase_auth_hook",
232
- "trigger_description": "Auth Hook function created (e.g., custom_access_token_hook)",
233
- "action": "Dashboard → Authentication → Hooks → Enable and select function",
234
- "note": "Cannot be done via CLI or migration",
235
- "blocks_tests_for": ["auth", "session", "token"]
236
- },
237
- {
238
- "trigger_tag": "supabase_webhook",
239
- "trigger_description": "Database Webhook / Edge Function created",
240
- "action": "Dashboard → Database → Webhooks → Configure",
241
- "note": "Edge Function must be deployed first",
242
- "blocks_tests_for": ["webhook", "edge-function"]
243
- },
244
- {
245
- "trigger_tag": "supabase_realtime",
246
- "trigger_description": "Realtime publication added for a table",
247
- "action": "Dashboard → Database → Replication → Enable table",
248
- "note": "Required for real-time subscriptions to work",
249
- "blocks_tests_for": ["realtime", "subscription"]
250
- }
251
- ]
252
- }
253
- }
1
+ {
2
+ "name": "supabase-nextjs",
3
+ "description": "Full-stack Next.js with Supabase backend, optimized for Jelastic deployment",
4
+ "version": "1.0.0",
5
+
6
+ "stack": {
7
+ "runtime": {
8
+ "node": "22.x",
9
+ "typescript": "^5.9.3"
10
+ },
11
+ "frontend": {
12
+ "next": "^16.2.0",
13
+ "react": "^19.2.4",
14
+ "react-dom": "^19.2.4",
15
+ "tailwindcss": "^4.2.0",
16
+ "zustand": "^5.0.12"
17
+ },
18
+ "backend": {
19
+ "supabase-js": "@supabase/supabase-js@^2.99.3",
20
+ "supabase-cli": "^2.82.0"
21
+ },
22
+ "auth": {
23
+ "provider": "supabase-auth",
24
+ "methods": ["email", "oauth"],
25
+ "notes": "Supabase Auth with Email + OAuth. Token refresh strategy is project-specific (decision_log)."
26
+ },
27
+ "storage": "supabase-storage",
28
+ "realtime": "supabase-realtime"
29
+ },
30
+
31
+ "design_system": {
32
+ "name": "untitled-ui",
33
+ "type": "react",
34
+ "docs_url": "https://www.untitledui.com/react/components",
35
+ "mockup_approach": "html-inline-css",
36
+ "_comment": "Design system for shipwright-design mockups. Implementation uses component_library below."
37
+ },
38
+
39
+ "ui": {
40
+ "component_library": "shadcn/ui",
41
+ "shadcn_cli": "^4.0.0",
42
+ "forms": {
43
+ "react-hook-form": "^7.71.2",
44
+ "zod": "^4.3.6"
45
+ },
46
+ "patterns": {
47
+ "auth_flow": "Login/Signup page with social OAuth buttons (shadcn/ui)",
48
+ "dashboard": "Sidebar navigation + header + content area",
49
+ "settings": "Tab-based settings page",
50
+ "lists": "Data tables with sorting, filtering, pagination (shadcn/ui)",
51
+ "forms": "Multi-step forms with validation (react-hook-form + zod)",
52
+ "empty_states": "Illustrated empty state with CTA",
53
+ "error_pages": "404/500 with navigation back"
54
+ }
55
+ },
56
+
57
+ "dev_server": {
58
+ "command": "npm run dev",
59
+ "port": 3000,
60
+ "ready_timeout_seconds": 60,
61
+ "ready_path": "/"
62
+ },
63
+
64
+ "testing": {
65
+ "unit": {
66
+ "framework": "vitest",
67
+ "version": "^4.1.0"
68
+ },
69
+ "e2e": {
70
+ "framework": "@playwright/test",
71
+ "version": "^1.58.2"
72
+ },
73
+ "integration": {
74
+ "framework": "vitest",
75
+ "config": "vitest.integration.config.ts",
76
+ "command": "npx vitest run --config vitest.integration.config.ts",
77
+ "dir": "tests/integration/",
78
+ "helpers_template": "integration-helpers-supabase.ts.template",
79
+ "vitest_config_template": "vitest.integration.config.ts.template",
80
+ "cleanup_strategy": "cascade-delete-test-user",
81
+ "db_strategy": { "local": "supabase start", "ci": "supabase start", "dev": "supabase start" },
82
+ "env_file": ".env.test",
83
+ "url_safety_check": "localhost_only",
84
+ "requires_env": ["NEXT_PUBLIC_SUPABASE_URL", "NEXT_PUBLIC_SUPABASE_ANON_KEY", "SUPABASE_SERVICE_ROLE_KEY"],
85
+ "test_users": {
86
+ "admin": { "env_email": "TEST_ADMIN_EMAIL", "env_password": "TEST_ADMIN_PASSWORD" },
87
+ "member": { "env_email": "TEST_MEMBER_EMAIL", "env_password": "TEST_MEMBER_PASSWORD" }
88
+ },
89
+ "timeout_ms": 30000,
90
+ "sequential": true,
91
+ "autofix": {
92
+ "max_retries": 3,
93
+ "strategy": "structured-debugging",
94
+ "fast_fail_patterns": ["ECONNREFUSED", "ETIMEDOUT", "connect ENOENT"],
95
+ "fast_fail_threshold": 0.5
96
+ }
97
+ },
98
+ "db_tests": {
99
+ "framework": "pgtap",
100
+ "command": "supabase test db",
101
+ "dir": "supabase/tests/database/",
102
+ "setup_script": "supabase/tests/database/000-setup-tests-hooks.sql",
103
+ "helpers": "supabase-test-helpers"
104
+ },
105
+ "security": {
106
+ "provider": "auto",
107
+ "scope": ["sast", "sca", "secret-detection"],
108
+ "_comment": "provider: 'auto' detects Aikido or OSS tools. Set 'oss' or 'aikido' to force a backend."
109
+ }
110
+ },
111
+
112
+ "linting": {
113
+ "eslint": "^10.0.3",
114
+ "eslint_config": "flat",
115
+ "prettier": "^3.8.1"
116
+ },
117
+
118
+ "error_tracking": {
119
+ "provider": "sentry",
120
+ "package": "@sentry/nextjs@^10.45.0",
121
+ "tier": "free"
122
+ },
123
+
124
+ "deploy": {
125
+ "target": "jelastic",
126
+ "environments": {
127
+ "dev": {
128
+ "auto_deploy": true,
129
+ "branches": ["develop", "feature/*"]
130
+ },
131
+ "prod": {
132
+ "auto_deploy": false,
133
+ "branches": ["main"],
134
+ "requires_confirmation": true,
135
+ "snapshot_before_deploy": true
136
+ }
137
+ },
138
+ "next_config": {
139
+ "output": "standalone"
140
+ },
141
+ "notes": "No ISR on Jelastic — use SSR or client-side fetch. Optional Cloudflare CDN for caching + image optimization."
142
+ },
143
+
144
+ "ci": {
145
+ "provider": "github-actions",
146
+ "pipeline": {
147
+ "on_push": ["develop", "feature/*"],
148
+ "on_pr": ["main"],
149
+ "jobs": ["lint", "type-check", "unit-tests", "integration-tests"],
150
+ "on_pr_jobs": ["aikido-scan"]
151
+ }
152
+ },
153
+
154
+ "folder_structure": {
155
+ "src/app/": "Next.js App Router pages",
156
+ "src/components/": "React components",
157
+ "src/lib/": "Utility functions",
158
+ "src/hooks/": "Custom React hooks",
159
+ "supabase/migrations/": "SQL forward migrations (managed by shipwright-build)",
160
+ "supabase/migrations/_rollback/": "SQL rollback migrations (not executed by supabase db push)",
161
+ "supabase/functions/": "Edge Functions",
162
+ "tests/": "Vitest unit tests",
163
+ "tests/integration/": "Vitest integration tests (real DB, no mocks, localhost only)",
164
+ "supabase/tests/database/": "pgTAP database tests (RLS, constraints, DB functions)",
165
+ "e2e/": "Playwright E2E tests",
166
+ "public/": "Static assets"
167
+ },
168
+
169
+ "env_files": {
170
+ ".env.local": "Local development (not committed)",
171
+ ".env.test": "Integration test environment — localhost Supabase only (not committed)",
172
+ ".env.example": "Template with all required vars (committed)",
173
+ "jelastic_dashboard": "DEV/PROD secrets (SUPABASE_URL, SUPABASE_KEY, etc.)"
174
+ },
175
+
176
+ "required_env_vars": {
177
+ "build": [
178
+ {"name": "NEXT_PUBLIC_SUPABASE_URL", "description": "Supabase project URL"},
179
+ {"name": "NEXT_PUBLIC_SUPABASE_ANON_KEY", "description": "Supabase anonymous key"},
180
+ {"name": "SUPABASE_SERVICE_ROLE_KEY", "description": "Supabase service role key (admin operations: webhooks, role upgrades)"},
181
+ {"name": "TEST_ADMIN_EMAIL", "description": "Test admin user email for integration tests", "optional": true},
182
+ {"name": "TEST_ADMIN_PASSWORD", "description": "Test admin user password for integration tests", "optional": true},
183
+ {"name": "TEST_MEMBER_EMAIL", "description": "Test member user email for integration tests", "optional": true},
184
+ {"name": "TEST_MEMBER_PASSWORD", "description": "Test member user password for integration tests", "optional": true}
185
+ ],
186
+ "deploy": [
187
+ {"name": "JELASTIC_TOKEN", "description": "Infomaniak Jelastic API token"},
188
+ {"name": "SUPABASE_ACCESS_TOKEN", "description": "Supabase CLI access token (for migrations)", "optional": true}
189
+ ],
190
+ "plugin": [
191
+ {"name": "OPENROUTER_API_KEY", "description": "OpenRouter API key for external plan review", "optional": true},
192
+ {"name": "GEMINI_API_KEY", "description": "Google Gemini API key (alternative to OpenRouter)", "optional": true},
193
+ {"name": "OPENAI_API_KEY", "description": "OpenAI API key (alternative to OpenRouter)", "optional": true},
194
+ {"name": "AIKIDO_CLIENT_ID", "description": "Aikido Security API client ID", "optional": true},
195
+ {"name": "AIKIDO_CLIENT_SECRET", "description": "Aikido Security API client secret", "optional": true}
196
+ ]
197
+ },
198
+
199
+ "architecture_rules": [
200
+ "Feature modules must not import from other feature modules",
201
+ "All Supabase calls go through lib/supabase/ — no direct client usage in components",
202
+ "All API calls go through lib/api/ — no fetch() in components",
203
+ "Server Components by default — 'use client' only when needed",
204
+ "No business logic in API routes — use Edge Functions",
205
+ "All database changes via migrations in supabase/migrations/"
206
+ ],
207
+
208
+ "rules": ["tests", "integration-tests", "api", "migrations", "components", "config"],
209
+
210
+ "package_manager": "npm",
211
+
212
+ "migrations": {
213
+ "dev": "supabase db push (automatic)",
214
+ "prod": "supabase db push --dry-run first, user confirms, then apply",
215
+ "rollback": "down.sql generated in supabase/migrations/_rollback/ (best-effort, never in migrations/ directly)",
216
+ "destructive_protection": true,
217
+ "destructive_patterns": ["DROP TABLE", "DROP COLUMN", "ALTER TYPE"],
218
+ "dir": "supabase/migrations/",
219
+ "preflight_cmd": "npx supabase status",
220
+ "apply_cmd": "npx supabase db push --linked",
221
+ "dry_run_cmd": "npx supabase db push --linked --dry-run",
222
+ "list_cmd": "npx supabase migration list",
223
+ "safe_nonprod_only": true,
224
+ "supports_idempotent_apply": true,
225
+ "supports_locking": true,
226
+ "supports_dry_run": true,
227
+ "apply_scope": "linked",
228
+ "rollback_strategy": "manual",
229
+ "post_apply_manual_steps": [
230
+ {
231
+ "trigger_tag": "supabase_auth_hook",
232
+ "trigger_description": "Auth Hook function created (e.g., custom_access_token_hook)",
233
+ "action": "Dashboard → Authentication → Hooks → Enable and select function",
234
+ "note": "Cannot be done via CLI or migration",
235
+ "blocks_tests_for": ["auth", "session", "token"]
236
+ },
237
+ {
238
+ "trigger_tag": "supabase_webhook",
239
+ "trigger_description": "Database Webhook / Edge Function created",
240
+ "action": "Dashboard → Database → Webhooks → Configure",
241
+ "note": "Edge Function must be deployed first",
242
+ "blocks_tests_for": ["webhook", "edge-function"]
243
+ },
244
+ {
245
+ "trigger_tag": "supabase_realtime",
246
+ "trigger_description": "Realtime publication added for a table",
247
+ "action": "Dashboard → Database → Replication → Enable table",
248
+ "note": "Required for real-time subscriptions to work",
249
+ "blocks_tests_for": ["realtime", "subscription"]
250
+ }
251
+ ]
252
+ }
253
+ }