Commit Graph

303 Commits

Author SHA1 Message Date
martbost 7aec7d5169 Presentation page + Build Wide 'wide' join angle
- /presentation: the narrated InstantAdPay presentation (video on Spaces
  training/iap-presentation.mp4, poster .jpg), caption pills for
  en/it/fr/es/de/pt (VTTs served from /captions, text/vtt MIME added),
  sponsor card from /api/sponsor ("Shared with you by @name" + Join to
  /join/<ref>?v=wide, or the plain join link). Works framed: join and
  sign-in open a new tab, internal links carry ?ref.
- Site menu + footer: Presentation. Sitemap, Traffic pages and the viral
  page list include it. Promo tools: "Share the presentation" strip copies
  instantadpay.com/presentation?ref=<username>.
- 'wide' join angle (Width unlocks depth.): server JOIN_ANGLES with the
  buildwide poster as og:image, join.js angle (portrait video on phones,
  16:9 otherwise, files promo/buildwide*), link stats row, promo VIDEOS
  first entry with a per-entry file override, front-door list entry.
- Chatbot: presentation canned answer + facts, ?v=wide in the angle lists,
  KNOWLEDGE_DATE 2026-10-15.
- common.js/my.js/promo.js/join.js cache tags bumped; qa/walk.mjs PUBLIC
  gains /presentation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:51:04 -05:00
martbost d86f2fbcf8 Reverse registry sync: LinkSpin-first members arrive on InstantAdPay as waiting accounts
POST /api/partner/registry (same HMAC LS_SYNC_SECRET scheme LinkSpin accepts from us, 10-minute window) feeds
lsinbound.js: an email already on InstantAdPay keeps its sponsor and only gets empty fields filled (username if free
and allowed, wallet if no other account or linked position holds it, profile); a new email becomes a waiting shell
(joinedVia linkspin) under its LinkSpin sponsor, building the sponsor's shell upward from known rows (25 levels),
remembering a sponsor whose row has not arrived and binding it later, refusing sponsor loops. No mail, notices or chain.

Unclaimed shells are left out of accounts.listAll by default (tank, coach nudges, Friday/Wednesday broadcasts, member
update audiences, leaderboard, 1,000-member milestone count); the admin members table and lssync ask for them. The first
sign-in claims the shell: the sign-up anti-fraud checks run then, a sponsorless shell takes the link used, lastSeen set.

