@kapeta/local-cluster-service 0.55.1 → 0.55.3
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.
- package/CHANGELOG.md +14 -0
- package/definitions.d.ts +1 -1
- package/dist/cjs/src/storm/event-parser.d.ts +2 -1
- package/dist/cjs/src/storm/event-parser.js +43 -12
- package/dist/cjs/src/storm/routes.js +1 -1
- package/dist/cjs/test/storm/blog-events.json +860 -0
- package/dist/cjs/test/storm/codegen.test.js +2 -2
- package/dist/cjs/test/storm/event-parser.test.js +25 -7
- package/dist/cjs/test/storm/predefined-user-events.json +9 -0
- package/dist/esm/src/storm/event-parser.d.ts +2 -1
- package/dist/esm/src/storm/event-parser.js +43 -12
- package/dist/esm/src/storm/routes.js +1 -1
- package/dist/esm/test/storm/blog-events.json +860 -0
- package/dist/esm/test/storm/codegen.test.js +2 -2
- package/dist/esm/test/storm/event-parser.test.js +25 -7
- package/dist/esm/test/storm/predefined-user-events.json +9 -0
- package/package.json +1 -1
- package/src/storm/event-parser.ts +76 -37
- package/src/storm/routes.ts +1 -1
- package/test/storm/blog-events.json +860 -0
- package/test/storm/codegen.test.ts +4 -2
- package/test/storm/event-parser.test.ts +27 -7
- package/test/storm/predefined-user-events.json +9 -0
@@ -0,0 +1,860 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"type": "MODEL_RESPONSE",
|
4
|
+
"reason": "System description",
|
5
|
+
"payload": {
|
6
|
+
"text": "A blogging platform with user management, post management, and comment management functionalities."
|
7
|
+
},
|
8
|
+
"created": 1720784218327
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"type": "CREATE_PLAN_PROPERTIES",
|
12
|
+
"reason": "Define the properties for the plan itself",
|
13
|
+
"payload": {
|
14
|
+
"description": "A blogging platform with user management, post management, and comment management functionalities.",
|
15
|
+
"name": "Blog Platform"
|
16
|
+
},
|
17
|
+
"created": 1720784218328
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"type": "CREATE_BLOCK",
|
21
|
+
"reason": "Handles user registration, login, and profile management.",
|
22
|
+
"payload": {
|
23
|
+
"description": "Handles user registration, login, and profile management.",
|
24
|
+
"name": "user-interface",
|
25
|
+
"resources": [],
|
26
|
+
"type": "FRONTEND",
|
27
|
+
"blockRef": "kapeta://kapeta/user-interface:local",
|
28
|
+
"instanceId": "b3172066-f5cc-5569-b0e7-913413a3342b"
|
29
|
+
},
|
30
|
+
"created": 1720784218936
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"type": "CREATE_BLOCK",
|
34
|
+
"reason": "Displays blog posts, allows users to create, edit, and delete their own posts, and manage comments on their posts.",
|
35
|
+
"payload": {
|
36
|
+
"description": "Displays blog posts, allows users to create, edit, and delete their own posts, and manage comments on their posts.",
|
37
|
+
"name": "blog-interface",
|
38
|
+
"resources": [],
|
39
|
+
"type": "FRONTEND",
|
40
|
+
"blockRef": "kapeta://kapeta/blog-interface:local",
|
41
|
+
"instanceId": "d9f4ade8-b319-59b2-b031-69162b79f9fa"
|
42
|
+
},
|
43
|
+
"created": 1720784218937
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"type": "CREATE_BLOCK",
|
47
|
+
"reason": "Handles user registration, authentication, and authorization.",
|
48
|
+
"payload": {
|
49
|
+
"archetype": "USER_SERVICE",
|
50
|
+
"description": "Handles user registration, authentication, and authorization.",
|
51
|
+
"name": "user-service",
|
52
|
+
"resources": [],
|
53
|
+
"type": "BACKEND",
|
54
|
+
"blockRef": "kapeta://kapeta/user-service:local",
|
55
|
+
"instanceId": "a074d2c5-1239-52d6-9722-e8c5ddff39a8"
|
56
|
+
},
|
57
|
+
"created": 1720784220151
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"type": "CREATE_BLOCK",
|
61
|
+
"reason": "Manages the creation, editing, and deletion of blog posts.",
|
62
|
+
"payload": {
|
63
|
+
"description": "Manages the creation, editing, and deletion of blog posts.",
|
64
|
+
"name": "post-service",
|
65
|
+
"resources": [],
|
66
|
+
"type": "BACKEND",
|
67
|
+
"blockRef": "kapeta://kapeta/post-service:local",
|
68
|
+
"instanceId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26"
|
69
|
+
},
|
70
|
+
"created": 1720784220158
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"type": "CREATE_BLOCK",
|
74
|
+
"reason": "Manages the creation, editing, and deletion of comments on blog posts.",
|
75
|
+
"payload": {
|
76
|
+
"description": "Manages the creation, editing, and deletion of comments on blog posts.",
|
77
|
+
"name": "comment-service",
|
78
|
+
"resources": [],
|
79
|
+
"type": "BACKEND",
|
80
|
+
"blockRef": "kapeta://kapeta/comment-service:local",
|
81
|
+
"instanceId": "d4215220-f552-5a6d-9429-bef1c40c4d7c"
|
82
|
+
},
|
83
|
+
"created": 1720784220161
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"type": "CREATE_BLOCK",
|
87
|
+
"reason": "Block updated",
|
88
|
+
"payload": {
|
89
|
+
"archetype": "",
|
90
|
+
"description": "Handles user registration, login, and profile management.",
|
91
|
+
"name": "user-interface",
|
92
|
+
"resources": [
|
93
|
+
{
|
94
|
+
"description": "Displays and allows users to edit their profile information.",
|
95
|
+
"name": "userinterface_profile",
|
96
|
+
"path": "/profile",
|
97
|
+
"type": "WEBPAGE"
|
98
|
+
}
|
99
|
+
],
|
100
|
+
"type": "FRONTEND",
|
101
|
+
"blockRef": "kapeta://kapeta/user-interface:local",
|
102
|
+
"instanceId": "b3172066-f5cc-5569-b0e7-913413a3342b"
|
103
|
+
},
|
104
|
+
"created": 1720784221358
|
105
|
+
},
|
106
|
+
{
|
107
|
+
"type": "CREATE_BLOCK",
|
108
|
+
"reason": "Block updated",
|
109
|
+
"payload": {
|
110
|
+
"archetype": "",
|
111
|
+
"description": "Displays blog posts, allows users to create, edit, and delete their own posts, and manage comments on their posts.",
|
112
|
+
"name": "blog-interface",
|
113
|
+
"resources": [
|
114
|
+
{
|
115
|
+
"description": "Displays a list of blog posts, allows users to create, edit, and delete their own posts, and manage comments on their posts.",
|
116
|
+
"name": "bloginterface_blogposts",
|
117
|
+
"path": "/posts",
|
118
|
+
"type": "WEBPAGE"
|
119
|
+
}
|
120
|
+
],
|
121
|
+
"type": "FRONTEND",
|
122
|
+
"blockRef": "kapeta://kapeta/blog-interface:local",
|
123
|
+
"instanceId": "d9f4ade8-b319-59b2-b031-69162b79f9fa"
|
124
|
+
},
|
125
|
+
"created": 1720784221362
|
126
|
+
},
|
127
|
+
{
|
128
|
+
"type": "CREATE_BLOCK",
|
129
|
+
"reason": "Handles traffic from the frontend interfaces.",
|
130
|
+
"payload": {
|
131
|
+
"description": "Handles traffic from the frontend interfaces.",
|
132
|
+
"name": "frontend-gateway",
|
133
|
+
"resources": [],
|
134
|
+
"type": "GATEWAY",
|
135
|
+
"blockRef": "kapeta://kapeta/frontend-gateway:local",
|
136
|
+
"instanceId": "016c9729-ba12-5178-9de6-cdfe3f234bb3"
|
137
|
+
},
|
138
|
+
"created": 1720784223038
|
139
|
+
},
|
140
|
+
{
|
141
|
+
"type": "CREATE_BLOCK",
|
142
|
+
"reason": "Handles traffic from the backend services.",
|
143
|
+
"payload": {
|
144
|
+
"description": "Handles traffic from the backend services.",
|
145
|
+
"name": "api-gateway",
|
146
|
+
"resources": [],
|
147
|
+
"type": "GATEWAY",
|
148
|
+
"blockRef": "kapeta://kapeta/api-gateway:local",
|
149
|
+
"instanceId": "6b247f30-dec4-5960-a8a0-f300caa95226"
|
150
|
+
},
|
151
|
+
"created": 1720784223042
|
152
|
+
},
|
153
|
+
{
|
154
|
+
"type": "CREATE_BLOCK",
|
155
|
+
"reason": "Block updated",
|
156
|
+
"payload": {
|
157
|
+
"archetype": "USER_SERVICE",
|
158
|
+
"description": "Handles user registration, authentication, and authorization.",
|
159
|
+
"name": "user-service",
|
160
|
+
"resources": [
|
161
|
+
{
|
162
|
+
"description": "Database for User Service",
|
163
|
+
"name": "userdatabase",
|
164
|
+
"type": "DATABASE"
|
165
|
+
}
|
166
|
+
],
|
167
|
+
"type": "BACKEND",
|
168
|
+
"blockRef": "kapeta://kapeta/user-service:local",
|
169
|
+
"instanceId": "a074d2c5-1239-52d6-9722-e8c5ddff39a8"
|
170
|
+
},
|
171
|
+
"created": 1720784223584
|
172
|
+
},
|
173
|
+
{
|
174
|
+
"type": "CREATE_BLOCK",
|
175
|
+
"reason": "Block updated",
|
176
|
+
"payload": {
|
177
|
+
"archetype": "",
|
178
|
+
"description": "Manages the creation, editing, and deletion of blog posts.",
|
179
|
+
"name": "post-service",
|
180
|
+
"resources": [
|
181
|
+
{
|
182
|
+
"description": "Database for Post Service",
|
183
|
+
"name": "postdatabase",
|
184
|
+
"type": "DATABASE"
|
185
|
+
}
|
186
|
+
],
|
187
|
+
"type": "BACKEND",
|
188
|
+
"blockRef": "kapeta://kapeta/post-service:local",
|
189
|
+
"instanceId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26"
|
190
|
+
},
|
191
|
+
"created": 1720784223587
|
192
|
+
},
|
193
|
+
{
|
194
|
+
"type": "CREATE_BLOCK",
|
195
|
+
"reason": "Block updated",
|
196
|
+
"payload": {
|
197
|
+
"archetype": "",
|
198
|
+
"description": "Manages the creation, editing, and deletion of comments on blog posts.",
|
199
|
+
"name": "comment-service",
|
200
|
+
"resources": [
|
201
|
+
{
|
202
|
+
"description": "Database for Comment Service",
|
203
|
+
"name": "commentdatabase",
|
204
|
+
"type": "DATABASE"
|
205
|
+
}
|
206
|
+
],
|
207
|
+
"type": "BACKEND",
|
208
|
+
"blockRef": "kapeta://kapeta/comment-service:local",
|
209
|
+
"instanceId": "d4215220-f552-5a6d-9429-bef1c40c4d7c"
|
210
|
+
},
|
211
|
+
"created": 1720784223590
|
212
|
+
},
|
213
|
+
{
|
214
|
+
"type": "CREATE_TYPE",
|
215
|
+
"reason": "Create type for post-service",
|
216
|
+
"payload": {
|
217
|
+
"blockName": "post-service",
|
218
|
+
"content": "type Post {\n\tauthor_id: integer\n\tcontent: string\n\tcreated_at: date\n\tid: integer\n\ttitle: string\n\tupdated_at: date\n}",
|
219
|
+
"blockRef": "kapeta://kapeta/post-service:local",
|
220
|
+
"instanceId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26"
|
221
|
+
},
|
222
|
+
"created": 1720784233286
|
223
|
+
},
|
224
|
+
{
|
225
|
+
"type": "CREATE_API",
|
226
|
+
"reason": "Create API for post-service",
|
227
|
+
"payload": {
|
228
|
+
"blockName": "post-service",
|
229
|
+
"content": "controller PostsAPI(\"/\") {\n\n\t//Get a list of posts\n\t@GET(\"/posts\")\n\tgetByPosts():Post[]\n\t\n\t//Create a new post\n\t@POST(\"/posts\")\n\tpostByPosts(@Body body:Post):Post\n\t\n\t//Get a post by ID\n\t@GET(\"/posts/{id}\")\n\tgetByPostsId(@Path id:integer):Post\n\t\n\t//Update a post by ID\n\t@PUT(\"/posts/{id}\")\n\tputByPostsId(@Path id:integer, @Body body:Post):Post\n\t\n\t//Delete a post by ID\n\t@DELETE(\"/posts/{id}\")\n\tdeleteByPostsId(@Path id:integer):void\n}",
|
230
|
+
"blockRef": "kapeta://kapeta/post-service:local",
|
231
|
+
"instanceId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26"
|
232
|
+
},
|
233
|
+
"created": 1720784233290
|
234
|
+
},
|
235
|
+
{
|
236
|
+
"type": "CREATE_TYPE",
|
237
|
+
"reason": "Create type for comment-service",
|
238
|
+
"payload": {
|
239
|
+
"blockName": "comment-service",
|
240
|
+
"content": "type Comment {\n\tid: integer\n\tpost_id: integer\n\tupdated_at: date\n\tauthor_id: integer\n\tcontent: string\n\tcreated_at: date\n}",
|
241
|
+
"blockRef": "kapeta://kapeta/comment-service:local",
|
242
|
+
"instanceId": "d4215220-f552-5a6d-9429-bef1c40c4d7c"
|
243
|
+
},
|
244
|
+
"created": 1720784241000
|
245
|
+
},
|
246
|
+
{
|
247
|
+
"type": "CREATE_API",
|
248
|
+
"reason": "Create API for comment-service",
|
249
|
+
"payload": {
|
250
|
+
"blockName": "comment-service",
|
251
|
+
"content": "controller CommentsAPI(\"/\") {\n\n\t//Get a comment by ID\n\t@GET(\"/comments/{id}\")\n\tgetByCommentsId(@Path id:integer):Comment\n\t\n\t//Update a comment by ID\n\t@PUT(\"/comments/{id}\")\n\tputByCommentsId(@Path id:integer, @Body body:Comment):Comment\n\t\n\t//Delete a comment by ID\n\t@DELETE(\"/comments/{id}\")\n\tdeleteByCommentsId(@Path id:integer):void\n\t\n\t//Get a list of comments\n\t@GET(\"/comments\")\n\tgetByComments(@Query post_id:integer):Comment[]\n\t\n\t//Create a new comment\n\t@POST(\"/comments\")\n\tpostByComments(@Body body:Comment):Comment\n}",
|
252
|
+
"blockRef": "kapeta://kapeta/comment-service:local",
|
253
|
+
"instanceId": "d4215220-f552-5a6d-9429-bef1c40c4d7c"
|
254
|
+
},
|
255
|
+
"created": 1720784241002
|
256
|
+
},
|
257
|
+
{
|
258
|
+
"type": "CREATE_BLOCK",
|
259
|
+
"reason": "Block updated",
|
260
|
+
"payload": {
|
261
|
+
"archetype": "",
|
262
|
+
"description": "Handles user registration, login, and profile management.",
|
263
|
+
"name": "user-interface",
|
264
|
+
"resources": [
|
265
|
+
{
|
266
|
+
"description": "Displays and allows users to edit their profile information.",
|
267
|
+
"name": "userinterface_profile",
|
268
|
+
"path": "/profile",
|
269
|
+
"type": "WEBPAGE"
|
270
|
+
},
|
271
|
+
{
|
272
|
+
"description": "Client for user-service",
|
273
|
+
"name": "users",
|
274
|
+
"to": "user-service",
|
275
|
+
"type": "CLIENT"
|
276
|
+
}
|
277
|
+
],
|
278
|
+
"type": "FRONTEND",
|
279
|
+
"blockRef": "kapeta://kapeta/user-interface:local",
|
280
|
+
"instanceId": "b3172066-f5cc-5569-b0e7-913413a3342b"
|
281
|
+
},
|
282
|
+
"created": 1720784242049
|
283
|
+
},
|
284
|
+
{
|
285
|
+
"type": "CREATE_BLOCK",
|
286
|
+
"reason": "Block updated",
|
287
|
+
"payload": {
|
288
|
+
"archetype": "",
|
289
|
+
"description": "Displays blog posts, allows users to create, edit, and delete their own posts, and manage comments on their posts.",
|
290
|
+
"name": "blog-interface",
|
291
|
+
"resources": [
|
292
|
+
{
|
293
|
+
"description": "Displays a list of blog posts, allows users to create, edit, and delete their own posts, and manage comments on their posts.",
|
294
|
+
"name": "bloginterface_blogposts",
|
295
|
+
"path": "/posts",
|
296
|
+
"type": "WEBPAGE"
|
297
|
+
},
|
298
|
+
{
|
299
|
+
"description": "Client for post-service",
|
300
|
+
"name": "posts",
|
301
|
+
"to": "post-service",
|
302
|
+
"type": "CLIENT"
|
303
|
+
}
|
304
|
+
],
|
305
|
+
"type": "FRONTEND",
|
306
|
+
"blockRef": "kapeta://kapeta/blog-interface:local",
|
307
|
+
"instanceId": "d9f4ade8-b319-59b2-b031-69162b79f9fa"
|
308
|
+
},
|
309
|
+
"created": 1720784242053
|
310
|
+
},
|
311
|
+
{
|
312
|
+
"type": "CREATE_BLOCK",
|
313
|
+
"reason": "Block updated",
|
314
|
+
"payload": {
|
315
|
+
"archetype": "",
|
316
|
+
"description": "Displays blog posts, allows users to create, edit, and delete their own posts, and manage comments on their posts.",
|
317
|
+
"name": "blog-interface",
|
318
|
+
"resources": [
|
319
|
+
{
|
320
|
+
"description": "Displays a list of blog posts, allows users to create, edit, and delete their own posts, and manage comments on their posts.",
|
321
|
+
"name": "bloginterface_blogposts",
|
322
|
+
"path": "/posts",
|
323
|
+
"type": "WEBPAGE"
|
324
|
+
},
|
325
|
+
{
|
326
|
+
"description": "Client for post-service",
|
327
|
+
"name": "posts",
|
328
|
+
"to": "post-service",
|
329
|
+
"type": "CLIENT"
|
330
|
+
},
|
331
|
+
{
|
332
|
+
"description": "Client for comment-service",
|
333
|
+
"name": "comments",
|
334
|
+
"to": "comment-service",
|
335
|
+
"type": "CLIENT"
|
336
|
+
}
|
337
|
+
],
|
338
|
+
"type": "FRONTEND",
|
339
|
+
"blockRef": "kapeta://kapeta/blog-interface:local",
|
340
|
+
"instanceId": "d9f4ade8-b319-59b2-b031-69162b79f9fa"
|
341
|
+
},
|
342
|
+
"created": 1720784242058
|
343
|
+
},
|
344
|
+
{
|
345
|
+
"type": "CREATE_BLOCK",
|
346
|
+
"reason": "Block updated",
|
347
|
+
"payload": {
|
348
|
+
"archetype": "",
|
349
|
+
"description": "Handles traffic from the frontend interfaces.",
|
350
|
+
"name": "frontend-gateway",
|
351
|
+
"resources": [
|
352
|
+
{
|
353
|
+
"description": "",
|
354
|
+
"name": "userinterface_profile",
|
355
|
+
"path": "/profile",
|
356
|
+
"type": "WEBFRAGMENT"
|
357
|
+
},
|
358
|
+
{
|
359
|
+
"description": "",
|
360
|
+
"name": "bloginterface_blogposts",
|
361
|
+
"path": "/posts",
|
362
|
+
"type": "WEBFRAGMENT"
|
363
|
+
}
|
364
|
+
],
|
365
|
+
"type": "GATEWAY",
|
366
|
+
"blockRef": "kapeta://kapeta/frontend-gateway:local",
|
367
|
+
"instanceId": "016c9729-ba12-5178-9de6-cdfe3f234bb3"
|
368
|
+
},
|
369
|
+
"created": 1720784242061
|
370
|
+
},
|
371
|
+
{
|
372
|
+
"type": "CREATE_BLOCK",
|
373
|
+
"reason": "Block updated",
|
374
|
+
"payload": {
|
375
|
+
"archetype": "",
|
376
|
+
"description": "Handles traffic from the backend services.",
|
377
|
+
"name": "api-gateway",
|
378
|
+
"resources": [
|
379
|
+
{
|
380
|
+
"description": "",
|
381
|
+
"name": "users",
|
382
|
+
"to": "user-service",
|
383
|
+
"type": "CLIENT"
|
384
|
+
},
|
385
|
+
{
|
386
|
+
"description": "",
|
387
|
+
"name": "posts",
|
388
|
+
"to": "post-service",
|
389
|
+
"type": "CLIENT"
|
390
|
+
},
|
391
|
+
{
|
392
|
+
"description": "",
|
393
|
+
"name": "comments",
|
394
|
+
"to": "comment-service",
|
395
|
+
"type": "CLIENT"
|
396
|
+
}
|
397
|
+
],
|
398
|
+
"type": "GATEWAY",
|
399
|
+
"blockRef": "kapeta://kapeta/api-gateway:local",
|
400
|
+
"instanceId": "6b247f30-dec4-5960-a8a0-f300caa95226"
|
401
|
+
},
|
402
|
+
"created": 1720784242064
|
403
|
+
},
|
404
|
+
{
|
405
|
+
"type": "CREATE_BLOCK",
|
406
|
+
"reason": "Block updated",
|
407
|
+
"payload": {
|
408
|
+
"archetype": "",
|
409
|
+
"description": "Manages the creation, editing, and deletion of blog posts.",
|
410
|
+
"name": "post-service",
|
411
|
+
"resources": [
|
412
|
+
{
|
413
|
+
"description": "Database for Post Service",
|
414
|
+
"name": "postdatabase",
|
415
|
+
"type": "DATABASE"
|
416
|
+
},
|
417
|
+
{
|
418
|
+
"description": "The posts API provides endpoints for managing blog posts. It includes functionality for creating, editing, and deleting posts, as well as retrieving and searching for posts. The API is designed to be secure and follows best practices for authentication and authorization.",
|
419
|
+
"name": "posts",
|
420
|
+
"type": "API"
|
421
|
+
},
|
422
|
+
{
|
423
|
+
"description": "JWT Consumer for post-service",
|
424
|
+
"name": "jwt-consumer",
|
425
|
+
"type": "JWTCONSUMER"
|
426
|
+
}
|
427
|
+
],
|
428
|
+
"type": "BACKEND",
|
429
|
+
"blockRef": "kapeta://kapeta/post-service:local",
|
430
|
+
"instanceId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26"
|
431
|
+
},
|
432
|
+
"created": 1720784243137
|
433
|
+
},
|
434
|
+
{
|
435
|
+
"type": "CREATE_BLOCK",
|
436
|
+
"reason": "Block updated",
|
437
|
+
"payload": {
|
438
|
+
"archetype": "",
|
439
|
+
"description": "Manages the creation, editing, and deletion of comments on blog posts.",
|
440
|
+
"name": "comment-service",
|
441
|
+
"resources": [
|
442
|
+
{
|
443
|
+
"description": "Database for Comment Service",
|
444
|
+
"name": "commentdatabase",
|
445
|
+
"type": "DATABASE"
|
446
|
+
},
|
447
|
+
{
|
448
|
+
"description": "The comments API provides endpoints for managing comments on blog posts. It includes functionality for creating, editing, and deleting comments, as well as retrieving and searching for comments. The API is designed to be secure and follows best practices for authentication and authorization.",
|
449
|
+
"name": "comments",
|
450
|
+
"type": "API"
|
451
|
+
},
|
452
|
+
{
|
453
|
+
"description": "JWT Consumer for comment-service",
|
454
|
+
"name": "jwt-consumer",
|
455
|
+
"type": "JWTCONSUMER"
|
456
|
+
}
|
457
|
+
],
|
458
|
+
"type": "BACKEND",
|
459
|
+
"blockRef": "kapeta://kapeta/comment-service:local",
|
460
|
+
"instanceId": "d4215220-f552-5a6d-9429-bef1c40c4d7c"
|
461
|
+
},
|
462
|
+
"created": 1720784243141
|
463
|
+
},
|
464
|
+
{
|
465
|
+
"type": "CREATE_BLOCK",
|
466
|
+
"reason": "Handles user registration, login, and profile management.",
|
467
|
+
"payload": {
|
468
|
+
"archetype": "",
|
469
|
+
"description": "Handles user registration, login, and profile management.",
|
470
|
+
"name": "user-interface",
|
471
|
+
"resources": [
|
472
|
+
{
|
473
|
+
"description": "Displays and allows users to edit their profile information.",
|
474
|
+
"name": "userinterface_profile",
|
475
|
+
"path": "/profile",
|
476
|
+
"type": "WEBPAGE"
|
477
|
+
},
|
478
|
+
{
|
479
|
+
"description": "Client for user-service",
|
480
|
+
"name": "users",
|
481
|
+
"to": "user-service",
|
482
|
+
"type": "CLIENT"
|
483
|
+
}
|
484
|
+
],
|
485
|
+
"type": "FRONTEND",
|
486
|
+
"blockRef": "kapeta://kapeta/user-interface:local",
|
487
|
+
"instanceId": "b3172066-f5cc-5569-b0e7-913413a3342b"
|
488
|
+
},
|
489
|
+
"created": 1720784243145
|
490
|
+
},
|
491
|
+
{
|
492
|
+
"type": "CREATE_BLOCK",
|
493
|
+
"reason": "Displays blog posts, allows users to create, edit, and delete their own posts, and manage comments on their posts.",
|
494
|
+
"payload": {
|
495
|
+
"archetype": "",
|
496
|
+
"description": "Displays blog posts, allows users to create, edit, and delete their own posts, and manage comments on their posts.",
|
497
|
+
"name": "blog-interface",
|
498
|
+
"resources": [
|
499
|
+
{
|
500
|
+
"description": "Displays a list of blog posts, allows users to create, edit, and delete their own posts, and manage comments on their posts.",
|
501
|
+
"name": "bloginterface_blogposts",
|
502
|
+
"path": "/posts",
|
503
|
+
"type": "WEBPAGE"
|
504
|
+
},
|
505
|
+
{
|
506
|
+
"description": "Client for post-service",
|
507
|
+
"name": "posts",
|
508
|
+
"to": "post-service",
|
509
|
+
"type": "CLIENT"
|
510
|
+
},
|
511
|
+
{
|
512
|
+
"description": "Client for comment-service",
|
513
|
+
"name": "comments",
|
514
|
+
"to": "comment-service",
|
515
|
+
"type": "CLIENT"
|
516
|
+
}
|
517
|
+
],
|
518
|
+
"type": "FRONTEND",
|
519
|
+
"blockRef": "kapeta://kapeta/blog-interface:local",
|
520
|
+
"instanceId": "d9f4ade8-b319-59b2-b031-69162b79f9fa"
|
521
|
+
},
|
522
|
+
"created": 1720784243147
|
523
|
+
},
|
524
|
+
{
|
525
|
+
"type": "CREATE_BLOCK",
|
526
|
+
"reason": "Handles user registration, authentication, and authorization.",
|
527
|
+
"payload": {
|
528
|
+
"archetype": "USER_SERVICE",
|
529
|
+
"description": "Handles user registration, authentication, and authorization.",
|
530
|
+
"name": "user-service",
|
531
|
+
"resources": [
|
532
|
+
{
|
533
|
+
"description": "Database for User Service",
|
534
|
+
"name": "userdatabase",
|
535
|
+
"type": "DATABASE"
|
536
|
+
},
|
537
|
+
{
|
538
|
+
"description": "The users API provides endpoints for managing user accounts. It includes functionality for user registration, login, profile management, and account deletion. The API is designed to be secure and follows best practices for authentication and authorization.",
|
539
|
+
"name": "users",
|
540
|
+
"type": "API"
|
541
|
+
},
|
542
|
+
{
|
543
|
+
"description": "JWT Provider for User Service",
|
544
|
+
"name": "jwt-provider",
|
545
|
+
"type": "JWTPROVIDER"
|
546
|
+
}
|
547
|
+
],
|
548
|
+
"type": "BACKEND",
|
549
|
+
"blockRef": "kapeta://kapeta/user-service:local",
|
550
|
+
"instanceId": "a074d2c5-1239-52d6-9722-e8c5ddff39a8"
|
551
|
+
},
|
552
|
+
"created": 1720784243149
|
553
|
+
},
|
554
|
+
{
|
555
|
+
"type": "CREATE_BLOCK",
|
556
|
+
"reason": "Manages the creation, editing, and deletion of blog posts.",
|
557
|
+
"payload": {
|
558
|
+
"archetype": "",
|
559
|
+
"description": "Manages the creation, editing, and deletion of blog posts.",
|
560
|
+
"name": "post-service",
|
561
|
+
"resources": [
|
562
|
+
{
|
563
|
+
"description": "Database for Post Service",
|
564
|
+
"name": "postdatabase",
|
565
|
+
"type": "DATABASE"
|
566
|
+
},
|
567
|
+
{
|
568
|
+
"description": "The posts API provides endpoints for managing blog posts. It includes functionality for creating, editing, and deleting posts, as well as retrieving and searching for posts. The API is designed to be secure and follows best practices for authentication and authorization.",
|
569
|
+
"name": "posts",
|
570
|
+
"type": "API"
|
571
|
+
},
|
572
|
+
{
|
573
|
+
"description": "JWT Consumer for post-service",
|
574
|
+
"name": "jwt-consumer",
|
575
|
+
"type": "JWTCONSUMER"
|
576
|
+
}
|
577
|
+
],
|
578
|
+
"type": "BACKEND",
|
579
|
+
"blockRef": "kapeta://kapeta/post-service:local",
|
580
|
+
"instanceId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26"
|
581
|
+
},
|
582
|
+
"created": 1720784243150
|
583
|
+
},
|
584
|
+
{
|
585
|
+
"type": "CREATE_BLOCK",
|
586
|
+
"reason": "Manages the creation, editing, and deletion of comments on blog posts.",
|
587
|
+
"payload": {
|
588
|
+
"archetype": "",
|
589
|
+
"description": "Manages the creation, editing, and deletion of comments on blog posts.",
|
590
|
+
"name": "comment-service",
|
591
|
+
"resources": [
|
592
|
+
{
|
593
|
+
"description": "Database for Comment Service",
|
594
|
+
"name": "commentdatabase",
|
595
|
+
"type": "DATABASE"
|
596
|
+
},
|
597
|
+
{
|
598
|
+
"description": "The comments API provides endpoints for managing comments on blog posts. It includes functionality for creating, editing, and deleting comments, as well as retrieving and searching for comments. The API is designed to be secure and follows best practices for authentication and authorization.",
|
599
|
+
"name": "comments",
|
600
|
+
"type": "API"
|
601
|
+
},
|
602
|
+
{
|
603
|
+
"description": "JWT Consumer for comment-service",
|
604
|
+
"name": "jwt-consumer",
|
605
|
+
"type": "JWTCONSUMER"
|
606
|
+
}
|
607
|
+
],
|
608
|
+
"type": "BACKEND",
|
609
|
+
"blockRef": "kapeta://kapeta/comment-service:local",
|
610
|
+
"instanceId": "d4215220-f552-5a6d-9429-bef1c40c4d7c"
|
611
|
+
},
|
612
|
+
"created": 1720784243153
|
613
|
+
},
|
614
|
+
{
|
615
|
+
"type": "CREATE_BLOCK",
|
616
|
+
"reason": "Handles traffic from the frontend interfaces.",
|
617
|
+
"payload": {
|
618
|
+
"archetype": "",
|
619
|
+
"description": "Handles traffic from the frontend interfaces.",
|
620
|
+
"name": "frontend-gateway",
|
621
|
+
"resources": [
|
622
|
+
{
|
623
|
+
"description": "",
|
624
|
+
"name": "userinterface_profile",
|
625
|
+
"path": "/profile",
|
626
|
+
"type": "WEBFRAGMENT"
|
627
|
+
},
|
628
|
+
{
|
629
|
+
"description": "",
|
630
|
+
"name": "bloginterface_blogposts",
|
631
|
+
"path": "/posts",
|
632
|
+
"type": "WEBFRAGMENT"
|
633
|
+
}
|
634
|
+
],
|
635
|
+
"type": "GATEWAY",
|
636
|
+
"blockRef": "kapeta://kapeta/frontend-gateway:local",
|
637
|
+
"instanceId": "016c9729-ba12-5178-9de6-cdfe3f234bb3"
|
638
|
+
},
|
639
|
+
"created": 1720784243155
|
640
|
+
},
|
641
|
+
{
|
642
|
+
"type": "CREATE_BLOCK",
|
643
|
+
"reason": "Handles traffic from the backend services.",
|
644
|
+
"payload": {
|
645
|
+
"archetype": "",
|
646
|
+
"description": "Handles traffic from the backend services.",
|
647
|
+
"name": "api-gateway",
|
648
|
+
"resources": [
|
649
|
+
{
|
650
|
+
"description": "",
|
651
|
+
"name": "users",
|
652
|
+
"to": "user-service",
|
653
|
+
"type": "CLIENT"
|
654
|
+
},
|
655
|
+
{
|
656
|
+
"description": "",
|
657
|
+
"name": "posts",
|
658
|
+
"to": "post-service",
|
659
|
+
"type": "CLIENT"
|
660
|
+
},
|
661
|
+
{
|
662
|
+
"description": "",
|
663
|
+
"name": "comments",
|
664
|
+
"to": "comment-service",
|
665
|
+
"type": "CLIENT"
|
666
|
+
}
|
667
|
+
],
|
668
|
+
"type": "GATEWAY",
|
669
|
+
"blockRef": "kapeta://kapeta/api-gateway:local",
|
670
|
+
"instanceId": "6b247f30-dec4-5960-a8a0-f300caa95226"
|
671
|
+
},
|
672
|
+
"created": 1720784243158
|
673
|
+
},
|
674
|
+
{
|
675
|
+
"type": "CREATE_CONNECTION",
|
676
|
+
"reason": "user-interface needs to be able to serve the users API from the user-service",
|
677
|
+
"payload": {
|
678
|
+
"fromComponent": "user-service",
|
679
|
+
"fromResource": "users",
|
680
|
+
"fromResourceType": "API",
|
681
|
+
"toComponent": "user-interface",
|
682
|
+
"toResource": "users",
|
683
|
+
"toResourceType": "CLIENT",
|
684
|
+
"fromBlockId": "a074d2c5-1239-52d6-9722-e8c5ddff39a8",
|
685
|
+
"toBlockId": "b3172066-f5cc-5569-b0e7-913413a3342b"
|
686
|
+
},
|
687
|
+
"created": 1720784243160
|
688
|
+
},
|
689
|
+
{
|
690
|
+
"type": "CREATE_CONNECTION",
|
691
|
+
"reason": "blog-interface needs to be able to serve the posts API from the post-service",
|
692
|
+
"payload": {
|
693
|
+
"fromComponent": "post-service",
|
694
|
+
"fromResource": "posts",
|
695
|
+
"fromResourceType": "API",
|
696
|
+
"toComponent": "blog-interface",
|
697
|
+
"toResource": "posts",
|
698
|
+
"toResourceType": "CLIENT",
|
699
|
+
"fromBlockId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26",
|
700
|
+
"toBlockId": "d9f4ade8-b319-59b2-b031-69162b79f9fa"
|
701
|
+
},
|
702
|
+
"created": 1720784243162
|
703
|
+
},
|
704
|
+
{
|
705
|
+
"type": "CREATE_CONNECTION",
|
706
|
+
"reason": "blog-interface needs to be able to serve the comments API from the comment-service",
|
707
|
+
"payload": {
|
708
|
+
"fromComponent": "comment-service",
|
709
|
+
"fromResource": "comments",
|
710
|
+
"fromResourceType": "API",
|
711
|
+
"toComponent": "blog-interface",
|
712
|
+
"toResource": "comments",
|
713
|
+
"toResourceType": "CLIENT",
|
714
|
+
"fromBlockId": "d4215220-f552-5a6d-9429-bef1c40c4d7c",
|
715
|
+
"toBlockId": "d9f4ade8-b319-59b2-b031-69162b79f9fa"
|
716
|
+
},
|
717
|
+
"created": 1720784243163
|
718
|
+
},
|
719
|
+
{
|
720
|
+
"type": "CREATE_CONNECTION",
|
721
|
+
"reason": "user-service needs to be able to authenticate requests",
|
722
|
+
"payload": {
|
723
|
+
"fromComponent": "user-service",
|
724
|
+
"fromResource": "jwt-provider",
|
725
|
+
"fromResourceType": "JWTPROVIDER",
|
726
|
+
"toComponent": "post-service",
|
727
|
+
"toResource": "jwt-consumer",
|
728
|
+
"toResourceType": "JWTCONSUMER",
|
729
|
+
"fromBlockId": "a074d2c5-1239-52d6-9722-e8c5ddff39a8",
|
730
|
+
"toBlockId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26"
|
731
|
+
},
|
732
|
+
"created": 1720784243165
|
733
|
+
},
|
734
|
+
{
|
735
|
+
"type": "CREATE_CONNECTION",
|
736
|
+
"reason": "user-service needs to be able to authenticate requests",
|
737
|
+
"payload": {
|
738
|
+
"fromComponent": "user-service",
|
739
|
+
"fromResource": "jwt-provider",
|
740
|
+
"fromResourceType": "JWTPROVIDER",
|
741
|
+
"toComponent": "comment-service",
|
742
|
+
"toResource": "jwt-consumer",
|
743
|
+
"toResourceType": "JWTCONSUMER",
|
744
|
+
"fromBlockId": "a074d2c5-1239-52d6-9722-e8c5ddff39a8",
|
745
|
+
"toBlockId": "d4215220-f552-5a6d-9429-bef1c40c4d7c"
|
746
|
+
},
|
747
|
+
"created": 1720784243167
|
748
|
+
},
|
749
|
+
{
|
750
|
+
"type": "CREATE_CONNECTION",
|
751
|
+
"reason": "frontend-gateway needs to be able to serve the user-interface web page from the frontend-gateway",
|
752
|
+
"payload": {
|
753
|
+
"fromComponent": "user-interface",
|
754
|
+
"fromResource": "userinterface_profile",
|
755
|
+
"fromResourceType": "WEBPAGE",
|
756
|
+
"toComponent": "frontend-gateway",
|
757
|
+
"toResource": "userinterface_profile",
|
758
|
+
"toResourceType": "WEBFRAGMENT",
|
759
|
+
"fromBlockId": "b3172066-f5cc-5569-b0e7-913413a3342b",
|
760
|
+
"toBlockId": "016c9729-ba12-5178-9de6-cdfe3f234bb3"
|
761
|
+
},
|
762
|
+
"created": 1720784243168
|
763
|
+
},
|
764
|
+
{
|
765
|
+
"type": "CREATE_CONNECTION",
|
766
|
+
"reason": "frontend-gateway needs to be able to serve the blog-interface web page from the frontend-gateway",
|
767
|
+
"payload": {
|
768
|
+
"fromComponent": "blog-interface",
|
769
|
+
"fromResource": "bloginterface_blogposts",
|
770
|
+
"fromResourceType": "WEBPAGE",
|
771
|
+
"toComponent": "frontend-gateway",
|
772
|
+
"toResource": "bloginterface_blogposts",
|
773
|
+
"toResourceType": "WEBFRAGMENT",
|
774
|
+
"fromBlockId": "d9f4ade8-b319-59b2-b031-69162b79f9fa",
|
775
|
+
"toBlockId": "016c9729-ba12-5178-9de6-cdfe3f234bb3"
|
776
|
+
},
|
777
|
+
"created": 1720784243170
|
778
|
+
},
|
779
|
+
{
|
780
|
+
"type": "CREATE_CONNECTION",
|
781
|
+
"reason": "api-gateway needs to be able to serve the users API from the user-service",
|
782
|
+
"payload": {
|
783
|
+
"fromComponent": "user-service",
|
784
|
+
"fromResource": "users",
|
785
|
+
"fromResourceType": "API",
|
786
|
+
"toComponent": "api-gateway",
|
787
|
+
"toResource": "users",
|
788
|
+
"toResourceType": "CLIENT",
|
789
|
+
"fromBlockId": "a074d2c5-1239-52d6-9722-e8c5ddff39a8",
|
790
|
+
"toBlockId": "6b247f30-dec4-5960-a8a0-f300caa95226"
|
791
|
+
},
|
792
|
+
"created": 1720784243171
|
793
|
+
},
|
794
|
+
{
|
795
|
+
"type": "CREATE_CONNECTION",
|
796
|
+
"reason": "api-gateway needs to be able to serve the posts API from the post-service",
|
797
|
+
"payload": {
|
798
|
+
"fromComponent": "post-service",
|
799
|
+
"fromResource": "posts",
|
800
|
+
"fromResourceType": "API",
|
801
|
+
"toComponent": "api-gateway",
|
802
|
+
"toResource": "posts",
|
803
|
+
"toResourceType": "CLIENT",
|
804
|
+
"fromBlockId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26",
|
805
|
+
"toBlockId": "6b247f30-dec4-5960-a8a0-f300caa95226"
|
806
|
+
},
|
807
|
+
"created": 1720784243173
|
808
|
+
},
|
809
|
+
{
|
810
|
+
"type": "CREATE_CONNECTION",
|
811
|
+
"reason": "api-gateway needs to be able to serve the comments API from the comment-service",
|
812
|
+
"payload": {
|
813
|
+
"fromComponent": "comment-service",
|
814
|
+
"fromResource": "comments",
|
815
|
+
"fromResourceType": "API",
|
816
|
+
"toComponent": "api-gateway",
|
817
|
+
"toResource": "comments",
|
818
|
+
"toResourceType": "CLIENT",
|
819
|
+
"fromBlockId": "d4215220-f552-5a6d-9429-bef1c40c4d7c",
|
820
|
+
"toBlockId": "6b247f30-dec4-5960-a8a0-f300caa95226"
|
821
|
+
},
|
822
|
+
"created": 1720784243174
|
823
|
+
},
|
824
|
+
{
|
825
|
+
"type": "CREATE_MODEL",
|
826
|
+
"reason": "",
|
827
|
+
"payload": {
|
828
|
+
"blockName": "user-service",
|
829
|
+
"content": "type User {\n\t@Id\n\tuserId: string\n\tusername: string\n\tpassword: string\n\temail: string\n\tfirstName: string\n\tlastName: string\n\tcreatedAt: date\n\tupdatedAt: date\n}",
|
830
|
+
"blockRef": "kapeta://kapeta/user-service:local",
|
831
|
+
"instanceId": "a074d2c5-1239-52d6-9722-e8c5ddff39a8",
|
832
|
+
"resourceName": "userdatabase"
|
833
|
+
},
|
834
|
+
"created": 1720784245861
|
835
|
+
},
|
836
|
+
{
|
837
|
+
"type": "CREATE_MODEL",
|
838
|
+
"reason": "",
|
839
|
+
"payload": {
|
840
|
+
"blockName": "post-service",
|
841
|
+
"content": "type Post {\n\t@Id\n\tpostId: string\n\ttitle: string\n\tcontent: string\n\tauthorId: string\n\tcreatedAt: date\n\tupdatedAt: date\n}",
|
842
|
+
"blockRef": "kapeta://kapeta/post-service:local",
|
843
|
+
"instanceId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26",
|
844
|
+
"resourceName": "postdatabase"
|
845
|
+
},
|
846
|
+
"created": 1720784246683
|
847
|
+
},
|
848
|
+
{
|
849
|
+
"type": "CREATE_MODEL",
|
850
|
+
"reason": "",
|
851
|
+
"payload": {
|
852
|
+
"blockName": "comment-service",
|
853
|
+
"content": "type Comment {\n\t@Id\n\tcommentId: string\n\tcontent: string\n\tauthorId: string\n\tpostId: string\n\tcreatedAt: date\n\tupdatedAt: date\n}",
|
854
|
+
"blockRef": "kapeta://kapeta/comment-service:local",
|
855
|
+
"instanceId": "d4215220-f552-5a6d-9429-bef1c40c4d7c",
|
856
|
+
"resourceName": "commentdatabase"
|
857
|
+
},
|
858
|
+
"created": 1720784247378
|
859
|
+
}
|
860
|
+
]
|