{"id":46328049,"url":"https://github.com/mod-construction/mod-dlm","last_synced_at":"2026-03-04T17:01:00.590Z","repository":{"id":243684792,"uuid":"813134666","full_name":"mod-construction/mod-dlm","owner":"mod-construction","description":"mod-dlm is an open source project designed to create a domain-specific language (DSL) for describing prefab elements in the AEC industry.","archived":false,"fork":false,"pushed_at":"2026-03-02T09:48:54.000Z","size":845,"stargazers_count":16,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-02T13:35:19.372Z","etag":null,"topics":["aec","modular-construction","open-source","prefab"],"latest_commit_sha":null,"homepage":"https://mod-construction.github.io/mod-dlm/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mod-construction.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-10T14:38:52.000Z","updated_at":"2025-11-20T22:53:37.000Z","dependencies_parsed_at":"2024-06-17T10:49:57.213Z","dependency_job_id":"5a66ec25-b463-44c9-8ea2-30601ced7d85","html_url":"https://github.com/mod-construction/mod-dlm","commit_stats":null,"previous_names":["mod-construction/mod-dlm"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/mod-construction/mod-dlm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mod-construction%2Fmod-dlm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mod-construction%2Fmod-dlm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mod-construction%2Fmod-dlm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mod-construction%2Fmod-dlm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mod-construction","download_url":"https://codeload.github.com/mod-construction/mod-dlm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mod-construction%2Fmod-dlm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30086511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aec","modular-construction","open-source","prefab"],"created_at":"2026-03-04T17:00:31.228Z","updated_at":"2026-03-04T17:01:00.534Z","avatar_url":"https://github.com/mod-construction.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mod-dlm\n\n\u003c!-- markdownlint-disable MD033 --\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://mod.construction/\" target=\"_blank\"\u003e\n\u003cimg src=\"assets/mod-dlm-title.png\" alt=\"mod-dlm-logo\"/\u003e\n  \u003c/a\u003e\n\nOpen source domain specific language to describe prefab construction elements.\n\n\u003cbr/\u003e\n\n[![build status](https://github.com/mod-construction/mod-dlm/actions/workflows/apidoc.yml/badge.svg)](https://github.com/mod-construction/mod-dlm/actions/workflows/apidoc.yml)\n[![build status](https://github.com/mod-construction/mod-dlm/actions/workflows/publish.yml/badge.svg)](https://github.com/mod-construction/mod-dlm/actions/workflows/publish.yml)\n[![npm version](https://img.shields.io/npm/v/@mod-construction/mod-dlm/latest)](https://www.npmjs.com/package/@mod-construction/mod-dlm)\n[![PyPI version](https://img.shields.io/pypi/v/mod-dlm-server)](https://pypi.org/project/mod-dlm-server/)\n[![License](https://img.shields.io/github/license/mod-construction/mod-dlm)](https://opensource.org/licenses/MIT)\n\n\n\u003cbr/\u003e\n  \u003ca href=\"https://mod-construction.github.io/mod-dlm/\"\u003eAPI Documentation\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@mod-construction/mod-dlm\"\u003enpm\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://pypi.org/project/mod-dlm-server/\"\u003eFastAPI Server\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://github.com/mod-construction/mod-dlm/issues/new\"\u003eIssues\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://mod.construction\"\u003emod.construction\u003c/a\u003e\n  \u003cbr /\u003e\n\n\u003c/div\u003e\n\n**mod-dlm** is an open-source domain-specific language (DSL) for describing prefab elements in the Architecture, Engineering, and Construction (AEC) industry. This project provides tools for defining entity models and automatically generating CRUD APIs, enabling suppliers to create and manage catalogs of their products easily.\n\nYou can always find the most up-to-date [API documentation here](https://mod-construction.github.io/mod-dlm/).\n\n## Table of Contents\n\n- [Data Model](#data-model)\n- [Getting Started](#getting-started)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Hello Prefab Project](#hello-prefab-project)\n- [Features](#features)\n- [Contributing](#contributing)\n\n## Features\n\n- **Domain-Specific Language**: Define prefab elements with a custom DSL tailored for the AEC industry.\n- **Automatic CRUD API Generation**: Generate RESTful APIs for managing prefab elements.\n- **Multi-language Support**: Define entities once and generate code in multiple languages including TypeScript, Python, Java, and Go.\n- **3D Visuaspanzation**: Support for visuaspanzing 3D bounding boxes of prefab elements.\n- **Comprehensive Metadata**: Include critical attributes such as material composition, dimensions, weight, thermal properties, and more.\n- **Extensible**: Easily extend the language and API generation capabispanties to fit specific needs.\n\n## Data Model\n\n\u003e **Note on Units**: All units decsribing the geometry of prefab elements are expressed in **millimeters (mm)** unless otherwise specified.\n\n```mermaid\nerDiagram\n    PrefabElement {\n        UUID id\n        string name\n        string description\n        string[] images\n        string ifcType\n        string bimModelUrl\n    }\n\n    PrefabElement ||--|| VersionMetadata : has\n    VersionMetadata {\n        string version\n        string status\n        date lastUpdated\n    }\n\n    PrefabElement ||--|| BoundingBox : has\n    BoundingBox {\n        float width\n        float height\n        float depth\n    }\n\n    PrefabElement ||--|| ProductCategory : has\n    ProductCategory {\n        string category\n        string buildingSystem\n    }\n\n    PrefabElement ||--|| Material : has\n    Material {\n        string finishMaterial\n        string structuralMaterial\n    }\n\n    PrefabElement ||--|| Dimensional : has\n    Dimensional {\n        Range width\n        Range height\n        Range length\n    }\n\n    Dimensional ||--|| Range : uses\n    Range {\n        float min\n        float max\n    }\n\n    PrefabElement ||--|| StructuralProperties : has\n    StructuralProperties {\n        float safetyFactor\n    }\n\n    StructuralProperties ||--|| LoadBearingCapacity : has\n    LoadBearingCapacity {\n        float maximumLoad\n        string forceUnit\n        string loadDistribution\n        string testStandard\n    }\n\n    PrefabElement ||--|| Performance : has\n    Performance {\n        float thermalTransmittance\n        float airTightness\n        float vaporPermeability\n    }\n\n    Performance ||--|| FireResistance : has\n    FireResistance {\n        string reactionToFireClassification\n        string fireResistanceDuration\n    }\n\n    Performance ||--|| AcousticProperties : has\n    AcousticProperties {\n        float weightedSoundReductionIndex\n        float spectrumAdaptationTerm\n    }\n\n    PrefabElement ||--|| Sustainability : has\n    Sustainability {\n    }\n\n    Sustainability ||--|| EnvironmentalImpact : has\n    EnvironmentalImpact {\n        string classification\n        string VOCEmissions\n        float recyclability\n        string energyEfficiency\n    }\n\n    Sustainability ||--|| Circularity : has\n    Circularity {\n        string disassemblyRating\n        string reusePotential\n        string refurbishmentScope\n        string circularityCertification\n    }\n\n    Sustainability ||--|| Origin : has\n    Origin {\n        string countryOfManufacturing\n    }\n\n    PrefabElement ||--|| DocumentationCompliance : has\n    DocumentationCompliance {\n        string technicalSpecifications\n    }\n\n    DocumentationCompliance ||--|| Certifications : has\n    Certifications {\n        string[] certificationTypes\n        string[] regulatoryApprovals\n    }\n\n    PrefabElement ||--|| InstallationConnectivity : has\n    InstallationConnectivity {\n        string connectionType\n        int installationTime\n        string compatibility\n    }\n\n    PrefabElement ||--|| LifecycleMaintenance : has\n    LifecycleMaintenance {\n        int expectedLifespan\n        string maintenanceRequirements\n        string warranty\n    }\n\n    PrefabElement ||--|| AestheticCustomization : has\n    AestheticCustomization {\n        string[] colorOptions\n        string texture\n        string modularAdaptability\n    }\n\n    PrefabElement ||--|| EconomicFactors : has\n    EconomicFactors {\n        float costPerUnit\n        string currency\n        int manufacturingLeadTime\n    }\n```\n\n## Getting Started\n\nFor a complete starter guide, see [Hello Prefab Project](#hello-prefab-project)\n\n### Prerequisites\n\nMake sure you have the following installed:\n\n- [Node.js](https://nodejs.org/) (version 16 or later)\n- npm (comes with Node.js)\n\n### Installation\n\n```bash\nnpm install @mod-construction/mod-dlm@latest -D\n```\n\n### Usage\n\nYou can use **mod-dlm** in different scenarios.\n\n### 1. Defining a New Element\n\n```typescript\nimport {\n  PrefabElement,\n  PrefabElementSchema,\n  IfcBuildingElementEnum,\n  ConnectionType,\n  CompatibilityEnum,\n  ReusePotentialEnum,\n  CircularityCertificationEnum,\n  VOCEmissions,\n  EnergyEfficiency,\n  FireResistanceDurationEnum,\n  ReactionToFireClassificationEnum\n} from '@mod-construction/mod-dlm';\n\nconst examplePrefabElement: PrefabElement = {\n  id: '8be9e7b3-de6c-4621-8751-3a1b12d71f94',\n  name: 'Insulated Concrete Wall Panel',\n  description: 'A high-performance insulated concrete wall panel suitable for residential and commercial buildings.',\n  boundingBox: {\n    width: 3000,\n    height: 6000,\n    depth: 200\n  },\n  images: [\n    'https://example.com/images/panel-front.jpg',\n    'https://example.com/images/panel-back.jpg'\n  ],\n  ifcType: IfcBuildingElementEnum.IfcWall,\n  bimModelUrl: 'https://example.com/bim-model.ifc',\n  productCategory: {\n    category: 'Insulated Concrete Panels',\n    buildingSystem: 'Wall'\n  },\n  material: {\n    finishMaterial: 'Concrete',\n    structuralMaterial: 'Concrete'\n  },\n  dimensional: {\n    width: { min: 1000, max: 4000 },\n    height: { min: 2000, max: 8000 },\n    length: { min: 100, max: 300 }\n  },\n  structuralProperties: {\n    safetyFactor: 1.2,\n    loadBearingCapacity: {\n      maximumLoad: 5000,\n      forceUnit: 'kN',\n      loadDistribution: 'Uniform',\n      testStandard: 'EN 1990'\n    }\n  },\n  performance: {\n    fireResistance: {\n      reactionToFireClassification: ReactionToFireClassificationEnum.A2,\n      fireResistanceDuration: FireResistanceDurationEnum.REI_60\n    },\n    thermalTransmittance: 0.25,\n    airTightness: 0.8,\n    vaporPermeability: 90,\n    acousticProperties: {\n      weightedSoundReductionIndex: 55,\n      spectrumAdaptationTerm: 2\n    }\n  },\n  sustainability: {\n    origin: {\n      countryOfManufacturing: 'DE'\n    },\n    environmentalImpact: {\n      classification: 'A',\n      VOCEmissions: VOCEmissions.Low,\n      recyclability: 75,\n      energyEfficiency: EnergyEfficiency.LEED_Gold\n    },\n    circularity: {\n      disassemblyRating: 'Moderate',\n      reusePotential: ReusePotentialEnum.High,\n      refurbishmentScope: 'Surface treatments only',\n      circularityCertification: CircularityCertificationEnum.CradleToCradleCertified\n    }\n  },\n  documentationAndCompliance: {\n    technicalSpecifications: 'https://example.com/specifications/panel-001.pdf',\n    certifications: {\n      certificationTypes: ['ISO 9001', 'CE Marking'],\n      regulatoryApprovals: ['EN 14992', 'DIN 4102']\n    }\n  },\n  installationAndConnectivity: {\n    connectionType: ConnectionType.BoltOn,\n    installationTime: 120,\n    compatibility: CompatibilityEnum.ConcreteStructure\n  },\n  lifecycleAndMaintenance: {\n    expectedLifespan: 50,\n    maintenanceRequirements: 'Periodic inspection every 5 years',\n    warranty: '10-year manufacturer warranty'\n  },\n  aestheticAndCustomizationOptions: {\n    colorOptions: ['Gray', 'White', 'Beige'],\n    texture: 'Smooth',\n    modularAdaptability: 'Compatible with modular building systems'\n  },\n  economicFactors: {\n    costPerUnit: 1500,\n    currency: 'EUR',\n    manufacturingLeadTime: 28\n  }\n};\n\n// Validate the element using the schema\nconst result = PrefabElementSchema.safeParse(examplePrefabElement);\nconsole.log(result.success ? '✅ Prefab element is valid' : result.error);\n```\n\n### 2. Validating an Element Using Zod and PrefabElementSchema\n\n```typescript\n// Validate the element using the schema\nconst result = PrefabElementSchema.safeParse(examplePrefabElement);\nconsole.log(result.success ? '✅ Prefab element is valid' : result.error);\n```\n\n## Hello Prefab Project\n\nThis is a short guide to get you up and running in no time, even if you are not familiar with setting up a typescript project.\n\nMake sure you have the following installed:\n\n- [Node.js](https://nodejs.org/) (version 16 or later)\n- npm (comes with Node.js)\n\n---\n\n## Steps\n\n### 1. Initialize a New Project\n\n1. Open your terminal and create a new directory for your project:\n\n   ```bash\n   mkdir mod-dlm-project\n   cd mod-dlm-project\n   ```\n\n2. Initialize a new Node.js project:\n\n    ```bash\n      npm init -y\n    ```\n\n### 2. Install Dependencies\n\n1. Install TypeScript and the required types.\n\n    ```bash\n    npm install typescript @types/node --save-dev\n    ```\n\n2. Initialize a `TypeScript` configuration file.\n\n    ```bash\n    npx tsc --init\n    ```\n\n3. To auto-restart your project when you make changes, install `nodemon`.\n\n    ```bash\n   npm install nodemon --save-dev\n    ```\n\n4. Install `mod-dlm`.\n\n    ```bash\n   npm install @mod-construction/mod-dlm@latest -D\n    ```\n\n### 3. Configure your project\n\nUpdate the scripts section in your package.json:\n\n```json\n\"scripts\": {\n    \"start\": \"tsc \u0026\u0026 node index.js\",\n    \"dev\": \"nodemon --watch src --ext ts --exec \\\"ts-node index.ts\\\"\"\n  },\n```\n\n### 4. Start coding\n\n1. Create an `index.ts` file in the root and paste the following code in it:\n\n```typescript\nimport {\n  PrefabElement,\n  PrefabElementSchema,\n  IfcBuildingElementEnum,\n  ConnectionType,\n  CompatibilityEnum,\n  ReusePotentialEnum,\n  CircularityCertificationEnum,\n  VOCEmissions,\n  EnergyEfficiency,\n  FireResistanceDurationEnum,\n  ReactionToFireClassificationEnum\n} from '@mod-construction/mod-dlm';\n\nconst examplePrefabElement: PrefabElement = {\n  id: '8be9e7b3-de6c-4621-8751-3a1b12d71f94',\n  name: 'Insulated Concrete Wall Panel',\n  description: 'A high-performance insulated concrete wall panel suitable for residential and commercial buildings.',\n  boundingBox: {\n    width: 3000,\n    height: 6000,\n    depth: 200\n  },\n  images: [\n    'https://example.com/images/panel-front.jpg',\n    'https://example.com/images/panel-back.jpg'\n  ],\n  ifcType: IfcBuildingElementEnum.IfcWall,\n  bimModelUrl: 'https://example.com/bim-model.ifc',\n  productCategory: {\n    category: 'Insulated Concrete Panels',\n    buildingSystem: 'Wall'\n  },\n  material: {\n    finishMaterial: 'Concrete',\n    structuralMaterial: 'Concrete'\n  },\n  dimensional: {\n    width: { min: 1000, max: 4000 },\n    height: { min: 2000, max: 8000 },\n    length: { min: 100, max: 300 }\n  },\n  structuralProperties: {\n    safetyFactor: 1.2,\n    loadBearingCapacity: {\n      maximumLoad: 5000,\n      forceUnit: 'kN',\n      loadDistribution: 'Uniform',\n      testStandard: 'EN 1990'\n    }\n  },\n  performance: {\n    fireResistance: {\n      reactionToFireClassification: ReactionToFireClassificationEnum.A2,\n      fireResistanceDuration: FireResistanceDurationEnum.REI_60\n    },\n    thermalTransmittance: 0.25,\n    airTightness: 0.8,\n    vaporPermeability: 90,\n    acousticProperties: {\n      weightedSoundReductionIndex: 55,\n      spectrumAdaptationTerm: 2\n    }\n  },\n  sustainability: {\n    origin: {\n      countryOfManufacturing: 'DE'\n    },\n    environmentalImpact: {\n      classification: 'A',\n      VOCEmissions: VOCEmissions.Low,\n      recyclability: 75,\n      energyEfficiency: EnergyEfficiency.LEED_Gold\n    },\n    circularity: {\n      disassemblyRating: 'Moderate',\n      reusePotential: ReusePotentialEnum.High,\n      refurbishmentScope: 'Surface treatments only',\n      circularityCertification: CircularityCertificationEnum.CradleToCradleCertified\n    }\n  },\n  documentationAndCompliance: {\n    technicalSpecifications: 'https://example.com/specifications/panel-001.pdf',\n    certifications: {\n      certificationTypes: ['ISO 9001', 'CE Marking'],\n      regulatoryApprovals: ['EN 14992', 'DIN 4102']\n    }\n  },\n  installationAndConnectivity: {\n    connectionType: ConnectionType.BoltOn,\n    installationTime: 120,\n    compatibility: CompatibilityEnum.ConcreteStructure\n  },\n  lifecycleAndMaintenance: {\n    expectedLifespan: 50,\n    maintenanceRequirements: 'Periodic inspection every 5 years',\n    warranty: '10-year manufacturer warranty'\n  },\n  aestheticAndCustomizationOptions: {\n    colorOptions: ['Gray', 'White', 'Beige'],\n    texture: 'Smooth',\n    modularAdaptability: 'Compatible with modular building systems'\n  },\n  economicFactors: {\n    costPerUnit: 1500,\n    currency: 'EUR',\n    manufacturingLeadTime: 28\n  }\n};\n\n// Validate the element using the schema\nconst result = PrefabElementSchema.safeParse(examplePrefabElement);\nconsole.log(result.success ? '✅ Prefab element is valid' : result.error);\n\n```\n\n### 5. Run your code\n\nTo tun your code, simply run the following command in your terminal:\n\n```bash\nnpm run dev\n```\n\n## Contributing\n\nWe appreciate feedback and contribution to this project! Before you get started, please see the following:\n\n- [Contribution guidelines](CONTRIBUTING.md)\n- [Code of conduct](CODE_OF_CONDUCT.md)\n\n### 🙌 Thanks to Our Contributors\n\nA huge thank you to all the amazing contributors who have helped make this project better. You can find the full [list of contributors here](CONTRIBUTORS.md).\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmod-construction%2Fmod-dlm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmod-construction%2Fmod-dlm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmod-construction%2Fmod-dlm/lists"}