Loop guard: lssync mutes an email while its LinkSpin row is applied, then records the result as already pushed when it
equals what LinkSpin sent; touch() now skips rows whose hash is unchanged. Status: GET /api/admin/lsinbound (also under
/api/admin/lssync as inbound).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:44:53 -05:00
martbost ae72a06a85 Mail: every non-transactional email carries an unsubscribe link and honours opt-outs
instantadpay.com landed on the Spamhaus DBL. Only the drip and the admin update
tool had an unsubscribe link; the Wednesday/Friday broadcasts, coach nudges and
digests, milestone, refill, reach, wallet nudges and sponsor notices had none,
and several did not check opt-outs. The rule now lives in mailer.send, so new
senders inherit it: skip anyone who unsubscribed, append the signed link (unless
the body already has one) and add RFC 8058 one-click List-Unsubscribe headers.
Exempt (transactional): sign-in codes, mail to ADMIN_EMAIL, purchase receipts
and payout notices. /unsubscribe now accepts the one-click POST too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 06:34:40 -05:00
martbost 4759cabf09 Game art off the adrotate.xyz host: ad blockers filter 'adrotate', so the PolyBreak card showed no image (Games tab, public games page) and promo banner previews went blank; serve from the Spaces CDN instead
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 08:28:31 -05:00
martbost 2df64f6247 Angle pages: each hook angle shares with its own video frame as the preview image; Share sends one message with the link inside the text (Telegram dropped the separate url)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:51:58 -05:00
martbost ba811e48f8 Angle page 'play': /join/<member>?v=play shows the 'If you have time to play' video, three points and a Play the free games button (games page with the member's ref) above the free sign-up; listed in Promo tools angle pages; the video's matched link now opens this page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:43:46 -05:00
martbost ab83e37d23 PolyBreak on the network rails (hand-off, in-game sign-in, one-more-paddle refuel receipts, Games card, strip line, return routing) + Promo tools PolyBreak card, 600x300 traffic-exchange size for every game and InstantAdPay's own 600x300 banner
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:06:57 -05:00
martbost 06f2665809 PolyWarriors pass mint: visible 'Minting now' hand-back page with a Back to PolyWarriors button and a 2 s auto-return (a silent redirect chain left Zachary's iPad on the mint form)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 13:45:48 -05:00
martbost f417d416da RPC circuit breaker for InstantAdPay: bench a failing provider for 10 min, 4 s timeout on eth_call, log provider failures; log any request over 3 s (members felt slow sign-ins; the sticky index was paying the 15 s timeout on every call when a node hung)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 11:29:31 -05:00
martbost 0f56d3c7bb PolyWarriors launch trailer: Promo tools game card (player, 16:9 + vertical downloads, poster, caption, share) and the public games card plays it; poster replaces the coming-soon art
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 09:41:35 -05:00
martbost 1287f94669 Bare /join: use the viral-link token when the handler already consumed ?ref= 2026-10-11 18:36:12 -05:00
martbost b796a7a64e Bare /join: honour ?ref= before the sponsor cookie 2026-10-11 18:29:22 -05:00
martbost 041a3d41ae Bare /join redirects to the sponsored join page (cookie sponsor, else company); games page links /join/<ref> directly
Diann: "Join free" on /games?ref=diannt landed on "Not found". /join, /join?ref=
and the Friday/Wednesday /join?v= links all 404ed because only /join/<token>
was routed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 18:26:24 -05:00
martbost 9cf039270e Telegram feed: name a freshly activated member by wallet when the chain id is not mapped yet
The "switched on payouts" line read a bare "#200" although the member had a
username (roodtriaan07): names are looked up by chain id, which the account only
gets after the index links it. Fall back to the activating wallet's account.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 06:48:35 -05:00
martbost 23da5b61ba PolyWarriors mint bar: 4 h cookie (was 7 days), cleared on every exit, x to hide
Members who tapped Mint, saw the price and went back to the game kept the blue
"PolyWarriors mint" bar on the dashboard for a week. The cookie now lives 4 h,
is cleared by Back to PolyWarriors / Cancel (new /pw/mint/leave), by the
mint-pass success redirect, and by an x on the bar (/pw/mint/dismiss). The
waiting order itself is untouched: a later package still completes the mint.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 06:28:53 -05:00
martbost 1ffca3030c Games page: featured PolyWarriors listings come through a same-origin proxy (/api/public/pw-featured, 60 s cache); the page CSP blocked the direct call
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 18:13:09 -05:00
martbost 84d54eda16 Games page in Promo tools (All games entry with the member's referral, three posts), in the viral-link page list and the chatbot; a generic games banner (1200x630 + 1080 square) as the /games share image instead of the two-games launch art (Marty 2026-10-10)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 14:18:55 -05:00
martbost fcb9edd2eb Public games page at /games (Marty 2026-10-10: a page to send people): every game, open ones first, dated ones after, with play links to each game's site, OG tags, and a join call that keeps ?ref; data from the new public /api/public/games/all
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 14:06:55 -05:00
martbost f8e55413ee Mint passes survive deploys: durable persisted maps (passes, prizes, game orders) are restored whatever their age, pass records carry ts; the admin member card shows PolyWarriors mint passes
The open-tokens loader kept only entries newer than 2 hours, meant for short-lived earn tokens; pass balances had no ts, so every deploy wiped them (Orlando's were lost on 2026-10-10).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 09:51:06 -05:00
martbost 310992e40f 1,000-member POL drop (Marty 2026-10-10): snapshot of activated members at the milestone, 1 POL each from a dedicated wallet, notices for paid and missed
milestone.js watches the account count (site config milestoneMode off|dry|armed, milestoneTarget 1000, milestonePol 1). At the target it freezes the eligibility list: wallet activated on chain (member record with activated flag), not on the no-payout list, not suspended, one payment per wallet. Payments go one at a time from IAP_MILESTONE_KEY with tx hashes per row and never twice; the Telegram start post waits for the wallet to hold the full amount. Paid members get an in-app notice + email with their Polygonscan link; everyone else gets the missed-it nudge (link a wallet / switch on payouts), email only with the newsletter opt-in. One start and one finish Telegram post (Discord mirrored), the total logged in the P&L as a rewards cost against Receiver A. Admin: /api/admin/milestone (view, mode, snapshot, recheck, pay, settle, notify-missed, reset-before-payment).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 09:35:50 -05:00
martbost d8a31ddd40 Games tab: a coming-soon card stops carrying its soon object once the opening day arrives (SpellWheel's button read '[object Object]' on 2026-10-10); SpellWheel card art switches to the game's live OG image
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 06:16:15 -05:00
martbost f7c4d34a35 PolyWarriors mint pass: the button shows Minting... and the redirect no longer waits on the game callback (Marty's phone sat on the form on 2026-10-09 while the mint had already gone through)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 18:30:26 -05:00
martbost 7d20cd2c35 Login ad: frame the sponsor's page inside the gate under the timer bar (open-in-tab link, dashboard button), new-tab fallback only when the site refuses framing (Brian Holland: no timer, no way out on the ad tab)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 09:17:48 -05:00
Marty Bostick efb6020e40 Mirror Telegram group posts into the Crypto Team Build Discord
Discord relaunch 2026-10-09: the shared discord-relay.cjs fans every post that goes to the
community group out to the matching Discord channel (achievements topic -> #achievements,
payments topic -> #payment-proofs) through DISCORD_WEBHOOK_* webhooks. Telegram HTML is
converted to Discord markdown, buttons become links, cards post as images. DMs and alert
chats are not mirrored. Fire-and-forget; off when the env is unset.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 13:57:29 +00:00
martbost af5a53b833 Daily snapshot gains a Games block: members handed into each game (counted at hand-off, per hour) and payouts read from each game wallet on Polygon in the last 24 h, launches of the day called out
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 09:13:44 -05:00
martbost d93d26f2e3 Signed /api/partner/registry: InstantAdPay pushes member rows live; new people become shell accounts with their line, existing shells gain username/wallet/sponsor
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 07:14:39 -05:00
martbost 7e949c86ec Cross-promo strip entries for SpellWheel and PolyWarriors (shown once each is in gamesLive)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 04:57:02 -05:00
martbost 468def461c Tester view of a coming-soon game drops the soon object so the Play button renders (showed [object Object])
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 17:30:57 -05:00
martbost 8285e31fbd Game testers (env GAMES_TESTERS) see the Play button on a coming-soon game from the Games tab before it opens (Road Agent testers, Marty 2026-10-07)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 17:17:33 -05:00
martbost b82f63f803 Road Agent card shows 'Opens Thursday, Oct 15' to every member until launch day; Promo tools gain the Road Agent entry on launch day
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 14:10:20 -05:00
martbost dfd0b9dbed Destination reachability: refuse a link whose host has no DNS record at save time; daily sweep pauses live ads whose host is dead two days running, notices the owner (in-app + opt-in email), one admin alert; Admin API /api/admin/reach (+/run, dry) (campaign #163 served lmgnow.co after the domain vanished)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 13:24:50 -05:00
martbost 04fad66dab Road Agent hooks: per-game door round trip (fuel stops under RA_SSO_SECRET, callbacks to RA_URL), /api/my/roadagent hand-off, registry + strip entries (not live), wallet nudges ask Road Agent, door page words itself as a fuel stop
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 12:30:41 -05:00
martbost 616bd37142 Wallet-link nudges: hourly job asks each game (signed with the shared secret) for players with POL waiting and no wallet, sends up to three notices per person (now, 3 days, 10 days) in-app and by opt-in email, stops when a wallet is linked; coach directs badge "POL waiting, no wallet"; admin view and run endpoint
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 10:35:16 -05:00
martbost 5c31f4540c Sign-in guard: measure form age on the visitor's own clock (fage) so a device with a fast clock is not refused forever
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 04:26:58 -05:00
martbost 98c24c2e6b Platform facts page (/facts) and /llms.txt: verified contract split, credits, refunds, anti-fraud and games; footer link on every page; sitemap entry
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 15:25:26 -05:00
martbost 9142efef01 PolyWarriors mint passes go to the NEWEST waiting order (an old forgotten order took Marty's); admin endpoint to credit/remove passes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 07:30:56 -05:00
martbost a32c1ab3c9 PolyWarriors weekly season prizes: signed game claim -> earned credits (setting pwWeeklyPrize 1000,500,250), once per week+place
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 09:38:18 -05:00
martbost e3b2c7b579 PolyWarriors mints: every $5 of packages bought while a mint waits earns one mint pass (bigger packages earn more, kept on the account); one-tap 'use a pass'; members keep the ad credits; existing credits never pay for mints (replaces the 100-credit checkout)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 09:15:30 -05:00
martbost ec57a926fc Welcome back bonus: +250 earned credits on the first sign-in after 7+ days away (settings comebackBonus/comebackDays)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 08:28:54 -05:00
martbost 503a252fc8 P&L: Game marketing category for game wallet top-ups (old top-ups moved once from Player rewards); counted in Advertising and promotion
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 08:22:06 -05:00
martbost 18813a4127 PolyWarriors paid mints: /pw/mint checkout, 100 credits from package credits only (earned never counts)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:56:44 -05:00
martbost d1a638b66b Games tab: PolyWarriors coming-soon card (opens Monday Oct 12); sign-in kit's one-tap link carries the inviter's ref
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:32:13 -05:00
martbost f9299e5ef3 One-tap game links keep the inviter's ?ref for signed-out visitors (PolyWarriors, SpellWheel, ClutterHunt, Drip Runner, PassiveDrip; Gem Kingdom and Spooky Doors already did)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:25:36 -05:00
martbost c99896c131 Member welcome offer from the games: starter.js (+100 purchased-grade credits on a first $5+ package after a game visit within 14 days, once per account; setting starterBonusCredits), /api/starter + /api/starter/public, /my?from=<game>#buy banner with the way back to the game perk, Members get <perk> on game cards, admin Traffic 'Games to members' table
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 06:26:03 -05:00
martbost f09ff71c56 PolyWarriors hookups: in-game sign-in (game 'polywarriors', PW_SSO_SECRET), one-tap /api/my/polywarriors, sign-in return route
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 04:34:37 -05:00
martbost e09babc1ff SpellWheel hookups: in-game sign-in (game 'spellwheel', SW_SSO_SECRET), one-tap /api/my/spellwheel, sponsor-visit hints through the shared refuel flow (sw-hint receipts)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 08:56:40 -05:00
martbost 5a4b27f50e Games tab: SpellWheel coming-soon card (date, no Play until Oct 10); ClutterHunt card now says it pays POL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 08:27:11 -05:00
martbost 4e35a83fdd Tax summary: real block timestamps for sale dates (the 2 s estimate drifted weeks), cached
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 07:24:17 -05:00
martbost eb3cfebf1f P&L: Cost lines with tax categories (advertising, player rewards, software, other), outside-wallet source, duplicate-tx guard; Tax summary (income vs advertising/promotion, own sales excluded, CSV)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 07:22:21 -05:00
martbost ca7a579990 Admin: stop a member campaign on every rail (pause + archive, releases unspent budget) and grant refunds as purchased-grade credits (Shift AI closed)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 07:06:42 -05:00