Skip to main content

Creating domains

Adding domains to your EventCatalog is a great way to group services within your architecture to define their bounded context.

What do domains look like in EventCatalog?​

Example

Adding a new domain​

To add a new domain create a new folder within the /domains folder with an index.md file.

  • /domains/{Domain Name}/index.md
    • (example /domains/Orders/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.

/domains/Orders/index.md (example)
---
# id of your domain, used for slugs and references in EventCatalog.
id: Orders

# Display name of the domain, rendered in EventCatalog
name: Orders

# Version of the domain
version: 0.0.1

# Short summary of your domain
summary: |
Domain that contains order related information

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

# Optional services. Groups services into this domain.
services:
- id: PaymentService
version: 0.0.1

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

## Overview

Domain that contains all services that are related to the orders domain within FakeCompany.

<NodeGraph />

That's it!

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

Adding content​

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

tip

Think about writing a blog. EventCatalog is just markdown. Write and use it how you like, and the website will render your content!

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

To find out more read the domain components list.

Tips for domain content​

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

  • Context of the domain. What is it? Why does it exist?
  • How other teams can add services to your domains?
  • Any edit/contributing guidelines?