mirror of
https://github.com/PR0M3TH3AN/Artstr-Studio.git
synced 2026-11-02 19:50:39 +00:00
d94eff9671569d18909400cd0ca0147c981289c3
Share button (template browser preview):
- New "Copy share link" button next to Save JSON / Print
- Generates a NIP-19 identifier:
* naddr (stable, address-based) for new-style events whose d-tag
starts with the mode prefix (cover:, disc:, jewel:, disc-design:)
* nevent (event-id-based) for legacy events whose d-tag is a bare
IMDB id, so a cover share-link doesn't collide with the
disc-design share-link for the same movie
- Encoded URLs use #/share/<id> form so they work on any host without
a server rewrite; the URL bar also updates while a preview is open
Receiving:
- On init, parseShareIdFromLocation() reads either /share/<id> or
#/share/<id> and dispatches to loadSharedDesign()
- loadSharedDesign uses a two-stage fast path: query the relay hints
embedded in the naddr/nevent first (2s timeout), fall back to the
user's default relay list (4s timeout) only if those don't have it
- Skips the full fetchFeedAndReactions(); instead fetches only the
one event + that author's kind-0 profile + kind-7 reactions on that
event + kind-5 deletions for that author/kind, all in parallel with
short timeouts. Typical lookup is now ~1-3s instead of ~20s.
Bech32/NIP-19 codec:
- Self-contained encoder + decoder for note/nevent/naddr (no
dependencies). Decoder also accepts a raw 64-char hex event id.
URL lifecycle:
- openDesignPreview replaces the URL with #/share/<id> so reload/
bookmark/copy-from-address-bar all work
- closeNostrPreview restores the URL to / so reload doesn't re-open
Hosting:
- vercel.json with rewrites maps /share/:id -> / for the "pretty"
path form. Hash form works without any host config.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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
httporhttpsURLs - 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.htmlis the complete app entrypoint. Open it directly in a browser or serve it from any static host.
Export and print
- Use
Print / Save PDFfor print-ready output - Keep browser scale at
100% - Disable browser headers and footers
Save, restore, and sharing
Save projectwrites project JSONLoad projectrestores project JSONCopy Nostr eventcopies a signed event payloadImport from Nostrrestores 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
30078app-data events withcasewraptags - Typical social events use standard kinds (
1,7,6,3,0) - Template modes include
cover,disc,jewel, anddisc-design - Current schema version is
5; minimum supported schema version is4
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
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%