Skip to content

Repository files navigation

Watermark

Docs GitHub Launch Dev

React 19 TypeScript 5 C2PA 0.14.5 Vite 8 Tests Passing


Watermark

Watermark is a local-first web application for inspecting C2PA Content Credentials and understanding media provenance. The first release verifies media in the browser, computes a SHA-256 digest, distinguishes valid signatures from trusted issuers, and displays manifest lineage without uploading the asset.

Current scope

  • Drag-and-drop image, audio, and video inspection
  • C2PA manifest discovery and verification through @contentauth/c2pa-web
  • Signature algorithm, issuer, claim generator, ingredients, assertions, and validation codes
  • File size, MIME type, and SHA-256 display
  • Explicit handling for missing, invalid, untrusted, and unsupported credentials
  • Browser-only processing with no application backend

Important notes

This software is under active development and contains known bugs. While we strive for accuracy, results may not always be as expected.

Text processing limitations

  • Not all text documents are suitable for processing in all modes. PDFs with letter-spacing (e.g., stylized headers like "K Y L O S A R C") may produce garbled output when using grammar checking features.
  • Scientific notation, chemical formulas, and technical content may be incorrectly flagged or modified by grammar/linting tools.
  • Text extraction from PDFs, Word documents, and PowerPoint files may lose formatting, embedded images, or complex layouts.
  • The unsloper and stripper tools are designed for prose text and may not work well on code, technical documentation, or structured data.

Video and media limitations

  • Video files do not always load a playable preview or reference thumbnail. In these cases, you will still see watermarking details, C2PA manifest information, and metadata — but no video playback.
  • Large video files may take longer to process or may not fully load in the browser.
  • Some media formats may not be fully supported by the C2PA SDK.

Your files are safe

Original documents and media are never overwritten by Watermark. All processing happens in memory and produces a new output — your source files remain completely untouched on disk. Even if results are unexpected or processing fails, there is no risk to your original files.

Run locally

npm install
npm run dev

Vite serves the app at http://localhost:42069.

Commands

npm run build
npm run typecheck
npm test

Architecture

  • src/App.tsx contains the drop zone, preview, result views, and text/batch views.
  • src/lib/c2pa.ts owns SDK initialization and file verification.
  • src/lib/verification.ts normalizes SDK manifest data into a stable UI model.
  • src/lib/file.ts contains MIME detection, byte formatting, and SHA-256 utilities.
  • src/lib/types.ts defines the application verification contract.
  • src/lib/transform.ts provides text stripping, PII redaction, unsloping, and PDF normalization.
  • src/lib/harper.ts integrates the Harper grammar checker (WASM-based, browser-local).
  • src/lib/metadata.ts handles file metadata extraction, sanitization, and editing.
  • src/lib/extract.ts extracts text from PDFs, Word documents, and PowerPoint files.

The C2PA SDK runs in a Web Worker with its WASM binary loaded as a Vite asset. The app does not currently create or re-sign manifests; editing and signing require a separate key-management and provenance update design.

Verification boundaries

A trusted C2PA result means the SDK validated the manifest signature, content binding, and issuer trust policy available to the application. It does not prove that every statement in the manifest is true. A missing manifest does not establish that content is human-made or AI-generated.

Next modules

  1. ✅ Privacy-safe metadata sanitizer with an explicit field allowlist.
  2. ✅ Text analysis with AI detection, grammar checking (Harper), and unsloping.
  3. ✅ File metadata viewer and editor.
  4. Provenance-aware crop, resize, and compression workflow.
  5. Local lineage dashboard backed by IndexedDB.
  6. AI-detection appeal evidence export.
  7. Educational views for C2PA, SynthID, statistical watermarking, and steganalysis.

References

License

MIT. See LICENSE.

About

Watermark is a local-first web app for inspecting C2PA credentials & understanding provenance: media text & other file types. In-browser verification - computes a SHA-256 digest - distinguishes valid signatures from trusted issuers & displays manifest lineage. AI detection tools + strip and unslop text files. No external uploads.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages