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

workflow-visualizer-sdk

v1.0.0

Published

Production-ready React SDK for visualizing and controlling workflow executions

Readme

Workflow Visualizer SDK

Production-ready, embeddable React SDK for visualizing and controlling workflow executions. Designed for non-technical end users to monitor AI-driven pipelines and automated workflows.

Features

  • Next.js App Router Compatible - Works seamlessly with Next.js 14+ App Router
  • TypeScript First - Fully typed API with comprehensive type definitions
  • Timeline Visualization - Clear, vertical step-by-step progress display
  • Interactive Controls - Pause, resume, and re-run workflows
  • Editable Fields - In-place editing of workflow parameters
  • Expandable Steps - View detailed input/output for each step
  • Theming Support - Customize colors to match your brand
  • No Backend Dependencies - Frontend-only, callback-driven architecture

Installation

npm install @automove/workflow-visualizer

Quick Start

"use client";

import { WorkflowVisualizer } from "@automove/workflow-visualizer";
import type { WorkflowRun } from "@automove/workflow-visualizer";

export default function WorkflowPage() {
  const workflowData: WorkflowRun = {
    id: "wf-001",
    status: "running",
    currentStepId: "step-2",
    steps: [
      {
        id: "step-1",
        name: "Data Collection",
        status: "completed",
        input: { source: "api" },
        output: { records: 1500 },
        startedAt: "2026-01-20T10:00:00Z",
        finishedAt: "2026-01-20T10:02:30Z",
      },
      {
        id: "step-2",
        name: "AI Processing",
        status: "running",
        input: { model: "gpt-4" },
        editableFields: ["model"],
        startedAt: "2026-01-20T10:02:35Z",
      },
    ],
  };

  return (
    <WorkflowVisualizer
      workflowRun={workflowData}
      onPause={(runId) => console.log("Pause:", runId)}
      onResume={(runId) => console.log("Resume:", runId)}
      onRerunFrom={(stepId) => console.log("Rerun from:", stepId)}
      onFieldEdit={(stepId, field, value) => 
        console.log("Edit:", { stepId, field, value })
      }
    />
  );
}

Data Model

WorkflowRun

interface WorkflowRun {
  id: string;
  status: "pending" | "running" | "paused" | "completed" | "failed";
  currentStepId: string;
  steps: WorkflowStep[];
}

WorkflowStep

interface WorkflowStep {
  id: string;
  name: string;
  status: "pending" | "running" | "paused" | "completed" | "failed";
  input?: Record<string, any>;
  output?: Record<string, any>;
  editableFields?: string[];  // Fields that users can edit
  startedAt?: string;  // ISO 8601 timestamp
  finishedAt?: string;  // ISO 8601 timestamp
}

Props

WorkflowVisualizerProps

| Prop | Type | Required | Default | Description | |------|------|----------|---------|-------------| | workflowRun | WorkflowRun | Yes | - | The workflow data to visualize | | onPause | (runId: string) => void | No | - | Called when user clicks pause | | onResume | (runId: string) => void | No | - | Called when user clicks resume | | onRerunFrom | (stepId: string) => void | No | - | Called when user wants to restart from a step | | onFieldEdit | (stepId, field, value) => void | No | - | Called when user edits a field | | className | string | No | "" | Additional CSS classes | | theme | ThemeOptions | No | - | Custom color theme | | showControls | boolean | No | true | Show pause/resume controls |

ThemeOptions

interface ThemeOptions {
  primaryColor?: string;    // Default: #3b82f6
  successColor?: string;    // Default: #10b981
  errorColor?: string;      // Default: #ef4444
  warningColor?: string;    // Default: #f59e0b
  neutralColor?: string;    // Default: #6b7280
}

Styling

The SDK includes default styles. Import the CSS in your app:

import "@automove/workflow-visualizer/dist/index.css";

For custom styling, you can:

  1. Use the className prop to add custom classes
  2. Use CSS variables to override theme colors
  3. Override specific classes using CSS specificity

CSS Custom Properties

:root {
  --wf-primary: #3b82f6;
  --wf-success: #10b981;
  --wf-error: #ef4444;
  --wf-warning: #f59e0b;
  --wf-neutral: #6b7280;
}

Integration Pattern

This SDK is designed to work with your existing backend:

"use client";

import { useState, useEffect } from "react";
import { WorkflowVisualizer } from "@automove/workflow-visualizer";

export default function YourWorkflowPage() {
  const [workflow, setWorkflow] = useState(null);

  useEffect(() => {
    // Fetch workflow data from your API
    fetch("/api/workflows/123")
      .then(res => res.json())
      .then(setWorkflow);
  }, []);

  const handlePause = async (runId) => {
    await fetch(`/api/workflows/${runId}/pause`, { method: "POST" });
    // Refresh workflow state
  };

  if (!workflow) return <div>Loading...</div>;

  return (
    <WorkflowVisualizer
      workflowRun={workflow}
      onPause={handlePause}
      // ... other handlers
    />
  );
}

Advanced Usage

Real-time Updates

Use polling or WebSockets to update the workflow state:

useEffect(() => {
  const interval = setInterval(async () => {
    const updated = await fetch(`/api/workflows/${id}`).then(r => r.json());
    setWorkflow(updated);
  }, 2000);

  return () => clearInterval(interval);
}, [id]);

Custom Theming

<WorkflowVisualizer
  workflowRun={data}
  theme={{
    primaryColor: "#8b5cf6",
    successColor: "#22c55e",
    errorColor: "#dc2626",
  }}
/>

Browser Support

  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 14+

License

MIT

Support

For issues or questions, please open an issue on GitHub.