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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@burgan-tech/morph-idm-runtime

v0.0.1

Published

Morph IDM Domain - Runtime Package for engine deployment

Readme

morph-idm

A structured template package for vNext workflow components with domain-based architecture. This package provides a foundation for building scalable workflow systems with schemas, tasks, views, functions, and extensions.

npm version License: MIT

🚀 Features

  • Domain-Driven Architecture: Organized by business domains with clear separation of concerns
  • Component-Based Structure: Modular design with schemas, workflows, tasks, views, functions, and extensions
  • JSON Schema Validation: Built-in validation for all component definitions
  • Template System: Ready-to-use template structure for new vNext projects
  • Type Safety: Structured exports with clear APIs for accessing components

📦 Installation

Install as dependency

npm install @my-organization/morph-idm

Install as dev dependency

npm install --save-dev @my-organization/morph-idm

🏗️ Project Structure

vnext-template/
├── morph-idm/              # Domain-specific components
│   ├── Extensions/            # Extension definitions
│   ├── Functions/             # Function definitions
│   ├── Schemas/              # JSON schema definitions
│   ├── Tasks/                # Task definitions
│   ├── Views/                # View components
│   └── Workflows/            # Workflow definitions
├── index.js                  # Main entry point
├── vnext.config.json         # Domain configuration
└── package.json              # Package metadata

📚 Usage

Basic Usage

const vnextTemplate = require('@my-organization/morph-idm');

// Get domain configuration
const config = vnextTemplate.getDomainConfig();
console.log('Domain config:', config);

// Get all available component types
const availableTypes = vnextTemplate.getAvailableTypes();
console.log('Available types:', availableTypes);
// Output: ['schemas', 'workflows', 'tasks', 'views', 'functions', 'extensions']

// Get domain name
const domainName = vnextTemplate.getDomainName();
console.log('Domain name:', domainName);

Component Access

// Load specific component types
const schemas = vnextTemplate.getSchemas();
const workflows = vnextTemplate.getWorkflows();
const tasks = vnextTemplate.getTasks();
const views = vnextTemplate.getViews();
const functions = vnextTemplate.getFunctions();
const extensions = vnextTemplate.getExtensions();

// Example: Working with schemas
Object.keys(schemas).forEach(schemaName => {
  console.log(`Schema: ${schemaName}`, schemas[schemaName]);
});

// Example: Working with workflows
Object.keys(workflows).forEach(workflowName => {
  console.log(`Workflow: ${workflowName}`, workflows[workflowName]);
});

Integration Example

const vnext = require('my-organization/morph-idm');

class WorkflowManager {
  constructor() {
    this.config = vnext.getDomainConfig();
    this.schemas = vnext.getSchemas();
    this.workflows = vnext.getWorkflows();
  }
  
  validateWorkflow(workflowData) {
    // Use loaded schemas for validation
    // Implementation depends on your validation library
  }
  
  executeWorkflow(workflowName) {
    const workflow = this.workflows[workflowName];
    if (!workflow) {
      throw new Error(`Workflow ${workflowName} not found`);
    }
    // Execute workflow logic
  }
}

const manager = new WorkflowManager();

🔧 API Reference

getDomainConfig()

Returns the domain configuration from vnext.config.json.

Returns: Object | null - The configuration object or null if not found

getSchemas()

Loads all JSON schema files from the Schemas directory.

Returns: Object - Key-value pairs of schema names and definitions

getWorkflows()

Loads all workflow definitions from the Workflows directory.

Returns: Object - Key-value pairs of workflow names and definitions

getTasks()

Loads all task definitions from the Tasks directory.

Returns: Object - Key-value pairs of task names and definitions

getViews()

Loads all view definitions from the Views directory.

Returns: Object - Key-value pairs of view names and definitions

getFunctions()

Loads all function definitions from the Functions directory.

Returns: Object - Key-value pairs of function names and definitions

getExtensions()

Loads all extension definitions from the Extensions directory.

Returns: Object - Key-value pairs of extension names and definitions

getAvailableTypes()

Returns an array of available component types.

Returns: Array<string> - Available component types

getDomainName()

Returns the name of the domain directory.

Returns: string | null - Domain directory name or null if not found

🏛️ Architecture Principles

Domain-Driven Design

  • Each domain is represented as a separate directory
  • Components are organized by type within domains
  • Clear separation between different workflow concerns

Component Types

  1. Schemas: JSON Schema definitions for data validation
  2. Workflows: Business process definitions and state machines
  3. Tasks: Individual task definitions and configurations
  4. Views: User interface and presentation components
  5. Functions: Reusable business logic functions
  6. Extensions: Plugin and extension definitions

Example: user-registration.1.0.0.json

🛠️ Development

Running Tests

npm test

Validation

npm run validate

📋 Schema Validation Rules

The template follows strict schema validation rules:

Instance Base Properties

  • Schema instances MUST include: key, version, domain, flow, flowVersion
  • Schema instances MUST NOT include: labels (labels belong to business logic)
  • Optional fields: id, eTag (added by platform in production)

Reference Pattern

  • References use: domain + workflow + (id OR key) + optional version
  • NO type property in references - workflow field serves as type
  • Always use local file references: reference.json#/attributes

Standard Lifecycle Pattern

All lifecycle workflows must have:

  • draft (type: "start") - Initial state
  • active (type: "normal") - Active state
  • passive (type: "finish") - Final state

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🏢 About Burgan Tech

This package is maintained by the Burgan Tech team as part of our commitment to building scalable, domain-driven workflow solutions.

🔗 Links

📞 Support

For support and questions:


Made with ❤️ by the Burgan Tech team