@nebulit/embuilder 0.1.39

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 (212) hide show
  1. package/README.md +254 -0
  2. package/dist/cli.d.ts +2 -0
  3. package/dist/cli.js +138 -0
  4. package/package.json +49 -0
  5. package/templates/.claude/hooks/QUICKSTART.md +256 -0
  6. package/templates/.claude/hooks/README.md +533 -0
  7. package/templates/.claude/hooks/analyze-commit.sh +22 -0
  8. package/templates/.claude/hooks/analyze-commit.ts +518 -0
  9. package/templates/.claude/hooks/analyzers/README.md +198 -0
  10. package/templates/.claude/hooks/analyzers/code-quality-checker.ts +154 -0
  11. package/templates/.claude/hooks/analyzers/code-quality.md +54 -0
  12. package/templates/.claude/hooks/analyzers/commit-blocker-example.ts.disabled +110 -0
  13. package/templates/.claude/hooks/analyzers/commit-policy.md +49 -0
  14. package/templates/.claude/hooks/analyzers/event-model-validator.md +49 -0
  15. package/templates/.claude/hooks/analyzers/event-model-validator.ts +169 -0
  16. package/templates/.claude/hooks/analyzers/example-logger.ts +70 -0
  17. package/templates/.claude/hooks/analyzers/slice-scope-validator.md +81 -0
  18. package/templates/.claude/hooks/check-review-result.sh +47 -0
  19. package/templates/.claude/hooks/prepare-review.sh +34 -0
  20. package/templates/.claude/hooks/review-agent-prompt.md +42 -0
  21. package/templates/.claude/hooks/run-review-agent.sh +124 -0
  22. package/templates/.claude/settings.local.json +37 -0
  23. package/templates/.claude/skills/help/README.md +84 -0
  24. package/templates/.claude/skills/help/SKILL.md +393 -0
  25. package/templates/.claude/skills/help/templates/demo-config.json +6753 -0
  26. package/templates/.claude/skills/sample-slices/SKILL.md +8 -0
  27. package/templates/.claude/skills/sample-slices/templates/.slices/Library/addbook/code-slice.json +124 -0
  28. package/templates/.claude/skills/sample-slices/templates/.slices/Library/addbook/slice.json +255 -0
  29. package/templates/.claude/skills/sample-slices/templates/.slices/Library/availablebooks/slice.json +107 -0
  30. package/templates/.claude/skills/sample-slices/templates/.slices/index.json +20 -0
  31. package/templates/.claude/skills/sample-slices/templates/Cart/additem/slice.json +979 -0
  32. package/templates/.claude/skills/sample-slices/templates/Cart/archiveitem/slice.json +529 -0
  33. package/templates/.claude/skills/sample-slices/templates/Cart/cartitems/slice.json +1072 -0
  34. package/templates/.claude/skills/sample-slices/templates/Cart/cartwithproducts/slice.json +394 -0
  35. package/templates/.claude/skills/sample-slices/templates/Cart/changedprices/slice.json +88 -0
  36. package/templates/.claude/skills/sample-slices/templates/Cart/changeinventory/slice.json +264 -0
  37. package/templates/.claude/skills/sample-slices/templates/Cart/changeprice/slice.json +308 -0
  38. package/templates/.claude/skills/sample-slices/templates/Cart/clearcart/slice.json +358 -0
  39. package/templates/.claude/skills/sample-slices/templates/Cart/inventories/slice.json +203 -0
  40. package/templates/.claude/skills/sample-slices/templates/Cart/publishcart/slice.json +876 -0
  41. package/templates/.claude/skills/sample-slices/templates/Cart/removeitem/slice.json +560 -0
  42. package/templates/.claude/skills/sample-slices/templates/Cart/submitcart/slice.json +708 -0
  43. package/templates/.claude/skills/sample-slices/templates/Cart/submittedcartdata/slice.json +399 -0
  44. package/templates/.claude/skills/sample-slices/templates/index.json +108 -0
  45. package/templates/.claude/skills/slice-automation/SKILL.md +49 -0
  46. package/templates/.claude/skills/slice-state-change/SKILL.md +369 -0
  47. package/templates/.claude/skills/slice-state-change/templates/AddLocation/AddLocation.test.ts.sample +76 -0
  48. package/templates/.claude/skills/slice-state-change/templates/AddLocation/AddLocationCommand.ts.sample +84 -0
  49. package/templates/.claude/skills/slice-state-change/templates/AddLocation/routes.ts.sample +73 -0
  50. package/templates/.claude/skills/slice-state-change/templates/README.md +46 -0
  51. package/templates/.claude/skills/slice-state-view/SKILL.md +336 -0
  52. package/templates/.claude/skills/slice-state-view/templates/Locations/Locations.test.ts.sample +84 -0
  53. package/templates/.claude/skills/slice-state-view/templates/Locations/LocationsProjection.ts.sample +50 -0
  54. package/templates/.claude/skills/slice-state-view/templates/Locations/routes.ts.sample +46 -0
  55. package/templates/.claude/skills/slice-state-view/templates/README.md +109 -0
  56. package/templates/.claude/skills/slice-state-view/templates/Tables/Tables.test.ts.sample +104 -0
  57. package/templates/.claude/skills/slice-state-view/templates/Tables/TablesProjection.ts.sample +59 -0
  58. package/templates/.claude/skills/slice-state-view/templates/Tables/routes.ts.sample +46 -0
  59. package/templates/.claude/skills/slice-state-view/templates/V2__tables.sql +7 -0
  60. package/templates/.claude/skills/slice-state-view/templates/V8__locations.sql +7 -0
  61. package/templates/.claude/skills/test-analyzer/SKILL.md +373 -0
  62. package/templates/.claude/skills/test-analyzer/examples/specification-format.md +143 -0
  63. package/templates/.claude/skills/test-analyzer/examples/state-change-example.md +111 -0
  64. package/templates/.claude/skills/test-analyzer/examples/state-view-example.md +122 -0
  65. package/templates/AGENTS.md +110 -0
  66. package/templates/Claude.md +58 -0
  67. package/templates/README.md +178 -0
  68. package/templates/backend/.env +9 -0
  69. package/templates/backend/BACKEND_AUTH_SETUP.md +183 -0
  70. package/templates/backend/SWAGGER.md +213 -0
  71. package/templates/backend/eslint.config.mjs +31 -0
  72. package/templates/backend/flyway.conf +17 -0
  73. package/templates/backend/package.json +44 -0
  74. package/templates/backend/prd.json.example +64 -0
  75. package/templates/backend/public/assets/images/banner.png +0 -0
  76. package/templates/backend/public/assets/logo.png +0 -0
  77. package/templates/backend/public/file.svg +4 -0
  78. package/templates/backend/public/globe.svg +12 -0
  79. package/templates/backend/public/next.svg +6 -0
  80. package/templates/backend/public/vercel.svg +3 -0
  81. package/templates/backend/public/window.svg +5 -0
  82. package/templates/backend/server.ts +129 -0
  83. package/templates/backend/setup-env.sh +50 -0
  84. package/templates/backend/src/common/assertions.ts +6 -0
  85. package/templates/backend/src/common/db.ts +1 -0
  86. package/templates/backend/src/common/loadPostgresEventstore.ts +16 -0
  87. package/templates/backend/src/common/parseEndpoint.ts +51 -0
  88. package/templates/backend/src/common/replay.ts +9 -0
  89. package/templates/backend/src/common/routes.ts +19 -0
  90. package/templates/backend/src/common/testHelpers.ts +53 -0
  91. package/templates/backend/src/core/readmodel.ts +28 -0
  92. package/templates/backend/src/core/types.ts +26 -0
  93. package/templates/backend/src/process/process.ts +53 -0
  94. package/templates/backend/src/supabase/LoginHandler.ts +36 -0
  95. package/templates/backend/src/supabase/ProtectedPageProps.ts +21 -0
  96. package/templates/backend/src/supabase/README.md +171 -0
  97. package/templates/backend/src/supabase/api.ts +63 -0
  98. package/templates/backend/src/supabase/authMiddleware.ts +53 -0
  99. package/templates/backend/src/supabase/component.ts +12 -0
  100. package/templates/backend/src/supabase/requireUser.ts +72 -0
  101. package/templates/backend/src/supabase/serverProps.ts +25 -0
  102. package/templates/backend/src/supabase/staticProps.ts +10 -0
  103. package/templates/backend/src/swagger.ts +34 -0
  104. package/templates/backend/src/util/assertions.ts +6 -0
  105. package/templates/backend/supabase/config.toml +295 -0
  106. package/templates/backend/supabase/migrations/20260121155918593_catalogentries.sql.sample +23 -0
  107. package/templates/backend/supabase/seed.sql +1 -0
  108. package/templates/backend/tsconfig.json +31 -0
  109. package/templates/frontend/.env.development +3 -0
  110. package/templates/frontend/AGENTS.md +7 -0
  111. package/templates/frontend/README.md +73 -0
  112. package/templates/frontend/components.json +20 -0
  113. package/templates/frontend/eslint.config.js +26 -0
  114. package/templates/frontend/index.html +18 -0
  115. package/templates/frontend/package-lock.json +8347 -0
  116. package/templates/frontend/package.json +94 -0
  117. package/templates/frontend/postcss.config.js +6 -0
  118. package/templates/frontend/public/favicon.ico +0 -0
  119. package/templates/frontend/public/logo.png +0 -0
  120. package/templates/frontend/public/placeholder.svg +1 -0
  121. package/templates/frontend/public/robots.txt +14 -0
  122. package/templates/frontend/src/App.css +42 -0
  123. package/templates/frontend/src/App.tsx +47 -0
  124. package/templates/frontend/src/components/NavLink.tsx +28 -0
  125. package/templates/frontend/src/components/ProtectedRoute.tsx +24 -0
  126. package/templates/frontend/src/components/calendar/Calendar.tsx +302 -0
  127. package/templates/frontend/src/components/layout/DashboardLayout.tsx +21 -0
  128. package/templates/frontend/src/components/layout/Header.tsx +45 -0
  129. package/templates/frontend/src/components/layout/Sidebar.tsx +82 -0
  130. package/templates/frontend/src/components/tables/ReservationTemplates.tsx +189 -0
  131. package/templates/frontend/src/components/ui/accordion.tsx +52 -0
  132. package/templates/frontend/src/components/ui/alert-dialog.tsx +104 -0
  133. package/templates/frontend/src/components/ui/alert.tsx +43 -0
  134. package/templates/frontend/src/components/ui/aspect-ratio.tsx +5 -0
  135. package/templates/frontend/src/components/ui/avatar.tsx +38 -0
  136. package/templates/frontend/src/components/ui/badge.tsx +29 -0
  137. package/templates/frontend/src/components/ui/breadcrumb.tsx +90 -0
  138. package/templates/frontend/src/components/ui/button.tsx +47 -0
  139. package/templates/frontend/src/components/ui/calendar.tsx +54 -0
  140. package/templates/frontend/src/components/ui/card.tsx +43 -0
  141. package/templates/frontend/src/components/ui/carousel.tsx +224 -0
  142. package/templates/frontend/src/components/ui/chart.tsx +303 -0
  143. package/templates/frontend/src/components/ui/checkbox.tsx +26 -0
  144. package/templates/frontend/src/components/ui/collapsible.tsx +9 -0
  145. package/templates/frontend/src/components/ui/command.tsx +132 -0
  146. package/templates/frontend/src/components/ui/context-menu.tsx +178 -0
  147. package/templates/frontend/src/components/ui/dialog.tsx +95 -0
  148. package/templates/frontend/src/components/ui/drawer.tsx +87 -0
  149. package/templates/frontend/src/components/ui/dropdown-menu.tsx +179 -0
  150. package/templates/frontend/src/components/ui/form.tsx +129 -0
  151. package/templates/frontend/src/components/ui/hover-card.tsx +27 -0
  152. package/templates/frontend/src/components/ui/input-otp.tsx +61 -0
  153. package/templates/frontend/src/components/ui/input.tsx +22 -0
  154. package/templates/frontend/src/components/ui/label.tsx +17 -0
  155. package/templates/frontend/src/components/ui/menubar.tsx +207 -0
  156. package/templates/frontend/src/components/ui/navigation-menu.tsx +120 -0
  157. package/templates/frontend/src/components/ui/pagination.tsx +81 -0
  158. package/templates/frontend/src/components/ui/popover.tsx +29 -0
  159. package/templates/frontend/src/components/ui/progress.tsx +23 -0
  160. package/templates/frontend/src/components/ui/radio-group.tsx +36 -0
  161. package/templates/frontend/src/components/ui/resizable.tsx +37 -0
  162. package/templates/frontend/src/components/ui/scroll-area.tsx +38 -0
  163. package/templates/frontend/src/components/ui/select.tsx +143 -0
  164. package/templates/frontend/src/components/ui/separator.tsx +20 -0
  165. package/templates/frontend/src/components/ui/sheet.tsx +107 -0
  166. package/templates/frontend/src/components/ui/sidebar.tsx +637 -0
  167. package/templates/frontend/src/components/ui/skeleton.tsx +7 -0
  168. package/templates/frontend/src/components/ui/slider.tsx +23 -0
  169. package/templates/frontend/src/components/ui/sonner.tsx +27 -0
  170. package/templates/frontend/src/components/ui/stat-card.tsx +44 -0
  171. package/templates/frontend/src/components/ui/switch.tsx +27 -0
  172. package/templates/frontend/src/components/ui/table.tsx +72 -0
  173. package/templates/frontend/src/components/ui/tabs.tsx +53 -0
  174. package/templates/frontend/src/components/ui/textarea.tsx +21 -0
  175. package/templates/frontend/src/components/ui/toast.tsx +111 -0
  176. package/templates/frontend/src/components/ui/toaster.tsx +24 -0
  177. package/templates/frontend/src/components/ui/toggle-group.tsx +49 -0
  178. package/templates/frontend/src/components/ui/toggle.tsx +37 -0
  179. package/templates/frontend/src/components/ui/tooltip.tsx +28 -0
  180. package/templates/frontend/src/components/ui/use-toast.ts +3 -0
  181. package/templates/frontend/src/contexts/AuthContext.tsx +94 -0
  182. package/templates/frontend/src/contexts/RefreshContext.tsx +236 -0
  183. package/templates/frontend/src/hooks/api/index.ts +2 -0
  184. package/templates/frontend/src/hooks/api/useLocations.ts +15 -0
  185. package/templates/frontend/src/hooks/use-mobile.tsx +19 -0
  186. package/templates/frontend/src/hooks/use-toast.ts +186 -0
  187. package/templates/frontend/src/hooks/useApiContext.ts +11 -0
  188. package/templates/frontend/src/index.css +118 -0
  189. package/templates/frontend/src/integrations/supabase/client.ts +9 -0
  190. package/templates/frontend/src/lib/api-client.ts +136 -0
  191. package/templates/frontend/src/lib/api.ts +1028 -0
  192. package/templates/frontend/src/lib/utils.ts +6 -0
  193. package/templates/frontend/src/main.tsx +5 -0
  194. package/templates/frontend/src/pages/Auth.tsx +408 -0
  195. package/templates/frontend/src/pages/Dashboard.tsx +168 -0
  196. package/templates/frontend/src/pages/Menus.tsx +224 -0
  197. package/templates/frontend/src/pages/NotFound.tsx +24 -0
  198. package/templates/frontend/src/pages/Register.tsx +285 -0
  199. package/templates/frontend/src/test/example.test.ts +0 -0
  200. package/templates/frontend/src/test/setup.ts +15 -0
  201. package/templates/frontend/src/types/index.ts +8 -0
  202. package/templates/frontend/src/vite-env.d.ts +1 -0
  203. package/templates/frontend/tailwind.config.ts +101 -0
  204. package/templates/frontend/tsconfig.app.json +31 -0
  205. package/templates/frontend/tsconfig.json +16 -0
  206. package/templates/frontend/tsconfig.node.json +22 -0
  207. package/templates/frontend/vite.config.ts +21 -0
  208. package/templates/frontend/vitest.config.ts +16 -0
  209. package/templates/init.sh +1 -0
  210. package/templates/prompt.md +139 -0
  211. package/templates/ralph.sh +120 -0
  212. package/templates/server.mjs +505 -0
