Skip to main content

Creating events

Adding an event to your EventCatalog is a great way for you to document your messages.

What do events look like in EventCatalog?​

Example

Adding a new event​

To add a new event create a new folder within the /events folder with an index.md file.

  • /events/{event Name}/index.md
    • (example /events/InventoryOutOfStock/index.md)

The index.md contents are split into two sections, frontmatter and the markdown content.

Here is an example of what a domain markdown file may look like.

/events/InventoryOutOfStock/index.md (example)
---
# id of your event, used for slugs and references in EventCatalog.
id: InventoryOutOfStock

# Display name of the event, rendered in EventCatalog
name: Out of stock

# Version of the event
version: 0.0.3

# Short summary of your event
summary: |
Event that is published when inventory it out of stock

# Optional owners, references teams or users
owners:
- dboyne

# Optional badges, rendered to UI by EventCatalog
badges:
- content: New event
backgroundColor: blue
textColor: blue
---

## Overview

Event is published when the inventory is out of stock.

<NodeGraph />

That's it!

Once you add your new event to EventCatalog, it will now show in the docs, visualizer and discoverability table.

Adding content​

With events you can write any Markdown you want and it will render on your page. Every command gets its own page.

Within your markdown content you can use components to add interactive components to your page.

Tips for event content​

It's entirely up to you what you want to add to your events markdown content but here are a few things you might want to consider.

  • Context of the event. What is it? Why does it exist?
  • How can others trigger this event?
  • What is the schema of the event?
  • How can others make contributions to changes to this event? Who do they contact (owners?)
  • Any edit/contributing guidelines?