Commit Graph

17 Commits

Author SHA1 Message Date
martbost 8e6d2f9cd0 One swap per banner + admin takedown (Marty 2026-11-15: "allow the member to swap it only, and they can only do it one time. Admin takes down the option to credit back or none.")
Member swap: My Banners shows "Swap image or link" on a banner that is waiting or in the loop, usable once (then "Swap used"). POST /api/my/banners/<id>/swap changes the image and/or link (or a Banner Spin to another of the member's own 125x125/250x250 spins via lsspins), same checks as a new post (checkLink, probeLink, upload/https image checks); id, place, clicks and loop progress stay. Logged on the banner (swaps: old/new image + link, time). No withdraw, removal or refund for members.

Admin takedown: /admin finds banners (#id, wallet, username), POST /api/admin/banners/<id>/takedown {reason required, credit: back|none}. The banner is hidden at once (splash loop + waiting line show a house tile in its place, /go goes home, no look/teaser/swap); its place rides out on time so nobody moves, then it ends with no cycle, no network views, no prize count. My Banners shows "Taken down" with the reason. Restore reverses a given credit (when the owner still holds one) and, if its place rode out meanwhile, records the cycle then. Admin ledger: GET /api/admin/actions (who, when, reason, credit decision).

Chatbot: CANNED 'swap' + FACTS line (KNOWLEDGE_DATE already 2026-11-15), chat-qa entry. my.js?v=4, admin.js?v=3, vbb.css?v=8.
Tests: smoke section 15 (swap once, refused twice, keeps place, bad link/image refused, spin swap, takedown credit back vs none, others keep places, ride-out without a cycle, restore, admin ledger, phone UI): 308/308 with the committed networksso.js; chatbot.test 182/182; qa:chain 49/49.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:18:49 -06:00
martbost 5afde38f6f Site assistant (Marty 2026-11-15): chat widget in the Viral Banner Blitz pop-art look on every page, CANNED + FACTS from this repo's code (loop 50, 10 verified visitors per shift, 150 network ad views per cycle recorded but not credited yet, 1 free post credit a day for network members, packs 10/$3 and 40/$10, look $2, split 30% introducer + 10% prize pot + 60% company, weekly boards; the pot's floor and cap are never stated), retrieval over the shared network knowledge base on the hub (netkb.js, home entries boosted, another site named = its answer), reasoning off, account problems hand off to network support. chatbot.test 170, smoke 249/249
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 12:58:40 -06:00
martbost cab68c01dd PolHunter mission vbb-how (Marty 2026-11-14: every rebuilt network site gets a PolHunter mission). /how carries the one-line PolHunter embed (data-selector "main.wrap > .card", 4 slots, the code lands in one of the How the loop works cards, picked per hunter per day); CSP admits https://polhunter.com in script-src and connect-src only. Smoke 245/245 (qa:chain 44/49, the same 5 legal-page em-dash checks fail without this change)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 17:00:34 -06:00
martbost 86a84b9606 GET /api/admin/member-lookup (Marty 2026-11-14, network hub member lookup): read-only, behind the admin token; ?q=<wallet> | #<banner id> | <username> answers myData (banners, credits, rewards) plus known, record, purchases and sponsored (VBBShop Purchase rows with tx), contract, explorer. Smoke 245/245
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 12:53:40 -06:00
martbost 2f58a41af5 Network ad zones live on VBB: Marty's LinkSpin zones ls-b17eff (footer wide), ls-e8f989 (footer phone), ls-0be4df (leaders), ls-88b761 (My Banners), ls-9824e4 (How it works), ls-d83484 (404); common.js?v=6. Smoke 241/241
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 11:11:33 -06:00
martbost 2fe3d9e4c0 Trust pack (Marty 2026-11-14): contract proof, live ledger, proof toasts, Telegram sale cards, legal pages, network footer.
- proof.js: /api/ledger (each VBBShop purchase with its split read from the receipt's Paid/PaymentFailed events, else the contract's fixed 30/10/60 math; weekly prize transfers with their transactions), /api/contract (owner, prize wallet, company, keeper, paused, orders, balance and owed, read live and cached 5 min; Sourcify exact match, Polygonscan pending).
- Telegram (CTB Rewards bot, payments topic, TG_TOKEN/TG_CHAT/TG_PAY_TOPIC same as Downline Banners): one photo card per purchase (prebuilt VBB proof image rotated, buyer, sponsor/prize/company split in POL, this week's purchases + prize pot, Polygonscan + ledger links) and one line per confirmed prize payout. Hooks: shop.setHook (newly credited purchases only) and prize.setHook (confirmed transfers); once per tx via an in-process guard plus docstore.claim; nothing older than 2 hours.
- Pages /contract, /ledger, /terms, /disclaimer (Earnings Disclaimer), /privacy (TrustClickz, real mechanics: advertising not income, same-transaction split, prize wallet holds the 10% until Monday, no refunds on-chain, one-time purchases, crypto risk, data incl. hashed visit checks and the network hub); sitemap.
- Footer: Terms, Earnings Disclaimer, Privacy, Contract, Ledger, Support, company line, 'Part of the network' from the hub (netsites.js, /api/network-sites, fallback list), VBB marked current. Toasts add purchases and prize payouts.
- tools/proof-art.mjs renders public/art/proof/vbb-proof-{pink,blue,yellow}.png. common.js?v=5, vbb.css?v=6.
chain.mjs 49/49 (real contract on anvil + stand-in Telegram: exact split, 2 cards, no repost on rescans, 6 prize lines). smoke 241/241.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 10:38:40 -06:00
martbost d049c529ac LinkSpin Banner Spins in Viral Banner Blitz (Marty 2026-11-14: "make sure Viral Banner Blitz incorporates banner spins that could be pulled in just like downline banners"), the Downline Banners pattern. lsspins.js calls LinkSpin's /api/partner/bl/spins with { site: 'vbb' }, signed with NETWORK_SSO_SECRET (by wallet; the network username too for network-verified members). My Banners: "Use my LinkSpin Banner Spin" lists the member's 125x125 / 250x250 spins (GET /api/my/lsspins) and one tap posts one (POST /api/my/banners { spinId }): one credit, same credit + waiting rules, image + link from LinkSpin's signed answer only (https, same host), the image is the spin's rotating image and the link its click link, so clicks count in LinkSpin Reports under a Viral Banner Blitz source. /go/ fills {clickid}, {spot} (banner number) and {type} (loop or waiting). Splash: the loop's open places (one stays "post yours") and the empty waiting line show members' Banner Spins (SPIN tiles, refreshed every 10 minutes, one per member, none for a member with a banner on the page, no image twice, same picks for 2 minutes); they are never in the loop list, never shift it, cycle or earn, and a note says so. Admin status: lsSpins. LS_PARTNER_URL for the smoke stand-in. common.js?v=4, splash.js?v=3, my.js?v=3, vbb.css?v=5. Smoke 227/227 (35 new, stand-in LinkSpin), chain 29/29. Needs LinkSpin 5d630ec.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 10:07:41 -06:00
martbost aee1ccc36a VBB purchases live + weekly prize payouts (Marty 2026-11-14: "why does it say 'coming soon' on all the stuff in it? Shouldn't it all be live already?")
Buying (VBBShop 0x36F6...07D7): Packages page has live Buy buttons for the 10 and 40 credit packs (USD price + live POL from quoteWei, SafePal or any other crypto wallet, one-time, never a subscription, where the payment goes); My Banners has "Add the banner look ($2)" on each waiting or in-loop banner (SKU 3, ref = banner id) and a 40-character teaser editor once it has the look. POST /api/my/order builds the member's buy() call on the server (fresh keeper voucher when the hub knows their sponsor, else no sponsor); the page checks the connected wallet is the member's VBB account (explains how to switch if not), checks the balance, sends with Polygon's fee floor (/api/gas), waits on /api/tx, nudges the watcher (/api/my/paid) and polls until the credits or the look arrive. Public: /api/quote, /api/gas, /api/tx/<hash>; /api/config has shop {live, contract} + explorer. The banner look on the loop: double border + star, hover teaser (always shown on touch screens; default = the link's site). Only Tokens still says coming soon. wallet.js gains sendTx/waitTx/balance (DLB flow).

Weekly prize payouts (prize.js): each Central-time week's pot = 10% of its VBBShop sales (usdCents of Purchase events by block time), $20 floor (company top-up shown to admin), $50 cap internal, half per board, 50/30/20. Every Monday the app prepares last week's plan (winners, wallets, USD; POL quoted live from the Chainlink feed the contract uses). /admin "Approve and pay" (two clicks): refuses unless PRIZE_KEY is the contract's prizeWallet(), the feed is fresh and the wallet holds the POL + gas (says how much more to send); then once per week (docstore.claim in MySQL + plan status), consecutive nonces, each hash saved as sent, stops at the first unclear send (never auto-retried), receipts watched. Ties: earlier to reach the count wins (leaderboards use the same rule). A winner that cannot be paid (the prize or company wallet) is skipped and the rest move up; an unfilled place stays in the prize wallet. /leaders shows past winners with transaction links. Posts nothing anywhere. Compose passes PRIZE_KEY.

Tests: smoke 192/192 (stand-in chain answers quoteWei + receipts: quote, order calldata + voucher, look purchase, teaser, prizes API, UI Buy buttons). New qa/chain.mjs on a local anvil with the real VBBShop + mock feed: buy -> Purchase -> credits, voucher binds sponsor, 30/10/60 split, overpay refunded, banner look; prize prepare -> short refusal -> pay 6 transfers exact POL -> paid once: 29/29. common.js?v=3, vbb.css?v=4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:47:58 -06:00
martbost a6a9b3cace Promo kit (Marty 2026-11-14: "get all the creatives built ... and put them in all the places they need to go"): promokit.js is the one source for the VBB kit, published as GET /api/promo-kit?u=<network username or wallet> (public, CORS open, read by /promote and InstantAdPay's promo center): personal links (?ref=), 21 creatives (3 angles: free daily post / every visitor pushes the loop / weekly prizes, in 125x125, 468x60, 728x90, 300x250, 160x600, 1200x630, 1080x1080) at /art/kit/vbb-<angle>-<shape>.png (ad-blocker-neutral names, rendered by tools/kit-art.mjs with Playwright), 5 lines, 3 headlines, 1 email, 2 posts built from config (perShift, viewsPerCycle, prize floor shown as "at least", never the cap). /promote page (kitpage.js + promote.js + kit.css): username from sign-in, ?u= or typed. Nav + footer link Promote. Network zones wired like DLB (common.js ZONES: footer wide/phone, Leaderboards, My Banners, How it works; 404 in server.js ZONE_404), never on the loop page; ids empty until the LinkSpin zones exist. CSP admits linkspin.app. common.js?v=2, vbb.css?v=3. Smoke 160/160 on this commit alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:41:50 -06:00
martbost 840161b367 Membership and sponsors through the network hub (Marty 2026-11-14): hubpeople.js (the Downline Banners module, signed as vbb, cached 5 minutes, never waits on a down hub); netMember asks the hub first, InstantAdPay only when the hub is unreachable. Free daily credits: verified = the hub knows this wallet, or the network member who signed in through InstantAdPay/LinkSpin (by the token's email, never stored); InstantAdPay or a network sign-in counts only while the hub is unreachable. /api/my/voucher: sponsor = the hub network sponsor for the wallet, resolved to a wallet by hub id; hub unreachable = no voucher (why hub-unavailable). Admin status shows hubLookup. Smoke 142/142 (stand-in hub answers /v1/resolve)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:25:57 -06:00
martbost be9de262db Launch prep: /health + Dockerfile HEALTHCHECK; old site links (/?<old username>, /splashpg.php?pid=N&r=, /lcp.php?pid=N&r= -> /?ref=<network username> from the oldrefs.json MySQL document, loaded by POST /api/admin/oldrefs; any other *.php -> /), checked before any page; hubreport.js (DLB pattern): each VBBShop purchase reported to the network hub by wallet, first as contract-bind with the sponsor, later as contract-spend, signed as vbb, off unless HUB_ENABLED; compose passes HUB_* + RPC_URLS + CHAIN_ID. Smoke 134/134
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 08:03:26 -06:00
martbost 07cc1944e6 VBBShop hooks (inert until configured, nothing deployed): GET /api/my/voucher signs an EIP-712 sponsor voucher with KEEPER_KEY when the hub lookup names the member's network sponsor (new optional sponsor field; none or self = no voucher); shop.js watcher reads Purchase logs (CONTRACT_ADDRESS + CHAIN_RPC, confirmed blocks, 1,000-block ranges) and credits packs once per txHash:logIndex, dedupe marks saved in vbb.json with the credits; admin status shows the watcher, never the key. Packages page stays coming soon. Smoke 117/117 (fake chain + voucher checks)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:20:24 -06:00
martbost 471fefacf0 VBB own look (Marty 2026-11-13: each site its own vibrant look): pop-art blitz on warm paper, hot pink / electric blue / sunshine yellow / mint, ink outlines + hard shadows, Bricolage Grotesque + DM Sans + Space Mono; new mark, OG image, icon, 404 + fallback tile; CTA 'Post your banner' (free is network members only); smoke 102/102
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:51:33 -06:00
martbost 885187bfb1 Free daily post credits for network-verified members only (Marty 2026-11-13): InstantAdPay/LinkSpin sign-in or a wallet the network knows; plain wallets rechecked each visit; copy on My Banners, How and Packages; smoke 102/102
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:48:30 -06:00
martbost cb77582926 Weekly prize pot (Marty 2026-11-13): 10% of the week's sales, $20 floor topped up by the company, $50 cap kept internal; half per leaderboard, split 50/30/20; leaderboard page shows the live pot, never the cap; smoke 100/100
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:42:03 -06:00
martbost 832395daa4 VBB v1: Marty's approved numbers as config defaults (1 free credit/day; packs 10 for $3, 40 for $10; look $2; split 30/70 kept for later; 150 views per cycle; weekly prizes $15/$7/$3 per leaderboard, display only); packages page shows planned prices as coming soon; smoke test (99/99); OG image + icon; env example + compose (not deployed)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:30:19 -06:00
martbost 9d0dde4b57 VBB v1 skeleton: off-chain loop engine, verified visitors, members, banners, leaderboards, admin; docstore + networksso from Downline Banners
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:24:34 -06:00