@eventcatalog/create-eventcatalog 4.1.3 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +510 -539
- package/package.json +9 -6
- package/templates/amazon-api-gateway/README-template.md +4 -8
- package/templates/amazon-api-gateway/eventcatalog.auth.js +4 -5
- package/templates/amazon-api-gateway/eventcatalog.config.js +16 -11
- package/templates/amazon-api-gateway/eventcatalog.styles.css +1 -1
- package/templates/analytics.ts +8 -8
- package/templates/asyncapi/asyncapi-files/messages/user-signed-up.yml +1 -1
- package/templates/asyncapi/asyncapi-files/user-service.yml +1 -1
- package/templates/asyncapi/eventcatalog.auth.js +4 -5
- package/templates/asyncapi/eventcatalog.config.js +16 -9
- package/templates/asyncapi/eventcatalog.styles.css +1 -1
- package/templates/asyncapi/teams/order-management.mdx +6 -6
- package/templates/asyncapi/teams/user-management.mdx +4 -4
- package/templates/asyncapi/users/aSmith.mdx +0 -1
- package/templates/asyncapi/users/alee.mdx +1 -1
- package/templates/asyncapi/users/azhang.mdx +1 -1
- package/templates/asyncapi/users/dboyne.mdx +4 -3
- package/templates/asyncapi/users/dkim.mdx +1 -1
- package/templates/asyncapi/users/jbrown.mdx +1 -1
- package/templates/asyncapi/users/mSmith.mdx +2 -2
- package/templates/confluent/README-template.md +4 -8
- package/templates/confluent/eventcatalog.auth.js +4 -5
- package/templates/confluent/eventcatalog.config.js +7 -8
- package/templates/confluent/eventcatalog.styles.css +1 -1
- package/templates/default/channels/inventory.{env}.events/index.mdx +10 -8
- package/templates/default/channels/orders.{env}.events/index.mdx +5 -3
- package/templates/default/channels/payment.{env}.events/index.mdx +14 -13
- package/templates/default/domains/E-Commerce/index.mdx +32 -20
- package/templates/default/domains/E-Commerce/ubiquitous-language.mdx +9 -9
- package/templates/default/domains/Orders/changelog.mdx +1 -1
- package/templates/default/domains/Orders/entities/CartItem/index.mdx +15 -14
- package/templates/default/domains/Orders/entities/Customer/index.mdx +5 -5
- package/templates/default/domains/Orders/entities/Order/index.mdx +9 -9
- package/templates/default/domains/Orders/entities/OrderItem/index.mdx +6 -5
- package/templates/default/domains/Orders/entities/ShoppingCart/index.mdx +16 -15
- package/templates/default/domains/Orders/index.mdx +22 -7
- package/templates/default/domains/Orders/services/InventoryService/changelog.mdx +1 -1
- package/templates/default/domains/Orders/services/InventoryService/commands/AddInventory/index.mdx +2 -5
- package/templates/default/domains/Orders/services/InventoryService/commands/AddInventory/schema.json +26 -27
- package/templates/default/domains/Orders/services/InventoryService/commands/PlaceOrder/index.mdx +10 -12
- package/templates/default/domains/Orders/services/InventoryService/commands/UpdateInventory/index.mdx +1 -1
- package/templates/default/domains/Orders/services/InventoryService/commands/UpdateInventory/schema.json +26 -27
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/changelog.mdx +3 -4
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/index.mdx +14 -4
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/changelog.mdx +3 -7
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/index.mdx +8 -5
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/changelog.mdx +11 -11
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/index.mdx +15 -12
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/index.mdx +1 -0
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/versioned/0.0.1/index.mdx +13 -12
- package/templates/default/domains/Orders/services/InventoryService/index.mdx +40 -21
- package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryList/index.mdx +5 -5
- package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryList/schema.json +48 -49
- package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryStatus/index.mdx +6 -7
- package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryStatus/schema.json +25 -26
- package/templates/default/domains/Orders/services/NotificationService/index.mdx +29 -10
- package/templates/default/domains/Orders/services/NotificationService/queries/GetNotificationDetails/index.mdx +4 -4
- package/templates/default/domains/Orders/services/NotificationService/queries/GetNotificationDetails/schema.json +0 -1
- package/templates/default/domains/Orders/services/NotificationService/queries/GetUserNotifications/index.mdx +4 -5
- package/templates/default/domains/Orders/services/NotificationService/queries/GetUserNotifications/schema.json +43 -44
- package/templates/default/domains/Orders/services/OrdersService/changelog.mdx +1 -1
- package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/schema.json +66 -67
- package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/index.mdx +1 -2
- package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/schema.json +67 -68
- package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/index.mdx +1 -1
- package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/schema.json +62 -63
- package/templates/default/domains/Orders/services/OrdersService/index.mdx +26 -6
- package/templates/default/domains/Orders/services/OrdersService/openapi.yml +3 -3
- package/templates/default/domains/Orders/services/OrdersService/order-service-asyncapi.yaml +11 -11
- package/templates/default/domains/Orders/services/OrdersService/queries/GetOrder/index.mdx +5 -5
- package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/changelog.mdx +1 -1
- package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/index.mdx +1 -1
- package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/openapi.yml +1 -1
- package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/order-service-asyncapi.yaml +11 -11
- package/templates/default/domains/Orders/services/ShippingService/commands/CancelShipment/index.mdx +1 -2
- package/templates/default/domains/Orders/services/ShippingService/commands/CancelShipment/schema.json +12 -12
- package/templates/default/domains/Orders/services/ShippingService/commands/CreateReturnLabel/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/commands/CreateReturnLabel/schema.json +17 -17
- package/templates/default/domains/Orders/services/ShippingService/commands/CreateShipment/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/commands/UpdateShipmentStatus/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/commands/UpdateShipmentStatus/schema.json +26 -26
- package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/schema.json +0 -1
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/index.mdx +14 -5
- package/templates/default/domains/Orders/ubiquitous-language.mdx +10 -10
- package/templates/default/domains/Orders/versioned/0.0.1/index.mdx +7 -7
- package/templates/default/domains/Orders/versioned/0.0.2/index.mdx +3 -3
- package/templates/default/domains/Payment/entities/Address/index.mdx +17 -16
- package/templates/default/domains/Payment/entities/Invoice/index.mdx +8 -7
- package/templates/default/domains/Payment/entities/Payment/index.mdx +15 -14
- package/templates/default/domains/Payment/entities/PaymentMethod/index.mdx +8 -7
- package/templates/default/domains/Payment/entities/Transaction/index.mdx +6 -5
- package/templates/default/domains/Payment/flows/PaymentProcessed/index.mdx +71 -70
- package/templates/default/domains/Payment/index.mdx +10 -10
- package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/index.mdx +2 -2
- package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/schema.json +1 -1
- package/templates/default/domains/Payment/services/FraudDetectionService/index.mdx +3 -2
- package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/index.mdx +4 -3
- package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/schema.json +1 -1
- package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/index.mdx +4 -2
- package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/schema.json +1 -1
- package/templates/default/domains/Payment/services/PaymentGatewayService/index.mdx +3 -2
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/index.mdx +1 -1
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/index.mdx +1 -1
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/versioned/0.0.1/index.mdx +3 -3
- package/templates/default/domains/Payment/services/PaymentService/index.mdx +1 -0
- package/templates/default/domains/Payment/services/PaymentService/queries/GetPaymentStatus/index.mdx +5 -5
- package/templates/default/domains/Payment/services/PaymentService/queries/GetPaymentStatus/schema.json +0 -1
- package/templates/default/domains/Payment/ubiquitous-language.mdx +8 -8
- package/templates/default/domains/ProductCatalog/entities/Category/index.mdx +10 -9
- package/templates/default/domains/ProductCatalog/entities/Inventory/index.mdx +15 -14
- package/templates/default/domains/ProductCatalog/entities/Product/index.mdx +11 -10
- package/templates/default/domains/ProductCatalog/entities/Review/index.mdx +15 -14
- package/templates/default/domains/ProductCatalog/index.mdx +8 -6
- package/templates/default/domains/ProductCatalog/ubiquitous-language.mdx +10 -10
- package/templates/default/domains/Subscriptions/entities/BillingProfile/index.mdx +8 -7
- package/templates/default/domains/Subscriptions/entities/SubscriptionPeriod/index.mdx +8 -7
- package/templates/default/domains/Subscriptions/flows/CancelSubscription/SubscriptionRenewed/index.mdx +207 -208
- package/templates/default/domains/Subscriptions/flows/CancelSubscription/index.mdx +48 -49
- package/templates/default/domains/Subscriptions/flows/CancelSubscription/versioned/0.0.1/index.mdx +36 -36
- package/templates/default/domains/Subscriptions/index.mdx +10 -10
- package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/index.mdx +3 -2
- package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/schema.json +1 -1
- package/templates/default/domains/Subscriptions/services/BillingService/index.mdx +2 -1
- package/templates/default/domains/Subscriptions/services/PlanManagementService/index.mdx +6 -2
- package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/CancelSubscription/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/SubscribeUser/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/index.mdx +30 -10
- package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/schema.json +10 -2
- package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/versioned/0.0.1/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/versioned/0.0.1/schema.json +10 -2
- package/templates/default/domains/Subscriptions/ubiquitous-language.mdx +9 -9
- package/templates/default/eventcatalog.auth.js +4 -5
- package/templates/default/eventcatalog.config.js +6 -8
- package/templates/default/eventcatalog.styles.css +1 -1
- package/templates/default/teams/full-stack.mdx +4 -4
- package/templates/default/teams/mobile-devs.mdx +4 -2
- package/templates/default/users/aSmith.mdx +0 -1
- package/templates/default/users/dboyne.mdx +4 -3
- package/templates/default/users/mSmith.mdx +2 -2
- package/templates/empty/eventcatalog.auth.js +4 -5
- package/templates/empty/eventcatalog.config.js +6 -7
- package/templates/empty/eventcatalog.styles.css +1 -1
- package/templates/eventbridge/README-template.md +4 -8
- package/templates/eventbridge/eventcatalog.auth.js +4 -5
- package/templates/eventbridge/eventcatalog.config.js +7 -8
- package/templates/eventbridge/eventcatalog.styles.css +1 -1
- package/templates/graphql/eventcatalog.auth.js +4 -5
- package/templates/graphql/eventcatalog.config.js +29 -20
- package/templates/graphql/eventcatalog.styles.css +1 -1
- package/templates/graphql/teams/order-management.mdx +6 -6
- package/templates/graphql/teams/payment-management.mdx +4 -4
- package/templates/graphql/teams/product-management.mdx +4 -4
- package/templates/graphql/users/aSmith.mdx +0 -1
- package/templates/graphql/users/alee.mdx +1 -1
- package/templates/graphql/users/azhang.mdx +1 -1
- package/templates/graphql/users/dboyne.mdx +4 -3
- package/templates/graphql/users/dkim.mdx +1 -1
- package/templates/graphql/users/jbrown.mdx +1 -1
- package/templates/graphql/users/mSmith.mdx +2 -2
- package/templates/index.ts +49 -59
- package/templates/openapi/eventcatalog.auth.js +4 -5
- package/templates/openapi/eventcatalog.config.js +33 -26
- package/templates/openapi/eventcatalog.styles.css +1 -1
- package/templates/openapi/teams/order-management.mdx +6 -6
- package/templates/openapi/teams/payment-management.mdx +4 -4
- package/templates/openapi/teams/product-management.mdx +4 -4
- package/templates/openapi/users/aSmith.mdx +0 -1
- package/templates/openapi/users/alee.mdx +1 -1
- package/templates/openapi/users/azhang.mdx +1 -1
- package/templates/openapi/users/dboyne.mdx +4 -3
- package/templates/openapi/users/dkim.mdx +1 -1
- package/templates/openapi/users/jbrown.mdx +1 -1
- package/templates/openapi/users/mSmith.mdx +2 -2
- package/templates/types.ts +12 -3
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eventcatalog/create-eventcatalog",
|
|
3
3
|
"description": "Create EventCatalog with one command",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.2.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-catalog": "./dist/index.js"
|
|
7
7
|
},
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/event-catalog/
|
|
10
|
+
"url": "https://github.com/event-catalog/eventcatalog"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"dist",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@types/async-retry": "1.4.2",
|
|
21
21
|
"@types/ci-info": "2.0.0",
|
|
22
22
|
"@types/cross-spawn": "6.0.0",
|
|
23
|
-
"@types/node": "^
|
|
23
|
+
"@types/node": "^20.14.10",
|
|
24
24
|
"@types/prompts": "2.0.1",
|
|
25
25
|
"@types/rimraf": "3.0.0",
|
|
26
26
|
"@types/tar": "4.0.3",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"fast-glob": "^3.3.2",
|
|
36
36
|
"got": "^14.0.0",
|
|
37
37
|
"ora": "^5.4.1",
|
|
38
|
+
"prettier": "^3.3.3",
|
|
38
39
|
"prompts": "2.1.0",
|
|
39
40
|
"rimraf": "^5.0.7",
|
|
40
41
|
"tar": "^4.4.19",
|
|
@@ -49,9 +50,11 @@
|
|
|
49
50
|
},
|
|
50
51
|
"scripts": {
|
|
51
52
|
"build": "tsup index.ts --format cjs --dts",
|
|
53
|
+
"build:bin": "tsup index.ts --format cjs --dts",
|
|
54
|
+
"test:ci": "echo 'No tests for create-eventcatalog yet'",
|
|
52
55
|
"run": "node dist/index.js",
|
|
53
|
-
"dev": "
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
+
"dev": "pnpm run build --watch",
|
|
57
|
+
"format": "prettier --write .",
|
|
58
|
+
"format:diff": "prettier --list-different ."
|
|
56
59
|
}
|
|
57
60
|
}
|
|
@@ -5,10 +5,10 @@ Welcome to your new Amazon API Gateway EventCatalog!
|
|
|
5
5
|
Getting started:
|
|
6
6
|
|
|
7
7
|
1. Edit the `.env` file to configure your environment variables.
|
|
8
|
-
1. Configure the apis in the `eventcatalog.config.js` file
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
1. Configure the apis in the `eventcatalog.config.js` file
|
|
9
|
+
1. Run `npm run generate` to import your OpenAPI specs from apigateway and document them.
|
|
10
|
+
1. Run `npm run dev` to start the development server.
|
|
11
|
+
1. Go to localhost:3000 to view your catalog.
|
|
12
12
|
|
|
13
13
|
### What else can you do?
|
|
14
14
|
|
|
@@ -22,10 +22,6 @@ With the ApiGateway integration you can :
|
|
|
22
22
|
|
|
23
23
|
The easiest way to get started and dive deeper is to read the [EventCatalog documentation](https://www.eventcatalog.dev/docs/plugins/amazon-apigateway/intro).
|
|
24
24
|
|
|
25
|
-
|
|
26
25
|
### Found a problem?
|
|
27
26
|
|
|
28
27
|
If you found a problem or have a feature request, please open an issue on [GitHub](https://github.com/event-catalog/generators).
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
1
|
/**
|
|
3
2
|
* This is an optional file that can add authentication to your EventCatalog.
|
|
4
|
-
*
|
|
3
|
+
*
|
|
5
4
|
* To enable authentication you need to set `server:output` in your `eventcatalog.config.js` file.
|
|
6
5
|
* And then pick which provider you want to use.
|
|
7
|
-
*
|
|
6
|
+
*
|
|
8
7
|
* You can read more in the documentation:
|
|
9
8
|
* https://www.eventcatalog.dev/docs/development/guides/authentication/introduction
|
|
10
|
-
*
|
|
9
|
+
*
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
12
|
// export default {
|
|
@@ -42,4 +41,4 @@
|
|
|
42
41
|
// issuer: process.env.AUTH_OKTA_ISSUER,
|
|
43
42
|
// },
|
|
44
43
|
// },
|
|
45
|
-
// }
|
|
44
|
+
// }
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/** @type {import('@eventcatalog/core/bin/eventcatalog.config').Config} */
|
|
2
2
|
export default {
|
|
3
3
|
title: 'EventCatalog',
|
|
4
|
-
tagline:
|
|
4
|
+
tagline:
|
|
5
|
+
'This internal platform provides a comprehensive view of our event-driven architecture across all systems. Use this portal to discover EventBridge schemas, services and domains, and understand the message contracts that connect our infrastructure',
|
|
5
6
|
organizationName: '<organizationName>',
|
|
6
7
|
homepageLink: 'https://eventcatalog.dev/',
|
|
7
8
|
editUrl: 'https://github.com/boyney123/eventcatalog-demo/edit/master',
|
|
@@ -17,19 +18,19 @@ export default {
|
|
|
17
18
|
logo: {
|
|
18
19
|
alt: 'EventCatalog Logo',
|
|
19
20
|
src: '/logo.png',
|
|
20
|
-
text: 'EventCatalog'
|
|
21
|
+
text: 'EventCatalog',
|
|
21
22
|
},
|
|
22
23
|
// Enable RSS feed for your eventcatalog
|
|
23
24
|
rss: {
|
|
24
25
|
enabled: true,
|
|
25
26
|
// number of items to include in the feed per resource (event, service, etc)
|
|
26
|
-
limit: 20
|
|
27
|
+
limit: 20,
|
|
27
28
|
},
|
|
28
29
|
docs: {
|
|
29
30
|
sidebar: {
|
|
30
31
|
// TREE_VIEW will render the DOCS as a tree view and map your file system folder structure
|
|
31
32
|
// LIST_VIEW will render the DOCS that look familiar to API documentation websites
|
|
32
|
-
type: 'LIST_VIEW'
|
|
33
|
+
type: 'LIST_VIEW',
|
|
33
34
|
},
|
|
34
35
|
},
|
|
35
36
|
// This lets you copy markdown contents from EventCatalog to your clipboard
|
|
@@ -41,7 +42,7 @@ export default {
|
|
|
41
42
|
cId: '<cId>',
|
|
42
43
|
generators: [
|
|
43
44
|
[
|
|
44
|
-
|
|
45
|
+
'@eventcatalog/generator-amazon-apigateway',
|
|
45
46
|
{
|
|
46
47
|
output: 'amazon-api-gateway-output',
|
|
47
48
|
apis: [
|
|
@@ -53,20 +54,24 @@ export default {
|
|
|
53
54
|
// The API stage name
|
|
54
55
|
stageName: 'prod',
|
|
55
56
|
version: '2',
|
|
56
|
-
}
|
|
57
|
-
]
|
|
57
|
+
},
|
|
58
|
+
],
|
|
58
59
|
},
|
|
59
60
|
],
|
|
60
61
|
// This will process the output of the amazon api gateway generator
|
|
61
62
|
// it will process the OpenAPI file and map it into a service and domain
|
|
62
63
|
// All routes are mapped to messages.
|
|
63
64
|
[
|
|
64
|
-
|
|
65
|
+
'@eventcatalog/generator-openapi',
|
|
65
66
|
{
|
|
66
67
|
services: [
|
|
67
|
-
{
|
|
68
|
-
|
|
68
|
+
{
|
|
69
|
+
path: path.join(__dirname, 'amazon-api-gateway-output', 'EcommerceApi.json'),
|
|
70
|
+
id: 'ecommerce-api',
|
|
71
|
+
owners: ['full-stack'],
|
|
72
|
+
},
|
|
73
|
+
],
|
|
69
74
|
},
|
|
70
75
|
],
|
|
71
76
|
],
|
|
72
|
-
}
|
|
77
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/* Custom styling support coming soon. */
|
|
1
|
+
/* Custom styling support coming soon. */
|
package/templates/analytics.ts
CHANGED
|
@@ -8,25 +8,25 @@ interface EventMetadata {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
async function raiseEvent(eventData: EventMetadata): Promise<void> {
|
|
11
|
-
const url =
|
|
11
|
+
const url = 'https://queue.simpleanalyticscdn.com/events';
|
|
12
12
|
const userAgent = `@eventcatalog/create-eventcatalog/${pkg.version} (${os.platform()}; ${os.arch()}; Node/${process.version})`;
|
|
13
13
|
|
|
14
14
|
const payload = {
|
|
15
|
-
type:
|
|
16
|
-
hostname:
|
|
17
|
-
event:
|
|
15
|
+
type: 'event',
|
|
16
|
+
hostname: 'eventcatalog.dev',
|
|
17
|
+
event: '@eventcatalog/create-eventcatalog',
|
|
18
18
|
metadata: {
|
|
19
19
|
...eventData,
|
|
20
20
|
t: `t;${new Date().toISOString()}`,
|
|
21
|
-
ua: userAgent
|
|
21
|
+
ua: userAgent,
|
|
22
22
|
},
|
|
23
|
-
ua: userAgent
|
|
23
|
+
ua: userAgent,
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
try {
|
|
27
27
|
await fetch(url, {
|
|
28
|
-
method:
|
|
29
|
-
headers: {
|
|
28
|
+
method: 'POST',
|
|
29
|
+
headers: { 'Content-Type': 'application/json' },
|
|
30
30
|
body: JSON.stringify(payload),
|
|
31
31
|
});
|
|
32
32
|
} catch (error) {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
1
|
/**
|
|
3
2
|
* This is an optional file that can add authentication to your EventCatalog.
|
|
4
|
-
*
|
|
3
|
+
*
|
|
5
4
|
* To enable authentication you need to set `server:output` in your `eventcatalog.config.js` file.
|
|
6
5
|
* And then pick which provider you want to use.
|
|
7
|
-
*
|
|
6
|
+
*
|
|
8
7
|
* You can read more in the documentation:
|
|
9
8
|
* https://www.eventcatalog.dev/docs/development/guides/authentication/introduction
|
|
10
|
-
*
|
|
9
|
+
*
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
12
|
// export default {
|
|
@@ -42,4 +41,4 @@
|
|
|
42
41
|
// issuer: process.env.AUTH_OKTA_ISSUER,
|
|
43
42
|
// },
|
|
44
43
|
// },
|
|
45
|
-
// }
|
|
44
|
+
// }
|
|
@@ -6,7 +6,8 @@ const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
|
|
6
6
|
/** @type {import('@eventcatalog/core/bin/eventcatalog.config').Config} */
|
|
7
7
|
export default {
|
|
8
8
|
title: 'EventCatalog',
|
|
9
|
-
tagline:
|
|
9
|
+
tagline:
|
|
10
|
+
'This internal platform provides a comprehensive view of our event-driven architecture across all systems. Use this portal to discover existing domains, explore services and their dependencies, and understand the message contracts that connect our infrastructure',
|
|
10
11
|
organizationName: '<organizationName>',
|
|
11
12
|
homepageLink: 'https://eventcatalog.dev/',
|
|
12
13
|
editUrl: 'https://github.com/boyney123/eventcatalog-demo/edit/master',
|
|
@@ -21,9 +22,7 @@ export default {
|
|
|
21
22
|
// Customize the navigation for your docs sidebar.
|
|
22
23
|
// read more at https://eventcatalog.dev/docs/development/customization/customize-sidebars/documentation-sidebar
|
|
23
24
|
navigation: {
|
|
24
|
-
pages: [
|
|
25
|
-
'list:all',
|
|
26
|
-
]
|
|
25
|
+
pages: ['list:all'],
|
|
27
26
|
},
|
|
28
27
|
logo: {
|
|
29
28
|
alt: 'EventCatalog Logo',
|
|
@@ -40,7 +39,11 @@ export default {
|
|
|
40
39
|
'@eventcatalog/generator-asyncapi',
|
|
41
40
|
{
|
|
42
41
|
services: [
|
|
43
|
-
{
|
|
42
|
+
{
|
|
43
|
+
path: path.join(__dirname, 'asyncapi-files', 'orders-service.yml'),
|
|
44
|
+
owners: ['order-management'],
|
|
45
|
+
id: 'Orders Service',
|
|
46
|
+
},
|
|
44
47
|
],
|
|
45
48
|
domain: { id: 'orders', name: 'Orders', version: '0.0.1' },
|
|
46
49
|
},
|
|
@@ -49,7 +52,11 @@ export default {
|
|
|
49
52
|
'@eventcatalog/generator-asyncapi',
|
|
50
53
|
{
|
|
51
54
|
services: [
|
|
52
|
-
{
|
|
55
|
+
{
|
|
56
|
+
path: path.join(__dirname, 'asyncapi-files', 'payment-service.yml'),
|
|
57
|
+
owners: ['order-management'],
|
|
58
|
+
id: 'Payment Service',
|
|
59
|
+
},
|
|
53
60
|
],
|
|
54
61
|
domain: { id: 'payment', name: 'Payment', version: '0.0.1' },
|
|
55
62
|
},
|
|
@@ -61,7 +68,7 @@ export default {
|
|
|
61
68
|
{ path: path.join(__dirname, 'asyncapi-files', 'user-service.yml'), owners: ['user-management'], id: 'User Service' },
|
|
62
69
|
],
|
|
63
70
|
domain: { id: 'user-domain', name: 'User Domain', version: '0.0.1' },
|
|
64
|
-
debug: true
|
|
71
|
+
debug: true,
|
|
65
72
|
},
|
|
66
73
|
],
|
|
67
74
|
],
|
|
@@ -69,8 +76,8 @@ export default {
|
|
|
69
76
|
rss: {
|
|
70
77
|
enabled: true,
|
|
71
78
|
// number of items to include in the feed per resource (event, service, etc)
|
|
72
|
-
limit: 20
|
|
79
|
+
limit: 20,
|
|
73
80
|
},
|
|
74
81
|
// required random generated id used by eventcatalog
|
|
75
|
-
cId: '<cId>'
|
|
82
|
+
cId: '<cId>',
|
|
76
83
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/* Custom styling support coming soon. */
|
|
1
|
+
/* Custom styling support coming soon. */
|
|
@@ -3,11 +3,11 @@ id: order-management
|
|
|
3
3
|
name: Order Management
|
|
4
4
|
summmary: Order Management team based in London, UK
|
|
5
5
|
members:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
- dboyne
|
|
7
|
+
- asmith
|
|
8
|
+
- msmith
|
|
9
|
+
- alee
|
|
10
|
+
- azhang
|
|
11
11
|
email: test@test.com
|
|
12
12
|
slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
|
|
13
13
|
---
|
|
@@ -28,4 +28,4 @@ The Order Management team is responsible for managing orders, inventory, shipmen
|
|
|
28
28
|
|
|
29
29
|
- David Boyne
|
|
30
30
|
- Alice Smith
|
|
31
|
-
- Mike Smith
|
|
31
|
+
- Mike Smith
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
id: user-management
|
|
3
3
|
name: User Management
|
|
4
4
|
members:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
- dboyne
|
|
6
|
+
- jbrown
|
|
7
|
+
- dkim
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
The user management team is responsible for managing users and user accounts.
|
|
@@ -15,4 +15,4 @@ The user management team is responsible for managing users and user accounts.
|
|
|
15
15
|
- Manage user and user account provisioning
|
|
16
16
|
- Manage user and user account deprovisioning
|
|
17
17
|
- Manage user and user account password management
|
|
18
|
-
- Manage user and user account role management
|
|
18
|
+
- Manage user and user account role management
|
|
@@ -24,4 +24,3 @@ As the Product Owner for Full Stackers, my role involves a wide range of respons
|
|
|
24
24
|
My mission is to deliver products that not only meet but exceed customer expectations. I thrive on the challenge of translating complex requirements into simple, intuitive solutions.
|
|
25
25
|
|
|
26
26
|
If you’re interested in product management, user experience, or discussing the latest trends in technology, feel free to reach out!
|
|
27
|
-
|
|
@@ -5,4 +5,4 @@ avatarUrl: https://randomuser.me/api/portraits/women/91.jpg
|
|
|
5
5
|
role: Technical Writer
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
As a Technical Writer on the Documentation team, I create clear, comprehensive documentation for our products and APIs. My focus is on making complex technical concepts accessible to developers and end-users alike. I collaborate with engineering teams to ensure our documentation stays current and accurate.
|
|
8
|
+
As a Technical Writer on the Documentation team, I create clear, comprehensive documentation for our products and APIs. My focus is on making complex technical concepts accessible to developers and end-users alike. I collaborate with engineering teams to ensure our documentation stays current and accurate.
|
|
@@ -8,4 +8,4 @@ slackDirectMessageUrl: https://yourteam.slack.com/channels/azhang
|
|
|
8
8
|
msTeamsDirectMessageUrl: https://teams.microsoft.com/l/chat/0/0?users=azhang@company.com
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
Building and maintaining data pipelines and infrastructure...
|
|
11
|
+
Building and maintaining data pipelines and infrastructure...
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: dboyne
|
|
3
3
|
name: David Boyne
|
|
4
|
-
avatarUrl:
|
|
4
|
+
avatarUrl: 'https://pbs.twimg.com/profile_images/1262283153563140096/DYRDqKg6_400x400.png'
|
|
5
5
|
role: Lead developer
|
|
6
6
|
email: test@test.com
|
|
7
7
|
slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
|
|
@@ -28,5 +28,6 @@ I am passionate about leveraging the power of events to build systems that are n
|
|
|
28
28
|
Feel free to connect with me to discuss all things tech, event-driven architectures, or to exchange ideas on building better software systems!
|
|
29
29
|
|
|
30
30
|
---
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
|
|
32
|
+
_David Boyne_
|
|
33
|
+
_Tech Lead, Full Stackers_
|
|
@@ -8,4 +8,4 @@ slackDirectMessageUrl: https://yourteam.slack.com/channels/dkim
|
|
|
8
8
|
msTeamsDirectMessageUrl: https://teams.microsoft.com/l/chat/0/0?users=dkim@company.com
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
Optimizing application performance and user experience...
|
|
11
|
+
Optimizing application performance and user experience...
|
|
@@ -8,4 +8,4 @@ slackDirectMessageUrl: https://yourteam.slack.com/channels/jbrown
|
|
|
8
8
|
msTeamsDirectMessageUrl: https://teams.microsoft.com/l/chat/0/0?users=jbrown@company.com
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
Creating intuitive and engaging user interfaces...
|
|
11
|
+
Creating intuitive and engaging user interfaces...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: msmith
|
|
3
3
|
name: Martin Smith
|
|
4
|
-
avatarUrl:
|
|
4
|
+
avatarUrl: 'https://randomuser.me/api/portraits/men/51.jpg'
|
|
5
5
|
role: Senior software engineer
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
As a Senior Mobile Developer on The Mobile Devs team, I play a key role in designing, developing, and maintaining our company’s mobile applications. My focus is on creating a seamless and intuitive user experience for our customers on both iOS and Android platforms. I work closely with cross-functional teams, including backend developers, UX/UI designers, and product managers, to deliver high-quality mobile solutions that meet business objectives and exceed user expectations.
|
|
8
|
+
As a Senior Mobile Developer on The Mobile Devs team, I play a key role in designing, developing, and maintaining our company’s mobile applications. My focus is on creating a seamless and intuitive user experience for our customers on both iOS and Android platforms. I work closely with cross-functional teams, including backend developers, UX/UI designers, and product managers, to deliver high-quality mobile solutions that meet business objectives and exceed user expectations.
|
|
@@ -5,10 +5,10 @@ Welcome to your new Confluent Event Catalog!
|
|
|
5
5
|
Getting started:
|
|
6
6
|
|
|
7
7
|
1. Edit the `.env` file to configure your environment variables.
|
|
8
|
-
1. Run Confluent Cloud locally, or configure your `schemaRegistryUrl` in the `eventcatalog.config.js` file
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
1. Run Confluent Cloud locally, or configure your `schemaRegistryUrl` in the `eventcatalog.config.js` file
|
|
9
|
+
1. Run `npm run generate` to import your schemas from confluent schema registry.
|
|
10
|
+
1. Run `npm run dev` to start the development server.
|
|
11
|
+
1. Go to localhost:3000 to view your catalog.
|
|
12
12
|
|
|
13
13
|
### What else can you do?
|
|
14
14
|
|
|
@@ -23,10 +23,6 @@ With the Confluent Schema Registry integration you can :
|
|
|
23
23
|
|
|
24
24
|
The easiest way to get started and dive deeper is to read the [Event Catalog documentation](https://eventcatalog.dev/docs/plugins/confluent-schema-registry/intro).
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
### Found a problem?
|
|
28
27
|
|
|
29
28
|
If you found a problem or have a feature request, please open an issue on [GitHub](https://github.com/event-catalog/generators).
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
1
|
/**
|
|
3
2
|
* This is an optional file that can add authentication to your EventCatalog.
|
|
4
|
-
*
|
|
3
|
+
*
|
|
5
4
|
* To enable authentication you need to set `server:output` in your `eventcatalog.config.js` file.
|
|
6
5
|
* And then pick which provider you want to use.
|
|
7
|
-
*
|
|
6
|
+
*
|
|
8
7
|
* You can read more in the documentation:
|
|
9
8
|
* https://www.eventcatalog.dev/docs/development/guides/authentication/introduction
|
|
10
|
-
*
|
|
9
|
+
*
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
12
|
// export default {
|
|
@@ -42,4 +41,4 @@
|
|
|
42
41
|
// issuer: process.env.AUTH_OKTA_ISSUER,
|
|
43
42
|
// },
|
|
44
43
|
// },
|
|
45
|
-
// }
|
|
44
|
+
// }
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/** @type {import('@eventcatalog/core/bin/eventcatalog.config').Config} */
|
|
2
2
|
export default {
|
|
3
3
|
title: 'EventCatalog',
|
|
4
|
-
tagline:
|
|
4
|
+
tagline:
|
|
5
|
+
'This internal platform provides a comprehensive view of our event-driven architecture across all systems. Use this portal to discover kafka schemas, topics, services and domains, and understand the message contracts that connect our infrastructure',
|
|
5
6
|
organizationName: '<organizationName>',
|
|
6
7
|
homepageLink: 'https://eventcatalog.dev/',
|
|
7
8
|
editUrl: 'https://github.com/boyney123/eventcatalog-demo/edit/master',
|
|
@@ -16,21 +17,19 @@ export default {
|
|
|
16
17
|
// Customize the navigation for your docs sidebar.
|
|
17
18
|
// read more at https://eventcatalog.dev/docs/development/customization/customize-sidebars/documentation-sidebar
|
|
18
19
|
navigation: {
|
|
19
|
-
pages: [
|
|
20
|
-
'list:all',
|
|
21
|
-
]
|
|
20
|
+
pages: ['list:all'],
|
|
22
21
|
},
|
|
23
22
|
// Customize the logo, add your logo to public/ folder
|
|
24
23
|
logo: {
|
|
25
24
|
alt: 'EventCatalog Logo',
|
|
26
25
|
src: '/logo.png',
|
|
27
|
-
text: 'EventCatalog'
|
|
26
|
+
text: 'EventCatalog',
|
|
28
27
|
},
|
|
29
28
|
// Enable RSS feed for your eventcatalog
|
|
30
29
|
rss: {
|
|
31
30
|
enabled: true,
|
|
32
31
|
// number of items to include in the feed per resource (event, service, etc)
|
|
33
|
-
limit: 20
|
|
32
|
+
limit: 20,
|
|
34
33
|
},
|
|
35
34
|
// required random generated id used by eventcatalog
|
|
36
35
|
cId: '<cId>',
|
|
@@ -46,8 +45,8 @@ export default {
|
|
|
46
45
|
// The URL for your schema registry
|
|
47
46
|
schemaRegistryUrl: 'http://localhost:8081',
|
|
48
47
|
// This will document all the schemas in the registry, not just the latest version (default is false)
|
|
49
|
-
includeAllVersions: true
|
|
48
|
+
includeAllVersions: true,
|
|
50
49
|
},
|
|
51
50
|
],
|
|
52
51
|
],
|
|
53
|
-
}
|
|
52
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/* Custom styling support coming soon. */
|
|
1
|
+
/* Custom styling support coming soon. */
|
|
@@ -7,7 +7,7 @@ summary: |
|
|
|
7
7
|
owners:
|
|
8
8
|
- dboyne
|
|
9
9
|
address: inventory.{env}.events
|
|
10
|
-
protocols:
|
|
10
|
+
protocols:
|
|
11
11
|
- kafka
|
|
12
12
|
|
|
13
13
|
parameters:
|
|
@@ -20,6 +20,7 @@ parameters:
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
22
|
### Overview
|
|
23
|
+
|
|
23
24
|
The Inventory Events channel is the central stream for all inventory-related events across the system. This includes stock level changes, inventory allocations, adjustments, and stocktake events. Events for a specific SKU are guaranteed to be processed in sequence when using productId as the partition key.
|
|
24
25
|
|
|
25
26
|
<ChannelInformation />
|
|
@@ -27,6 +28,7 @@ The Inventory Events channel is the central stream for all inventory-related eve
|
|
|
27
28
|
### Publishing and Subscribing to Events
|
|
28
29
|
|
|
29
30
|
#### Publishing Example
|
|
31
|
+
|
|
30
32
|
```python
|
|
31
33
|
from kafka import KafkaProducer
|
|
32
34
|
import json
|
|
@@ -68,7 +70,7 @@ inventory_event = {
|
|
|
68
70
|
|
|
69
71
|
# Send the message - using productId as key for partitioning
|
|
70
72
|
producer.send(
|
|
71
|
-
topic,
|
|
73
|
+
topic,
|
|
72
74
|
key=inventory_event['payload']['productId'].encode('utf-8'),
|
|
73
75
|
value=inventory_event
|
|
74
76
|
)
|
|
@@ -102,7 +104,7 @@ class InventoryEventConsumer:
|
|
|
102
104
|
def process_event(self, event):
|
|
103
105
|
"""Process individual inventory events based on type"""
|
|
104
106
|
event_type = event.get('eventType')
|
|
105
|
-
|
|
107
|
+
|
|
106
108
|
if event_type == 'STOCK_LEVEL_CHANGED':
|
|
107
109
|
self.handle_stock_level_change(event)
|
|
108
110
|
elif event_type == 'LOW_STOCK_ALERT':
|
|
@@ -132,18 +134,18 @@ class InventoryEventConsumer:
|
|
|
132
134
|
# Process the message
|
|
133
135
|
event = message.value
|
|
134
136
|
print(f"Received event: {event['eventType']} for product: {event['payload']['productId']}")
|
|
135
|
-
|
|
137
|
+
|
|
136
138
|
# Process the event
|
|
137
139
|
self.process_event(event)
|
|
138
|
-
|
|
140
|
+
|
|
139
141
|
# Commit the offset after successful processing
|
|
140
142
|
self.consumer.commit()
|
|
141
|
-
|
|
143
|
+
|
|
142
144
|
except Exception as e:
|
|
143
145
|
print(f"Error processing message: {str(e)}")
|
|
144
146
|
# Implement your error handling logic here
|
|
145
147
|
# You might want to send to a DLQ (Dead Letter Queue)
|
|
146
|
-
|
|
148
|
+
|
|
147
149
|
except Exception as e:
|
|
148
150
|
print(f"Consumer error: {str(e)}")
|
|
149
151
|
finally:
|
|
@@ -154,4 +156,4 @@ if __name__ == "__main__":
|
|
|
154
156
|
# Create and start the consumer
|
|
155
157
|
consumer = InventoryEventConsumer()
|
|
156
158
|
consumer.start_consuming()
|
|
157
|
-
|
|
159
|
+
```
|
|
@@ -7,7 +7,7 @@ summary: |
|
|
|
7
7
|
owners:
|
|
8
8
|
- dboyne
|
|
9
9
|
address: orders.{env}.events
|
|
10
|
-
protocols:
|
|
10
|
+
protocols:
|
|
11
11
|
- kafka
|
|
12
12
|
routes:
|
|
13
13
|
- id: inventory-queue
|
|
@@ -21,6 +21,7 @@ parameters:
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
23
|
### Overview
|
|
24
|
+
|
|
24
25
|
The Orders Events channel is the central stream for all order-related events across the order processing lifecycle. This includes order creation, updates, payment status, fulfillment status, and customer communications. All events related to a specific order are guaranteed to be processed in sequence when using orderId as the partition key.
|
|
25
26
|
|
|
26
27
|
<ChannelInformation />
|
|
@@ -74,10 +75,11 @@ order_event = {
|
|
|
74
75
|
|
|
75
76
|
# Send the message - using orderId as key for partitioning
|
|
76
77
|
producer.send(
|
|
77
|
-
topic,
|
|
78
|
+
topic,
|
|
78
79
|
key=order_event['payload']['orderId'].encode('utf-8'),
|
|
79
80
|
value=order_event
|
|
80
81
|
)
|
|
81
82
|
producer.flush()
|
|
82
83
|
|
|
83
|
-
print(f"Order event sent to topic {topic}")
|
|
84
|
+
print(f"Order event sent to topic {topic}")
|
|
85
|
+
```
|