Skip to main content

Project structure

How you document your domains, services and messages is up to you, but to make it easier for you, you can nest resources within each other.

By default all resources in EventCatalog have a flat folder structure (e.g. /domains, /services, /events, /commands).

my-catalog
├── /domains
│ ├── /Orders
│ │ └──index.md
│ │ └──/versioned
│ │ └──0.0.1
│ │ └──index.md
│ └── /Payment
│ └──index.md
├── /services
│ ├── /InventoryService
│ │ └──index.md
│ ├── /NotificationService
│ │ └──index.md
│ ├── /OrdersService
│ │ └──index.md
│ │ └──openapi.yml
│ └── /PaymentService
│ └──index.md
├── /commands
│ ├── /AddInventory
│ │ └──index.md
│ ├── /UpdateInventory
│ │ └──index.md
├── /events
│ ├── /Inventory
│ │ ├── /InventoryAdjusted
│ │ │ └──index.md
│ │ │ └──schema.json
│ │ │ └──/versioned
│ │ │ └──0.0.1
│ │ │ └──index.md
│ │ │ └──schema.json
│ ├── OutOfStock
│ │ └──index.md
├── teams
│ └──full-stack.md
│ └──mobile-devs.md
├── users
│ └──aSmith.md
│ └──dboyne.md
│ └──mSmith.md
├── eventcatalog.config.js
├── package.json
└── README.md

You can also nest resources making it easier to maintain and manage your catalogs as they grow in size.

EventCatalog hierarchy of resources is as following: domains > services > messages.

Using this hierarchy you can nest resources within each other using folder structures

  • /domains/{Domain Name}
    • /services/{My Service}
      • /events/{My Event}
      • /commands/{My Command}

Example with nested resources

my-catalog
├── /domains
│ ├── /Orders
│ │ └──index.md
│ │ └──openapi.yml
│ │ └──index.md
│ │ └──/versioned
│ │ └──0.0.1
│ │ └──index.md
│ │ └──/services
│ │ └── /OrdersService
│ │ └──index.md
│ │ └──openapi.yml
│ │ └── /events
│ │ └──OrderPlaced
│ │ └──index.md
│ │ └── /OrderCancelled
│ │ └──index.md
│ └── /Payment
│ │ └──index.md
│ │ └──/services
│ │ └──/PaymentService
│ │ └── index.md
│ │ └── asyncapi.yml
│ │ └── /events
│ │ └── /PaymentReceived
│ │ └── /index.md
│ │ └── /schema.json
│ │ └── /PaymentCancelled
│ │ └── /index.md
│ │ └── /schema.avro
│ │ └── /commands
│ │ └── /VerifyPayment
│ │ └── /index.md
│ │ └── /schema.json
│ │ └── /CancelPayment
│ │ └── /index.md
│ │ └── /schema.json
├── teams
│ └──full-stack.md
│ └──mobile-devs.md
├── users
│ └──aSmith.md
│ └──dboyne.md
│ └──mSmith.md
├── eventcatalog.config.js
├── package.json
└── README.md

If you want to see an example you can look at the EventCatalog repo example.

Nesting your resources within folders can help you manage your catalog as it grows over time.