# How Domain Starter Templates Are Structured in Microsoft Ontology Playground: Retail, Healthcare & Finance

> Explore the structure of domain starter templates like Retail, Healthcare, and Finance in Microsoft Ontology Playground. Learn how folder structure and metadata files organize OWL ontology definitions.

- Repository: [Microsoft/Ontology-Playground](https://github.com/microsoft/Ontology-Playground)
- Tags: how-to-guide
- Published: 2026-07-21

---

**Domain starter templates in Microsoft Ontology Playground follow a standardized step-based folder structure under `catalogue/official/`, where each incremental learning step contains a [`metadata.json`](https://github.com/microsoft/Ontology-Playground/blob/main/metadata.json) file for UI configuration and an RDF file containing the OWL ontology definitions.**

The Microsoft Ontology Playground repository provides structured learning paths for Retail, Healthcare, and Finance domains through progressive ontology modeling exercises. These domain starter templates utilize a consistent physical layout that separates human-readable metadata from machine-readable ontology definitions, enabling the application to render guided tutorials while loading complex RDF data.

## Physical Folder Structure and Naming Conventions

All domain starter templates reside within the **`catalogue/official/`** directory at the repository root. The runtime discovers templates using a glob pattern that looks for folders matching the `*-step-*` convention.

Each domain step lives in its own folder following the pattern `<domain-prefix>-step-<N>/`:

- **Retail**: `iq-lab-retail-step-1/` through `iq-lab-retail-step-6/`
- **Healthcare**: `healthcare-step-1/` through `healthcare-step-3/`
- **Finance**: `finance-step-1/` through `finance-step-3/`

This naming convention allows the application to programmatically identify all available steps for a given domain by scanning for directories that match the domain prefix and step number pattern.

## Metadata and Ontology File Components

Every step folder contains exactly two critical files that work together to provide the complete learning experience.

### The metadata.json Configuration

The **[`metadata.json`](https://github.com/microsoft/Ontology-Playground/blob/main/metadata.json)** file supplies the UI with human-readable information required to render the starter template selector. This JSON structure includes the template name, short description, emoji icon, tags, and author attribution.

For example, Retail Step 1 stores its metadata at [`catalogue/official/iq-lab-retail-step-1/metadata.json`](https://github.com/microsoft/Ontology-Playground/blob/main/catalogue/official/iq-lab-retail-step-1/metadata.json), which contains the display title "Retail Supply Chain — Step 1: Core Commerce" alongside visual and descriptive elements.

### The RDF Ontology Definitions

The companion **`{domain-prefix}-step-{N}.rdf`** file contains the actual OWL triples that model domain concepts for that specific learning step. These files define classes, properties, and relationships using standard RDF/XML syntax.

The complete Retail Step 1 ontology is located at `catalogue/official/iq-lab-retail-step-1/iq-lab-retail-step-1.rdf`, while Healthcare Step 2 uses `catalogue/official/healthcare-step-2/healthcare-step-2.rdf`.

## Step-by-Step Progression by Domain

Each domain template breaks complex ontology modeling into digestible increments, with the UI presenting steps sequentially to build conceptual understanding gradually.

### Retail Supply Chain (6 Steps)

The Retail domain uses the prefix `iq-lab-retail` and provides six progressive steps:

```

catalogue/official/
├── iq-lab-retail-step-1/
│   ├── metadata.json
│   └── iq-lab-retail-step-1.rdf
├── iq-lab-retail-step-2/
│   ├── metadata.json
│   └── iq-lab-retail-step-2.rdf
...
└── iq-lab-retail-step-6/
    ├── metadata.json
    └── iq-lab-retail-step-6.rdf

```

The sequence moves from Core Commerce concepts through Order Details, Categories, and eventually completes with a comprehensive supply chain model.

### Healthcare (3 Steps)

The Healthcare template follows the same structure with three focused steps covering Patients & Appointments, Clinical Encounters, and Billing & Claims:

```

catalogue/official/
├── healthcare-step-1/
│   ├── metadata.json
│   └── healthcare-step-1.rdf
├── healthcare-step-2/
│   ├── metadata.json
│   └── healthcare-step-2.rdf
└── healthcare-step-3/
    ├── metadata.json
    └── healthcare-step-3.rdf

```

### Finance and Banking (3 Steps)

The Finance domain uses the prefix `finance` to deliver three steps covering Customer & Accounts, Transactions, and Loans & Products:

```

catalogue/official/
├── finance-step-1/
│   ├── metadata.json
│   └── finance-step-1.rdf
├── finance-step-2/
│   ├── metadata.json
│   └── finance-step-2.rdf
└── finance-step-3/
    ├── metadata.json
    └── finance-step-3.rdf

```

Additionally, each domain includes a **top-level descriptor** (e.g., [`catalogue/official/finance/metadata.json`](https://github.com/microsoft/Ontology-Playground/blob/main/catalogue/official/finance/metadata.json) and `catalogue/official/finance/finance.rdf`) that provides a high-level overview of the entire domain once users complete individual steps.

## Loading Templates Programmatically

The application consumes these templates through a standardized loader that leverages the consistent file naming conventions. The loader implementation in [`src/lib/catalogue.ts`](https://github.com/microsoft/Ontology-Playground/blob/main/src/lib/catalogue.ts) demonstrates how the runtime resolves domain prefixes to physical file paths.

```typescript
// src/lib/catalogue.ts – simplified loader
import { readFileSync } from 'fs';
import { parse as parseRdf } from 'rdf-parse';

export async function loadStarterStep(domain: string, step: number) {
  const base = `catalogue/official/${domain}-step-${step}`;
  const meta = JSON.parse(
    readFileSync(`${base}/metadata.json`, 'utf-8')
  );
  const rdfText = readFileSync(`${base}/${domain}-step-${step}.rdf`, 'utf-8');
  const ontology = await parseRdf(rdfText, { contentType: 'application/rdf+xml' });
  return { meta, ontology };
}

```

Usage remains identical across all three domains due to the uniform naming scheme:

```typescript
// Load Retail Step 1
const { meta, ontology } = await loadStarterStep('iq-lab-retail', 1);
console.log(meta.name); // "Retail Supply Chain — Step 1: Core Commerce"
renderGraph(ontology);  // Visualizes the RDF model

```

## Summary

- **Location**: All domain starter templates reside under `catalogue/official/` with subfolders following the `<domain-prefix>-step-<N>/` naming convention.
- **File Structure**: Each step contains exactly two files: [`metadata.json`](https://github.com/microsoft/Ontology-Playground/blob/main/metadata.json) for UI metadata and `{domain-prefix}-step-{N}.rdf` for OWL ontology definitions.
- **Domain Variations**: Retail provides 6 steps (`iq-lab-retail`), while Healthcare and Finance each provide 3 steps using their respective domain prefixes.
- **Programmatic Access**: The consistent naming pattern enables dynamic loading via glob patterns and template string resolution in the catalogue loader.
- **Overview Files**: Top-level descriptors exist at `catalogue/official/{domain}/` to summarize complete domain models beyond individual steps.

## Frequently Asked Questions

### Where are the domain starter templates located in the repository?

The domain starter templates are stored in the `catalogue/official/` directory at the repository root. Each template follows a strict subfolder naming convention where Retail uses the prefix `iq-lab-retail`, Healthcare uses `healthcare`, and Finance uses `finance`, followed by `-step-{N}` to indicate the sequential learning progression.

### How does the UI know what to display for each template step?

The UI reads the **[`metadata.json`](https://github.com/microsoft/Ontology-Playground/blob/main/metadata.json)** file located inside each step folder. This JSON file contains the display name, description, emoji icon, tags, and author information that the Ontology Playground renders in the starter template selector interface.

### What is the difference between the step folders and the domain overview files?

Step folders (e.g., `finance-step-1/`) contain incremental learning modules with specific RDF ontologies for that lesson stage, while domain overview files located at `catalogue/official/{domain}/` (such as [`finance/metadata.json`](https://github.com/microsoft/Ontology-Playground/blob/main/finance/metadata.json) and `finance/finance.rdf`) provide a high-level summary of the complete domain model that represents the final state after completing all steps.

### How many steps are included in each domain starter template?

The **Retail** domain starter template includes **6 steps**, covering progressive supply chain complexity from core commerce to complete modeling. Both the **Healthcare** and **Finance** domain starter templates include **3 steps** each, focusing on patient encounters and banking transactions respectively.