Skip to content

Commit

Permalink
update events docs
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannymassuia committed Apr 24, 2024
1 parent a4a12e0 commit 4503fb0
Show file tree
Hide file tree
Showing 24 changed files with 203 additions and 11 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ understanding of what's happening inside the system.
> **Note:** _This project is intentionally over-engineered to explore different technologies and
architectures._

## High-level architecture overview
## Documentation

- [Events Catalog](https://giovannymassuia.github.io/disecomm)

### High-level architecture overview

_Node: The architecture is still a work in progress, so it may change in the future._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ version: 0.0.2
summary: |
Holds information about what the user added to their shopping cart.
producers:
- Basket Service
- Basket Service
consumers:
- Data Lake
- Data Lake
owners:
- giovannymassuia
- giovannymassuia
tags:
- label: example
---

<Admonition>When firing this event make sure you set the `correlation-id` in the headers. Our
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ version: 0.0.1
summary: |
Holds information about what the user removed from their cart.
producers:
- Basket Service
- Basket Service
consumers:
- Data Lake
- Data Lake
owners:
- giovannymassuia
- giovannymassuia
tags:
- label: example
---

<Admonition>When firing this event make sure you set the `correlation-id` in the headers. Our
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
name: Shopping
name: Example
summary: |
Domain for everything shopping
owners:
- giovannymassuia
tags:
- label: example
---

<Admonition>Domain for everything to do with Shopping at our business. Before adding any events or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ name: Basket Service
summary: |
CRUD based API to handle Basket interactions for users of the shopping website.
owners:
- giovannymassuia
- giovannymassuia
repository:
language: JavaScript
url: https://github.com/boyney123/pretend-basket-service
tags:
- label: defaultContentType:application/json
- label: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
---

Simple API that handles interactions between users and their baskets. Use this service to add,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: InventoryUpdate
version: 0.0.1
summary: |
Event raised when the inventory has been updated.
producers:
- Inventory Service
consumers:
- Order Management Service
owners:
- giovannymassuia
---

<Admonition>When firing this event make sure you set the `correlation-id` in the headers. Our
schemas have standard metadata make sure you read and follow it.</Admonition>

### Details

This event is the final event of the ordering process. It gets raised when the shipment has been
delivered.

<NodeGraph title="Consumer / Producer Diagram" />

<Schema />
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$id": "https://example.com/AddedItemToCart.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "AddedItemToCart",
"type": "object",
"properties": {
"metadata": {
"type": "object",
"properties": {
"correlationId": {
"type": "string",
"description": "The ID of the user"
},
"domain": {
"type": "string",
"description": "The domain of the event"
},
"service": {
"type": "string",
"description": "The name of the service that triggered the event"
}
},
"required": ["correlationId", "domain"]
},
"data": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"description": "The ID of the user"
},
"itemId": {
"type": "string",
"description": "The ID of the shopping item"
},
"quantity": {
"type": "number",
"description": "How many items the user wants to add to their shopping cart",
"minimum": 1,
"maximum": 1000,
"default": 1
}
}
}
}
}
21 changes: 21 additions & 0 deletions docs/events-catalog/domains/Inventory/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Inventory
summary: |
Domain for everything inventory related
owners:
- giovannymassuia
externalLinks:
- label: See code
url: https://github.com/giovannymassuia/disecomm/tree/main/order-management
tags:
- label: order
---

### Details

This domain encapsulates everything in our business that has to do with orders and users. This
might be new orders added to our online shop or order management.

<NodeGraph title="Domain Graph" />

<Mermaid />
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Inventory Service
summary: |
# CRUD based API to handle Basket interactions for users of the shopping website.
owners:
- giovannymassuia
repository:
language: Java
url: https://github.com/giovannymassuia/disecomm/tree/main/order-management
tags:
- label: order
---

Simple API that handles interactions between users and their baskets. Use this service to add,
remove and query the status of a users basket.

This service will also generate Async events for downstream services.

<NodeGraph />

<Mermaid />

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Logistics Service
summary: |
# CRUD based API to handle Basket interactions for users of the shopping website.
owners:
- giovannymassuia
repository:
language: Java
url: https://github.com/giovannymassuia/disecomm/tree/main/order-management
tags:
- label: order
---

Simple API that handles interactions between users and their baskets. Use this service to add,
remove and query the status of a users basket.

This service will also generate Async events for downstream services.

<NodeGraph />

<Mermaid />

21 changes: 21 additions & 0 deletions docs/events-catalog/domains/Orders/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Orders
summary: |
Domain for everything orders
owners:
- giovannymassuia
externalLinks:
- label: See code
url: https://github.com/giovannymassuia/disecomm/tree/main/order-management
tags:
- label: order
---

### Details

This domain encapsulates everything in our business that has to do with orders and users. This
might be new orders added to our online shop or order management.

<NodeGraph title="Domain Graph" />

<Mermaid />
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Order Management Service
summary: |
# CRUD based API to handle Basket interactions for users of the shopping website.
owners:
- giovannymassuia
repository:
language: Java
url: https://github.com/giovannymassuia/disecomm/tree/main/order-management
tags:
- label: order
---

Simple API that handles interactions between users and their baskets. Use this service to add,
remove and query the status of a users basket.

This service will also generate Async events for downstream services.

<NodeGraph />

<Mermaid />

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Inventory Service
name: Example Service
summary: |
Service responsible for managing the inventory of the store.
owners:
Expand All @@ -9,7 +9,7 @@ repository:
url: https://github.com/giovannymassuia/disecomm/tree/main/inventory-management
---

The inventory service is responsible for managing the inventory of the store. It listens to events
The example service is responsible for managing the inventory of the store. It listens to events
from the order service and updates the inventory accordingly.


Expand Down

0 comments on commit 4503fb0

Please sign in to comment.