@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.
Files changed (189) hide show
  1. package/dist/index.js +510 -539
  2. package/package.json +9 -6
  3. package/templates/amazon-api-gateway/README-template.md +4 -8
  4. package/templates/amazon-api-gateway/eventcatalog.auth.js +4 -5
  5. package/templates/amazon-api-gateway/eventcatalog.config.js +16 -11
  6. package/templates/amazon-api-gateway/eventcatalog.styles.css +1 -1
  7. package/templates/analytics.ts +8 -8
  8. package/templates/asyncapi/asyncapi-files/messages/user-signed-up.yml +1 -1
  9. package/templates/asyncapi/asyncapi-files/user-service.yml +1 -1
  10. package/templates/asyncapi/eventcatalog.auth.js +4 -5
  11. package/templates/asyncapi/eventcatalog.config.js +16 -9
  12. package/templates/asyncapi/eventcatalog.styles.css +1 -1
  13. package/templates/asyncapi/teams/order-management.mdx +6 -6
  14. package/templates/asyncapi/teams/user-management.mdx +4 -4
  15. package/templates/asyncapi/users/aSmith.mdx +0 -1
  16. package/templates/asyncapi/users/alee.mdx +1 -1
  17. package/templates/asyncapi/users/azhang.mdx +1 -1
  18. package/templates/asyncapi/users/dboyne.mdx +4 -3
  19. package/templates/asyncapi/users/dkim.mdx +1 -1
  20. package/templates/asyncapi/users/jbrown.mdx +1 -1
  21. package/templates/asyncapi/users/mSmith.mdx +2 -2
  22. package/templates/confluent/README-template.md +4 -8
  23. package/templates/confluent/eventcatalog.auth.js +4 -5
  24. package/templates/confluent/eventcatalog.config.js +7 -8
  25. package/templates/confluent/eventcatalog.styles.css +1 -1
  26. package/templates/default/channels/inventory.{env}.events/index.mdx +10 -8
  27. package/templates/default/channels/orders.{env}.events/index.mdx +5 -3
  28. package/templates/default/channels/payment.{env}.events/index.mdx +14 -13
  29. package/templates/default/domains/E-Commerce/index.mdx +32 -20
  30. package/templates/default/domains/E-Commerce/ubiquitous-language.mdx +9 -9
  31. package/templates/default/domains/Orders/changelog.mdx +1 -1
  32. package/templates/default/domains/Orders/entities/CartItem/index.mdx +15 -14
  33. package/templates/default/domains/Orders/entities/Customer/index.mdx +5 -5
  34. package/templates/default/domains/Orders/entities/Order/index.mdx +9 -9
  35. package/templates/default/domains/Orders/entities/OrderItem/index.mdx +6 -5
  36. package/templates/default/domains/Orders/entities/ShoppingCart/index.mdx +16 -15
  37. package/templates/default/domains/Orders/index.mdx +22 -7
  38. package/templates/default/domains/Orders/services/InventoryService/changelog.mdx +1 -1
  39. package/templates/default/domains/Orders/services/InventoryService/commands/AddInventory/index.mdx +2 -5
  40. package/templates/default/domains/Orders/services/InventoryService/commands/AddInventory/schema.json +26 -27
  41. package/templates/default/domains/Orders/services/InventoryService/commands/PlaceOrder/index.mdx +10 -12
  42. package/templates/default/domains/Orders/services/InventoryService/commands/UpdateInventory/index.mdx +1 -1
  43. package/templates/default/domains/Orders/services/InventoryService/commands/UpdateInventory/schema.json +26 -27
  44. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/changelog.mdx +3 -4
  45. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/index.mdx +14 -4
  46. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/changelog.mdx +3 -7
  47. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/index.mdx +8 -5
  48. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/changelog.mdx +11 -11
  49. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/index.mdx +15 -12
  50. package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/index.mdx +1 -0
  51. package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/versioned/0.0.1/index.mdx +13 -12
  52. package/templates/default/domains/Orders/services/InventoryService/index.mdx +40 -21
  53. package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryList/index.mdx +5 -5
  54. package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryList/schema.json +48 -49
  55. package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryStatus/index.mdx +6 -7
  56. package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryStatus/schema.json +25 -26
  57. package/templates/default/domains/Orders/services/NotificationService/index.mdx +29 -10
  58. package/templates/default/domains/Orders/services/NotificationService/queries/GetNotificationDetails/index.mdx +4 -4
  59. package/templates/default/domains/Orders/services/NotificationService/queries/GetNotificationDetails/schema.json +0 -1
  60. package/templates/default/domains/Orders/services/NotificationService/queries/GetUserNotifications/index.mdx +4 -5
  61. package/templates/default/domains/Orders/services/NotificationService/queries/GetUserNotifications/schema.json +43 -44
  62. package/templates/default/domains/Orders/services/OrdersService/changelog.mdx +1 -1
  63. package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/schema.json +66 -67
  64. package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/index.mdx +1 -2
  65. package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/schema.json +67 -68
  66. package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/index.mdx +1 -1
  67. package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/schema.json +62 -63
  68. package/templates/default/domains/Orders/services/OrdersService/index.mdx +26 -6
  69. package/templates/default/domains/Orders/services/OrdersService/openapi.yml +3 -3
  70. package/templates/default/domains/Orders/services/OrdersService/order-service-asyncapi.yaml +11 -11
  71. package/templates/default/domains/Orders/services/OrdersService/queries/GetOrder/index.mdx +5 -5
  72. package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/changelog.mdx +1 -1
  73. package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/index.mdx +1 -1
  74. package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/openapi.yml +1 -1
  75. package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/order-service-asyncapi.yaml +11 -11
  76. package/templates/default/domains/Orders/services/ShippingService/commands/CancelShipment/index.mdx +1 -2
  77. package/templates/default/domains/Orders/services/ShippingService/commands/CancelShipment/schema.json +12 -12
  78. package/templates/default/domains/Orders/services/ShippingService/commands/CreateReturnLabel/index.mdx +2 -2
  79. package/templates/default/domains/Orders/services/ShippingService/commands/CreateReturnLabel/schema.json +17 -17
  80. package/templates/default/domains/Orders/services/ShippingService/commands/CreateShipment/index.mdx +2 -2
  81. package/templates/default/domains/Orders/services/ShippingService/commands/UpdateShipmentStatus/index.mdx +2 -2
  82. package/templates/default/domains/Orders/services/ShippingService/commands/UpdateShipmentStatus/schema.json +26 -26
  83. package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/index.mdx +2 -2
  84. package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/schema.json +15 -15
  85. package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/index.mdx +2 -2
  86. package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/schema.json +15 -15
  87. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/index.mdx +2 -2
  88. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/schema.json +0 -1
  89. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/index.mdx +2 -2
  90. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/schema.json +15 -15
  91. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/index.mdx +2 -2
  92. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/schema.json +15 -15
  93. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/index.mdx +2 -2
  94. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/schema.json +15 -15
  95. package/templates/default/domains/Orders/services/ShippingService/index.mdx +14 -5
  96. package/templates/default/domains/Orders/ubiquitous-language.mdx +10 -10
  97. package/templates/default/domains/Orders/versioned/0.0.1/index.mdx +7 -7
  98. package/templates/default/domains/Orders/versioned/0.0.2/index.mdx +3 -3
  99. package/templates/default/domains/Payment/entities/Address/index.mdx +17 -16
  100. package/templates/default/domains/Payment/entities/Invoice/index.mdx +8 -7
  101. package/templates/default/domains/Payment/entities/Payment/index.mdx +15 -14
  102. package/templates/default/domains/Payment/entities/PaymentMethod/index.mdx +8 -7
  103. package/templates/default/domains/Payment/entities/Transaction/index.mdx +6 -5
  104. package/templates/default/domains/Payment/flows/PaymentProcessed/index.mdx +71 -70
  105. package/templates/default/domains/Payment/index.mdx +10 -10
  106. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/index.mdx +2 -2
  107. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/schema.json +1 -1
  108. package/templates/default/domains/Payment/services/FraudDetectionService/index.mdx +3 -2
  109. package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/index.mdx +4 -3
  110. package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/schema.json +1 -1
  111. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/index.mdx +4 -2
  112. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/schema.json +1 -1
  113. package/templates/default/domains/Payment/services/PaymentGatewayService/index.mdx +3 -2
  114. package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/index.mdx +1 -1
  115. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/index.mdx +1 -1
  116. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/versioned/0.0.1/index.mdx +3 -3
  117. package/templates/default/domains/Payment/services/PaymentService/index.mdx +1 -0
  118. package/templates/default/domains/Payment/services/PaymentService/queries/GetPaymentStatus/index.mdx +5 -5
  119. package/templates/default/domains/Payment/services/PaymentService/queries/GetPaymentStatus/schema.json +0 -1
  120. package/templates/default/domains/Payment/ubiquitous-language.mdx +8 -8
  121. package/templates/default/domains/ProductCatalog/entities/Category/index.mdx +10 -9
  122. package/templates/default/domains/ProductCatalog/entities/Inventory/index.mdx +15 -14
  123. package/templates/default/domains/ProductCatalog/entities/Product/index.mdx +11 -10
  124. package/templates/default/domains/ProductCatalog/entities/Review/index.mdx +15 -14
  125. package/templates/default/domains/ProductCatalog/index.mdx +8 -6
  126. package/templates/default/domains/ProductCatalog/ubiquitous-language.mdx +10 -10
  127. package/templates/default/domains/Subscriptions/entities/BillingProfile/index.mdx +8 -7
  128. package/templates/default/domains/Subscriptions/entities/SubscriptionPeriod/index.mdx +8 -7
  129. package/templates/default/domains/Subscriptions/flows/CancelSubscription/SubscriptionRenewed/index.mdx +207 -208
  130. package/templates/default/domains/Subscriptions/flows/CancelSubscription/index.mdx +48 -49
  131. package/templates/default/domains/Subscriptions/flows/CancelSubscription/versioned/0.0.1/index.mdx +36 -36
  132. package/templates/default/domains/Subscriptions/index.mdx +10 -10
  133. package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/index.mdx +3 -2
  134. package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/schema.json +1 -1
  135. package/templates/default/domains/Subscriptions/services/BillingService/index.mdx +2 -1
  136. package/templates/default/domains/Subscriptions/services/PlanManagementService/index.mdx +6 -2
  137. package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/CancelSubscription/index.mdx +5 -5
  138. package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/SubscribeUser/index.mdx +5 -5
  139. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/index.mdx +5 -5
  140. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/index.mdx +5 -5
  141. package/templates/default/domains/Subscriptions/services/SubscriptionService/index.mdx +30 -10
  142. package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/index.mdx +5 -5
  143. package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/schema.json +10 -2
  144. package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/versioned/0.0.1/index.mdx +5 -5
  145. package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/versioned/0.0.1/schema.json +10 -2
  146. package/templates/default/domains/Subscriptions/ubiquitous-language.mdx +9 -9
  147. package/templates/default/eventcatalog.auth.js +4 -5
  148. package/templates/default/eventcatalog.config.js +6 -8
  149. package/templates/default/eventcatalog.styles.css +1 -1
  150. package/templates/default/teams/full-stack.mdx +4 -4
  151. package/templates/default/teams/mobile-devs.mdx +4 -2
  152. package/templates/default/users/aSmith.mdx +0 -1
  153. package/templates/default/users/dboyne.mdx +4 -3
  154. package/templates/default/users/mSmith.mdx +2 -2
  155. package/templates/empty/eventcatalog.auth.js +4 -5
  156. package/templates/empty/eventcatalog.config.js +6 -7
  157. package/templates/empty/eventcatalog.styles.css +1 -1
  158. package/templates/eventbridge/README-template.md +4 -8
  159. package/templates/eventbridge/eventcatalog.auth.js +4 -5
  160. package/templates/eventbridge/eventcatalog.config.js +7 -8
  161. package/templates/eventbridge/eventcatalog.styles.css +1 -1
  162. package/templates/graphql/eventcatalog.auth.js +4 -5
  163. package/templates/graphql/eventcatalog.config.js +29 -20
  164. package/templates/graphql/eventcatalog.styles.css +1 -1
  165. package/templates/graphql/teams/order-management.mdx +6 -6
  166. package/templates/graphql/teams/payment-management.mdx +4 -4
  167. package/templates/graphql/teams/product-management.mdx +4 -4
  168. package/templates/graphql/users/aSmith.mdx +0 -1
  169. package/templates/graphql/users/alee.mdx +1 -1
  170. package/templates/graphql/users/azhang.mdx +1 -1
  171. package/templates/graphql/users/dboyne.mdx +4 -3
  172. package/templates/graphql/users/dkim.mdx +1 -1
  173. package/templates/graphql/users/jbrown.mdx +1 -1
  174. package/templates/graphql/users/mSmith.mdx +2 -2
  175. package/templates/index.ts +49 -59
  176. package/templates/openapi/eventcatalog.auth.js +4 -5
  177. package/templates/openapi/eventcatalog.config.js +33 -26
  178. package/templates/openapi/eventcatalog.styles.css +1 -1
  179. package/templates/openapi/teams/order-management.mdx +6 -6
  180. package/templates/openapi/teams/payment-management.mdx +4 -4
  181. package/templates/openapi/teams/product-management.mdx +4 -4
  182. package/templates/openapi/users/aSmith.mdx +0 -1
  183. package/templates/openapi/users/alee.mdx +1 -1
  184. package/templates/openapi/users/azhang.mdx +1 -1
  185. package/templates/openapi/users/dboyne.mdx +4 -3
  186. package/templates/openapi/users/dkim.mdx +1 -1
  187. package/templates/openapi/users/jbrown.mdx +1 -1
  188. package/templates/openapi/users/mSmith.mdx +2 -2
  189. package/templates/types.ts +12 -3
