Commit Graph

794 Commits

Author SHA1 Message Date
martbost d322971d7d Watch-to-earn videos on Social Tube: signed partner calls /api/partner/watch/next|done
The serve and complete halves of a watch-to-earn video are now videoNextFor / videoDoneFor, used by the member area and by the partner
calls, so the daily cap, server-clock watch floor, once-a-day-per-video, advertiser charge and viewer credit are one piece of code.
Partner calls: site 'socialtube', member named by email, HMAC with SITE_INVITE_SECRET under the prefix 'watch.v1.', 5 minutes.
Credit line reads 'Watched a video on Social Tube'. Chatbot: answer socialtube-earn + prompt line (Marty 2026-11-22).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 10:32:38 -06:00
martbost 543bdefda2 Campaigns: /my#campaigns?video=... opens the video ad form filled in (Video App Income's "Run this on InstantAdPay" button)
Fields only (video link, target, name, title, button words, watch length); https .mp4/.webm links only; nothing is submitted for the member
and the server validates as before. Chatbot: new answer vai-video-ad + prompt line, KNOWLEDGE_DATE 2026-11-22 (Marty 2026-11-22).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 10:08:27 -06:00
martbost 8ae98be870 Site invite: kind 'promo' for a site's own ready-made video. The email then reads "Here's a short video that shows how it works" and the subject "<sponsor> sent you a video", never that the sender made it; every other word unchanged (Marty 2026-11-21)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 12:45:11 -06:00
martbost 7ca7514c42 Stack POL Pro badge: granted or comped Pro no longer posts to Telegram (the 111 pre-launch grants were posting one by one as members opened their dashboards); Pro from a member's own purchase still posts (Marty 2026-11-21)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 09:18:16 -06:00
martbost 50bd2e3557 Site invite module: email-check code mail for Video App Income's network gate (/api/partner/invite/code: fixed wording, no links, requested = transactional, 5 an hour per address, 2,000 a day; typo and throwaway domains refused); mailer.send opts.fromName = the site's name on the same authenticated address; chatbot answer extended (Marty 2026-11-21: every Video App Income member must be a network member, as frictionless as possible)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 07:42:51 -06:00
martbost 1d5dd057e0 Sponsor invite emails for other network sites (siteinvite.js): Video App Income sponsors can email their own directs once, sent here (Marty approved 2026-11-20: directs only, fixed wording, IAP sends it). Signed /api/partner/invite/{eligible,send} (SITE_INVITE_SECRET), once ever per recipient per site, 25 a day per sender and 200 a day overall, pause switch siteInvitesPaused, the tank batches' never-mail list, no email address leaves this app; admin view + one sample to the admin address; chatbot answer; KNOWLEDGE_DATE 2026-11-21; qa/site-invite.test.mjs (39 checks)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 06:38:23 -06:00
martbost 68825e694e Stack POL Pro admin grant: quiet:true skips the badge post (bulk Pro for members whose $10+ package predates the Pro launch, Marty 2026-11-20); an existing Pro never re-posts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 17:10:51 -06:00
martbost 66581fb621 Public /api/config: no Telegram chat/topic ids, no spamScanAllow, no value holding an email address (seven member emails and the admin chat id were readable by anyone; admin pages read them through /api/admin/site) (2026-11-20)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:10:35 -06:00
martbost d662a382ac Pipeline board fits on one screen: long columns scroll inside themselves (headings pinned) and the board's sideways scrollbar is wide and visible (a LinkSpin member 2026-11-20: "need a bottom slide rule"); site.css v=20261120pp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 12:28:06 -06:00
martbost 0b45058b6a Text ads one price everywhere: on-site text 1 credit per 100 views (was 10), network text unchanged at 100 (nas ipc 100, divisor 1); chatbot + Campaigns copy updated (Marty 2026-11-20)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 05:16:56 -06:00
martbost d86ab29302 Stack POL switch from stackpol.com/my: signed partner route POST /api/partner/stackpol/switch (STACKPOL_SWITCH_KEY), same stack-optin.json write as Promo tools (Marty 2026-11-19)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 06:59:15 -06:00
martbost f8f05e22b5 Tank batches deal the warmest leads first (hub heat score, ties in tank order; Marty 2026-11-19)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 04:46:30 -06:00
martbost 52f0a5496b Holding-tank readiness on the tank cards (Marty 2026-11-18, warm-up stage 1, no email)
Each waiting lead on My line > Holding tank and Admin > Members tank card now shows how they got into the tank, a stage chip (New / Warming / Engaged / Activated / Ready, real actions only), the network heat score 0-100 with its band, and their last real action. Computed on the network hub (POST /v1/tank/readiness); tankready.js sends this site's facts (own last sign-in, wallet, entry reason from the adoption records and join data; sponsor usernames, never emails) and caches the answer. Tank list sorts hottest first by default (grace and ready-to-activate grouping unchanged), new Heat sort and "Warm or hot" filter on the tank only. Hub down = the card exactly as before. No mail, no Telegram, no sponsor moves; adoption rules, caps and the v2 batch untouched. qa/tank-readiness.test.mjs (against a local hub) added to member + tankhold. tankready.js?v=20261118rd, my.js / admin.js / site.css ?v=20261118rd. iap-qa member ALL PASSED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 19:01:46 -06:00
martbost e57efd9e7c Promo tools: replace the team-build-link tiers infographic with clean team-link cards
Marty 2026-11-18. The 300x250 AI infographic (commission tiers, income-tier
figures) leaves the Banners pane; the file stays on disk so pasted URLs keep
working. New iap-team-box (300x250), iap-team-wide (600x300) and
iap-team-small (250x250): one invite link, joiners placed in your team line,
no tiers, percentages, amounts or income wording. my.js?v bumped. QA member
run: 0 bugs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:43:20 -06:00
martbost f000dfc7e4 Promo tools: 600x300 wide and 250x250 small banners for every display design
Member request. New: core Advertise & earn (wide + small), the globe art
(small; its 600x300 existed), the ledger card (wide + small), Wired Wednesday
and Five Dollar Friday (wide + small). Rendered by tools/gen-card-banners.cjs
with neutral file names. Wired into the Banners pill groups; my.js?v bumped;
chatbot banner-size facts updated. QA member run: 0 bugs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:18:18 -06:00
martbost 0e4e744fe7 sponsorOf: a numeric sponsor ref (a member id, e.g. '1') now resolves; the bare byMemberId name threw inside a try and returned null, so members sponsored as #N had no sponsor for chat, coach and line checks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 15:54:27 -06:00
martbost 2c39ef5e40 Sponsors can message every member of their line: isDownlineOf walks up the member's sponsor chain (exact, uncapped) instead of the capped list of newest directs; listByReferrer cap 200 -> 2000 so big lines show older directs (Marty's follow-ups: 41 of 49 were refused 403)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 15:39:25 -06:00
martbost 3213cdfa0b Promo tools > Network sites: YourProgramBuilder kit (creatives, lines, tracked links from its /api/promo-kit, src rewritten to iap); CSP connect-src yourprogrambuilder.com; netkits.js?v=20261117ypb (YourProgramBuilder go-live, Marty GO 2026-11-17). iap-qa member ALL PASSED.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 11:38:24 -06:00
martbost 0d91ab87d9 Network link nwypb: YourProgramBuilder as its own tracked network link (netsites CODES), the nwvas pattern (YourProgramBuilder go-live, Marty GO 2026-11-17)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 11:31:17 -06:00
martbost 8c9d72a768 Spamhaus DBL cleanup (2026-11-17): close the ad-click redirector, mail links on the share domain
- /api/ads/click/<id> only redirects off-site for an active campaign (or its owner). Ended, paused,
  archived and flagged campaigns (488 of them, e.g. #164 -> shrt1.xyz) kept forwarding forever, a
  standing instantadpay.com redirector. They now land on the home page, uncounted.
- mailer.js rewrites every instantadpay.com URL in subject/text/html and List-Unsubscribe to
  MAIL_BASE (default https://instantadpay.link; '' = off). Email addresses and subdomains untouched.
- Share hosts answer /unsubscribe (GET + RFC 8058 POST) and /banners/* in place; leaderboard, blog,
  presentation, partners, launch, plays, bixpay, wall are pages, not usernames (none taken).
- NAS syndicated ad click URLs go out on instantadpay.link (NAS_CLICK_BASE) for new pushes.
- toolkit.js member links (AI writer, handout QR, split-test, partner promo) use shareDomain.
- my.js: banner "copy URL" on the share domain; bridge link (Wednesday/Friday) now builds from the
  share-form invite line (it silently fell back to the plain invite). my.js?v=20261117dbl.
iap-qa member: 0 bugs; networksso-partner e2e all passed on rerun.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:29:11 -06:00
martbost f1c8ba33c8 Partner credits for PolHunter tour stops (Marty 2026-11-17): POST /api/partner/credits
Signed like polgrant (X-Game-Ts + X-Game-Sig = HMAC(HUNT_SSO_SECRET, ts + newline + body)), polhunter only.
Grants earned-grade ad credits (ads.addEarned, kind earn, credit-activity line "PolHunter tour stop: <site>")
once per ref across instances (marks.claim pcred:<game>:<ref>); a repeat answers repeat: true. Ceiling per call
siteConfig partnerCreditsMax (default 25); suspended accounts refused. qa/partnercredits.test.mjs: 9 checks
on a local copy (bad sig, unknown member, ceiling, bad ref, grant, repeat, one log line, earned grade, other game).
iap-qa member walk: 0 bugs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:23:13 -06:00
martbost c65e57dadc Network Weekend: Builder Bundle cap 24 (DH keeperGrantsLeft 49, 5 PRO_PENDING, 20 reserve); tier Game Pass bonus days only said while sovTiers is on (it is 0 live) (Marty 2026-11-17)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 08:27:05 -06:00
martbost d471a5664d AI ad writer on text-ad campaigns (Marty 2026-11-17: "do it on the other sites too"): "Write my ad from my link" under the text ad fields asks the network hub (hubadwriter.js, POST /v1/adwriter, headline 60 / ad text 140) for 3 ads from the Target URL; GET/POST /api/my/adwriter; shown only when the hub says on; chatbot fact, KNOWLEDGE_DATE 2026-11-17; my.js?v=20261117aiw. iap-qa member 0 bugs, kb green
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 08:16:39 -06:00
martbost 218bb10145 Network Weekend 2026, built dormant (Marty 2026-11-17): Black Friday to Cyber Monday, midnight to midnight Central
- promodays.js: reusable date-to-percent bonus map (setting promoDays, kill switch promoDaysOn), once per tx via marks (MySQL):
  Fri 11-27 +40% $5+, Sat/Sun +20% $5+, Mon 11-30 +30% $20+. A mapped Friday is paid by friday.js at max(fridayBonusPct, day pct),
  one bonus per tx, Game Pass Friday perk intact; Five Dollar Friday +20% resumes 12-04 with no hand edits.
- friday.js: Thanksgiving Thursday 18:00 CT notice + email carry the Black Friday copy (one message); Black Friday kickoff and
  wrap-up copy; /api/friday reports the day's real pct and name; IAP_TEST_NOW test clock (ignored in production).
- Weekend Starter Bundle ($20+ in the window: LinkSpin code WEEKEND500 on a purchase notice) and Builder Bundle ($100+: notice +
  GET /api/network/weekend-builders for DownlineHydra, X-Weekend-Key = env WEEKEND_BUNDLE_KEY, constant-time compare).
- promos.js: promo_codes.starts (dormant-until gate) for code NETWORKWEEKEND.
- gamepass.js: tier passes paid by a package Fri 11-27 00:00 CT to Fri 12-04 00:00 CT get Explorer/Champion +15 days, Legend +60.
- /weekend deals page (assets/weekend.js), Home strip + Overview card (assets/weekend-card.js), network ribbon (netdeals.js +
  assets/netweekend.js via common.js and netline.js), chatbot fact + answer date-gated.
- Share hosts: /weekend, /friday and other page names are pages, not usernames (email links use instantadpay.link: instantadpay.com
  is still on the Spamhaus DBL, checked 11-17).
- welcome.js says the day's real pct; common.js/netline.js/welcome.js ?v=20261117nw.
- Tests: qa/promodays.test.cjs (12) + qa/weekend.e2e.mjs (18) at test clocks; bash qa/run.sh weekend; member walk clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:59:55 -06:00
martbost 72160c6a10 Network sign-in: the way back to every network site (Marty 2026-11-17: "I just logged in to Instant Ad Pay from Viral Ad Source, and it never had a return path back")
Root cause: IAP's networksso `wallets` list was hand-written and had no ViralAdSource line, so
/sso/check?r=viraladsource was refused ("unknown site asking") and the browser was sent to the
IAP dashboard: a signed-out visitor to viraladsource.com/my was even dropped there by the silent
check, and a signed-in IAP member could never be signed in on ViralAdSource through IAP.
- networksso.js: providers also answer every site in the hub's GET /v1/sso-sites; ?return=<site>
  &to=/path links remember the way back (nsso.ret, known sites only); /sso/resume finishes it
  after the code sign-in; a wallet site with no wallet on the account goes to the Wallet tab
  first (nsso.wait, no bounce loop) and the wallet link answers next: /sso/resume; the tap state
  lives 1 hour.
- server.js: every /go/<site> and ?return= request goes to networksso (no per-site list; fivex
  was missing from it too); walletPath /my#wallet; /api/me nssoBackTo; wallet link next/backTo.
- my.js: "Taking you back to <site>" after the wallet link; one line on the Wallet tab while a
  site waits for the wallet. my.js?v=20261117back.
- qa/networksso-return.e2e.mjs: hub-only site, silent check, tap, wallet step, return links,
  no open redirect. All network sign-in suites and iap-qa member pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:21:19 -06:00
martbost 71e2e2b487 Promo tools > Network sites: ViralAdSource kit (creatives, lines, tracked links from its /api/promo-kit; src rewritten to iap inside copy and HTML too); CSP connect-src viraladsource.com; netsites CODES viraladsource nwvas; netkits.js?v=20261117vas
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 06:11:30 -06:00
martbost 78bf53c48e Remove street mailing address from public footers (Marty 2026-11-16)
Footer and the network line now read "(c) 2026 TrustClickz"; bump asset
version tags so browsers pick up the new common.js and netline.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:48:34 -06:00
martbost 7e113f055d Smarter chatbot + support matching by meaning (Marty 2026-11-16): the hub's semantic match (free core2 embeddings)
Chatbot (chatbot.js + netkb.js route): a hand-off pattern still answers first; then the hub's POST /v1/kb/match answers with
this site's entry when it is sure, keeps or overrules the CANNED regex hit, and picks the AI prompt context, this site's own
entries first. 1.5 s timeout, then the hub is skipped for 30 s and the old pattern + BM25 path answers (NETKB_MATCH=0 = off).
Support desk: while a signed-in member types a new ticket, POST /api/my/support/suggest shows the closest help answers (KB
entries only, incl. ones written from past tickets, never another member's ticket; BM25 when the hub is down); Send is never
blocked. support.js?v=20261116sg.
Tests: qa/netkb-semantic.test.mjs (route/suggest decisions, fail soft, shared-file parity; run.sh kb) and
qa/support-suggest.mjs (run.sh member). netkb.js is the same file in all eight network sites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 05:46:31 -06:00
martbost 94067cf000 networksso hub e2e: the wallet partner takes the hub hook (Marty 2026-11-16)
The stand-in wallet partner now runs the real wallet-site hubevents.js (from ../../5xyourteam/app, skipped when absent) behind
POST /api/hub/events, and the hub hooks it (HUB_HOOK_EVERY_MS 1 s). New cases: the partner session open in the browser ends after
Sign out everywhere on LinkSpin (member.signedout, matched by the member wallet), and a partner session opened before a hub
block ends after it (member.blocked). Same file in InstantAdPay and LinkSpin: ALL PASSED from both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 05:06:03 -06:00
martbost 8e6b5674ae Holding tank batches: throttled emails + round announcement (Marty 2026-11-15: "spread the emails out", "Post it to the new members area")
Assignments still happen at once. Only the assigned people's "X is now your sponsor" emails go
into a MySQL outbox (tank_batch_outbox, survives deploys): tankBatchEmailsPerDay (100) per
Central day, evenly spaced from tankBatchEmailStartHour 8 to tankBatchEmailEndHour 20 CT,
oldest first, through the site mailer (unsubscribe rules + link). Right before each send:
still with that sponsor, not unsubscribed, flagged, spam or erased, else skipped. Exactly once
across app copies: MySQL lock + conditional UPDATE queued->sending + marks claim per row. The
switch-on reminders for a batch person start when their email goes out.

Telegram: one announcement per round for the CTB group's General topic (tankBatchAnnounce,
tankBatchAnnounceChatId blank = the payments group, tankBatchAnnounceTopicId blank = General),
with the ladder card image (banners/holding-tank-leads-1200x675.jpg): total, sponsors by
level, how to qualify; then one card per sponsor in the payments topic, at least
tankBatchFeedGapMin (2) minutes apart. Sponsor emails stay one digest per round.

Admin: GET/POST /api/admin/tank/batches/mail (queued, sent today, next send, pause/resume),
POST /api/admin/tank/batches/round (the normal round path). Preview shows the email plan.
qa/tank-batch.test.mjs 78 checks (cap, window, skip-if-changed, two copies, pause).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:53:42 -06:00
martbost ade472cbc8 networksso e2e: tamper a middle character of the signature (the last base64url character carries only 4 bits, so A<->B could decode to the same bytes: a 6% flake seen in qa member 2026-11-15)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:46:03 -06:00
martbost 0e031f477e Network hub sign-in, step 3 (Marty 2026-11-15) + signed-out login slot refused
networksso.js (the same file on every network site): with HUB_SSO=on /sso/start asks the network hub, /sso/in takes the hub's h1. token (this site's HUB_SECRET, iss hub, aud iap, 60 s, single use, state cookie), and when the hub has nobody the old pairwise provider is tried once (the fallback until every site is switched). networksso.page() on every GET: a signed-in member's real page load tells the hub once (nsso.hp, hub /sso/set and straight back) and pings the hub's /v1/activity once a day (fire and forget), only while the hub answers /health.
Sessions: SESSION_TTL_HOURS (168 = 7 days in production), renewed on use at most hourly; the cookie lives 30 days and the server's sliding expiry decides. auth.endSessions(email, wallet).
Sign out everywhere: POST /api/auth/logout-everywhere (hub /v1/sso/signout, every session of the member here ends) and a "Sign out everywhere" link beside Log out; my.js?v=20261115hub. hubsync: member.blocked and member.signedout end every session of that member here.
Login ad: /api/ads/slot?type=login refuses signed-out callers (no ad drawn, no view counted; bots and probes cannot run up an advertiser's numbers). The games' kit keeps its own route.
Chatbot: a sign-in lasts 7 days and renews; the login ad shows every few hours on its own clock; the silent check is every 2 minutes.
Tests: qa/networksso-hub.e2e.mjs (new, run.sh member; real hub + IAP + LinkSpin + a wallet partner on four cookie hosts): page load pushes to the hub once, LinkSpin signs in through the hub, partner gets the wallet from the hub, sign out everywhere, blocked, replay, forged key, no email code. Partner e2e: signed-out slot on both sites, LinkSpin clock. qa member: ALL PASSED (2 known admin warnings).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:26:16 -06:00
martbost 027107b0fd Chatbot: the coming-soon tank batches entry needs its pattern (seeds() reads c.re.source; boot failed without it)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:07:07 -06:00
martbost ccfaacc935 Holding tank batches (Marty 2026-11-15), master switch tankBatches OFF
Active members with their own paid package ($20+ InstantAdPay, $25+ LinkSpin via the
refuel record) receive tank people in batches: Paid 10, Fueled 20 (counted refuel streak
or a $50+ package), Twin Engine 25 (both engines this cycle or the top package, the live
catalog's highest, $500 today), +5 per further consecutive refuel month up to 50. Every
2 days per sponsor, topped up to their size, dealt by rotation highest tier first from
tank.adoptable() (grace, rule 3, LinkSpin adoptions respected), never self, own upline,
adopted twice, flagged, spam, mistyped, erased or unsubscribed. Same tank.adopt path
(sponsor change, chat, "X is now your sponsor" email, switch-on reminders); one notice
per batch to the sponsor. Uncontacted after 7 days -> back to the tank as 'unreached'
(not counted). Tank feed: payments-topic card + live toast, sponsor/count/level only.
Member panel "How to get fed leads" (tankfeed.js). Every number is a site setting.

5xYourTeam draft gets its own cap (fiveXDraftCap, default 10): open draft picks only;
plain adoptions, the 24-hour safety net and batches each count their own people.
Admin: GET /api/admin/tank/batches/preview (read-only) + /api/admin/tank/batches.
Chatbot: coming soon only. qa/tank-batch.test.mjs (60 checks) in run.sh member.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:59:20 -06:00
martbost 1a13f53b9c Login ad on a clock + 5xYourTeam sign-in loop fix (Marty 2026-11-15)
Login ad: shown on the next member page load whenever the member's last finished view on this site is older than loginAdEveryHours (site setting, default 3), signed in just now or not. One row per member in MySQL (loginadclock.js, table login_ad_views; the same file in LinkSpin): /api/ads/slot?type=login answers notDue inside the window and marks the serve; POST /api/ads/login/seen at the end of the countdown restarts the clock only if the serve was at least dwell-2 s earlier (a reload during the countdown does not skip it). Framed gate, 10 s timer, click relay, frameable fallback, delivery and credit accounting unchanged. Welcome tour still outranks it. Member erase forgets the row. Admin site setting label added.

5xYourTeam loop: IAP answered /sso/check?r=fivex as if LinkSpin asked (fivex was missing from the wallets map), so tokens went to LinkSpin and Marty never got back. fivex added (FIVEX_URL, default https://5xyourteam.com); networksso.js now refuses an unknown r instead of answering as the peer. A pending network hop (nsso.back) is finished after sign-in: the login ad (if due) then /sso/resume; the gate's finish button says Continue and goes back to the site and page the member came from. /api/me carries nssoBack. The session pop-up (welcome.js) waits until the login gate is closed.

networksso.js: loop guard TRIED_AGE 30 min -> 120 s (it blocked Marty's silent sign-in on LinkSpin), NAMES gains fivex. The same file now ships byte-identical in IAP, LinkSpin, VBB, DLB, ViralAdBlitz, DownlineHydra, 5xYourTeam.

Tests: qa/networksso-partner.e2e.mjs (new, in run.sh member): a stand-in wallet partner on its own host; signed in on IAP -> straight back with a session, no dashboard, no ad; signed out -> sign in, login ad, Continue -> back on the partner page; the clock (due, too-soon refused, no re-show on reload or another tab, reload during the countdown brings it back); LinkSpin -> partner. networksso unit test: 2-minute guard, unknown site gets nothing. qa member: ALL PASSED (2 known admin warnings).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:45:12 -06:00
martbost ad533a0d56 Promo tools > Network sites: ViralAdBlitz, DownlineHydra, 5xYourTeam join Downline Banners and Viral Banner Blitz (Marty 2026-11-15), read live from each site's /api/promo-kit; CSP connect-src admits the three; netkits.js?v=20261115nk. qa member ALL PASSED
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:09:29 -06:00
martbost 3a00ddf3dc Shared network knowledge (Marty 2026-11-15): the chatbot publishes its KB to the network hub and reads the other network sites' entries (netkb.js, the same file in every network site), home entries boosted, a named site's entries first and labelled with its LinkSpin tracked link, a question naming another site skips the instant answers (a hand-off still wins). Wallet answers follow Marty's rule (SafePal or any other crypto wallet, never recommend MetaMask), since they are now shared network-wide. /support prefills the subject when a network site's chat hands off (?from=&subject=), support.js v=20261115cb. KNOWLEDGE_DATE 2026-11-15. qa kb (incl. netkb-merge 98) + member pass
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 13:31:22 -06:00
martbost 6ef7a023df Member erase: their username leaves the messages that stay (another member's chat to them, a notice to their sponsor about them), whole words, 5+ characters; names option for a second pass after the account is gone; residue sweep also finds a long username inside text (REGEXP whole word)
Found on the LS-1021 erase: two kept messages still said "rajumiddha". qa/erase.mysql.test.cjs 3 pass (disposable mysql:8 on core), qa/erase.test.cjs 6 pass. NOT deployed (one InstantAdPay deploy today for this lane); ships with the next one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 12:43:14 -06:00
martbost 84d566e784 Member erase (Marty 2026-11-15, ticket LS-1021): POST /api/admin/erase {email, dryRun (default true), force} + the hub's member.erased event
erase.js runs inside the app so the documents modules keep in memory and the MySQL rows stay consistent. Refused unless
force: a main wallet, an on-chain member number, positions, a team here, ads still running or queued. SQL: the account,
sessions, signals, credits (unspent ad credits go away), credit log, views, visits, drips, nudges, digests, adoptions,
marks, promo redemptions, prospects, pipeline notes, their ads and every row hanging off them; messages they sent and
notices to them; a chat another member sent them stays for that member with a tombstone recipient; help-desk tickets
stay as history with the requester tombstoned and their own messages blanked; other members' mute lists. Documents:
every doc that mentions them is scrubbed by scrub.js (new, same file in LinkSpin) through the owning module's live copy
(lsinbound, lssync, sponsorfollow, refill, tank-ready, hubsync) or through docstore (legacy reloaded). A residue sweep
over every text column reports anything left. A 30-day email-hash tombstone (erase.json) stops lsinbound and the hub
path from bringing them back; the log keeps hashes and counts only. hubsync handles member.erased {emailHash}.
qa/erase.test.cjs 6 pass (JSON mode); qa/erase.mysql.test.cjs passes against a disposable mysql:8 on core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 12:29:31 -06:00
martbost b925661eac Network footer links: CODES adds viraladblitz nwvab, fivex nw5x and downlinehydra nwdh (Marty 2026-11-15), identical to LinkSpin's netsites.js. qa member ALL PASSED
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 10:17:31 -06:00
martbost dd50674d96 Merge dh-networksso (1c06c58 DownlineHydra network sign-in) for the 5x/DH IAP deploy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:05:54 -06:00
martbost ea07861b36 Footer network links carry a referral username (Marty 2026-11-15): the signed-in member's own (/api/me), else the sponsor the visitor came in on (iap.sponsor cookie, usernames only, never a member number or wallet). Tracked links get it as s1 (LinkSpin sends it on as ?ref=), plain links as ?ref=, none for Earners Corner. common.js + netline.js, same approach as VBB 6798503; ?v=20261115nr. iap-qa member: ALL PASSED. NOT deployed (5xYourTeam lane owns today's IAP deploy).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:05:30 -06:00
martbost 1c06c58daf Network sign-in for DownlineHydra (2026-11-15): networksso NAMES downlinehydra, wallets.downlinehydra = DH_URL (default https://downlinehydra.com; staging https://dh.saasy.top until the domain switch), /go/downlinehydra. networksso.test ALL PASSED
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:02:10 -06:00
martbost e1bee03b95 hubsync: a tank adoption-window expiry (sponsorfollow label 'expire') now reaches the hub as a sponsor change by 'expiry' (the hub's name); before, these moves were silently skipped. qa/hubsync.test.cjs 20/20 (new test fails without the fix)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 07:50:03 -06:00
martbost e17d8c4fbb 5xYourTeam The Draft on the network holding tank (Marty approved the rules 2026-11-15): signed partner routes draftpartner.js, LOCAL ONLY
POST /api/partner/draft/{pool,adopt,release,status}, HMAC DRAFT_PARTNER_SECRET over 'draft.v1.' + ts + newline + body (X-Draft-Ts /
X-Draft-Sig, 5 min), 503 until the secret is set; GET /api/admin/draft (picks + log). Every pick is tank.adopt() with opts.partner:
the signed 5x claim (positions >= 1) replaces the own-$20-buy rule for these calls only (the member's own tank button keeps it); the
coach needs an account here with a wallet linked and someone on this contract in their line (else a pick who starts here would walk
up to the company), not flagged, under the people-held cap; max 10 open picks; max 2 adoptions per person; the 24 h grace; rule 3
plus a fresh hub lock check at adopt (hub silent = refused); pool also drops spam/flagged (fraud + link-farm list), throwaway and
mistyped email domains, anyone adopted twice. Cards carry no contact data (hub ids or opaque i_ ids, door, joined, last seen,
wallet yes/no, surfing credits; games null, not tracked here). The adoption email is the only mail: no payTrack reminders, no
payments-topic post. Sponsor moves via setSponsor (sponsorfollow + hub sponsor-change, by 'adopt' / 'release').

Pick window: adoption row expires +3 days; tank.sweep skips picks (hooks.isDraftPick); draftpartner.sweep (hourly) closes them by the
pick rule: started (payouts on / purchase) = done, adopted twice or locked = kept with the coach, hub silent = wait, else back to the
tank with the original join time (no new grace). Coach release after 48 h. rid makes adopt/release idempotent. A pick closed some
other way reconciles as 'moved'. MySQL tables draft_picks + draft_log (JSON fallback locally); every call logged with a code/reason.

Tests: qa/draft-partner.test.mjs 66/66 (real tank.js, mocked clock, fake hub + a local copy's routes on 8825), in run.sh member and
run.sh draft; bash qa/run.sh member exit 0 (bugs 0); tank-cap 13/13, sponsorfollow 30/30.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 07:20:14 -06:00
martbost 7f57aedcb6 hubsync: ask the hub for ids on /v1/locked (hub id + first door per row) and expose hubInfo(email) / resolvePerson(q) for the 5xYourTeam draft pool
Read-only. A hub without hub 1e99713 ignores ids: true and the draft pool falls back to opaque i_ ids. hubsync.test 19/19.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 07:20:13 -06:00
martbost 968e60835f Network sign-in by wallet for ViralAdBlitz (2026-11-15): networksso NAMES viraladblitz, wallets.viraladblitz = VAB_URL (default https://viraladblitz.com; staging https://vab.saasy.top until the domain switch), /go/viraladblitz. qa member: ALL PASSED (bugs 0), networksso.test ALL PASSED
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 05:41:11 -06:00
martbost 911dd623c0 Kestrel is free at level 20 in Shards of Valor (Marty approved 2026-11-14, Dallas: "The Archer should be free to everyone at level 20")
gamepass.js: HERO_DEFS kestrel freeAt 20. She is never sold here any more: buyHero refuses her ("free for every player at level 20
in Shards of Valor, so she is not for sale"), a bundle setting that names her drops her, heroOrderPrices/heroOrderOpen skip her, and a
waiting Kestrel order from before is cancelled unpaid (never fulfilled by a package). A member who bought her keeps her (the hand-off
still lists kestrel); nothing refunded. Valda, Morag, Roland, the $50 bundle of those three and every price unchanged.
Member card: Kestrel shows "Free at level 20" and "Not for sale" (my.js?v=20261114kes). Chatbot canned answer + AI fact say so.
qa/sov-heroes-store.cjs reworked for it (old Kestrel buyer kept, stale order cancelled, stats $180). iap-qa member: ALL PASSED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 16:21:12 -06:00
martbost 4ccdb914c7 Network sign-in: a deliberate 'Sign in with InstantAdPay/LinkSpin' tap while signed out on the provider now asks for the provider's sign-in, then finishes the trip (/sso/resume), instead of bouncing back silently (Marty 2026-11-14: VBB sign-in did nothing)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 14:31:47 -06:00
martbost 82eab8016b GET /api/admin/member-extra?email= (Marty 2026-11-14, network hub member lookup): read-only, admin Bearer; what the member card leaves out: optedOut (drip unsubscribe), updatesOptIn, tank {inTank, ready {readyAt, holdUntil}, adoptions summary}, fraud {flags, suspended, suspendedReason}. qa/member-extra.mjs in the member run (401 without/with a wrong password, 404 unknown, fields present). iap-qa member: ALL PASSED
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 12:57:33 -06:00