Skip to content

Repository files navigation

DeckProbe browser demo

Live demo for DeckProbe: drop a PDF, Microsoft Office, or Apple iWork document and probe it in the browser. Parsing runs locally through @deckflow/deckprobe — document bytes never leave the tab.

Live site: https://deckflow.github.io/deckprobe/

What the demo exercises

The whole browser SDK surface, not just a happy-path probe:

Area Surfaced as
probe() The main flow — drop a file, get schema-v2 evidence
Composable presets Multi-select target chips (@summary + @security + …)
Individual targets Free-text field for any target id, e.g. powerpoint.slide_count
Probe levels header / metadata / deep
Execution paths createDeckProbeWorker() vs. main-thread probe()
planOnly Advanced options — preview selected paths without executing
minimumConfidence Advanced options
budget overrides Advanced options — physical/expanded bytes, archive entries, timeout
allowPiggyback Advanced options
Evidence provenance Every row shows source and path, not just the value
diagnostics / unresolved_targets Rendered inline, so partial verdicts explain themselves
execution.paths Rendered as the planner's chosen read path
formats() / targets() / schema() "Engine capabilities" panel

Sample documents

public/samples/ holds four synthetic documents (pptx / docx / xlsx / pdf) so a visitor with no file at hand can still complete a probe. They are generated by scripts/make-samples.mjs, are entirely invented, and contain no content from the private fixture corpus. Regenerate with:

node scripts/make-samples.mjs

Output is deterministic (fixed timestamps, stored ZIP entries), so regenerating produces no spurious diff. The generated files are committed; CI never runs the script.

Product & design

Develop

Requires Node.js 20+.

npm install
npm run dev      # http://localhost:5173/deckprobe/
npm run build
npm run preview  # serves dist/ at the real /deckprobe/ base path

While 2.2.1 is unpublished (see Deploy), plain npm install fails to resolve the SDK. Install the dev tooling first, then overlay the local tarball:

npm install --ignore-scripts          # devDependencies; the SDK will 404
npm install ../deckprobe/release/packages/deckprobe-js/deckflow-deckprobe-2.2.1.tgz \
  --no-save --no-package-lock

Note that npm run dev serves under the /deckprobe/ base, not / — the bare origin returns a blank page. Open the path Vite prints.

vite.config.ts excludes @deckflow/deckprobe from dev pre-bundling. Without it the WASM binary request falls through to the HTML fallback and the engine fails to initialize with expected magic word 00 61 73 6d, found 3c 21 64 6f (that is <!do). Production builds are unaffected, so this only shows up in npm run dev.

Deploy

Pushes to main deploy to GitHub Pages via .github/workflows/pages.yml.

Blocked on an upstream publish. The demo needs @deckflow/deckprobe@^2.2.1. The 2.2.0 tarball on npm ships no wasm/ directory, so dist/index.js cannot resolve ../wasm/deckprobe_wasm.js and any build against it fails. Until 2.2.1 is published, npm ci cannot install from the registry, so package-lock.json cannot be committed with a registry resolution. Once it is published:

rm -rf node_modules package-lock.json && npm install
git add package-lock.json && git commit -m "chore: lock @deckflow/deckprobe 2.2.1"

License

MIT

About

Browser demo for DeckProbe: probe PDF, Office, and iWork documents locally with WebAssembly

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages