UCD.js Docs

Pipeline Playground

Architecture notes for @ucdjs/pipeline-playground

@ucdjs/pipeline-playground is the sample corpus of pipeline definitions used for experimentation, demos, and UI development.

Role

  • Provides concrete .ucd-pipeline.ts files for the loader and server to discover.
  • Demonstrates simple, intermediate, advanced, and failure-oriented pipeline scenarios.
  • Gives tests and the pipeline UI realistic inputs without depending on a separate external repo.

Mental Model

This package is data and examples, not runtime infrastructure.

Its folders intentionally cover different documentation and testing scenarios:

  • simple/ for minimal examples
  • intermediate/ for transforms and custom resolvers
  • advanced/ for richer graphs
  • error-handling/ for broken or failure-producing cases

Example Flows

Loader discovering playground pipelines

*.ucd-pipeline.tspipeline-playgroundpipeline-loader*.ucd-pipeline.tspipeline-playgroundpipeline-loaderTooldiscover pipeline files in packageglob for .ucd-pipeline.tsmatching playground filesbundle + import each filePipelineDefinition exportsTool

Simple example: source-and-route

sourceAndRoutePipelinecolorsRoutecolorsSourcesourceAndRoutePipelinecolorsRoutecolorsSourceAuthordefinePipelineRoute(filter byName("colors.txt"))parser + propertyJsonResolver routedefinePipeline({ inputs: [colorsSource], routes: [colorsRoute] })minimal PipelineDefinitionAuthor

Development default source

pipeline-playground pathresolvePipelineSources()pipeline-playground pathresolvePipelineSources()pipeline-serverno explicit sources in developmentuse bundled local pathlocal source locatordefault pipeline sourcepipeline-server

Design Notes

  • Keeping examples in-repo makes UI and loader development reproducible.
  • Failure examples are intentional and valuable because the loader and server need to surface issues cleanly.
  • The playground is private because it is reference material, not a polished product surface.
  • File names with .ucd-pipeline.ts are part of the contract so discovery works automatically.

Testing Use

  • loader discovery and import behavior
  • UI states for successful, complex, and broken pipeline definitions
  • documentation examples for the DSL
  • development-mode default source selection in pipeline-server

On this page