Skip to main content

The Capture Service

The Capture Service is the companion tool that feeds the conversion pipeline. When you point the agent at a URL, the capture step visits the page in a real browser and records everything the converter needs to rebuild it faithfully:

  • the rendered DOM (including JS-built content and inline SVGs a plain view-source misses),
  • the page's media (images, video) so assets are side-loaded and used, not hot-linked, and
  • the computed styles — the actual values behind the design, so the converter translates rather than guesses.

Why it matters

This is what powers the capture-first rule (How It Works): because the real rendered page and its computed styles are captured up front, the converter can map each block to the right shortcode with native options and compile the styling into design tokens — instead of the agent hand-measuring the source.

Running it

The service lives in the kit under the assembled capture pipeline and is a small Node tool. In the tools/design-capture folder, install once (npm install), then capture a page:

node capture.mjs "https://example.com" capture-out/

It also runs as a local HTTP service that the WordPress Site Converter extension talks to, so you can capture and convert straight from the Unyson+ → Convert screen. Its main endpoints:

EndpointWhat it does
/healthService status + version + which AI backend is active.
/captureRender a live URL and return the converted bundle (or, with ?html=1, the rendered HTML).
/capture-screenshotThe reference screenshot for a captured URL.
/capture-fileUpload a Stitch .zip or raw HTML and run it through the same engine as a live URL.
/ai-convertOptional AI refinement of a draft mapping (uses your local AI backend).
/pen-shortcodeTurn a pasted pen (HTML/CSS/JS) into an installable UnysonPlus shortcode .zip — see What It Can Build.
/local-ai/chat*The dashboard's built-in chat (history / send / clear) against a local model.

The dashboard

Starting the capture service (start-converter.bat on Windows, start-converter.sh / .command on macOS/Linux) also opens a browser dashboard at http://localhost:4600. It's the visual face of the service, with these tabs:

  • Convert — run and watch a URL → WordPress conversion live, with design tokens, section mapping, and a source-vs-result comparison.
  • Pen (Alpha) — paste a pen's HTML/CSS/JS and download an installable shortcode .zip (see below).
  • Chat — a chat panel backed by a local AI model (no key needed).
  • Benchmarks — local-AI model benchmarks for conversion quality.
  • Settings — the destination WordPress + token, and the local-AI model picker.

The two ways to feed a source

InputHow
A live URL (best)The agent runs the capture service — it reads the DOM and computed styles.
A downloaded bundleA zip of devtools.html + view-source.html + media + a screenshot, uploaded to the Site Converter.

Get it

The Capture Service is bundled with the kit (assembled on setup) and is also its own repository: github.com/UnysonPlus/UnysonPlus-Capture-Service.

Next: Get the Kit.