Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.5 KB

README.md

File metadata and controls

46 lines (30 loc) · 1.5 KB

Testbed app

The testbed app is a minimal local app for experimenting with c2pa-web and inspecting C2PA manifest data in the browser.

Prerequisites

Install these before running the testbed. Full details are in the contributor prerequisites.

  • Node.js v22.22 or later
  • pnpm and the Nx CLI (npm install -g pnpm nx)
  • Rust toolchain and related tools to build c2pa-wasm from source:
    • Rust 1.96.0+ with the wasm32-unknown-unknown target
    • wasm-bindgen-cli (version must match Cargo.toml)
    • wasm-pack 0.13.1

See Prerequisites in packages/c2pa-wasm/README.md for install commands.

Setup

From the repository root (c2pa-js/):

pnpm install
nx build c2pa-web

nx build c2pa-web builds c2pa-wasm and other dependencies the app needs at runtime.

Run

From the repository root:

nx serve testbed

Open https://localhost:4200/ in your browser. The dev server uses vite-plugin-mkcert to serve over HTTPS on first launch.

Drag and drop a C2PA-enabled image onto the drop zone, then open the browser developer console to view the parsed manifest store and read time.

Other commands

nx build testbed    # Production build to tools/testbed/dist
nx preview testbed  # Preview the production build at https://localhost:4300