diff --git a/chatbot.js b/chatbot.js index 260592b..4c7ce75 100644 --- a/chatbot.js +++ b/chatbot.js @@ -77,6 +77,7 @@ FACTS: - Ad packages: Micro $5/500 credits, Activation $20/2,000, Builder $50/5,500, Growth $100/12,000, Leader $250/32,500. Dollar-priced, settled in POL (Polygon) at the live Chainlink rate. 1 credit = 1 cent of ad delivery. - Live formats: display banners (per impression), text ads (per impression), full-screen LOGIN ADS (per day: right after a member signs in they land on a sponsor interstitial — they click "Open Ad", the advertiser's page opens in a NEW tab, a countdown runs on the interstitial, and at zero a "Go to dashboard" button appears. Just a CTA link is enough; an optional banner image can be the clickable creative. No framing requirement since it opens in its own tab), WATCH-TO-EARN VIDEO ADS (advertiser uploads an MP4/WebM or gives a direct https .mp4/.webm link and picks a required watch length — 10s/30s/60s — which sets the per-view price; viewers watch in an escape-proof player under Earn credits > Watch videos, the watch time is enforced on the server clock, and they earn credits per completed watch; you never see your own videos), and solo ads. Banner ads also require a size (standard IAB sizes like 728x90, 300x250). Coming: featured rotation with disclosed rotation size, verified-visit packs. - WALLETS + BUYING POL (Training > Wallets and buying POL, /wallets, members only): preferred MetaMask (recommended; extra accounts for Qualified Start), Phantom, SafePal, Coinbase Wallet; Trust works but blocks buys spending most of its POL (keep ~2x). MoonPay flow: connect wallet, Buy packages > "Buy POL with a card" opens MoonPay with POL on Polygon + the member's address prefilled; card/Apple Pay/Google Pay; first-time ID check; minimum order ~$30; buy package cost + 2-3 POL for fees; POL arrives in minutes; then buy. Exchanges: withdraw POL on the Polygon network. Never MATIC on Ethereum, never share the recovery phrase. +- INTRO VIDEO ON THE WALL: Profile > social links has an "Intro video" field (YouTube, Vimeo or direct .mp4 link). It embeds on the member's public wall page (/wall/) right under their bio, above the three-level line and the join button. - HOLDING TANK (Members > My line > Holding tank card): free members who joined with no sponsor wait there; a member who has switched on payouts AND bought their own $20+ package can Adopt one (first come, max 2 open adoptions, 7-day window; if the person never links a wallet or buys, they fall back into the tank; a person can be adopted twice at most). Adopting sets the sponsor, opens a chat and emails the member; their first purchase then binds to the adopter on-chain. Members can also "Release to tank" one of their own free referrals (pay it forward). Admin sees the tank under Members. - DORMANT-LEAD RESCUE: a FREE referral (no wallet, no purchase) with no message from their sponsor for 10 days triggers a warning email + dashboard flag to the sponsor ("unreached, tank in N days"); at 14 days (warning at least 4 days old) the lead moves to the holding tank and the sponsor is told. Sponsor resets the clock with a chat, a Nudge, or the "Contacted them" button (for phone/text contact). Leads whose sponsor link resolves to nobody go to the tank after a day. Nothing on-chain moves; anyone bound by a purchase never moves. - PIF (pay it forward) button: on a free direct or an adopted member who has linked a wallet, the sponsor taps PIF, enters an amount (suggested: the $20 package plus fees), and their OWN wallet app opens with the member's address prefilled; the POL goes wallet to wallet. The site never touches the funds; it only logs the transaction and tells the recipient with a Polygonscan link. The gift is theirs; nothing forces a purchase. diff --git a/public/assets/my.js b/public/assets/my.js index 7b7640b..3097557 100644 --- a/public/assets/my.js +++ b/public/assets/my.js @@ -1924,7 +1924,7 @@ IAP.status('Wall positions saved.', 'ok'); await loadLineBanner(); })); - const SOCIALS = ['facebook', 'twitter', 'youtube', 'instagram', 'tiktok', 'telegram', 'linkedin', 'website']; + const SOCIALS = ['facebook', 'twitter', 'youtube', 'instagram', 'tiktok', 'telegram', 'linkedin', 'website', 'video']; // video = intro video on the wall, not a social link function fillProfileDetails(a) { if (!a) return; if (a.bio) $('pfBio').value = a.bio; diff --git a/public/assets/site.css b/public/assets/site.css index a0b869b..7d309e0 100644 --- a/public/assets/site.css +++ b/public/assets/site.css @@ -425,6 +425,8 @@ textarea{resize:vertical;font:inherit} .btn.disabled{opacity:.45;pointer-events:none;filter:grayscale(.3)} .bio-meta{flex:1;min-width:220px} .bio-socials{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px} +.bio-video{margin:14px auto 8px;max-width:760px} +.bio-video iframe,.bio-video video{width:100%;aspect-ratio:16/9;border:1px solid var(--line-strong);border-radius:16px;background:#000;display:block} .bio-socials a{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--mint);border:1px solid var(--line-strong); border-radius:999px;padding:4px 12px 4px 9px;text-decoration:none} .bio-socials a svg{flex:0 0 auto} diff --git a/public/assets/wall.js b/public/assets/wall.js index c056883..52e45b8 100644 --- a/public/assets/wall.js +++ b/public/assets/wall.js @@ -41,6 +41,18 @@ '' + (ICON[k] || '') + '' + SOC[k] + ''); sc.innerHTML = links.join(''); } + // intro video under the bio: YouTube / Vimeo embed, or a direct file + const bv = IAP.$('bioVideo'); + const vurl = w.socials && typeof w.socials === 'object' ? String(w.socials.video || '') : ''; + if (bv && vurl) { + let yt = /(?:youtube\.com\/(?:watch\?(?:.*&)?v=|shorts\/|embed\/)|youtu\.be\/)([A-Za-z0-9_-]{6,})/.exec(vurl); + let vm = /vimeo\.com\/(?:video\/)?(\d+)/.exec(vurl); + let inner = ''; + if (yt) inner = ''; + else if (vm) inner = ''; + else if (/\.(mp4|webm)(\?|$)/i.test(vurl)) inner = ''; + if (inner) { bv.innerHTML = '

