# QR-contained website experiment

This experiment encodes a complete HTML, CSS, and JavaScript page as a `data:text/html;base64,...` payload inside four QR codes. OpenCV and ZXing-cpp independently decode the rendered symbols; the exact recovered payload then launches in offline Chromium.

## Reproduce

```powershell
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
npm install
npx playwright install chromium
.\.venv\Scripts\python.exe build_qr.py
.\.venv\Scripts\python.exe verify_qr.py
node verify_browser.mjs
```

The PowerShell paths above are for Windows. On macOS or Linux, use `.venv/bin/python`.

## What counts as passing

- OpenCV and ZXing-cpp both decode at least one correction level to the exact payload hash.
- The browser launches the payload recovered from the QR image, not the original HTML file.
- Chromium runs offline and records zero HTTP requests or external resource entries.
- The page title and heading match, and two button clicks change the counter from `0` to `2` and the background to pink.

This does not claim that every stock phone-camera application will open a `data:` URL; scanner applications may reject or display non-HTTP schemes even when they decode the QR payload correctly.

## Outputs

- `outputs/manifest.json`: payload sizes, SHA-256 hashes, QR versions, and module counts.
- `outputs/benchmark.csv`: all 96 decoder, correction-level, resolution, and occlusion results.
- `outputs/qr-verification.json`: decoder summary and browser-input level.
- `outputs/browser-verification.json`: offline browser assertions and versions.
