# Create a domain

Copy as Markdown[View as Markdown](/docs/tutorial/create-a-domain.md)

***

In this step, you will create your first domain.

A [domain](/docs/development/guides/domains/introduction.md) groups related parts of your architecture around a business area. In this tutorial, you will create an `E-Commerce` domain and add the two services you already created.

## In this chapter...

Here are the topics we'll cover

* Create an E-Commerce domain folder.
* Add OrderService and InventoryService to the domain.
* Refresh EventCatalog and check the domain page.

### Create the domain folder[​](#create-the-domain-folder "Direct link to Create the domain folder")

From the root of your catalog, create a folder for the domain:

```
mkdir -p domains/E-Commerce
```

### Add the domain page[​](#add-the-domain-page "Direct link to Add the domain page")

Create a new file at `domains/E-Commerce/index.mdx`:

domains/E-Commerce/index.mdx

```
---
id: E-Commerce
name: E-Commerce
version: 0.0.1
summary: |
  Contains the services that support customer ordering.
owners:
  - commerce-platform-team
services:
  - id: OrderService
    version: 0.0.1
  - id: InventoryService
    version: 0.0.1
---

## Overview

The E-Commerce domain contains the services that support checkout, orders, and inventory coordination.
```

The important frontmatter fields are:

* `id` is the stable identifier for the domain.
* `name` is the label people see in EventCatalog.
* `version` is the version of the domain page.
* `summary` explains what belongs in the domain.
* `owners` links the domain to the team that owns it.
* `services` lists the services that belong to the domain.

You can learn more in the [creating domains guide](/docs/development/guides/domains/creating-domains/adding-domains.md), [adding services to domains guide](/docs/development/guides/domains/creating-domains/adding-services-to-domains.md), and [domain owners guide](/docs/development/guides/domains/ownership-and-language/owners.md).

The `version` field inside each service reference is optional. If you leave it out, EventCatalog will use the latest version of that service.

### Check the domain in EventCatalog[​](#check-the-domain-in-eventcatalog "Direct link to Check the domain in EventCatalog")

Refresh EventCatalog in your browser and open the `E-Commerce` domain.

You should see the domain page and the two services listed in the sidebar at <http://localhost:3000/docs/domains/E-Commerce/0.0.1>

![E-Commerce domain page showing Order Service and Inventory Service](/img/tutorial/e-commerce-domain-page.png)

The E-Commerce domain groups Order Service and Inventory Service.

### Check the domain map[​](#check-the-domain-map "Direct link to Check the domain map")

Open the `Map` view from the domain page.

EventCatalog shows the services that belong to the domain. Because those services already publish and consume `OrderPlaced`, the map also shows that relationship. You still only added services to the domain.

![E-Commerce domain map showing Order Service and Inventory Service](/img/tutorial/e-commerce-domain-map.png)

The E-Commerce domain map shows the services in the domain and the event relationship between them.

Show the domain map on the page

You can also embed the domain visualization directly into the domain documentation page with the [`NodeGraph`](/docs/development/components/components/nodegraph.md) component:

```
<NodeGraph />
```

### What you have now[​](#what-you-have-now "Direct link to What you have now")

Your catalog now has:

* two services
* one event
* a schema
* producer and consumer relationships
* ownership
* an `E-Commerce` domain that groups the services

### Next[​](#next "Direct link to Next")

Continue to [Visualize your catalog](/docs/tutorial/visualize-your-catalog.md).