@@ -0,0 +1,708 @@
1
+ {
2
+ "id": "3458764596110806982",
3
+ "status": "Done",
4
+ "title": "slice: submit cart",
5
+ "context": "Cart",
6
+ "sliceType": "STATE_CHANGE",
7
+ "commands": [
8
+ {
9
+ "id": "3458764596109969508",
10
+ "tags": [],
11
+ "domain": "Cart",
12
+ "elementContext": "INTERNAL",
13
+ "modelContext": "Cart",
14
+ "context": "INTERNAL",
15
+ "slice": "slice: submit cart",
16
+ "title": "Submit Cart",
17
+ "fields": [
18
+ {
19
+ "name": "aggregateId",
20
+ "type": "UUID",
21
+ "example": "",
22
+ "mapping": "",
23
+ "optional": false,
24
+ "cardinality": "Single",
25
+ "idAttribute": false
26
+ },
27
+ {
28
+ "name": "orderedProducts",
29
+ "type": "Custom",
30
+ "example": "",
31
+ "mapping": "",
32
+ "optional": false,
33
+ "cardinality": "List",
34
+ "idAttribute": false
35
+ }
36
+ ],
37
+ "type": "COMMAND",
38
+ "description": "",
39
+ "aggregate": "Cart",
40
+ "aggregateDependencies": [
41
+ "Cart"
42
+ ],
43
+ "dependencies": [
44
+ {
45
+ "id": "3458764595641022547",
46
+ "type": "OUTBOUND",
47
+ "title": "Cart Submitted",
48
+ "elementType": "EVENT"
49
+ },
50
+ {
51
+ "id": "3458764597395412247",
52
+ "type": "INBOUND",
53
+ "title": "title",
54
+ "elementType": "SCREEN"
55
+ }
56
+ ],
57
+ "apiEndpoint": "",
58
+ "createsAggregate": false,
59
+ "triggers": [],
60
+ "sketched": false,
61
+ "prototype": {
62
+ "activeByDefault": false
63
+ }
64
+ }
65
+ ],
66
+ "events": [
67
+ {
68
+ "id": "3458764595641022547",
69
+ "tags": [],
70
+ "domain": "Cart",
71
+ "elementContext": "INTERNAL",
72
+ "modelContext": "Cart",
73
+ "context": "INTERNAL",
74
+ "slice": "slice: submit cart",
75
+ "title": "Cart Submitted",
76
+ "fields": [
77
+ {
78
+ "name": "aggregateId",
79
+ "type": "UUID",
80
+ "example": "",
81
+ "mapping": "",
82
+ "optional": false,
83
+ "cardinality": "Single",
84
+ "idAttribute": false
85
+ },
86
+ {
87
+ "name": "orderedProducts",
88
+ "type": "Custom",
89
+ "example": "productId, price",
90
+ "mapping": "",
91
+ "optional": false,
92
+ "cardinality": "List",
93
+ "idAttribute": false
94
+ },
95
+ {
96
+ "name": "totalPrice",
97
+ "type": "Double",
98
+ "example": "",
99
+ "mapping": "orderedProducts",
100
+ "optional": false,
101
+ "cardinality": "Single",
102
+ "idAttribute": false
103
+ }
104
+ ],
105
+ "type": "EVENT",
106
+ "description": "",
107
+ "aggregate": "Cart",
108
+ "aggregateDependencies": [
109
+ "Cart"
110
+ ],
111
+ "dependencies": [
112
+ {
113
+ "id": "3458764596111217572",
114
+ "type": "OUTBOUND",
115
+ "title": "Submitted Cart Data",
116
+ "elementType": "READMODEL"
117
+ },
118
+ {
119
+ "id": "3458764596109969508",
120
+ "type": "INBOUND",
121
+ "title": "Submit Cart",
122
+ "elementType": "COMMAND"
123
+ }
124
+ ],
125
+ "apiEndpoint": "",
126
+ "createsAggregate": false,
127
+ "triggers": [],
128
+ "sketched": false,
129
+ "prototype": {
130
+ "activeByDefault": false
131
+ }
132
+ }
133
+ ],
134
+ "readmodels": [],
135
+ "screens": [
136
+ {
137
+ "id": "3458764597395412247",
138
+ "tags": [],
139
+ "domain": "Cart",
140
+ "elementContext": "INTERNAL",
141
+ "modelContext": "Cart",
142
+ "context": "INTERNAL",
143
+ "slice": "slice: submit cart",
144
+ "title": "title",
145
+ "fields": [
146
+ {
147
+ "name": "aggregateId",
148
+ "type": "UUID",
149
+ "example": "",
150
+ "mapping": "",
151
+ "optional": false,
152
+ "cardinality": "Single",
153
+ "idAttribute": false
154
+ },
155
+ {
156
+ "name": "orderedProducts",
157
+ "type": "Custom",
158
+ "example": "{\"productid\":UUID, \"price\":Double}",
159
+ "mapping": "",
160
+ "optional": false,
161
+ "cardinality": "Single",
162
+ "idAttribute": false
163
+ }
164
+ ],
165
+ "type": "SCREEN",
166
+ "description": "",
167
+ "aggregate": "Cart",
168
+ "aggregateDependencies": [
169
+ "Cart"
170
+ ],
171
+ "dependencies": [
172
+ {
173
+ "id": "3458764596109969508",
174
+ "type": "OUTBOUND",
175
+ "title": "Submit Cart",
176
+ "elementType": "COMMAND"
177
+ }
178
+ ],
179
+ "apiEndpoint": "",
180
+ "createsAggregate": false,
181
+ "triggers": [],
182
+ "sketched": false,
183
+ "prototype": {
184
+ "activeByDefault": false
185
+ }
186
+ }
187
+ ],
188
+ "screenImages": [],
189
+ "screenLayouts": [],
190
+ "processors": [],
191
+ "tables": [],
192
+ "specifications": [
193
+ {
194
+ "vertical": false,
195
+ "id": "3458764598754543523",
196
+ "sliceName": "slice: submit cart",
197
+ "title": "spec: cannot submit cart twice",
198
+ "given": [
199
+ {
200
+ "title": "Cart Submitted",
201
+ "tags": [],
202
+ "id": "3458764598754543527",
203
+ "index": 2,
204
+ "type": "SPEC_EVENT",
205
+ "fields": [
206
+ {
207
+ "name": "aggregateId",
208
+ "type": "UUID",
209
+ "example": "",
210
+ "mapping": "",
211
+ "optional": false,
212
+ "cardinality": "Single",
213
+ "subfields": []
214
+ },
215
+ {
216
+ "name": "orderedProducts",
217
+ "type": "Custom",
218
+ "example": "productId, price",
219
+ "mapping": "",
220
+ "optional": false,
221
+ "cardinality": "List",
222
+ "subfields": []
223
+ },
224
+ {
225
+ "name": "totalPrice",
226
+ "type": "Double",
227
+ "example": "",
228
+ "mapping": "orderedProducts",
229
+ "optional": false,
230
+ "cardinality": "Single",
231
+ "subfields": []
232
+ }
233
+ ],
234
+ "linkedId": "3458764595641022547"
235
+ },
236
+ {
237
+ "title": "Item Added",
238
+ "tags": [],
239
+ "id": "3458764598754543526",
240
+ "index": 1,
241
+ "type": "SPEC_EVENT",
242
+ "fields": [
243
+ {
244
+ "name": "aggregateId",
245
+ "type": "UUID",
246
+ "example": "",
247
+ "mapping": "",
248
+ "optional": false,
249
+ "cardinality": "Single",
250
+ "subfields": []
251
+ },
252
+ {
253
+ "name": "description",
254
+ "type": "String",
255
+ "example": "",
256
+ "mapping": "",
257
+ "optional": false,
258
+ "cardinality": "Single",
259
+ "subfields": []
260
+ },
261
+ {
262
+ "name": "image",
263
+ "type": "String",
264
+ "example": "",
265
+ "mapping": "",
266
+ "optional": false,
267
+ "cardinality": "Single",
268
+ "subfields": []
269
+ },
270
+ {
271
+ "name": "price",
272
+ "type": "Double",
273
+ "example": "",
274
+ "mapping": "",
275
+ "optional": false,
276
+ "cardinality": "Single",
277
+ "subfields": []
278
+ },
279
+ {
280
+ "name": "itemId",
281
+ "type": "UUID",
282
+ "example": "",
283
+ "mapping": "",
284
+ "optional": false,
285
+ "cardinality": "Single",
286
+ "subfields": []
287
+ },
288
+ {
289
+ "name": "productId",
290
+ "type": "UUID",
291
+ "example": "",
292
+ "mapping": "",
293
+ "optional": false,
294
+ "cardinality": "Single",
295
+ "subfields": []
296
+ }
297
+ ],
298
+ "linkedId": "3458764595631345476"
299
+ },
300
+ {
301
+ "title": "Cart Created",
302
+ "tags": [],
303
+ "id": "3458764598754543525",
304
+ "index": 0,
305
+ "type": "SPEC_EVENT",
306
+ "fields": [
307
+ {
308
+ "name": "aggregateId",
309
+ "type": "UUID",
310
+ "example": "",
311
+ "mapping": "",
312
+ "optional": false,
313
+ "cardinality": "Single",
314
+ "subfields": []
315
+ }
316
+ ],
317
+ "linkedId": "3458764596402400430"
318
+ }
319
+ ],
320
+ "when": [
321
+ {
322
+ "title": "Submit Cart",
323
+ "tags": [],
324
+ "id": "3458764598754543528",
325
+ "index": 0,
326
+ "type": "SPEC_COMMAND",
327
+ "fields": [
328
+ {
329
+ "name": "aggregateId",
330
+ "type": "UUID",
331
+ "example": "",
332
+ "mapping": "",
333
+ "optional": false,
334
+ "cardinality": "Single",
335
+ "subfields": []
336
+ },
337
+ {
338
+ "name": "orderedProducts",
339
+ "type": "Custom",
340
+ "example": "",
341
+ "mapping": "",
342
+ "optional": false,
343
+ "cardinality": "List",
344
+ "subfields": []
345
+ }
346
+ ],
347
+ "linkedId": "3458764596109969508"
348
+ }
349
+ ],
350
+ "then": [
351
+ {
352
+ "title": "Error-Case",
353
+ "tags": [],
354
+ "id": "3458764598754543529",
355
+ "index": 0,
356
+ "type": "SPEC_ERROR"
357
+ }
358
+ ],
359
+ "comments": [],
360
+ "linkedId": "3458764596110806982"
361
+ },
362
+ {
363
+ "vertical": false,
364
+ "id": "3458764596400921866",
365
+ "sliceName": "slice: submit cart",
366
+ "title": "spec: submit cart without quantity",
367
+ "given": [
368
+ {
369
+ "title": "Inventory Changed",
370
+ "tags": [],
371
+ "id": "3458764596400921868",
372
+ "index": 1,
373
+ "type": "SPEC_EVENT",
374
+ "fields": [
375
+ {
376
+ "name": "inventory",
377
+ "type": "Int",
378
+ "example": "0",
379
+ "mapping": "",
380
+ "optional": false,
381
+ "cardinality": "Single",
382
+ "subfields": []
383
+ },
384
+ {
385
+ "name": "productId",
386
+ "type": "UUID",
387
+ "example": "",
388
+ "mapping": "",
389
+ "optional": false,
390
+ "cardinality": "Single",
391
+ "idAttribute": true,
392
+ "subfields": []
393
+ }
394
+ ],
395
+ "linkedId": "3458764596395403355"
396
+ },
397
+ {
398
+ "title": "Item Added",
399
+ "tags": [],
400
+ "id": "3458764596400921867",
401
+ "index": 0,
402
+ "type": "SPEC_EVENT",
403
+ "fields": [
404
+ {
405
+ "name": "aggregateId",
406
+ "type": "UUID",
407
+ "example": "",
408
+ "mapping": "",
409
+ "optional": false,
410
+ "cardinality": "Single",
411
+ "subfields": []
412
+ },
413
+ {
414
+ "name": "description",
415
+ "type": "String",
416
+ "example": "",
417
+ "mapping": "",
418
+ "optional": false,
419
+ "cardinality": "Single",
420
+ "subfields": []
421
+ },
422
+ {
423
+ "name": "image",
424
+ "type": "String",
425
+ "example": "",
426
+ "mapping": "",
427
+ "optional": false,
428
+ "cardinality": "Single",
429
+ "subfields": []
430
+ },
431
+ {
432
+ "name": "price",
433
+ "type": "Double",
434
+ "example": "",
435
+ "mapping": "",
436
+ "optional": false,
437
+ "cardinality": "Single",
438
+ "subfields": []
439
+ },
440
+ {
441
+ "name": "itemId",
442
+ "type": "UUID",
443
+ "example": "",
444
+ "mapping": "",
445
+ "optional": false,
446
+ "cardinality": "Single",
447
+ "subfields": []
448
+ },
449
+ {
450
+ "name": "productId",
451
+ "type": "UUID",
452
+ "example": "",
453
+ "mapping": "",
454
+ "optional": false,
455
+ "cardinality": "Single",
456
+ "subfields": []
457
+ }
458
+ ],
459
+ "linkedId": "3458764595631345476"
460
+ }
461
+ ],
462
+ "when": [
463
+ {
464
+ "title": "Submit Cart",
465
+ "tags": [],
466
+ "id": "3458764596400921869",
467
+ "index": 0,
468
+ "type": "SPEC_COMMAND",
469
+ "fields": [
470
+ {
471
+ "name": "aggregateId",
472
+ "type": "UUID",
473
+ "example": "",
474
+ "mapping": "",
475
+ "optional": false,
476
+ "cardinality": "Single",
477
+ "subfields": []
478
+ },
479
+ {
480
+ "name": "orderedProducts",
481
+ "type": "Custom",
482
+ "example": "",
483
+ "mapping": "",
484
+ "optional": false,
485
+ "cardinality": "List",
486
+ "subfields": []
487
+ }
488
+ ],
489
+ "linkedId": "3458764596109969508"
490
+ }
491
+ ],
492
+ "then": [
493
+ {
494
+ "title": "Error-Case",
495
+ "tags": [],
496
+ "id": "3458764596400921870",
497
+ "index": 0,
498
+ "type": "SPEC_ERROR"
499
+ }
500
+ ],
501
+ "comments": [
502
+ {
503
+ "description": "Cart with zero inventory cannot be submitted."
504
+ }
505
+ ],
506
+ "linkedId": "3458764596110806982"
507
+ },
508
+ {
509
+ "vertical": false,
510
+ "id": "3458764596110807648",
511
+ "sliceName": "slice: submit cart",
512
+ "title": "spec: submit empty cart",
513
+ "given": [],
514
+ "when": [
515
+ {
516
+ "title": "Submit Cart",
517
+ "tags": [],
518
+ "id": "3458764596110807649",
519
+ "index": 0,
520
+ "type": "SPEC_COMMAND",
521
+ "fields": [
522
+ {
523
+ "name": "aggregateId",
524
+ "type": "UUID",
525
+ "example": "",
526
+ "mapping": "",
527
+ "optional": false,
528
+ "cardinality": "Single",
529
+ "subfields": []
530
+ },
531
+ {
532
+ "name": "orderedProducts",
533
+ "type": "Custom",
534
+ "example": "",
535
+ "mapping": "",
536
+ "optional": false,
537
+ "cardinality": "List",
538
+ "subfields": []
539
+ }
540
+ ],
541
+ "linkedId": "3458764596109969508"
542
+ }
543
+ ],
544
+ "then": [
545
+ {
546
+ "title": "Error-Case",
547
+ "tags": [],
548
+ "id": "3458764596110807650",
549
+ "index": 0,
550
+ "type": "SPEC_ERROR"
551
+ }
552
+ ],
553
+ "comments": [],
554
+ "linkedId": "3458764596110806982"
555
+ },
556
+ {
557
+ "vertical": false,
558
+ "id": "3458764596110807310",
559
+ "sliceName": "slice: submit cart",
560
+ "title": "spec: submit cart",
561
+ "given": [
562
+ {
563
+ "title": "Item Added",
564
+ "tags": [],
565
+ "id": "3458764596110807311",
566
+ "index": 0,
567
+ "type": "SPEC_EVENT",
568
+ "fields": [
569
+ {
570
+ "name": "aggregateId",
571
+ "type": "UUID",
572
+ "example": "",
573
+ "mapping": "",
574
+ "optional": false,
575
+ "cardinality": "Single",
576
+ "subfields": []
577
+ },
578
+ {
579
+ "name": "description",
580
+ "type": "String",
581
+ "example": "",
582
+ "mapping": "",
583
+ "optional": false,
584
+ "cardinality": "Single",
585
+ "subfields": []
586
+ },
587
+ {
588
+ "name": "image",
589
+ "type": "String",
590
+ "example": "",
591
+ "mapping": "",
592
+ "optional": false,
593
+ "cardinality": "Single",
594
+ "subfields": []
595
+ },
596
+ {
597
+ "name": "price",
598
+ "type": "Double",
599
+ "example": "",
600
+ "mapping": "",
601
+ "optional": false,
602
+ "cardinality": "Single",
603
+ "subfields": []
604
+ },
605
+ {
606
+ "name": "itemId",
607
+ "type": "UUID",
608
+ "example": "",
609
+ "mapping": "",
610
+ "optional": false,
611
+ "cardinality": "Single",
612
+ "subfields": []
613
+ },
614
+ {
615
+ "name": "productId",
616
+ "type": "UUID",
617
+ "example": "",
618
+ "mapping": "",
619
+ "optional": false,
620
+ "cardinality": "Single",
621
+ "subfields": []
622
+ }
623
+ ],
624
+ "linkedId": "3458764595631345476"
625
+ }
626
+ ],
627
+ "when": [
628
+ {
629
+ "title": "Submit Cart",
630
+ "tags": [],
631
+ "id": "3458764596110807312",
632
+ "index": 0,
633
+ "type": "SPEC_COMMAND",
634
+ "fields": [
635
+ {
636
+ "name": "aggregateId",
637
+ "type": "UUID",
638
+ "example": "",
639
+ "mapping": "",
640
+ "optional": false,
641
+ "cardinality": "Single",
642
+ "subfields": []
643
+ },
644
+ {
645
+ "name": "orderedProducts",
646
+ "type": "Custom",
647
+ "example": "",
648
+ "mapping": "",
649
+ "optional": false,
650
+ "cardinality": "List",
651
+ "subfields": []
652
+ }
653
+ ],
654
+ "linkedId": "3458764596109969508"
655
+ }
656
+ ],
657
+ "then": [
658
+ {
659
+ "title": "Cart Submitted",
660
+ "tags": [],
661
+ "id": "3458764596110807313",
662
+ "index": 0,
663
+ "type": "SPEC_EVENT",
664
+ "fields": [
665
+ {
666
+ "name": "aggregateId",
667
+ "type": "UUID",
668
+ "example": "",
669
+ "mapping": "",
670
+ "optional": false,
671
+ "cardinality": "Single",
672
+ "subfields": []
673
+ },
674
+ {
675
+ "name": "orderedProducts",
676
+ "type": "Custom",
677
+ "example": "productId, price",
678
+ "mapping": "",
679
+ "optional": false,
680
+ "cardinality": "List",
681
+ "subfields": []
682
+ },
683
+ {
684
+ "name": "totalPrice",
685
+ "type": "Double",
686
+ "example": "",
687
+ "mapping": "orderedProducts",
688
+ "optional": false,
689
+ "cardinality": "Single",
690
+ "subfields": []
691
+ }
692
+ ],
693
+ "linkedId": "3458764595641022547"
694
+ }
695
+ ],
696
+ "comments": [],
697
+ "linkedId": "3458764596110806982"
698
+ }
699
+ ],
700
+ "actors": [
701
+ {
702
+ "name": "User"
703
+ }
704
+ ],
705
+ "aggregates": [
706
+ "Cart"
707
+ ]
708
+ }