Skip to main content

Catalogs and Repositories

Overview

OctoMesh distinguishes between Catalogs and Repositories for managing Construction Kit Model Libraries:

  • Catalog: A file-based storage system that provides various Construction Kit Model Libraries in multiple versions. Catalogs serve as the source from which libraries can be imported.
  • Repository: A database-stored (e.g., MongoDB) collection of Construction Kit Model Libraries that work together. A repository contains exactly one version of each library, and all libraries must be logically compatible with each other.

Catalogs

Catalogs are file-based storage systems that centrally provide Construction Kit Model Libraries for OctoMesh. They can contain multiple versions of the same library, allowing you to choose which version to import into a repository.

Catalog Types

File System Catalog

Local directory structure containing Construction Kit library definitions. Suitable for development environments or on-premise deployments.

Default paths:

  • Windows: %USERPROFILE%\.octo-ck-models
  • macOS: ~/octo-ck-models
  • Linux: ~/.octo-ck-models

Git Catalog

GitHub or other Git-based sources for version-controlled, distributed access to Construction Kit libraries. Enables collaboration and change tracking across teams.

By default, the meshmakers Git catalog is configured, available at meshmakers.github.io.

System Libraries

Core Construction Kit libraries are compiled directly into OctoMesh services' source code. These system libraries are automatically available without external catalog configuration and provide fundamental data types and patterns required by the platform.

Catalog Structure

Construction Kit libraries are stored in validated form within catalogs. The validated form contains all types, attributes, records, enums, and associations. Catalogs can hold multiple versions of the same library (e.g., Industry.Energy-1.0.0, Industry.Energy-1.1.0, Industry.Energy-2.0.0).

Dependency Resolution

Catalogs are searched to resolve dependencies when importing libraries. The search order is:

  1. Embedded System Construction Kits - Built-in libraries compiled into OctoMesh services
  2. Local File System Catalog - User-specific or project-specific libraries
  3. GitHub Catalog - Shared libraries from the configured Git source

Managing Catalogs with octo-ckc

The octo-ckc tool provides commands for working with catalogs:

List Available Catalogs

octo-ckc -c GetCatalogs

Lists all known Construction Kit catalogs with their names and descriptions.

Publish to Catalog

octo-ckc -c Publish -f <file> [-c <catalog>] [-r]
ParameterDescription
-f, --filePath of the compiled construction kit model file (required)
-c, --catalogName of the catalog (default: LocalFileSystemCatalog)
-r, --replaceReplace existing model if it already exists

Get Model from Catalog

octo-ckc -c Get -c <catalog> -n <name> [-f <file>]
ParameterDescription
-c, --catalogName of the catalog (required)
-n, --nameName of the construction kit model to retrieve (required)
-f, --fileOptional output file path to store the model

Find Model in Catalogs

octo-ckc -c Find -id <modelId>
ParameterDescription
-id, --modelIdModel ID to find, including version ranges (required)

Searches all known catalogs for the specified model.

Restore Dependencies

octo-ckc -c Restore -f <file> -o <outputPath> [-c <cache>]
ParameterDescription
-f, --filePath of the model configuration file (required)
-o, --outputPathOutput path for compiled construction kits (required)
-c, --cacheOptional cache file path for dependent models

Restores all construction kit dependencies based on a model configuration file.

Refresh Catalog Cache

octo-ckc -c RefreshCatalogCache [-c <catalog>]
ParameterDescription
-c, --catalogName of the catalog (default: LocalFileSystemCatalog)

Refreshes the cache for a specific catalog by reloading from disk or fetching from remote sources.

octo-ckc -c RefreshAllCatalogCaches

Refreshes the cache for all known catalogs.

Repositories

A Repository is a coherent set of Construction Kit Model Libraries stored in a database (such as MongoDB). Unlike catalogs, repositories enforce strict version compatibility:

  • Single Version Rule: A repository contains exactly one version of each Model Library
  • Version Compatibility: All libraries in a repository must be logically compatible with each other
  • Dependency Consistency: Library dependencies must be satisfied within the same repository

Repository Characteristics

AspectDescription
StorageDatabase (e.g., MongoDB)
Versions per LibraryExactly one
CompatibilityAll libraries must work together
PurposeRuntime data model for OctoMesh instances

Importing Libraries

When importing a Construction Kit Model Library from a catalog into a repository:

  1. The system checks if the library's dependencies are satisfied
  2. Version compatibility with existing libraries is verified
  3. If a different version of the library already exists, it must be upgraded or the import fails
  4. All dependent libraries must have compatible versions

Example

A repository might contain:

Repository "production"
├── System-1.0.3
├── Basic-1.0.0 (depends on System-1.0.3)
├── Industry.Energy-1.0.0 (depends on Basic-1.0.0)
└── EnergyCommunity-1.0.0 (depends on Industry.Energy-1.0.0, Basic-1.0.0)

All libraries form a coherent set where dependencies are satisfied and versions are compatible.

Comparison

AspectCatalogRepository
StorageFile system or GitHubDatabase (e.g., MongoDB)
Multiple versionsYesNo (one per library)
PurposeLibrary distributionRuntime data model
Version constraintsNoneStrict compatibility
DependenciesCan be unresolvedMust be fully resolved