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