# BookSwipe QR Site Contract

This folder is a static Cloudflare Pages site generated by BookSwipe.

## Permanent Base URL

```text
https://cyprus-book.pages.dev/
```

Every printed QR code should resolve under this base URL. Keep the Cloudflare Pages project or custom domain alive after printing.

## Permanent QR Page URLs

Canonical QR pages use:

```text
photos/photo-<qr_id>.html
```

`qr_id` is stored in the BookSwipe project JSON for each photo. Do not rename or delete these files after printing. Reordering the book or changing captions does not change these URLs.

## Compatibility Redirects

Older generated URLs may look like:

```text
photos/page-001-filename-ab12cd34.html
```

This export writes small redirect HTML pages and `_redirects` entries so old URLs forward to the canonical `photo-<qr_id>.html` pages. Keep those if any QR codes were already printed from an older export.

## Source Of Truth

- Desktop project: `E:\BookSwipe\projects\fujiphotos\book_project.json`
- Optional Drive links: `E:\BookSwipe\projects\fujiphotos\drive_links.csv`
- Source photos stay outside this site and are never modified by BookSwipe.

## Safe To Change After Printing

- Captions, titles, story notes, location labels, and Google Maps links.
- Site CSS, JavaScript, layout, and visual design.
- Google Drive full-quality JPEG links.
- Gallery order and printed page order.

## Do Not Change After Printing

- The base URL/domain.
- `photos/photo-<qr_id>.html` filenames.
- Redirects for any QR URLs that may already exist in printed books.

## Rebuild

Open BookSwipe, load the project, then click `Generate Book Kit` or press `Ctrl+E`. Deploy the contents of this folder with:

```bat
E:\BookSwipe\deploy_cloudflare.bat
```
