npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mod-construction/mod-dlm

v1.0.7

Published

mod-dlm is an open source project designed to create a 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 automaticall

Downloads

40

Readme

Open source domain specific language to describe prefab construction elements.

build status build status npm version License

mod-dlm

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.

You can always find the most up-to-date API documentation here: https://mod-construction.github.io/mod-dlm/

Table of Contents

Features

  • Domain-Specific Language: Define prefab elements with a custom DSL tailored for the AEC industry.
  • Automatic CRUD API Generation: Generate RESTful APIs for managing prefab elements.
  • Multi-language Support: Define entities once and generate code in multiple languages including TypeScript, Python, Java, and Go.
  • 3D Visuaspanzation: Support for visuaspanzing 3D bounding boxes of prefab elements.
  • Comprehensive Metadata: Include critical attributes such as material composition, dimensions, weight, thermal properties, and more.
  • Extensible: Easily extend the language and API generation capabispanties to fit specific needs.

Getting Started

Prerequisites

  • Node.js
  • Typescript (recommended)

Installation

npm install @mod-construction/mod-dlm@latest -D

Usage

You can use mod-dlm in different scenarios.

1. Defining a New Element :

import { PrefabElementSchema, type PrefabElement } from '@mod-construction/mod-dlm';

const newElement: PrefabElement = {
   id: 'element-001',
   name: 'Eco-friendly Wall Panel',
   description: 'An eco-friendly wall panel with superior insulation and sustainability features.',
   boundingBox: {
      width: 2500,
      height: 3000,
      depth: 150,
   },
   images: [
      'https://example.com/images/wall-panel-front.jpg',
      'https://example.com/images/wall-panel-side.jpg'
   ],
   buildingSystem: 'Wall',
   productCategory: 'Solid Wall Panels',
   material: {
      finishMaterial: 'Timber',
      structuralMaterial: 'Timber',
   },
   dimensional: {
      width: {
         min: 2400,
         max: 2600,
      },
      height: {
         min: 2900,
         max: 3100,
      },
      length: {
         min: 140,
         max: 160,
      },
   },
   performance: {
      resistanceToFireClassification: 'B1',
      thermalTransmittance: 0.30,
      airborneSoundInsulation: 50,
   },
   sustainability: {
      countryOfManufacturing: 'Sweden',
      classification: 'A',
   },
   documentationAndCompliance: {
      technicalSpecifications: 'https://example.com/docs/wall-panel-specs.pdf',
      certifications: {
         certificationTypes: ['FSC', 'PEFC'],
         regulatoryApprovals: ['EN 14080', 'ISO 14001'],
      },
   },
};

// You can use this object to interact with other parts of your application or library
console.log('New element defined:', newElement);

2. Validating an Element Using Zod and PrefabElementSchema:

import { z } from 'zod';
import { PrefabElementSchema } from '@mod-construction/mod-dlm';

// Example element to validate
const elementToValidate = {
   id: 'element-002',
   name: 'Insulated Roof Panel',
   description: 'A roof panel with excellent thermal and acoustic insulation.',
   boundingBox: {
      width: 3200,
      height: 4000,
      depth: 180,
   },
   images: [
      'https://example.com/images/roof-panel-front.jpg',
      'https://example.com/images/roof-panel-side.jpg'
   ],
   buildingSystem: 'Roofs',
   productCategory: 'Roof Panel',
   material: {
      finishMaterial: 'Steel',
      structuralMaterial: 'Steel',
   },
   dimensional: {
      width: {
         min: 3100,
         max: 3300,
      },
      height: {
         min: 3900,
         max: 4100,
      },
      length: {
         min: 170,
         max: 190,
      },
   },
   performance: {
      resistanceToFireClassification: 'A2',
      thermalTransmittance: 0.20,
      airborneSoundInsulation: 55,
   },
   sustainability: {
      countryOfManufacturing: 'Germany',
      classification: 'A+',
   },
   documentationAndCompliance: {
      technicalSpecifications: 'https://example.com/docs/roof-panel-specs.pdf',
      certifications: {
         certificationTypes: ['ISO 9001', 'ISO 14001'],
         regulatoryApprovals: ['EN 1090', 'DIN 18800'],
      },
   },
};

// Validate the element using the PrefabElementSchema
const validation = PrefabElementSchema.safeParse(elementToValidate);

if (validation.success) {
   console.log('Element is valid:', validation.data);
} else {
   console.error('Element validation failed:', validation.error);
}

Contributing

We appreciate feedback and contribution to this project! Before you get started, please see the following:

License

MIT