Skip to content

FlowDelta Documentation

FlowDelta documentation

Guides for using, understanding, and extending FlowDelta.

Start here

New to the project? Read these three in order:

  1. Getting started: set up locally, run the tests, find your way around the code.
  2. Salesforce Flow primer: what a .flow-meta.xml file is and how it’s structured.
  3. Architecture: the pipeline, from parser to model to diff or snapshot to render.

Using FlowDelta

Understanding the system

  • Data model reference: the core types (GraphModel, GraphNode, FlowDiff) and how they move through the pipeline.
  • Architecture: what each module does, how properties are canonicalized, and the invariants that must hold.
  • Rendering: the interactive HTML, element cards, layout strategy, and side panel.

Extending FlowDelta

Working on the project

I want to

Compare flows locally or from Salesforce → Getting started, then CLI usage

Render a current Flow as an as-built snapshot → CLI usage, then Rendering

Set up CI reporting in GitLab or GitHub → CI integration, plus examples/gitlab-ci.yml or examples/github-actions.yml

Work out why a diff looks wrong → Debugging and troubleshooting, then Data model reference

Support a new Salesforce element type → Adding new node types, then Section schema authoring

Improve how changes look → Section schema authoring, then Rendering

Understand the code → Architecture, then Data model reference, then the module you care about

Write a test → Testing, then Debugging and troubleshooting

Cut a release → Publishing

Build or update the docs site → Documentation site

Which doc covers which module

ModuleDoc
src/parser/Vendoring policy (read-only, Apache-2.0)
src/io/Shared metadata and Git IO, CLI usage
src/model/Data model reference, Architecture
src/diff/Architecture
src/render/Rendering, Section schema authoring, CLI usage (compact.ts, outline.ts, --format)
src/ci/CI integration
test/Testing, Debugging and troubleshooting

Key terms

  • Canonicalization: cleaning up properties before diffing: dropping coordinates and connectors, and sorting unordered arrays. See Architecture.
  • Section schema: per-node-type settings that group property changes into meaningful sections, such as “Outcomes” for a decision. See Section schema authoring.
  • GraphModel: the normalized form of a Flow after parsing: nodes and edges, without coordinates or connectors. See Data model reference.
  • FlowDiff: the result of a comparison or an as-built snapshot: nodes and edges marked added, deleted, modified, unchanged, or present, with their properties. See Data model reference.
  • Fixture: a before-and-after pair of flows used to test behavior. See Testing.
  • Vendored parser: Google’s Flow Lens parser (Apache-2.0), copied in as-is and never edited. See Vendoring policy.

Conventions

  • File paths are relative to the project root, for example src/cli.ts.
  • Code examples use npm and npm run scripts. See package.json.
  • Terminal examples use bash. On Windows, use PowerShell or Git Bash.
  • Links to source assume you have the repo cloned and open.

Contributing and license

See CONTRIBUTING.md for code style, PR expectations, and workflow.

FlowDelta’s code is MIT. The vendored parser is Apache-2.0. See LICENSE and LICENSE-APACHE.