Commit Graph

250 Commits

Author SHA1 Message Date
martbost a3905a0b5a ClutterHunt: SEEK_SSO_SECRET tokens, in-game sign-in (game seek), one-tap hand-off, hint visits via the refuel flow, Games card + strip entry
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:10:03 -05:00
martbost 7775ed87ef Member update emails can carry one linked header image: a simple HTML part alongside the plain text (same paragraphs, footer, unsubscribe)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 16:19:49 -05:00
martbost 56eb1f2d4f Gem Kingdom continues ride the refuel flow (GK token, gk-continue receipt + callback, game-aware page, in-game overlay message); house-ad visits report 0 credits so no game pool books income nobody paid
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 15:47:51 -05:00
martbost 22407fe9ae Game purchases report the purchased part (paid): earned viewing credits are not money, so game POL pools grow only from purchased credits (Gem Kingdom + Spooky Doors receipts carry paid)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 15:36:33 -05:00
martbost 0fd67b407a In-game sign-in carries the paid-traffic source: joinedRef = <game host>/<src>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 11:30:23 -05:00
martbost 0112422c72 Cross-promo strip: /api/public/games (live list, Spooky Doors while in season), /g/<slug> counted hop (signed-in straight into the game), shared /assets/game-strip.js; Drip Runner card says 0.10 POL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:19:39 -05:00
martbost 30c95026f9 In-game sign-in for the games: /api/game/auth/{start,verify,username} (CORS for the game origins, same code guard and one-account checks), /api/game/enter for signed-in nudges, shared kit /assets/game-signin.js
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:01:34 -05:00
martbost 217802d577 Spooky Doors promo card link uses ?ref= (consistent with the other programs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:07:09 -05:00
martbost a5a991d024 Spooky Doors launch pack (IAP side): door packs + Golden Doors, Promo tools card, season from Oct 4
- Visit packs get a placement: 'all' (as before), 'doors' (Behind Spooky Doors, doorPackCost 4/door) or
  'golden' (Golden Spooky Door, goldenDoorCost 6/door). campaigns.placement column (alterSafe) + JSON store.
- Doors serve golden packs first, then door packs, then the existing chain; each pack at most once per
  player per Central day. Door-only packs never reach the Earn tab, refuels or the PassiveDrip listing
  until rates.sdSeasonEnd ('2026-11-01'); from then on they behave as 'all'.
- Door payloads: credits = per-door price actually charged (3/4/6); Golden Doors add golden: true and
  bonus: goldenBonusCandy (2) to /api/door/open, done, callback and receipt. Gold variant of /door.
- Campaign list: Spooky Doors / Golden Door chip, doors opened + unique players, Buy more doors at the
  door price. Composer: placement choice with live cost. Admin rates labels + house pack placement.
- Promo tools: Spooky Doors card (spookydoors.com/r/<username>, copy, share image, two posts) on the same
  season window as the Games card (seasonState helper).
- Season start moved up to 2026-10-04 (Games card + promo card + chatbot).
- qa/door.mjs covers all of the above.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 15:55:19 -05:00
martbost 9809953ae0 Spooky Doors house ads: an empty street serves one of Marty's programs instead of "Nobody's home"
When a door finds no visit pack and no video, /api/door/open serves a house ad from rates.doorHouseAds
(RM Circle, Drip Runner, Gem Kingdom, PolHunter by default; ref templates carry the player's IAP username
where the program takes a share link). Rotation: never the same program twice in a row, else the one least
recently shown to that member today. Same dwell + Halloween icon check. No advertiser charge and no campaign
imps, but it counts toward doorCapPerDay (visit_repeat row with campaign 0). Callback and receipt add
house: true and program, with credits 0, host null, campaignId 0. doorHouseAds = [] restores none=1.
Admin rates table keeps text columns as text so the list survives a save. qa/door.mjs covers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 15:06:53 -05:00
martbost dbbce34202 Spooky Doors: doors may repeat a visit campaign after doorRepeatDays (7) via visit_repeat; Earn and refuels stay once-ever
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 14:51:10 -05:00
martbost 3b57bbc9cf Spooky Doors door check uses Halloween icons (pumpkin, ghost, bat, candy...) instead of the generic set
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:10:41 -05:00
martbost 27c9d51fde Spooky Doors (Halloween season game): hand-off, door visits, costume shop, seasonal Games card
- SD_SSO_SECRET / SD_URL (default https://spookydoors.com); sdMint/sdOpen same token shape as Drip Runner
- GET /api/my/spookydoors sign-in hand-off (?ref pass-through; iap.return spookydoors + sdshop whitelisted)
- /door page (Halloween copy of /refuel, door art backdrop) + /api/door/open|challenge|done as visit kind 'door';
  signed callback to SD_URL/api/door/callback (X-SD-Ts/X-SD-Sig) + 24 h door-receipt on ret&ok=1&r=;
  ret&none=1 when nothing to serve, ret&cap=1 at the daily cap; host = campaign owner's username
- /sd/shop (+ topup/resume/confirm) costume checkout via ads.gamePurchase('Spooky Doors: <label>'), sd-receipt
- Games tab: generic season window (Central days, admin preview before start, hidden after end) + pink
  limited-time ribbon; progress from SD_URL/api/partner/player (signed); my.js ?v bumped
- Chatbot canned answer + prompt facts; qa/door.mjs (bash qa/run.sh door) end-to-end on a throwaway local copy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 09:40:08 -05:00
martbost 6804a26c5d Games cards: optional artPos crop anchor; Drip Runner share image anchored left so its headline isn't cropped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:47:36 -05:00
martbost bc713f57b0 Games tab: Drip Runner card uses its share image
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:45:59 -05:00
martbost 5c54bd3905 Games tab: Gem Kingdom card uses the share image
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:18:39 -05:00
martbost 9212128b0d Chatbot + Games card: Gem Kingdom pays POL for first clears (six chapters, boss ladder to 10 POL, pool-funded, no referral bonus)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 07:58:39 -05:00
martbost be102a4b16 Gem Kingdom sign-in carries a feed post's ?ref through to IAP sign-up
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 20:00:39 -05:00
martbost 0e32a57424 Gem Kingdom shop: Paid! page with refresh back to the game (CSP form-action blocked the cross-site 302)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 16:29:48 -05:00
martbost be313e6202 Gem Kingdom: sign-in hand-off (/api/my/gemkingdom), Games card (admin preview until gamesLive), Crown shop checkout (/gk/shop: confirm, short -> top-up detour with dashboard banner back, confirm spends credits via ads.gamePurchase, signed receipt redirect + server callback); game purchases skip refill notices and the campaign list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 15:36:03 -05:00
martbost 513c713292 PassiveDrip moves from Games to an Earn-tab card (it is an earning site); members see it when site config passivedripLive=on, admin preview until then
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 10:11:19 -05:00
martbost 5a522f0ede Weekly member email as sectioned HTML (plain-text twin kept); PassiveDrip one-tap hand-off (inert until PD_SSO_SECRET)
- coach.js: weeklyDigest() builds one card per topic (credits, streak, contest, tank, team) with the key number up front and one button; mailer.send takes optional html
- server.js: /api/my/passivedrip mints a signed hand-off (memberId, email, username, verified wallet, sponsor email); Games card for PassiveDrip (admin preview until gamesLive includes passivedrip) with the member's own coins line via the bridge 'member' lookup; sign-in return path
- my.js: card button label, return redirect; v=20261001b

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 08:43:22 -05:00
martbost dd53d132d6 Games hub: one Games menu entry and pane with a card per game (registry in server.js, live list = site config gamesLive, default polhunter; admin sees unlaunched games as previews), Drip Runner card with the player's own progress via a signed read; chatbot knows Games + Drip Runner (KNOWLEDGE_DATE 2026-10-01); QA walk covers the pane
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 04:36:49 -05:00
martbost 5fe6058e76 Drip Runner video refuels: when a player has visited every running visit pack, the refuel plays a member video ad (advertiser charged one view as on the Watch tab, player gets fuel not credits, counts toward the refuel cap, one refuel per video per person); timer runs only while the video plays and the page is in front
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 17:52:52 -05:00
martbost 5d0e89be6f Drip Runner refuels get their own daily allowance (refuelCapPerDay 20): visit_seen.kind earn|refuel, each kind capped separately, once-per-page-per-person still spans both; clearer refuel cap / no-packs copy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 17:44:59 -05:00
martbost 2b2e131c3e Drip Runner referrals: /join/<ref>?from=driprunner returns newcomers to the game once they have a username, first-touch source driprunner.saasy.top, hand-off carries sponsorRef/joinedRef
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 17:14:05 -05:00
martbost f1b37e0c4a Drip Runner return path: signed-out hand-off sets iap.return=driprunner and the email sign-in answers next=/api/my/driprunner (straight back into the game); refuel page dead ends keep a Back to Drip Runner button
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-30 14:01:47 -05:00
martbost 587272673b Drip Runner trial (2026-09-30): /api/my/driprunner hand-off, /refuel verified-visit page for the game (advertiser charged, viewer gets fuel not credits, signed callback + receipt), completeVisit(opts)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-30 13:33:37 -05:00
martbost 3ae9ab55e9 Balances: show earned and bonus credits that live campaigns already hold (Jim's Wired Wednesday bonus read as +0 earned); PassiveDrip bridge PD_SYNC_APPLY=0 read-only mode while pointed at staging
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-30 08:08:50 -05:00
martbost 972421fbbe PassiveDrip PTC bridge: visit campaigns listed on PassiveDrip's paid-to-click page (signed sync every 5 min), delivered visits read back and applied to the pack (read, never derived); admin status + run routes
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-30 07:57:47 -05:00
martbost a2d7bede82 Refill: 7-day idle follow-up (unanswered out notice, >=100 credits, nothing running; once per record, tracked as state idle); ad click relay ignores an advertiser opening their own ad
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-30 04:34:38 -05:00
martbost f7d9fd65cb Wired Wednesday: admin route to post the kickoff now (marks the day sent so 09:00 does not repeat it)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-30 04:26:24 -05:00
martbost a7a15615ec Sponsor survives a lost cookie: join page sends its own token with the code request, server remembers it per email for 30 days, framed visitors offered a full window
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 09:48:06 -05:00
martbost b5baaf27e8 Partner kit pages at /partners/<slug>; first one for Jamie (@cryptojaime)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 09:36:25 -05:00
martbost a60905a9fb Tank, roster and downline: sortable/filterable lists with last seen, surf earnings and wallet/payout state; admin Members table loads 5000 accounts
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 09:25:55 -05:00
martbost 43463366ec Wired Wednesday floor is $20 (Activation pack and up): there is no $10 package
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 08:07:21 -05:00
martbost 8a6029cd90 Wired Wednesday: bonus is wired into the balance (purchased-grade, any format), no forced visits campaign; all copy corrected
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 05:42:08 -05:00
martbost 04fd4db9ca Wired Wednesday: +25% on $10+ packs wired into a verified-visits campaign; /wednesday bridge page, banners, kit, cards, chatbot (notice + kickoff off until approved)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 04:49:34 -05:00
martbost 927b13a7cf Admin > Email an update loads at once; audience counts fill in from the background
The panel waited on a Sendy pass over every member (minutes, and the cache
empties on each deploy), so it showed blank. Counts are now a snapshot with
a background refresh, and the form no longer depends on them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 04:43:42 -05:00
martbost e1309d43b7 plan-lab: exactly one route, admin-fee label says whole-org
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-27 13:19:57 -05:00
martbost 6e3f631cc6 plan-lab: one route (the builder had appended it three times), clearer admin-fee label
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-27 13:09:04 -05:00
martbost a2d5706d8e Unlisted /plan-lab: Reach Ladder simulator for the planning group
The working simulator for the new matrix plan, served by link only
(noindex, no menu entry, no sitemap). Engine in /assets/plan-lab.js because
the CSP blocks inline scripts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-27 12:38:43 -05:00
martbost 7ef8094a4d Top-ups: check the ad's own position, say where the free credits are, offer to pay from another
Bug: topUpCampaign read the position from the owner's campaign list, which
does not carry memberId, so every top-up was checked against the member's
MAIN position (Jim Watts: every ad said 19 free). It now reads the ad's row.

When the ad's position is short, the error names it and lists the member's
other positions with their free credits; the dashboard offers to pay from
the best one. Moving an ad settles any charges its old position already ran
up (a burn on the old member id) before switching, so the new position only
pays for views after the move.

Weekly email: unspent credits are broken down by position with the advice to
start a campaign from the largest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 06:05:19 -05:00
martbost cf5a9674a2 Friday Bonus Hunts: InstantAdPay counts the banked days
Each day Saturday through Thursday (Central) that a member opens an inbox ad
and watches a video banks one extra PolHunter hunt for the following Friday.
If their inbox had no unread solo ad that day, the video alone counts, so
nobody is blocked by an empty inbox. These are the two slowest-delivering ad
types (about 6-7 views per campaign per day against 40-50 for banners), so
the game sends attention exactly where advertisers are short of it.

fridaybank.js counts from video_seen and solo_inbox.read_ts with DST-safe
Central midnights. /api/my/friday-bank feeds a card on the Earn tab (week
chips, today's two steps with links to the right sub-tab);
/api/hunt/friday-bank answers PolHunter, HMAC-signed with the existing
HUNT_SSO_SECRET, 5-minute window. QA member walk: 0 bugs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 15:20:51 -05:00
martbost 9116368ffe Telegram sender says what happened
Success logs tg-ok with the chat, thread and message id; a refusal logs
tg-fail with Telegram's own description; network errors and timeouts are
logged instead of swallowed. Without this a feed that fails is
indistinguishable from a quiet day, which is how the first grouped
purchase posts could not be confirmed from the log on 25 September.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-25 07:26:01 -05:00
martbost d2a3f162d0 Proof feed: one message per purchase, and it says InstantAdPay
Marty, reading the feed on 25 September: "I see the level 1 payout, I see
a level 2 payout, but I don't see who purchased something and what they
bought." And in the main Crypto Team Build group the same lines carried no
product name at all, so nobody knew what they were from.

feedgroup.js composes one message from every event of a purchase
transaction: the buyer and the package on top, the level payouts under it
with their dollar equivalents, then who was passed over and why. It is
triggered on AdminPaid, the last event the contract emits for a purchase,
which is how the missed-payout notice already knows the whole transaction
is indexed. Tier payouts and purchases are no longer posted one line at a
time. In payouts mode a purchase that paid no member (root or unsponsored
buyer) stays silent, as before. Every post now opens with the InstantAdPay
header in the main group as well as the payments topic.

Composed against three real transactions from the live index before
shipping: three tiers, a double pass-up, and a root purchase. QA member
walk: 0 bugs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-25 07:02:59 -05:00
martbost 742c271469 Chain-event side effects happen once across running instances
A Coolify deploy starts the new container and stops the old one only once
the new one is healthy, so for about half a minute two copies of this app
watch the chain. On 25 September, 06:26 CT, both saw Marty's $5 purchase:
two confirmation emails, and the Five Dollar Friday bonus granted twice
(+100 and +100, nineteen seconds apart). Every dedupe until now lived in
process memory or a JSON file on the volume; a second process shares
neither in time.

marks.js is the shared version: a row in MySQL that only one INSERT IGNORE
can win. The chain-event fan-out claims 'ev:<tx>:<logIndex>' before the
email, Telegram post, Friday bonus and sponsor sync; the in-memory feed
stays per instance. The Friday scheduler claims its Thursday email, kickoff
and wrap-up the same way, with the file marker kept as the second line of
defence and the thing an operator can edit by hand. Without a database it
degrades to a per-process Set, which is exactly the old single-instance
behaviour.

Proven on the production MySQL before deploy: first insert 1 row, second 0.
Marty's duplicate 100 credits reversed with a labelled adjust row; no other
member was double-granted.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-25 06:40:11 -05:00
martbost 5b694c8ab4 Five Dollar Friday bridge page, with the member's link on it
Marty's ask: use the Friday promo as a tool where the sponsor gets the
credit, and as a bridge-page entry point. The sponsor part already worked
(any public page + ?ref sets the sponsor cookie, 2026-09-21); what was
missing was a page that is ABOUT the offer, so a click on a "20% bonus
credits today" image did not land on the general pitch and leak.

/friday: the banner as the hero, the live state from /api/friday (live now
with today's pack count and bonus credits issued, or the next date with a
countdown to midnight Central found by scanning minutes so DST cannot put it
an hour out), three steps, the email-first join with a new `friday` angle so
it shows as its own row in Admin > Traffic, and the credit definition. No
attribution logic added: last touch, walk-up, as everywhere.

Promo tools: a {{FRIDAY}} token that turns the member's invite link into
/friday?ref=<username>; posts for X, Facebook and Telegram and a text that
carry it; the three new banners (loft 1200x630, dark 1200x630, square
1080x1080) as a group in the kit with a copy-my-Friday-link button on it.
Chatbot answer points at the page and drops the stale "first one is
September 25" line. /friday in the traffic list, the sitemap and the QA
public walk. Cache tags bumped on my.js, promo.js and site.css.

QA member walk: 0 bugs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-25 06:26:11 -05:00
martbost 1b72a9a18c Screen every advertiser destination against Google Safe Browsing
Google marked instantadpay.com "deceptive pages" on 24 September. The probable
cause was campaign #225: a verified-visits ad that opened llclickpro.com from
our pages, and llclickpro.com carries exactly that flag. We put other people's
destinations in front of members, so their reputation becomes ours, and
nothing was checking it.

sbcheck.js screens the destination when a campaign is saved (member and house
paths both) and re-screens every live campaign daily, pausing the ones on a
flagged host and alerting the admin channel with the campaigns and owners.
POST /api/admin/sbcheck {dry} runs a pass by hand.

Verdicts are three-valued on purpose: flagged, clean, unknown. A guard that
reads "could not check" as "clean" is the failure mode this whole day has been
about; one that reads it as "flagged" would refuse every advertiser whenever
Google rate-limits us. So flagged refuses and pauses, clean passes, unknown
passes at save time but is logged and retried by the sweep until it resolves.

Uses the official Lookup API v4 when SAFE_BROWSING_KEY is set (full-URL,
batched). Until a key exists it reads the Transparency Report site-status
record, decoded against Google's own test site rather than guessed:
status 1 is clean, status 3 with any true flag is listed, anything else is
no data. That endpoint rate-limits by answering HTML, hence the 4-second pace.

videosweep's inline alert is hoisted into videosweepAlert so both sweeps use
the same admin-only channel: these messages name members and their emails.

QA: member walk 0 bugs, public walk 0 bugs. Verified by hand that
llclickpro.com is refused, rmcircle.team passes, and our own host is skipped.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 19:38:35 -05:00
martbost fd08af36ba Admin alerts arrive from Marty's own Hermes bot
Operational alerts should come from @CoolifyHermes_Bot, where his other pings
land, not from the member-facing InstantAdPay bot. The token is supplied as
HERMES_BOT_TOKEN in the app environment and never appears in the repo.

Still admin-only, and it falls back to the IAP bot then email rather than to any
member-visible channel: these alerts name a member's campaign and their email.

Also: the sweep swallowed a failed pause in an empty catch, which is precisely
the failure mode the module exists to prevent. It reports now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-24 14:05:55 -05:00