thePR0M3TH3ANandClaude Opus 4.7 e33d15f41f Add Lightning tips (LNURL-pay → bolt11 → QR)
A self-contained tip flow that works for any author whose kind-0 profile
publishes a lud16 Lightning address or lud06 LNURL. Picks an amount,
fetches a bolt11 invoice from the LNURL-pay endpoint, renders it as a
scannable QR + copyable string. No NIP-57 zap request, no NWC, no
WebLN — just the smallest path to actually moving sats.

Phase A — LNURL helpers and tip modal:
- Vendored qrcode-generator (~20 KB, MIT) as src/vendor/qrcode.min.js
  so the QR encoder runs offline with no CDN dependency.
- lud16ToLnurlpUrl / lud06ToHttpUrl / resolveLnurlPayUrl pick the right
  endpoint from a profile.
- fetchLnurlPayMetadata validates the payRequest tag and surfaces the
  min/max range; fetchLnurlInvoice requests an amount-locked bolt11.
- renderQrInto auto-scales the typeNumber so long invoices still fit.
- tipModal: amount-chip picker (21 / 100 / 500 / 1k / 5k / 21k / Custom),
  inline min/max validation, fetching state, then an invoice view with
  QR, lightning: deeplink, copyable bolt11, and a New amount / Done row.
- Brought to front via the modal z-stack; ESC, backdrop, and × close it.

Phase B — Feed card surface:
- Every feed card whose author has a resolvable LN address gets a
  ⚡ Tip button in the actions row. No button when there's no address,
  so feeds stay clean.

Phase C — Design preview surface:
- Same conditional ⚡ Tip button in the design preview action row, next
  to Save JSON and Copy share link.

Profile pages now treat the Lightning chip as the entry point — clicking
the chip opens the tip modal instead of copying the address. Profiles
with an address that fails to resolve fall back to the original copy chip.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-18 13:44:46 -04:00
2026-05-13 17:25:59 -04:00
2026-05-18 13:21:30 -04:00

CaseWrap Studio

CaseWrap Studio is a static print-layout editor for physical media packaging. It supports DVD/Blu-ray case wraps, Avery 8960/8944 disc-label sheets, Avery 8693/8943 CD jewel-case insert sheets, and reusable single-disc designs.

What it supports

  • Separate front, spine, and back case artwork (or one combined wrap image)
  • Disc-label sheet mode (two print positions on one Avery 8960/8944 sheet)
  • CD jewel insert mode (front + tray inserts on one Avery 8693/8943 sheet)
  • Disc Designer mode for creating a reusable single-disc design
  • Additional image and text layers
  • Drag positioning, z-order changes, rotation, sizing, and opacity
  • PDF export through the browser print dialog
  • Nostr community browsing/sharing for templates and disc designs
  • Publishing, replies, reactions, follows, and reposts from inside the app

Important workflow

All image sources are remote URLs.

That means:

  • Case art, disc art, jewel insert art, and extra image layers should use http or https URLs
  • Saved project JSON remains portable across machines
  • Exported/copied Nostr events can reconstruct layouts from event content
  • Community feed data comes from relays listed in the Community panel
  • Publishing/social actions require a NIP-07 browser extension (for example Alby or nos2x)

If a URL stops working later, the image will no longer render. For long-term reliability, use stable hosted URLs.

Main file

  • src/index.html is the complete app entrypoint. Open it directly in a browser or serve it from any static host.

Export and print

  • Use Print / Save PDF for print-ready output
  • Keep browser scale at 100%
  • Disable browser headers and footers

Save, restore, and sharing

  • Save project writes project JSON
  • Load project restores project JSON
  • Copy Nostr event copies a signed event payload
  • Import from Nostr restores a template/design from a copied event
  • The Community modal lets you browse New/Popular/Search/Mine, preview templates, and import them
  • Disc designs can be published and reused independently, then imported into Disc 1 or Disc 2 positions on a disc sheet

Nostr data model

  • Template/design payloads are published as kind 30078 app-data events with casewrap tags
  • Typical social events use standard kinds (1, 7, 6, 3, 0)
  • Template modes include cover, disc, jewel, and disc-design
  • Current schema version is 5; minimum supported schema version is 4

Notes

  • The app is fully static and does not require a backend
  • Local browser autosave is still available
  • Older saved projects with embedded data URLs may still load, but new work should use remote URLs
S
Description
A static site DVD and Blu-Ray Case and disk label designer
Readme
5.7 MiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 99.7%
HTML 0.3%