A word from ' + String(w.name).replace(/[&<>]/g, '') + '

' + inner; bv.hidden = false; } + } IAP.$('wallCtaHead').textContent = 'Join ' + w.name + '’s line'; // per-wall viewed-position memory (survives revisits; anonymous-friendly) const VKEY = 'iap-wall-' + name; diff --git a/public/my.html b/public/my.html index e018eee..635b964 100644 --- a/public/my.html +++ b/public/my.html @@ -5,7 +5,7 @@ Member area | InstantAdPay - + @@ -749,6 +749,8 @@ +

Intro video on your public page (optional): a YouTube, Vimeo or direct .mp4 link. It plays right under your bio, before the line and the join button.

+

@@ -900,7 +902,7 @@ - + diff --git a/public/wall.html b/public/wall.html index b531c25..16a7e24 100644 --- a/public/wall.html +++ b/public/wall.html @@ -6,7 +6,7 @@ - + @@ -28,6 +28,7 @@
Join QR code
scan to join
+

The line, three levels deep

Three positions, three levels — the exact levels the contract pays. Every banner here belongs @@ -47,6 +48,6 @@

- + diff --git a/server.js b/server.js index 984476c..2c2e1db 100644 --- a/server.js +++ b/server.js @@ -1409,12 +1409,15 @@ const server = http.createServer(async (req, res) => { // socials: {platform: url}; keep only known platforms with valid https urls let socials; if (b.socials !== undefined) { - const PLAT = ['facebook', 'twitter', 'youtube', 'instagram', 'tiktok', 'telegram', 'linkedin', 'website']; + const PLAT = ['facebook', 'twitter', 'youtube', 'instagram', 'tiktok', 'telegram', 'linkedin', 'website', 'video']; const clean = {}; for (const p of PLAT) { const v = String((b.socials && b.socials[p]) || '').trim(); - if (v && /^https:\/\/[^\s]+$/i.test(v) && v.length <= 200) clean[p] = v; + if (v && /^https:\/\/[^\s]+$/i.test(v) && v.length <= 300) clean[p] = v; } + // intro video on the public wall: a YouTube, Vimeo or direct .mp4/.webm link only + if (clean.video && !/^https:\/\/((www\.|m\.)?youtube\.com\/(watch\?|shorts\/|embed\/)|youtu\.be\/|(www\.)?vimeo\.com\/\d+|player\.vimeo\.com\/video\/\d+|[^\s]+\.(mp4|webm)(\?|$))/i.test(clean.video)) + return json(res, 400, { error: 'The intro video needs to be a YouTube link, a Vimeo link, or a direct .mp4 link.' }); socials = Object.keys(clean).length ? JSON.stringify(clean) : null; } const r = await accounts.setProfile(s.email, avatar, bio, socials);