@@ -3,23 +3,24 @@ id: payments.{env}.events
3
3
  name: Payment Events Channel
4
4
  version: 1.0.0
5
5
  summary: |
6
- All events contain payment ID for traceability and ordered processing.
6
+ All events contain payment ID for traceability and ordered processing.
7
7
  owners:
8
- - dboyne
8
+ - dboyne
9
9
  address: payments.{env}.events
10
- protocols:
11
- - kafka
10
+ protocols:
11
+ - kafka
12
12
 
13
13
  parameters:
14
- env:
15
- enum:
16
- - dev
17
- - sit
18
- - prod
19
- description: 'Environment to use for payment events'
14
+ env:
15
+ enum:
16
+ - dev
17
+ - sit
18
+ - prod
19
+ description: 'Environment to use for payment events'
20
20
  ---
21
21
 
22
22
  ### Overview
23
+
23
24
  The Payments Events channel is the central stream for all payment lifecycle events. This includes payment initiation, authorization, capture, completion and failure scenarios. Events for a specific payment are guaranteed to be processed in sequence when using paymentId as the partition key.
24
25
 
25
26
  <ChannelInformation />
@@ -49,7 +50,7 @@ payment_event = {
49
50
  "timestamp": datetime.utcnow().isoformat(),
50
51
  "version": "1.0",
51
52
  "payload": {
52
- "paymentId": "PAY-123-456",
53
+ "paymentId": "PAY-123-456",
53
54
  "orderId": "ORD-789",
54
55
  "amount": {
55
56
  "value": 99.99,
@@ -71,7 +72,7 @@ payment_event = {
71
72
  },
72
73
  "metadata": {
73
74
  "correlationId": "corr-123-abc",
74
- "merchantId": "MERCH-456",
75
+ "merchantId": "MERCH-456",
75
76
  "source": "payment_service",
76
77
  "environment": "prod",
77
78
  "idempotencyKey": "PAY-123-456-2024-11-11-99.99"
@@ -85,4 +86,4 @@ producer.send(
85
86
  value=payment_event
86
87
  )
87
88
  producer.flush()
88
- ```
89
+ ```
@@ -26,23 +26,24 @@ import Footer from '@catalog/components/footer.astro';
26
26
  The E-Commerce domain is the core business domain of FlowMart, our modern digital marketplace. This domain orchestrates all critical business operations from product discovery to order fulfillment, handling millions of transactions monthly across our global customer base.
27
27
 
28
28
  <Tiles>
29
- <Tile
30
- icon="UserGroupIcon"
31
- href="/docs/teams/full-stack"
32
- title="Engineering Support"
33
- description="Questions? Contact our full-stack team for technical support"
34
- />
35
- <Tile
36
- icon="RectangleGroupIcon"
37
- href={`/visualiser/domains/${frontmatter.id}/${frontmatter.version}`}
38
- title="Domain Architecture"
39
- description="Explore our domain structure and service interactions"
40
- />
29
+ <Tile
30
+ icon="UserGroupIcon"
31
+ href="/docs/teams/full-stack"
32
+ title="Engineering Support"
33
+ description="Questions? Contact our full-stack team for technical support"
34
+ />
35
+ <Tile
36
+ icon="RectangleGroupIcon"
37
+ href={`/visualiser/domains/${frontmatter.id}/${frontmatter.version}`}
38
+ title="Domain Architecture"
39
+ description="Explore our domain structure and service interactions"
40
+ />
41
41
  </Tiles>
42
42
 
43
43
  ## Domain Overview
44
44
 
45
45
  FlowMart's E-Commerce domain is built on event-driven microservices architecture, enabling:
46
+
46
47
  - Real-time inventory management across multiple warehouses
47
48
  - Seamless payment processing with multiple providers
48
49
  - Smart order routing and fulfillment
@@ -54,9 +55,18 @@ FlowMart's E-Commerce domain is built on event-driven microservices architecture
54
55
 
55
56
  The E-Commerce domain is built on the following sub domains:
56
57
 
57
- - <ResourceLink id="Orders" type="domain">Orders</ResourceLink> - Core domain for order management
58
- - <ResourceLink id="Payment" type="domain">Payment</ResourceLink> - A generic domain for payment processing using Stripe as a payment provider
59
- - <ResourceLink id="Subscription" type="domain">Subscription</ResourceLink> - Generic subscription domain handling users subscriptions
58
+ - <ResourceLink id="Orders" type="domain">
59
+ Orders
60
+ </ResourceLink>
61
+ - Core domain for order management
62
+ - <ResourceLink id="Payment" type="domain">
63
+ Payment
64
+ </ResourceLink>
65
+ - A generic domain for payment processing using Stripe as a payment provider
66
+ - <ResourceLink id="Subscription" type="domain">
67
+ Subscription
68
+ </ResourceLink>
69
+ - Generic subscription domain handling users subscriptions
60
70
 
61
71
  ## Target Architecture (Event Storming Results)
62
72
 
@@ -96,11 +106,13 @@ sequenceDiagram
96
106
  ## Key Business Flows
97
107
 
98
108
  ### Subscription Management
109
+
99
110
  Our subscription service powers FlowMart's popular "Subscribe & Save" feature:
100
111
 
101
112
  <Flow id="CancelSubscription" version="latest" includeKey={false} />
102
113
 
103
114
  ### Payment Processing
115
+
104
116
  Secure, multi-provider payment processing with fraud detection:
105
117
 
106
118
  <Flow id="PaymentFlow" version="latest" includeKey={false} />
@@ -109,11 +121,11 @@ Secure, multi-provider payment processing with fraud detection:
109
121
 
110
122
  These services form the backbone of FlowMart's e-commerce operations:
111
123
 
112
- <ResourceGroupTable
113
- id="related-resources"
114
- limit={7}
115
- showOwners={true}
116
- description="Essential services powering our e-commerce platform"
124
+ <ResourceGroupTable
125
+ id="related-resources"
126
+ limit={7}
127
+ showOwners={true}
128
+ description="Essential services powering our e-commerce platform"
117
129
  />
118
130
 
119
131
  ## Performance SLAs
@@ -2,7 +2,7 @@
2
2
  dictionary:
3
3
  - id: Marketplace
4
4
  name: Marketplace
5
- summary: "The digital platform where buyers and sellers interact to browse, purchase, and sell goods."
5
+ summary: 'The digital platform where buyers and sellers interact to browse, purchase, and sell goods.'
6
6
  description: |
7
7
  The marketplace is FlowMart's core digital storefront, providing the infrastructure for all commerce activity. It encompasses:
8
8
 
@@ -13,7 +13,7 @@ dictionary:
13
13
  icon: Store
14
14
  - id: Checkout
15
15
  name: Checkout
16
- summary: "The process by which a customer finalizes a purchase, providing payment and shipping details."
16
+ summary: 'The process by which a customer finalizes a purchase, providing payment and shipping details.'
17
17
  description: |
18
18
  Checkout is the critical conversion step where a browsing customer becomes a paying customer. The checkout flow includes:
19
19
 
@@ -26,7 +26,7 @@ dictionary:
26
26
  icon: ShoppingCart
27
27
  - id: Cart
28
28
  name: Cart
29
- summary: "A temporary collection of items a customer intends to purchase."
29
+ summary: 'A temporary collection of items a customer intends to purchase.'
30
30
  description: |
31
31
  The shopping cart holds selected products before checkout. Key behaviors include:
32
32
 
@@ -39,11 +39,11 @@ dictionary:
39
39
  icon: ShoppingBag
40
40
  - id: Catalog
41
41
  name: Catalog
42
- summary: "The complete collection of products available for sale on the marketplace."
42
+ summary: 'The complete collection of products available for sale on the marketplace.'
43
43
  icon: BookOpen
44
44
  - id: Customer
45
45
  name: Customer
46
- summary: "An individual or organization that purchases goods or services from the marketplace."
46
+ summary: 'An individual or organization that purchases goods or services from the marketplace.'
47
47
  description: |
48
48
  Customers are the primary consumers in the e-commerce domain. A customer profile includes:
49
49
 
@@ -56,11 +56,11 @@ dictionary:
56
56
  icon: User
57
57
  - id: Storefront
58
58
  name: Storefront
59
- summary: "The customer-facing presentation layer of the marketplace, including product pages, navigation, and branding."
59
+ summary: 'The customer-facing presentation layer of the marketplace, including product pages, navigation, and branding.'
60
60
  icon: Layout
61
61
  - id: Promotion
62
62
  name: Promotion
63
- summary: "A marketing incentive such as a discount, coupon, or special offer applied to products or orders."
63
+ summary: 'A marketing incentive such as a discount, coupon, or special offer applied to products or orders.'
64
64
  description: |
65
65
  Promotions drive customer engagement and sales. Common promotion types include:
66
66
 
@@ -74,7 +74,7 @@ dictionary:
74
74
  icon: Percent
75
75
  - id: Conversion
76
76
  name: Conversion
77
- summary: "The completion of a desired customer action, most commonly a purchase."
77
+ summary: 'The completion of a desired customer action, most commonly a purchase.'
78
78
  icon: TrendingUp
79
79
  - id: Fulfillment
80
80
  name: Fulfillment
@@ -82,6 +82,6 @@ dictionary:
82
82
  icon: PackageCheck
83
83
  - id: Cart Abandonment
84
84
  name: Cart Abandonment
85
- summary: "When a customer adds items to their cart but leaves the site without completing the purchase."
85
+ summary: 'When a customer adds items to their cart but leaves the site without completing the purchase.'
86
86
  icon: ShoppingCart
87
87
  ---
@@ -4,4 +4,4 @@ createdAt: 2024-08-01
4
4
 
5
5
  ### Service added to domain
6
6
 
7
- Added the InventoryService to the domain.
7
+ Added the InventoryService to the domain.
@@ -94,30 +94,31 @@ properties:
94
94
  The CartItem entity represents individual products within a customer's shopping cart. It maintains snapshots of product information and pricing to ensure consistency during the shopping session.
95
95
 
96
96
  ### Entity Properties
97
+
97
98
  <EntityPropertiesTable />
98
99
 
99
100
  ## Relationships
100
101
 
101
- * **ShoppingCart:** Each cart item belongs to one `ShoppingCart` (identified by `cartId`).
102
- * **Product:** Each cart item references one `Product` (identified by `productId`).
102
+ - **ShoppingCart:** Each cart item belongs to one `ShoppingCart` (identified by `cartId`).
103
+ - **Product:** Each cart item references one `Product` (identified by `productId`).
103
104
 
104
105
  ## Price Calculations
105
106
 
106
- * **Total Price** = Quantity × Unit Price - Discount Amount
107
- * **Savings** = Original Price - Unit Price (if applicable)
107
+ - **Total Price** = Quantity × Unit Price - Discount Amount
108
+ - **Savings** = Original Price - Unit Price (if applicable)
108
109
 
109
110
  ## Examples
110
111
 
111
- * **CartItem #1:** iPhone 15 Pro, quantity 1, $999.99 unit price, no discount.
112
- * **CartItem #2:** Running Shoes Size 9, quantity 2, $64.99 unit price (was $129.99).
113
- * **CartItem #3:** T-Shirt Large/Blue, quantity 3, $19.99 unit price.
112
+ - **CartItem #1:** iPhone 15 Pro, quantity 1, $999.99 unit price, no discount.
113
+ - **CartItem #2:** Running Shoes Size 9, quantity 2, $64.99 unit price (was $129.99).
114
+ - **CartItem #3:** T-Shirt Large/Blue, quantity 3, $19.99 unit price.
114
115
 
115
116
  ## Business Rules
116
117
 
117
- * Quantity must be greater than zero
118
- * Unit price is captured at time of adding to maintain consistency
119
- * Product availability is checked when cart is accessed
120
- * Unavailable items are marked but not automatically removed
121
- * Total price is recalculated when quantity changes
122
- * Product snapshots prevent price changes from affecting active carts
123
- * Maximum quantity limits may apply per product type
118
+ - Quantity must be greater than zero
119
+ - Unit price is captured at time of adding to maintain consistency
120
+ - Product availability is checked when cart is accessed
121
+ - Unavailable items are marked but not automatically removed
122
+ - Total price is recalculated when quantity changes
123
+ - Product snapshots prevent price changes from affecting active carts
124
+ - Maximum quantity limits may apply per product type
@@ -45,15 +45,15 @@ properties:
45
45
  The Customer entity holds information about the individuals or organizations who interact with the system, primarily by placing orders. It stores contact details, addresses, and other relevant personal or business information.
46
46
 
47
47
  ### Entity Properties
48
+
48
49
  <EntityPropertiesTable />
49
50
 
50
51
  ## Relationships
51
52
 
52
- * **Order:** A customer can have multiple `Order` entities. The `Order` entity holds a reference (`customerId`) back to the `Customer`.
53
- * **Address:** A customer can have multiple associated `Address` value objects or entities.
53
+ - **Order:** A customer can have multiple `Order` entities. The `Order` entity holds a reference (`customerId`) back to the `Customer`.
54
+ - **Address:** A customer can have multiple associated `Address` value objects or entities.
54
55
 
55
56
  ## Examples
56
57
 
57
- * **Customer A:** Jane Doe, registered on 2023-01-15, with a primary shipping address and a billing address.
58
- * **Customer B:** John Smith, a long-time customer with multiple past orders.
59
-
58
+ - **Customer A:** Jane Doe, registered on 2023-01-15, with a primary shipping address and a billing address.
59
+ - **Customer B:** John Smith, a long-time customer with multiple past orders.
@@ -80,19 +80,19 @@ properties:
80
80
  The Order entity captures all details related to a customer's purchase request. It serves as the central aggregate root within the Orders domain, coordinating information about the customer, products ordered, payment, and shipping.
81
81
 
82
82
  ### Entity Properties
83
+
83
84
  <EntityPropertiesTable />
84
85
 
85
86
  ## Relationships
86
87
 
87
- * **Customer:** Each order belongs to one `Customer` (identified by `customerId`).
88
- * **OrderItem:** An order contains one or more `OrderItem` entities detailing the specific products and quantities.
89
- * **Address:** Each order has shipping and billing `Address` entities (identified by `shippingAddress` and `billingAddress`).
90
- * **Payment:** An order is associated with one `Payment` entity for transaction processing.
91
- * **ShoppingCart:** An order can be converted from a `ShoppingCart` (identified by `convertedFromCartId`).
92
- * **Shipment:** An order may lead to one or more `Shipment` entities (not detailed here).
88
+ - **Customer:** Each order belongs to one `Customer` (identified by `customerId`).
89
+ - **OrderItem:** An order contains one or more `OrderItem` entities detailing the specific products and quantities.
90
+ - **Address:** Each order has shipping and billing `Address` entities (identified by `shippingAddress` and `billingAddress`).
91
+ - **Payment:** An order is associated with one `Payment` entity for transaction processing.
92
+ - **ShoppingCart:** An order can be converted from a `ShoppingCart` (identified by `convertedFromCartId`).
93
+ - **Shipment:** An order may lead to one or more `Shipment` entities (not detailed here).
93
94
 
94
95
  ## Examples
95
96
 
96
- * **Order #12345:** A customer orders 2 units of Product A and 1 unit of Product B, to be shipped to their home address. Status is 'Processing'.
97
- * **Order #67890:** A customer places a large order for multiple items, requiring special shipping arrangements. Status is 'Pending' until payment confirmation.
98
-
97
+ - **Order #12345:** A customer orders 2 units of Product A and 1 unit of Product B, to be shipped to their home address. Status is 'Processing'.
98
+ - **Order #67890:** A customer places a large order for multiple items, requiring special shipping arrangements. Status is 'Pending' until payment confirmation.
@@ -24,7 +24,7 @@ properties:
24
24
  description: Identifier for the product being ordered
25
25
  references: Product
26
26
  referencesIdentifier: productId
27
- relationType: hasOne
27
+ relationType: hasOne
28
28
  - name: productName
29
29
  type: string
30
30
  required: false # Often denormalized for performance/display
@@ -48,14 +48,15 @@ properties:
48
48
  The OrderItem entity details a specific product and its quantity requested within an `Order`. It holds information about the product, the quantity ordered, and the price calculation for that line item. OrderItems are part of the `Order` aggregate.
49
49
 
50
50
  ### Entity Properties
51
+
51
52
  <EntityPropertiesTable />
52
53
 
53
54
  ## Relationships
54
55
 
55
- * **Order:** Each `OrderItem` belongs to exactly one `Order` (identified by `orderId`). It is a constituent part of the Order aggregate.
56
- * **Product:** Each `OrderItem` refers to one `Product` (identified by `productId`).
56
+ - **Order:** Each `OrderItem` belongs to exactly one `Order` (identified by `orderId`). It is a constituent part of the Order aggregate.
57
+ - **Product:** Each `OrderItem` refers to one `Product` (identified by `productId`).
57
58
 
58
59
  ## Examples
59
60
 
60
- * **OrderItem A (for Order #12345):** Product ID: P001, Quantity: 2, Unit Price: $50.00, Total Price: $100.00
61
- * **OrderItem B (for Order #12345):** Product ID: P002, Quantity: 1, Unit Price: $75.00, Total Price: $75.00
61
+ - **OrderItem A (for Order #12345):** Product ID: P001, Quantity: 2, Unit Price: $50.00, Total Price: $100.00
62
+ - **OrderItem B (for Order #12345):** Product ID: P002, Quantity: 1, Unit Price: $75.00, Total Price: $75.00
@@ -115,14 +115,15 @@ properties:
115
115
  The ShoppingCart entity manages the customer's shopping experience before checkout. It tracks selected products, quantities, pricing, and supports both registered customer and guest shopping scenarios.
116
116
 
117
117
  ### Entity Properties
118
+
118
119
  <EntityPropertiesTable />
119
120
 
120
121
  ## Relationships
121
122
 
122
- * **Customer:** A cart can belong to one `Customer` (identified by `customerId`).
123
- * **CartItem:** A cart contains multiple `CartItem` entities with product details.
124
- * **Address:** A cart can reference shipping and billing `Address` entities.
125
- * **Order:** A cart can be converted to one `Order` (identified by `convertedToOrderId`).
123
+ - **Customer:** A cart can belong to one `Customer` (identified by `customerId`).
124
+ - **CartItem:** A cart contains multiple `CartItem` entities with product details.
125
+ - **Address:** A cart can reference shipping and billing `Address` entities.
126
+ - **Order:** A cart can be converted to one `Order` (identified by `convertedToOrderId`).
126
127
 
127
128
  ## Cart States
128
129
 
@@ -134,17 +135,17 @@ converted expired
134
135
 
135
136
  ## Examples
136
137
 
137
- * **Cart #1:** Customer cart with 3 items, $299.99 total, active status.
138
- * **Cart #2:** Guest cart abandoned after 24 hours, contains 1 high-value item.
139
- * **Cart #3:** Converted cart that became Order #12345, marked as converted.
138
+ - **Cart #1:** Customer cart with 3 items, $299.99 total, active status.
139
+ - **Cart #2:** Guest cart abandoned after 24 hours, contains 1 high-value item.
140
+ - **Cart #3:** Converted cart that became Order #12345, marked as converted.
140
141
 
141
142
  ## Business Rules
142
143
 
143
- * Guest carts are identified by session ID when customer ID is null
144
- * Cart totals are recalculated when items are added/removed
145
- * Abandoned carts trigger marketing automation after configured time
146
- * Expired carts are cleaned up after retention period
147
- * Cart conversion creates an order and marks cart as converted
148
- * Inventory is not reserved until checkout begins
149
- * Applied coupons are validated on each cart update
150
- * Cart items maintain snapshot of product prices at time of addition
144
+ - Guest carts are identified by session ID when customer ID is null
145
+ - Cart totals are recalculated when items are added/removed
146
+ - Abandoned carts trigger marketing automation after configured time
147
+ - Expired carts are cleaned up after retention period
148
+ - Cart conversion creates an order and marks cart as converted
149
+ - Inventory is not reserved until checkout begins
150
+ - Applied coupons are validated on each cart update
151
+ - Cart items maintain snapshot of product prices at time of addition
@@ -39,8 +39,6 @@ resourceGroups:
39
39
 
40
40
  import Footer from '@catalog/components/footer.astro';
41
41
 
42
-
43
-
44
42
  :::warning
45
43
 
46
44
  Please ensure all services are **updated** to the latest version for compatibility and performance improvements.
@@ -48,9 +46,19 @@ Please ensure all services are **updated** to the latest version for compatibili
48
46
 
49
47
  The Orders domain handles all operations related to customer orders, from creation to fulfillment. This documentation provides an overview of the events and services involved in the Orders domain, helping developers and stakeholders understand the event-driven architecture
50
48
 
51
- <Tiles >
52
- <Tile icon="UserGroupIcon" href="/docs/teams/full-stack" title="Contact the team" description="Any questions? Feel free to contact the owners" />
53
- <Tile icon="RectangleGroupIcon" href={`/visualiser/domains/${frontmatter.id}/${frontmatter.version}`} title={`${frontmatter.services.length} services`} description="This domain contains the following services." />
49
+ <Tiles>
50
+ <Tile
51
+ icon="UserGroupIcon"
52
+ href="/docs/teams/full-stack"
53
+ title="Contact the team"
54
+ description="Any questions? Feel free to contact the owners"
55
+ />
56
+ <Tile
57
+ icon="RectangleGroupIcon"
58
+ href={`/visualiser/domains/${frontmatter.id}/${frontmatter.version}`}
59
+ title={`${frontmatter.services.length} services`}
60
+ description="This domain contains the following services."
61
+ />
54
62
  </Tiles>
55
63
 
56
64
  ### Architecture for the Orders domain
@@ -63,7 +71,6 @@ A visualization of the entities in the Orders domain. Here you can see the relat
63
71
 
64
72
  <EntityMap id="Orders" />
65
73
 
66
-
67
74
  <MessageTable format="all" limit={4} showChannels={true} title="Messages in/out of the domain" />
68
75
 
69
76
  ### Order example (sequence diagram)
@@ -88,15 +95,23 @@ sequenceDiagram
88
95
  ## Flows
89
96
 
90
97
  ### Cancel Subscription flow
98
+
91
99
  Documented flow when a user cancels their subscription.
92
100
 
93
101
  <Flow id="CancelSubscription" version="latest" includeKey={false} />
94
102
 
95
103
  ### Payment processing flow
104
+
96
105
  Documented flow when a user makes a payment within the order domain
97
106
 
98
107
  <Flow id="PaymentFlow" version="latest" includeKey={false} />
99
108
 
100
- <ResourceGroupTable id="related-resources" limit={4} showOwners={true} title="Core resources for the Orders domain" description="Resources that are related to the Orders domain, you may find them useful" />
109
+ <ResourceGroupTable
110
+ id="related-resources"
111
+ limit={4}
112
+ showOwners={true}
113
+ title="Core resources for the Orders domain"
114
+ description="Resources that are related to the Orders domain, you may find them useful"
115
+ />
101
116
 
102
117
  <Footer />
@@ -4,4 +4,4 @@ createdAt: 2024-08-01
4
4
 
5
5
  ### Service receives additional events
6
6
 
7
- Service now receives [OrderAmended](/docs/events/OrderAmended/0.0.1) and [UpdateInventory](/docs/commands/UpdateInventory/0.0.3) events.
7
+ Service now receives [OrderAmended](/docs/events/OrderAmended/0.0.1) and [UpdateInventory](/docs/commands/UpdateInventory/0.0.3) events.
@@ -25,7 +25,7 @@ The AddInventory command is issued to add new stock to the inventory. This comma
25
25
 
26
26
  ## Architecture diagram
27
27
 
28
- <NodeGraph/>
28
+ <NodeGraph />
29
29
 
30
30
  ## Payload example
31
31
 
@@ -36,13 +36,10 @@ The AddInventory command is issued to add new stock to the inventory. This comma
36
36
  "warehouseId": "456e7891-c23d-45f6-b78a-123456789abc",
37
37
  "timestamp": "2024-07-04T14:48:00Z"
38
38
  }
39
-
40
39
  ```
41
40
 
42
41
  ## Schema
43
42
 
44
- <Schema file="schema.json"/>
43
+ <Schema file="schema.json" />
45
44
 
46
45
  <Footer />
47
-
48
-
@@ -1,29 +1,28 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "AddInventoryCommand",
4
- "type": "object",
5
- "properties": {
6
- "productId": {
7
- "type": "string",
8
- "format": "uuid",
9
- "description": "The unique identifier of the product being added to the inventory."
10
- },
11
- "quantity": {
12
- "type": "integer",
13
- "description": "The quantity of the product being added to the inventory."
14
- },
15
- "warehouseId": {
16
- "type": "string",
17
- "format": "uuid",
18
- "description": "The unique identifier of the warehouse where the inventory is being added."
19
- },
20
- "timestamp": {
21
- "type": "string",
22
- "format": "date-time",
23
- "description": "The date and time when the inventory was added."
24
- }
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "AddInventoryCommand",
4
+ "type": "object",
5
+ "properties": {
6
+ "productId": {
7
+ "type": "string",
8
+ "format": "uuid",
9
+ "description": "The unique identifier of the product being added to the inventory."
25
10
  },
26
- "required": ["productId", "quantity", "warehouseId", "timestamp"],
27
- "additionalProperties": false
28
- }
29
-
11
+ "quantity": {
12
+ "type": "integer",
13
+ "description": "The quantity of the product being added to the inventory."
14
+ },
15
+ "warehouseId": {
16
+ "type": "string",
17
+ "format": "uuid",
18
+ "description": "The unique identifier of the warehouse where the inventory is being added."
19
+ },
20
+ "timestamp": {
21
+ "type": "string",
22
+ "format": "date-time",
23
+ "description": "The date and time when the inventory was added."
24
+ }
25
+ },
26
+ "required": ["productId", "quantity", "warehouseId", "timestamp"],
27
+ "additionalProperties": false
28
+ }
@@ -5,15 +5,15 @@ version: 0.0.1
5
5
  summary: |
6
6
  Command that will place an order
7
7
  owners:
8
- - dboyne
9
- - msmith
10
- - asmith
11
- - full-stack
12
- - mobile-devs
8
+ - dboyne
9
+ - msmith
10
+ - asmith
11
+ - full-stack
12
+ - mobile-devs
13
13
  badges:
14
- - content: Recently updated!
15
- backgroundColor: green
16
- textColor: green
14
+ - content: Recently updated!
15
+ backgroundColor: green
16
+ textColor: green
17
17
  schemaPath: 'schema.json'
18
18
  ---
19
19
 
@@ -25,12 +25,10 @@ The Order Placement Command is a versatile and robust system designed to streaml
25
25
 
26
26
  ## Architecture diagram
27
27
 
28
- <NodeGraph/>
28
+ <NodeGraph />
29
29
 
30
30
  ## Schema
31
31
 
32
- <SchemaViewer file="schema.json"/>
32
+ <SchemaViewer file="schema.json" />
33
33
 
34
34
  <Footer />
35
-
36
-
@@ -42,6 +42,6 @@ The UpdateInventory command is issued to update the existing stock levels of a p
42
42
 
43
43
  ## Schema (JSON schema)
44
44
 
45
- <Schema file="schema.json"/>
45
+ <Schema file="schema.json" />
46
46
 
47
47
  <Footer />