Turn Every Interaction Into Action.
Physical-to-digital experiences for modern local businesses.
See It In Action
© 2026 iTap Media
Owner Set
SLVR Pass
Promo Review Keychain
Promo Keychain
Wallet
Keychain
BLK Card
SLVR Pass
Review Keychain
Promo Keychain
Admin Key
Generate + Save
document.addEventListener("DOMContentLoaded", function () { const createBtn = document.getElementById("createBtn"); const resultBox = document.getElementById("resultBox"); if (!createBtn || !resultBox) { console.error("Missing createBtn or resultBox"); return; } createBtn.addEventListener("click", async function (e) { e.preventDefault(); resultBox.textContent = "Creating..."; const items = Array.from(document.querySelectorAll(".item:checked")).map(function (item) { return item.value; }); const payload = { customer_name: document.getElementById("customer_name").value, contact: document.getElementById("contact").value, display_serial: document.getElementById("display_serial").value, bundle_type: document.getElementById("bundle_type").value, items: items }; const admin_secret = document.getElementById("admin_secret").value; try { const response = await fetch("https://zluokwtrewwrflhiobrw.supabase.co/functions/v1/create-artifact-set", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ admin_secret: admin_secret, payload: payload }) }); const data = await response.json(); if (!response.ok) { resultBox.textContent = "Error:\n" + JSON.stringify(data, null, 2); return; } if (!data.urls || data.urls.length === 0) { resultBox.textContent = "No URLs returned."; return; } resultBox.innerHTML = data.urls.map(function (entry) { const label = String(entry.item || "artifact").split("_").join(" ").toUpperCase(); const url = String(entry.url || ""); return label + ":\n" + url; }).join("\n\n"); } catch (error) { resultBox.textContent = "Fetch failed:\n" + error.message; console.error(error); } }); });