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

@duabalabs/workflow-builder-server

v1.0.0

Published

Parse Server plugin for workflow execution engine with built-in DPS and PMO node packs

Readme

@duabalabs/workflow-builder-server

Parse Server plugin providing a complete workflow execution engine with built-in node packs for web deployment (DPS) and physical project management (PMO).

Features

  • Workflow Engine: Execute sync, async, and human-in-the-loop tasks
  • Node Registry: Extensible node type system with JSON/YAML definitions
  • Validation: Schema-based validation with business rules enforcement
  • Built-in Node Packs:
    • Shared: Common logic (if/else), HTTP requests, notifications
    • DPS: Web deployment automation (repo checkout, build, deploy, DNS, monitoring)
    • PMO: Physical project workflows (land registration, farm management, logistics)
  • Templates: Pre-built workflows for common use cases
  • Parse Integration: Cloud Functions, ACLs, Parse Classes

Installation

npm install @duabalabs/workflow-builder-server
# or
pnpm add @duabalabs/workflow-builder-server

Quick Start

Basic Setup

// In your Parse Server cloud/main.js
import { initialize } from '@duabalabs/workflow-builder-server';

// Initialize with default options
await initialize(Parse, {
  initSchema: true,        // Create Parse classes
  loadDefaultPacks: true   // Load shared, DPS, PMO packs
});

Manual Setup

import {
  registerWorkflowFunctions,
  initializeSchema,
  loadPacks
} from '@duabalabs/workflow-builder-server';
import { sharedPack } from '@duabalabs/workflow-builder-server/packs/shared';
import { dpsPack } from '@duabalabs/workflow-builder-server/packs/dps';
import { pmoPack } from '@duabalabs/workflow-builder-server/packs/pmo';

// Register Cloud Functions
registerWorkflowFunctions(Parse);

// Initialize Parse schema
await initializeSchema(Parse);

// Load node packs
await loadPacks([sharedPack, dpsPack, pmoPack]);

Cloud Functions

Version Check

const { version } = await Parse.Cloud.run('version');

Node Registry

// List node definitions
const defs = await Parse.Cloud.run('listNodeDefs', {
  scope: 'dps',  // optional: 'shared', 'dps', 'pmo'
  category: 'action'  // optional
});

// List node packs
const packs = await Parse.Cloud.run('listNodePacks');

Workflow CRUD

// Create workflow
const { workflowId } = await Parse.Cloud.run('createWorkflow', {
  projectId: 'proj_123',
  workflow: {
    meta: { name: 'My Workflow', version: '1.0.0' },
    graph: {
      nodes: [
        { id: 'n1', type: 'repo.checkout', data: { repoUrl: '...' } }
      ],
      edges: []
    },
    rules: {}
  }
});

// Update workflow
await Parse.Cloud.run('updateWorkflow', {
  workflowId,
  patch: { meta: { name: 'Updated Name' } }
});

// Validate workflow
const validation = await Parse.Cloud.run('validateWorkflow', {
  workflowId
});

Execution

// Execute workflow
const { runId } = await Parse.Cloud.run('execute', {
  workflowId,
  inputs: { environment: 'production' }
});

// Check status
const { run, tasks } = await Parse.Cloud.run('runStatus', { runId });

// Cancel run
await Parse.Cloud.run('cancelRun', { runId });

// List runs
const runs = await Parse.Cloud.run('listRuns', {
  workflowId,
  status: 'completed',
  limit: 50
});

Templates

// List templates
const templates = await Parse.Cloud.run('listTemplates', {
  scope: 'dps'
});

// Instantiate template
const workflow = await Parse.Cloud.run('instantiateTemplate', {
  projectId: 'proj_123',
  templateKey: 'dps.web-deploy',
  parameters: { siteName: 'my-site' }
});

Secrets

// Store secret
await Parse.Cloud.run('putSecret', {
  projectId: 'proj_123',
  key: 'NETLIFY_TOKEN',
  value: 'secret_value_here',
  scope: 'project'
});

// Get secret metadata (never returns plaintext)
const secrets = await Parse.Cloud.run('getSecretMeta', {
  projectId: 'proj_123'
});

Human Tasks

// Submit human task
await Parse.Cloud.run('submitHumanTask', {
  taskId: 'task_123',
  formData: {
    officerName: 'John Doe',
    date: '2024-01-15'
  },
  artifactIds: ['artifact_123']
});

Node Packs

Shared Pack

  • logic.ifElse: Conditional branching
  • data.http: HTTP requests

DPS Pack (Digital Platform Services)

  • repo.checkout: Clone Git repository
  • build.react: Build React application
  • deploy.netlify: Deploy to Netlify

PMO Pack (Project Management Office)

  • land.titleSearch: Land title search (human task)
  • land.deedRegistration: Deed registration (human task)

Creating Custom Nodes

import { NodeDefinition, NodeHandler, ExecutionContext } from '@duabalabs/workflow-builder-server';

// Define node
const myNodeDef: NodeDefinition = {
  defId: 'custom.myNode',
  name: 'My Custom Node',
  category: 'action',
  version: '1.0.0',
  scope: 'shared',
  inputs: [
    { key: 'input1', type: 'string', required: true }
  ],
  outputs: [
    { key: 'result', type: 'string' }
  ],
  execution: {
    type: 'async',
    handlerKey: 'custom.myNode',
    timeoutSec: 60
  }
};

// Implement handler
const myNodeHandler: NodeHandler = async (ctx: ExecutionContext) => {
  const input = ctx.inputs.input1;
  
  ctx.logger.info('Processing', { input });
  
  // Your logic here
  const result = `Processed: ${input}`;
  
  return {
    success: true,
    outputs: { result }
  };
};

// Create custom pack
const customPack = {
  name: 'custom',
  version: '1.0.0',
  scope: 'shared',
  definitions: [myNodeDef],
  handlers: {
    'custom.myNode': myNodeHandler
  }
};

// Load pack
await loadPacks([customPack]);

Templates

DPS Web Deploy Template

name: Deploy Web Application
scope: dps
graph:
  nodes:
    - id: n1
      type: repo.checkout
      data: { repoUrl: "..." }
    - id: n2
      type: build.react
      data: { nodeVersion: "18" }
    - id: n3
      type: deploy.netlify
      data: { token: "${NETLIFY_TOKEN}" }
  edges:
    - { source: n1, target: n2 }
    - { source: n2, target: n3 }

PMO Farm Project Template

name: Farm Establishment Project
scope: pmo
graph:
  nodes:
    - id: n1
      type: land.titleSearch
      data: { slaDays: 7 }
    - id: n2
      type: land.deedRegistration
      data: { registrarOffice: "Regional Office" }
  edges:
    - { source: n1, target: n2 }

Environment Variables

Create a .env file:

# Logging
LOG_LEVEL=info

# Redis (for BullMQ)
REDIS_URL=redis://localhost:6379

# Node environment
NODE_ENV=production

Testing

pnpm test

License

MIT