Skip to content

GoCodeAlone/workflow-plugin-product-capture

Repository files navigation

workflow-plugin-product-capture

Workflow plugin and workflow-compute provider package for user-submitted product URL capture.

The provider validates a supported product URL, loads the page with a normal browser runtime supplied by the worker image, extracts a bounded product snapshot, and returns provenance-marked data for user confirmation.

Amazon snapshots include title, ASIN, canonical URL, representative images, availability, price when present, seller, ships-from party, shipping summary, shipping price when Amazon exposes it, estimated product-plus-shipping total, and a nullable prime_eligible flag. Unavailable products are still valid snapshots; they normally omit price and Prime status while preserving availability.

Commands

GOWORK=off go test ./...
GOWORK=off go run ./cmd/product-capture-provider --probe
PRODUCT_CAPTURE_HTML_FIXTURE=internal/snapshot/testdata/amazon_xbox.html \
  GOWORK=off go run ./cmd/product-capture-provider \
  --request internal/provider/testdata/request-amazon.json \
  --output /tmp/snapshot.json

Live browser capture requires node plus Playwright in the worker image. Local development can set NODE_PATH to a Playwright install; fixture mode is used by unit tests and never emits raw HTML in the provider response.

Worker runtime image

Provider workloads must use a digest-pinned browser runtime image. Tagged releases publish:

ghcr.io/gocodealone/workflow-plugin-product-capture/product-capture-browser:<tag>

Use the published digest from the release workflow summary when configuring workflow-compute:

ghcr.io/gocodealone/workflow-plugin-product-capture/product-capture-browser@sha256:<digest>

The image contains Node, the Playwright package, and Google Chrome. It sets PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 so Playwright uses the installed Chrome channel rather than downloading bundled Chromium.

Workflow step

Use step.product_capture when a Workflow app needs to submit a product URL to workflow-compute. The step owns product-capture-specific validation and submits a generic provider workload using the product-capture.browser.v1 contract. workflow-plugin-compute should only provide generic dispatch/wait/catalog plumbing.

BuyMyWishlist live wiring details are in docs/buymywishlist-live-usage.md.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors