Commit Graph

167 Commits

Author SHA1 Message Date
martbost abf7415c83 Burner: on-chain ref = burn id; recognise already-mined burns from CreditsConsumed and hold in-flight sends, so a lost RPC response can never double-burn
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 09:49:20 -05:00
martbost 94910275c0 Positions policy: cap of five per account, refuse wallets registered under anything but the main member, admin members shows positions; Qualified Start card states the rule
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 09:42:06 -05:00
martbost f6490c9444 Promo tools: hook video cards (matched links, downloads, captions, share buttons)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 08:55:29 -05:00
martbost 276618dd73 Member ads everywhere they belong: text strip under every pane title, banner at the foot of each main pane, wall + plays slots; Network views as its own campaign column
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 08:35:31 -05:00
martbost 787963d605 Wall: larger InstantAdPay brand line
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 08:25:40 -05:00
martbost 7ae31f4b18 Join page: compact hero with InstantAdPay brand headline; opt-in and ledger example above the fold; chips and POL note below
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 08:23:59 -05:00
martbost 55b010d8c2 Admin burner line: balance is the gas fund, not a cost; show skipped burns
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 08:21:15 -05:00
martbost bcc895dc8d Member area: loading spinner instead of flashing the sign-in card
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 08:17:55 -05:00
martbost 7708e602ae Catalog: 20s cache so ladder pages stop waiting on five live quotes
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 08:13:27 -05:00
martbost 29e18aa48a Wall page: InstantAdPay headline + POL on Polygon; payouts-in-POL copy on join/home/Wallet/objections/chatbot
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 08:10:35 -05:00
martbost e0d4bbc2e1 Public /api/config never exposes credential-like site settings; join page spacing
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 08:04:19 -05:00
martbost b7f2b3ef3f Join page: How it works and The packages span full width below the fold; sign-up card sticks beside the ledger example
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 08:01:12 -05:00
martbost 7374dc8f1b Credits: reserve live campaign budgets so purchased credits can't be over-committed; burner dry-runs and skips reverting burns; coaching flags directs not bound to you on-chain
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 07:50:59 -05:00
martbost 9ebb9a86b2 Ledger/earnings rows show when; Earn credits: never your own ads; burner sets Polygon fees + rotates RPCs on node errors
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 07:43:24 -05:00
martbost 5652987675 Verified visits: budget derives from the pack count (form has no budget box)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 07:39:27 -05:00
martbost b824711ac5 Campaigns: gold available-to-spend banner + where-your-ads-run (incl. Network Ad Space); Wallet: live POL balances; Earn credits: done-for-today mark
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 07:36:24 -05:00
martbost 4156b1f815 Coaching layer + tools: coach your directs (rungs, stalled, one-click nudges), automatic member nudges + weekly sponsor digest, prospects list, per-angle link stats, broadcast templates, Qualified Start calculator, Telegram proof feed, send-failed alerts, admin P&L pane, automatic credit burner (ethers), username lock, home-page comparison, printable checklist, wall link in Promo tools
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 07:30:16 -05:00
martbost 0c30e831eb plays: scope box styles to direct children 2026-09-10 07:08:07 -05:00
martbost 16a9f76f50 Training: section pills; /plays member page (three plays + Qualified Start) with the member's own link in the scripts
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 07:06:19 -05:00
martbost f785016cb5 Training: section headers; byline 'Brought to you by the Crypto Team Build Network' under every logo
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 06:25:58 -05:00
martbost 15a881a72b Positions: force the wallet's account picker (wallet_requestPermissions) when adding a position or when the Buy-from wallet doesn't match; sign/send with the wallet's active account
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 06:11:38 -05:00
martbost 70b96bf862 Training: video posters (posterUrl from the list, else .jpg beside the .mp4) + preload=metadata
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 04:36:22 -05:00
martbost bd0f351c13 Plays doc: Qualified Start opening move
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 17:32:05 -05:00
martbost 046464b83e Linked positions (Qualified Start): extra wallets on one account, credits pooled, buy-from picker
- accounts/db: positions table + JSON store (add/list/owner/remove; main-wallet and cross-account guards)
- auth verify: asPosition links a second wallet without touching the session; position wallets can't mint a session
- /api/my/positions (chain-refreshed member ids, buyer counts, credits) + remove
- credits pooled across main + positions on /api/me, dashboard, campaigns; campaign charged to the best-funded position
- My line: own positions listed on level 1 as 'You · position N'
- Buy pane: Qualified Start card + Add a position flow + Buy-from picker with connected-wallet guard
- Wallet pane: Your positions card; chatbot answer updated

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 17:18:47 -05:00
martbost b86dbfd9e9 Admin: wall fallback ads editor (House ads pane) + /api/admin/wall-ads
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 15:45:49 -05:00
martbost 2ac6549171 Wall ownership ladder: positions 2 and 3 become the member's own at 2 / 5 qualifying buyers
- accounts.wall_offers (JSON, up to 2 offers: label, https link, banner) set from
  Profile > Your wall; upload supported; locks show the buyer threshold.
- /api/wall assembles: position 1 = own line banner; positions 2-3 = own offer
  when unlocked and set, else upline banners (only uplines with a live banner),
  else house ads. Response carries unlocked + buyerCount; wall labels show
  "this wall" / "their line" / "InstantAdPay".
- Chatbot canned answer + facts, follow-up email 7 mention the ladder.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 15:31:45 -05:00
martbost 8b25361eef QA harness: qa/run.sh + walk.mjs (public + member/admin) + earn.mjs (earning flows)
Headless Playwright checks that boot a throwaway local copy for anything that
signs in or writes; npm run qa / qa:public / qa:member / qa:earn.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 11:32:13 -05:00
martbost 26b98c65c5 Invite links answer HEAD too
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 11:05:02 -05:00
martbost fe217b897a QA fixes: HEAD on page routes, Shorts signed-out 401, invite-page onboarding handoff, viewer check buttons clear of the overlay close button
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 11:03:26 -05:00
martbost dc3a8e0464 Admin settings: graphical editors for follow-up emails, rates and site settings
Follow-ups: one card per email (hours, subject, body), placeholder chips,
add / reorder / remove / send-to-me. Rates: labeled fields with hints, tier
table, milestone sub-fields. Site settings: key/value rows. No more JSON.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 10:00:27 -05:00
martbost 9b32d40874 Wall page: platform icons on the social pills
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 08:32:52 -05:00
martbost 4846af535a Earn credits: ad view dwell defaults to 10 seconds (was 5)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 07:58:24 -05:00
martbost c7018f6258 My line: POL earned from each person; wallet picker features non-Trust wallets first
- /api/my/line sums TierPaid events per buyer for the signed-in member; the
  downline rows show "+X POL" (what that person has paid you so far).
- AppKit featuredWalletIds: MetaMask, Phantom, SafePal, Coinbase first; Trust
  Wallet stays available under All wallets.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 07:47:41 -05:00
martbost 9608d07544 Buy flow: balance pre-flight; Trust Wallet users get a drain-warning heads-up
Stops early when the wallet lacks the POL. Only Trust Wallet users see the
proportion warning (smaller package / add POL / other wallet); everyone else
goes straight to the wallet confirmation. Buy-pane tip + chatbot reworded.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 07:23:19 -05:00
martbost 68d68b1ebf Wallet: recover from a dead WalletConnect session instead of failing the buy
Probe the session after connect and retry once after a "disconnected" send
error by wiping the stale session and re-opening the picker (Trust kills the
session after its own security stop).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 06:41:09 -05:00
martbost 15a29af104 Follow-up sequence: 7 emails over 14 days in Marty's voice, paid-aware branches
Drafted through the Branded Voice engine (gain, logic, PAS, logic, honest
fear of loss, AIDA, gain + newsletter hand-off), checked against the contract
facts. {{paid:a|b}} resolves per reader from on-chain credits. Defaults now
live in drip-defaults.json; admin overrides still in the volume.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 06:37:39 -05:00
martbost ce49dbbe4d Lead capture pages + follow-up email sequence
- /join/<token>[?v=angle] now serves a capture page (email first, wallet
  later) with angle-matched hook copy, sponsor line, worked-example ledger,
  how-it-works, live package ladder, and per-angle og tags (og:url keeps ?v=).
  The sponsor cookie is set exactly as before; ?v= is remembered and stored
  on the account as joined_via (shown in admin Members).
- drip.js: 4-step getting-started sequence (24h/48h/96h/168h) queued when a
  free account is created with the pre-checked opt-in; ticker every 10 min;
  signed /unsubscribe link in every email; MySQL + JSON storage.
- Admin > Settings: edit the sequence as JSON, reset to defaults, send any
  step to the admin inbox; Overview shows follow-ups in flight.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 06:21:01 -05:00
martbost f717acad97 Promo tools: drop the printable handouts section and /flyers page
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 06:12:00 -05:00
martbost f3f9662d99 Promo tools built out: posts, text-a-friend, swipes, banner kit, handouts, objections
- Social posts for X / Facebook / LinkedIn / Telegram-WhatsApp with post and
  share buttons; 5 SMS-sized Text-a-friend messages (Text it / WhatsApp /
  Telegram / Copy); email swipes short, standard, long, follow-up.
- Banner kit adds 1080x1080, 1080x1920 and 1280x720 (tools/gen-social-banners.cjs)
  with Download buttons.
- Printable half-sheet handouts at /flyers with the member's QR + invite link
  (qrlib.js, two per letter page, cut line, print-one).
- Objection handling bank: truth + ready-to-send reply per objection.
- Invite-link strip, Branded Voice CTA, pill menu covers every kit; chatbot
  canned answer + prompt facts updated. Angle links carry ?v= for the
  upcoming hook pages.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 05:54:18 -05:00
martbost e7ee7d0614 Promo tools: pill menu (Social posts / Email swipes / Banners / Banner wall / Videos)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 05:34:45 -05:00
martbost dd2ee4b77e One way in: email sign-in only; wallet-only sessions finish setup by email
- Remove the "sign in with just your wallet" door from the sign-in card.
- A wallet-only session (no account) is walked to the email card with a
  finish-setup note; verifying the code links that wallet to the account
  and retires the wallet-only session, so member #, purchases and payouts
  stay attached and username/profile work.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 05:32:30 -05:00
martbost c0bd4fcbdd Plan: angle videos + matched ?v= squeeze pages for promo tools
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 05:26:51 -05:00
martbost 438b1921e9 Admin portal (/admin) + free house ads; POL amounts show two decimals
- /admin: email magic-code sign-in allowlisted to ADMIN_EMAIL, 12h admin
  session (cookie iap.adm, persisted in the volume). Bearer ADMIN_PASSWORD
  API access still works. Member area shows an Admin link for that email.
- House ads: admin places banner/text/login/solo/video/featured/visits
  campaigns owned by house@instantadpay.com that cost nothing; budget is
  only a delivery cap, spend is never charged or burned.
- Admin APIs: overview, all campaigns (+pause/resume any), members
  (+re-point sponsor), reports (+resolve), pending burns, rates/site
  config get+patch, creative upload.
- fmtPol rounds to two decimals everywhere (dashboard, toasts, prices).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 05:15:19 -05:00
martbost b6a0729335 Name the referral in the new-referral email
The email fired at signup, before the member picked a username, so it always
said "A new member." Fire it instead when the username is first set (onboarding
/api/my/profile, empty->set transition only) so the sponsor's email names them
(@username). Removed the signup/verify triggers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-08 16:46:59 -05:00
martbost e58de01209 Fallback unattributed joins under #1 instead of root
Members were activating with sponsorId 0 (their own root) whenever their sponsor
couldn't be resolved — dead pre-wipe links (dkain) or no link at all — so their
purchases rolled to admin instead of building the tree. Default an unresolvable
sponsor to the configured catch position (siteConfig.defaultSponsorId, default
1) in both the buy path (/api/sponsor) and the free-activation path (/api/me),
guarded so #1 itself is never self-sponsored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-08 15:28:28 -05:00
martbost 4872fbbfd0 Bump wallet.js cache token to t so the disconnect fix actually loads
The prior commit changed wallet.js but the HTML still referenced ?v=r, so
cached browsers kept the old file. Point the HTML at ?v=t.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-08 14:09:32 -05:00
martbost 85532155a6 Make wallet disconnect not hang
AppKit's modal.disconnect() can stall on the WalletConnect relay (mobile),
leaving the Disconnect button spinning forever ("just loads and says
disconnect") and never reaching the reload. Race the disconnect against a
1.2s timeout, and fire-and-forget from the button with a guaranteed reload
that drops in-memory wallet state so the picker returns.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-08 13:57:35 -05:00
martbost 11011c6c51 Put the price on each Buy button to prevent wrong-package buys
Testers were tapping the highlighted "Most Popular" $50 tile's Buy thinking it
was a general buy, and getting a $50 charge they couldn't afford. Each tile
already buys its own package; label the button "Buy $20" etc. so it's
unambiguous which package a tap purchases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-08 12:28:06 -05:00
martbost cb5c8db2c6 Never cache HTML (no-store) so wallet browsers can't serve stale pages
Trust's in-app browser was serving a cached pre-fix HTML page that pointed at
old JS, re-triggering the numeric-chainId crash even after the fix shipped.
Switch HTML from no-cache to no-store so every load fetches the current page and
its current asset versions. Versioned assets still cache for an hour.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-08 12:02:05 -05:00
martbost b7e2cf56b9 Use the account's stored sponsor at buy time, not just the cookie
/api/sponsor (which the buy flow reads to set sponsorIdIfNew) resolved ONLY the
iap.sponsor cookie. A member whose join cookie was absent at buy time (different
device, cleared cookies, return visit) resolved to 0 and activated on-chain as
their own root instead of under their real sponsor — irreversible. Prefer the
logged-in account's stored sponsorRef, cookie only as anonymous fallback,
matching /api/me.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-08 11:59:48 -05:00