@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,979 @@
1
+ {
2
+ "id": "3458764595831815141",
3
+ "status": "Done",
4
+ "title": "slice: add item",
5
+ "context": "Cart",
6
+ "sliceType": "STATE_CHANGE",
7
+ "commands": [
8
+ {
9
+ "id": "3458764595812558688",
10
+ "tags": [],
11
+ "domain": "Cart",
12
+ "elementContext": "INTERNAL",
13
+ "modelContext": "Cart",
14
+ "context": "INTERNAL",
15
+ "slice": "slice: add item",
16
+ "title": "Add Item",
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": "description",
29
+ "type": "String",
30
+ "example": "",
31
+ "mapping": "",
32
+ "optional": false,
33
+ "cardinality": "Single",
34
+ "idAttribute": false
35
+ },
36
+ {
37
+ "name": "image",
38
+ "type": "String",
39
+ "example": "",
40
+ "mapping": "",
41
+ "optional": false,
42
+ "cardinality": "Single",
43
+ "idAttribute": false
44
+ },
45
+ {
46
+ "name": "price",
47
+ "type": "Double",
48
+ "example": "",
49
+ "mapping": "",
50
+ "optional": false,
51
+ "cardinality": "Single",
52
+ "idAttribute": false
53
+ },
54
+ {
55
+ "name": "itemId",
56
+ "type": "UUID",
57
+ "example": "",
58
+ "mapping": "",
59
+ "optional": false,
60
+ "cardinality": "Single",
61
+ "idAttribute": false
62
+ },
63
+ {
64
+ "name": "productId",
65
+ "type": "UUID",
66
+ "example": "",
67
+ "mapping": "",
68
+ "optional": false,
69
+ "cardinality": "Single",
70
+ "idAttribute": false
71
+ }
72
+ ],
73
+ "type": "COMMAND",
74
+ "description": "",
75
+ "aggregate": "Cart",
76
+ "aggregateDependencies": [
77
+ "Cart"
78
+ ],
79
+ "dependencies": [
80
+ {
81
+ "id": "3458764596402400430",
82
+ "type": "OUTBOUND",
83
+ "title": "Cart Created",
84
+ "elementType": "EVENT"
85
+ },
86
+ {
87
+ "id": "3458764595631345476",
88
+ "type": "OUTBOUND",
89
+ "title": "Item Added",
90
+ "elementType": "EVENT"
91
+ },
92
+ {
93
+ "id": "3458764633782324896",
94
+ "type": "INBOUND",
95
+ "title": "Add Item",
96
+ "elementType": "SCREEN"
97
+ }
98
+ ],
99
+ "apiEndpoint": "",
100
+ "service": null,
101
+ "createsAggregate": false,
102
+ "triggers": [],
103
+ "sketched": false,
104
+ "prototype": {
105
+ "projection": "events.forEach((eventData)=>{\n let event = eventData.data\n switch(eventData.type) {\n \n }}\n )\n ",
106
+ "label": "Add Item",
107
+ "placement": "MAIN",
108
+ "initialValue": true,
109
+ "css": null,
110
+ "pageTemplate": null,
111
+ "order": 99,
112
+ "activeByDefault": false
113
+ }
114
+ }
115
+ ],
116
+ "events": [
117
+ {
118
+ "id": "3458764596402400430",
119
+ "tags": [],
120
+ "domain": "Cart",
121
+ "elementContext": "INTERNAL",
122
+ "modelContext": "Cart",
123
+ "context": "INTERNAL",
124
+ "slice": "slice: add item",
125
+ "title": "Cart Created",
126
+ "fields": [
127
+ {
128
+ "name": "aggregateId",
129
+ "type": "UUID",
130
+ "example": "",
131
+ "mapping": "",
132
+ "optional": false,
133
+ "cardinality": "Single",
134
+ "idAttribute": false
135
+ }
136
+ ],
137
+ "type": "EVENT",
138
+ "description": "",
139
+ "aggregate": "Cart",
140
+ "aggregateDependencies": [
141
+ "Cart"
142
+ ],
143
+ "dependencies": [
144
+ {
145
+ "id": "3458764596403196690",
146
+ "type": "OUTBOUND",
147
+ "title": "Carts with Products",
148
+ "elementType": "READMODEL"
149
+ },
150
+ {
151
+ "id": "3458764595831018749",
152
+ "type": "OUTBOUND",
153
+ "title": "cart items",
154
+ "elementType": "READMODEL"
155
+ },
156
+ {
157
+ "id": "3458764595812558688",
158
+ "type": "INBOUND",
159
+ "title": "Add Item",
160
+ "elementType": "COMMAND"
161
+ }
162
+ ],
163
+ "apiEndpoint": "",
164
+ "createsAggregate": false,
165
+ "triggers": [],
166
+ "sketched": false,
167
+ "prototype": {
168
+ "activeByDefault": false
169
+ }
170
+ },
171
+ {
172
+ "id": "3458764595631345476",
173
+ "tags": [],
174
+ "domain": "Cart",
175
+ "elementContext": "INTERNAL",
176
+ "modelContext": "Cart",
177
+ "context": "INTERNAL",
178
+ "slice": "slice: add item",
179
+ "title": "Item Added",
180
+ "fields": [
181
+ {
182
+ "name": "aggregateId",
183
+ "type": "UUID",
184
+ "example": "",
185
+ "mapping": "",
186
+ "optional": false,
187
+ "cardinality": "Single",
188
+ "idAttribute": false
189
+ },
190
+ {
191
+ "name": "description",
192
+ "type": "String",
193
+ "example": "",
194
+ "mapping": "",
195
+ "optional": false,
196
+ "cardinality": "Single",
197
+ "idAttribute": false
198
+ },
199
+ {
200
+ "name": "image",
201
+ "type": "String",
202
+ "example": "",
203
+ "mapping": "",
204
+ "optional": false,
205
+ "cardinality": "Single",
206
+ "idAttribute": false
207
+ },
208
+ {
209
+ "name": "price",
210
+ "type": "Double",
211
+ "example": "",
212
+ "mapping": "",
213
+ "optional": false,
214
+ "cardinality": "Single",
215
+ "idAttribute": false
216
+ },
217
+ {
218
+ "name": "itemId",
219
+ "type": "UUID",
220
+ "example": "",
221
+ "mapping": "",
222
+ "optional": false,
223
+ "cardinality": "Single",
224
+ "idAttribute": false
225
+ },
226
+ {
227
+ "name": "productId",
228
+ "type": "UUID",
229
+ "example": "",
230
+ "mapping": "",
231
+ "optional": false,
232
+ "cardinality": "Single",
233
+ "idAttribute": false
234
+ }
235
+ ],
236
+ "type": "EVENT",
237
+ "description": "",
238
+ "aggregate": "Cart",
239
+ "aggregateDependencies": [
240
+ "Cart"
241
+ ],
242
+ "dependencies": [
243
+ {
244
+ "id": "3458764596403196690",
245
+ "type": "OUTBOUND",
246
+ "title": "Carts with Products",
247
+ "elementType": "READMODEL"
248
+ },
249
+ {
250
+ "id": "3458764595831018749",
251
+ "type": "OUTBOUND",
252
+ "title": "cart items",
253
+ "elementType": "READMODEL"
254
+ },
255
+ {
256
+ "id": "3458764595812558688",
257
+ "type": "INBOUND",
258
+ "title": "Add Item",
259
+ "elementType": "COMMAND"
260
+ }
261
+ ],
262
+ "apiEndpoint": "",
263
+ "service": null,
264
+ "createsAggregate": false,
265
+ "triggers": [],
266
+ "sketched": false,
267
+ "prototype": {
268
+ "activeByDefault": false
269
+ }
270
+ }
271
+ ],
272
+ "readmodels": [],
273
+ "screens": [
274
+ {
275
+ "id": "3458764633782324896",
276
+ "tags": [],
277
+ "domain": "Cart",
278
+ "elementContext": "INTERNAL",
279
+ "modelContext": "Cart",
280
+ "context": "INTERNAL",
281
+ "slice": "slice: add item",
282
+ "title": "Add Item",
283
+ "fields": [
284
+ {
285
+ "name": "aggregateId",
286
+ "type": "UUID",
287
+ "example": "",
288
+ "mapping": "",
289
+ "optional": false,
290
+ "cardinality": "Single",
291
+ "idAttribute": false
292
+ },
293
+ {
294
+ "name": "description",
295
+ "type": "String",
296
+ "example": "",
297
+ "mapping": "",
298
+ "optional": false,
299
+ "cardinality": "Single",
300
+ "idAttribute": false
301
+ },
302
+ {
303
+ "name": "image",
304
+ "type": "String",
305
+ "example": "",
306
+ "mapping": "",
307
+ "optional": false,
308
+ "cardinality": "Single",
309
+ "idAttribute": false
310
+ },
311
+ {
312
+ "name": "price",
313
+ "type": "Double",
314
+ "example": "",
315
+ "mapping": "",
316
+ "optional": false,
317
+ "cardinality": "Single",
318
+ "idAttribute": false
319
+ },
320
+ {
321
+ "name": "totalPrice",
322
+ "type": "Double",
323
+ "example": "",
324
+ "mapping": "",
325
+ "optional": false,
326
+ "cardinality": "Single",
327
+ "idAttribute": false
328
+ },
329
+ {
330
+ "name": "itemId",
331
+ "type": "UUID",
332
+ "example": "",
333
+ "mapping": "",
334
+ "optional": false,
335
+ "cardinality": "Single",
336
+ "idAttribute": false
337
+ },
338
+ {
339
+ "name": "productId",
340
+ "type": "UUID",
341
+ "example": "",
342
+ "mapping": "",
343
+ "optional": false,
344
+ "cardinality": "Single",
345
+ "idAttribute": false
346
+ }
347
+ ],
348
+ "type": "SCREEN",
349
+ "description": "",
350
+ "aggregate": "Cart",
351
+ "aggregateDependencies": [
352
+ "Cart"
353
+ ],
354
+ "dependencies": [
355
+ {
356
+ "id": "3458764595812558688",
357
+ "type": "OUTBOUND",
358
+ "title": "Add Item",
359
+ "elementType": "COMMAND"
360
+ }
361
+ ],
362
+ "apiEndpoint": "",
363
+ "service": null,
364
+ "createsAggregate": false,
365
+ "triggers": [],
366
+ "sketched": false,
367
+ "prototype": {
368
+ "activeByDefault": false
369
+ }
370
+ }
371
+ ],
372
+ "screenImages": [],
373
+ "screenLayouts": [],
374
+ "processors": [],
375
+ "tables": [],
376
+ "specifications": [
377
+ {
378
+ "vertical": false,
379
+ "id": "3458764596790258150",
380
+ "sliceName": "slice: add item",
381
+ "title": "spec: add item max 3 items",
382
+ "given": [
383
+ {
384
+ "title": "Item Added",
385
+ "tags": [],
386
+ "id": "3458764596790258154",
387
+ "index": 3,
388
+ "type": "SPEC_EVENT",
389
+ "fields": [
390
+ {
391
+ "name": "aggregateId",
392
+ "type": "UUID",
393
+ "example": "",
394
+ "mapping": "",
395
+ "optional": false,
396
+ "cardinality": "Single",
397
+ "subfields": []
398
+ },
399
+ {
400
+ "name": "description",
401
+ "type": "String",
402
+ "example": "",
403
+ "mapping": "",
404
+ "optional": false,
405
+ "cardinality": "Single",
406
+ "subfields": []
407
+ },
408
+ {
409
+ "name": "image",
410
+ "type": "String",
411
+ "example": "",
412
+ "mapping": "",
413
+ "optional": false,
414
+ "cardinality": "Single",
415
+ "subfields": []
416
+ },
417
+ {
418
+ "name": "price",
419
+ "type": "Double",
420
+ "example": "",
421
+ "mapping": "",
422
+ "optional": false,
423
+ "cardinality": "Single",
424
+ "subfields": []
425
+ },
426
+ {
427
+ "name": "itemId",
428
+ "type": "UUID",
429
+ "example": "",
430
+ "mapping": "",
431
+ "optional": false,
432
+ "cardinality": "Single",
433
+ "subfields": []
434
+ },
435
+ {
436
+ "name": "productId",
437
+ "type": "UUID",
438
+ "example": "",
439
+ "mapping": "",
440
+ "optional": false,
441
+ "cardinality": "Single",
442
+ "subfields": []
443
+ }
444
+ ],
445
+ "linkedId": "3458764595631345476"
446
+ },
447
+ {
448
+ "title": "Item Added",
449
+ "tags": [],
450
+ "id": "3458764596790258153",
451
+ "index": 2,
452
+ "type": "SPEC_EVENT",
453
+ "fields": [
454
+ {
455
+ "name": "aggregateId",
456
+ "type": "UUID",
457
+ "example": "",
458
+ "mapping": "",
459
+ "optional": false,
460
+ "cardinality": "Single",
461
+ "subfields": []
462
+ },
463
+ {
464
+ "name": "description",
465
+ "type": "String",
466
+ "example": "",
467
+ "mapping": "",
468
+ "optional": false,
469
+ "cardinality": "Single",
470
+ "subfields": []
471
+ },
472
+ {
473
+ "name": "image",
474
+ "type": "String",
475
+ "example": "",
476
+ "mapping": "",
477
+ "optional": false,
478
+ "cardinality": "Single",
479
+ "subfields": []
480
+ },
481
+ {
482
+ "name": "price",
483
+ "type": "Double",
484
+ "example": "",
485
+ "mapping": "",
486
+ "optional": false,
487
+ "cardinality": "Single",
488
+ "subfields": []
489
+ },
490
+ {
491
+ "name": "itemId",
492
+ "type": "UUID",
493
+ "example": "",
494
+ "mapping": "",
495
+ "optional": false,
496
+ "cardinality": "Single",
497
+ "subfields": []
498
+ },
499
+ {
500
+ "name": "productId",
501
+ "type": "UUID",
502
+ "example": "",
503
+ "mapping": "",
504
+ "optional": false,
505
+ "cardinality": "Single",
506
+ "subfields": []
507
+ }
508
+ ],
509
+ "linkedId": "3458764595631345476"
510
+ },
511
+ {
512
+ "title": "Item Added",
513
+ "tags": [],
514
+ "id": "3458764596790258152",
515
+ "index": 1,
516
+ "type": "SPEC_EVENT",
517
+ "fields": [
518
+ {
519
+ "name": "aggregateId",
520
+ "type": "UUID",
521
+ "example": "",
522
+ "mapping": "",
523
+ "optional": false,
524
+ "cardinality": "Single",
525
+ "subfields": []
526
+ },
527
+ {
528
+ "name": "description",
529
+ "type": "String",
530
+ "example": "",
531
+ "mapping": "",
532
+ "optional": false,
533
+ "cardinality": "Single",
534
+ "subfields": []
535
+ },
536
+ {
537
+ "name": "image",
538
+ "type": "String",
539
+ "example": "",
540
+ "mapping": "",
541
+ "optional": false,
542
+ "cardinality": "Single",
543
+ "subfields": []
544
+ },
545
+ {
546
+ "name": "price",
547
+ "type": "Double",
548
+ "example": "",
549
+ "mapping": "",
550
+ "optional": false,
551
+ "cardinality": "Single",
552
+ "subfields": []
553
+ },
554
+ {
555
+ "name": "itemId",
556
+ "type": "UUID",
557
+ "example": "",
558
+ "mapping": "",
559
+ "optional": false,
560
+ "cardinality": "Single",
561
+ "subfields": []
562
+ },
563
+ {
564
+ "name": "productId",
565
+ "type": "UUID",
566
+ "example": "",
567
+ "mapping": "",
568
+ "optional": false,
569
+ "cardinality": "Single",
570
+ "subfields": []
571
+ }
572
+ ],
573
+ "linkedId": "3458764595631345476"
574
+ },
575
+ {
576
+ "title": "Cart Created",
577
+ "tags": [],
578
+ "id": "3458764596790258151",
579
+ "index": 0,
580
+ "type": "SPEC_EVENT",
581
+ "fields": [
582
+ {
583
+ "name": "aggregateId",
584
+ "type": "UUID",
585
+ "example": "",
586
+ "mapping": "",
587
+ "optional": false,
588
+ "cardinality": "Single",
589
+ "subfields": []
590
+ }
591
+ ],
592
+ "linkedId": "3458764596402400430"
593
+ }
594
+ ],
595
+ "when": [
596
+ {
597
+ "title": "Add Item",
598
+ "tags": [],
599
+ "id": "3458764596790258155",
600
+ "index": 0,
601
+ "type": "SPEC_COMMAND",
602
+ "fields": [
603
+ {
604
+ "name": "aggregateId",
605
+ "type": "UUID",
606
+ "example": "",
607
+ "mapping": "",
608
+ "optional": false,
609
+ "cardinality": "Single",
610
+ "subfields": []
611
+ },
612
+ {
613
+ "name": "description",
614
+ "type": "String",
615
+ "example": "",
616
+ "mapping": "",
617
+ "optional": false,
618
+ "cardinality": "Single",
619
+ "subfields": []
620
+ },
621
+ {
622
+ "name": "image",
623
+ "type": "String",
624
+ "example": "",
625
+ "mapping": "",
626
+ "optional": false,
627
+ "cardinality": "Single",
628
+ "subfields": []
629
+ },
630
+ {
631
+ "name": "price",
632
+ "type": "Double",
633
+ "example": "",
634
+ "mapping": "",
635
+ "optional": false,
636
+ "cardinality": "Single",
637
+ "subfields": []
638
+ },
639
+ {
640
+ "name": "itemId",
641
+ "type": "UUID",
642
+ "example": "",
643
+ "mapping": "",
644
+ "optional": false,
645
+ "cardinality": "Single",
646
+ "subfields": []
647
+ },
648
+ {
649
+ "name": "productId",
650
+ "type": "UUID",
651
+ "example": "",
652
+ "mapping": "",
653
+ "optional": false,
654
+ "cardinality": "Single",
655
+ "subfields": []
656
+ }
657
+ ],
658
+ "linkedId": "3458764595812558688"
659
+ }
660
+ ],
661
+ "then": [
662
+ {
663
+ "title": "Error-Case",
664
+ "tags": [],
665
+ "id": "3458764596790258156",
666
+ "index": 0,
667
+ "type": "SPEC_ERROR"
668
+ }
669
+ ],
670
+ "comments": [],
671
+ "linkedId": "3458764595831815141"
672
+ },
673
+ {
674
+ "vertical": false,
675
+ "id": "3458764596402842498",
676
+ "sliceName": "slice: add item",
677
+ "title": "spec: add item",
678
+ "given": [],
679
+ "when": [
680
+ {
681
+ "title": "Add Item",
682
+ "tags": [],
683
+ "id": "3458764596402842499",
684
+ "index": 0,
685
+ "type": "SPEC_COMMAND",
686
+ "fields": [
687
+ {
688
+ "name": "aggregateId",
689
+ "type": "UUID",
690
+ "example": "",
691
+ "mapping": "",
692
+ "optional": false,
693
+ "cardinality": "Single",
694
+ "subfields": []
695
+ },
696
+ {
697
+ "name": "description",
698
+ "type": "String",
699
+ "example": "",
700
+ "mapping": "",
701
+ "optional": false,
702
+ "cardinality": "Single",
703
+ "subfields": []
704
+ },
705
+ {
706
+ "name": "image",
707
+ "type": "String",
708
+ "example": "",
709
+ "mapping": "",
710
+ "optional": false,
711
+ "cardinality": "Single",
712
+ "subfields": []
713
+ },
714
+ {
715
+ "name": "price",
716
+ "type": "Double",
717
+ "example": "",
718
+ "mapping": "",
719
+ "optional": false,
720
+ "cardinality": "Single",
721
+ "subfields": []
722
+ },
723
+ {
724
+ "name": "itemId",
725
+ "type": "UUID",
726
+ "example": "",
727
+ "mapping": "",
728
+ "optional": false,
729
+ "cardinality": "Single",
730
+ "subfields": []
731
+ },
732
+ {
733
+ "name": "productId",
734
+ "type": "UUID",
735
+ "example": "",
736
+ "mapping": "",
737
+ "optional": false,
738
+ "cardinality": "Single",
739
+ "subfields": []
740
+ }
741
+ ],
742
+ "linkedId": "3458764595812558688"
743
+ }
744
+ ],
745
+ "then": [
746
+ {
747
+ "title": "Item Added",
748
+ "tags": [],
749
+ "id": "3458764596402842501",
750
+ "index": 1,
751
+ "type": "SPEC_EVENT",
752
+ "fields": [
753
+ {
754
+ "name": "aggregateId",
755
+ "type": "UUID",
756
+ "example": "",
757
+ "mapping": "",
758
+ "optional": false,
759
+ "cardinality": "Single",
760
+ "subfields": []
761
+ },
762
+ {
763
+ "name": "description",
764
+ "type": "String",
765
+ "example": "",
766
+ "mapping": "",
767
+ "optional": false,
768
+ "cardinality": "Single",
769
+ "subfields": []
770
+ },
771
+ {
772
+ "name": "image",
773
+ "type": "String",
774
+ "example": "",
775
+ "mapping": "",
776
+ "optional": false,
777
+ "cardinality": "Single",
778
+ "subfields": []
779
+ },
780
+ {
781
+ "name": "price",
782
+ "type": "Double",
783
+ "example": "",
784
+ "mapping": "",
785
+ "optional": false,
786
+ "cardinality": "Single",
787
+ "subfields": []
788
+ },
789
+ {
790
+ "name": "itemId",
791
+ "type": "UUID",
792
+ "example": "",
793
+ "mapping": "",
794
+ "optional": false,
795
+ "cardinality": "Single",
796
+ "subfields": []
797
+ },
798
+ {
799
+ "name": "productId",
800
+ "type": "UUID",
801
+ "example": "",
802
+ "mapping": "",
803
+ "optional": false,
804
+ "cardinality": "Single",
805
+ "subfields": []
806
+ }
807
+ ],
808
+ "linkedId": "3458764595631345476"
809
+ },
810
+ {
811
+ "title": "Cart Created",
812
+ "tags": [],
813
+ "id": "3458764596402842500",
814
+ "index": 0,
815
+ "type": "SPEC_EVENT",
816
+ "fields": [
817
+ {
818
+ "name": "aggregateId",
819
+ "type": "UUID",
820
+ "example": "",
821
+ "mapping": "",
822
+ "optional": false,
823
+ "cardinality": "Single",
824
+ "subfields": []
825
+ }
826
+ ],
827
+ "linkedId": "3458764596402400430"
828
+ }
829
+ ],
830
+ "comments": [
831
+ {
832
+ "description": "Cart-Session is automatically created if an item is added and no session exists."
833
+ }
834
+ ],
835
+ "linkedId": "3458764595831815141"
836
+ },
837
+ {
838
+ "vertical": false,
839
+ "id": "3458764596400668146",
840
+ "sliceName": "slice: add item",
841
+ "title": "spec: add item with empty inventory",
842
+ "given": [
843
+ {
844
+ "title": "Inventory Changed",
845
+ "tags": [],
846
+ "id": "3458764596400668148",
847
+ "index": 0,
848
+ "type": "SPEC_EVENT",
849
+ "fields": [
850
+ {
851
+ "name": "inventory",
852
+ "type": "Int",
853
+ "example": "0",
854
+ "mapping": "",
855
+ "optional": false,
856
+ "cardinality": "Single",
857
+ "subfields": []
858
+ },
859
+ {
860
+ "name": "productId",
861
+ "type": "UUID",
862
+ "example": "",
863
+ "mapping": "",
864
+ "optional": false,
865
+ "cardinality": "Single",
866
+ "idAttribute": true,
867
+ "subfields": []
868
+ }
869
+ ],
870
+ "linkedId": "3458764596395403355"
871
+ }
872
+ ],
873
+ "when": [
874
+ {
875
+ "title": "Add Item",
876
+ "tags": [],
877
+ "id": "3458764596400668149",
878
+ "index": 0,
879
+ "type": "SPEC_COMMAND",
880
+ "fields": [
881
+ {
882
+ "name": "aggregateId",
883
+ "type": "UUID",
884
+ "example": "",
885
+ "mapping": "",
886
+ "optional": false,
887
+ "cardinality": "Single",
888
+ "subfields": []
889
+ },
890
+ {
891
+ "name": "description",
892
+ "type": "String",
893
+ "example": "",
894
+ "mapping": "",
895
+ "optional": false,
896
+ "cardinality": "Single",
897
+ "subfields": []
898
+ },
899
+ {
900
+ "name": "image",
901
+ "type": "String",
902
+ "example": "",
903
+ "mapping": "",
904
+ "optional": false,
905
+ "cardinality": "Single",
906
+ "subfields": []
907
+ },
908
+ {
909
+ "name": "price",
910
+ "type": "Double",
911
+ "example": "",
912
+ "mapping": "",
913
+ "optional": false,
914
+ "cardinality": "Single",
915
+ "subfields": []
916
+ },
917
+ {
918
+ "name": "itemId",
919
+ "type": "UUID",
920
+ "example": "",
921
+ "mapping": "",
922
+ "optional": false,
923
+ "cardinality": "Single",
924
+ "subfields": []
925
+ },
926
+ {
927
+ "name": "productId",
928
+ "type": "UUID",
929
+ "example": "",
930
+ "mapping": "",
931
+ "optional": false,
932
+ "cardinality": "Single",
933
+ "subfields": []
934
+ }
935
+ ],
936
+ "linkedId": "3458764595812558688"
937
+ }
938
+ ],
939
+ "then": [
940
+ {
941
+ "title": "Cart Created",
942
+ "tags": [],
943
+ "id": "3458764596402842800",
944
+ "index": 0,
945
+ "type": "SPEC_EVENT",
946
+ "fields": [
947
+ {
948
+ "name": "aggregateId",
949
+ "type": "UUID",
950
+ "example": "",
951
+ "mapping": "",
952
+ "optional": false,
953
+ "cardinality": "Single",
954
+ "subfields": []
955
+ }
956
+ ],
957
+ "linkedId": "3458764596402400430"
958
+ },
959
+ {
960
+ "title": "Error-Case",
961
+ "tags": [],
962
+ "id": "3458764596400668151",
963
+ "index": 0,
964
+ "type": "SPEC_ERROR"
965
+ }
966
+ ],
967
+ "comments": [],
968
+ "linkedId": "3458764595831815141"
969
+ }
970
+ ],
971
+ "actors": [
972
+ {
973
+ "name": "User"
974
+ }
975
+ ],
976
+ "aggregates": [
977
+ "Cart"
978
+ ]
979
+ }