Skip to main content
New project sponsor πŸͺHookdeck: Serverless infrastructure for event-driven architecture. Learn more.

Installation

Requirements​

  • Node.js version >= 20.x.x or above (which can be checked by running node -v). You can use nvm for managing multiple Node versions on a single machine installed

Scaffold project catalog​

The easiest way to install EventCatalog is to use the command line tool that helps you scaffold a skeleton EventCatalog. You can run this command anywhere in a new empty repository or within an existing repository, it will create a new directory containing the scaffolded files.

npx @eventcatalog/create-eventcatalog@latest [name]

Example:

npx @eventcatalog/create-eventcatalog@latest my-catalog

Project structure​

Assuming you named your site my-catalog, you will see the following files generated under a new directory my-catalog/:

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

Project structure rundown​

  • /domains/ - Contains the domain Markdown files. These are optional but recommended. With domains you can group services. More details can be found in the domains guide
  • /services/ - Contains the service Markdown files. Services belong to a domain, and can send or receive messages (commands or events). These are optional but recommended. More details can be found in the services guide
  • /commands/ - Contains commands (message). These are optional. Learn more in the commands guide
  • /events/ - Contains events (message). These are optional. More details can be found in the events guide
  • /eventcatalog.config.js - A config file containing the site configuration. Read the API docs
  • /package.json - File required for your application to work.

Running the development server​

To preview your changes as you edit the files, you can run a local development server that will serve your website and reflect the latest changes.

cd my-catalog
npm run dev

You will be able to see your EventCatalog at http://localhost:3000/docs

Congratulations! You have just created your first EventCatalog site!

Build​

EventCatalog uses Astro under the hood. To build the catalog run the following command:

npm run build

All contents will be generated within the /dist directory.

EventCatalog is currently a static website so you can host this folder anywhere you like.

Check out the docs on hosting for more details.