Commit Graph

159 Commits

Author SHA1 Message Date
martbost 5d116c21a2 Video 1 rebuilt: 5-min motion-graphics team-build overview (approved script, cloned voice) replaces the 14-min original on the training page - corrected bonus doctrine, verified catch rule, dashboard layer; old file retained
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 09:03:10 -05:00
martbost 0e3af3b244 Rebuilt designed explainer with the approved 60s narration (rmc-explainer-8df7c62098): contract checks, one-tap join, live-dashboard scene, Get 2 Help 2 Teach 2 matrix, disclaimer CTA; tools card updated, poster regenerated, old file retained
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 08:40:55 -05:00
martbost 6f9d53cfa7 Teaching clips carved from the dashboard walkthrough: 1-min upgrade how-to + 2-min Messages intro, added to tools page; Hermes at-risk nudges now link the upgrade clip
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 08:33:56 -05:00
martbost 34dc04a9fc Training Video 7: the Member Dashboard full walkthrough (Marty's recording, web-compressed 74MB to 32MB) + chatbot sync + Coach card links to it as the teach-forward reference
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 08:26:39 -05:00
martbost f9500210eb Refreshed flagship promo (approved script): new 60s combined clip
rmc-combined-16284edbab.mp4 - the scroll b-roll now travels the current
home page INTO a real member dashboard, the matrix panel is retitled
"Get 2 - Help 2 - Teach 2", and a disclaimer end card closes the video.
Narration is the approved 60-second script (STT-verified word for word).
All references updated: home page, invite pages, member pitch, tools
(flagship card copy refreshed). Poster regenerated. Old clip retained
for links in the wild.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 08:11:21 -05:00
martbost bf7e9b7ea5 Share card rebuilt for person-to-person referrals: always-present personal QR (moving link handles rotation), tap-to-fullscreen scan mode, guidance adapts to 2/2; render pipeline hardened so one panel error can never blank later panels
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 07:33:19 -05:00
martbost 2e0620a251 Front page: replace the last YouTube embed with the self-hosted combined promo (matches join and pitch pages; no external embeds remain)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 07:25:19 -05:00
martbost 230fbde11e Invite pages: replace outdated YouTube embed with the self-hosted combined promo video (keeps prospects on-page, no end-screen leakage, matches the member-pitch hero)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 07:21:19 -05:00
martbost 12046334e4 Chatbot sync: promo tools answers describe dashboard hand-off + auto-personalized links
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 07:16:49 -05:00
martbost 8841e9d718 Tools page auto-personalization: dashboard hands off ?id=, every post/swipe (copy payload AND visible preview) swaps the bare main-domain link for the member's /join/<id> link; sticky via localStorage; green confirmation banner
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 07:14:45 -05:00
martbost 4014d12208 Make Promo Tools prominent on the member dashboard: gold nav button + full-width high-contrast CTA on the share card
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 06:26:55 -05:00
martbost b9ab55a156 Rotation exclusions: config rotationExcludeIds - excluded positions are never offered as the company-rotation target but their subtree is still traversed (founders reserving #4's slot for an incoming team)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 17:09:44 -05:00
martbost 02290f1200 SIWE-format (EIP-4361) sign-in challenge with EIP-55 checksummed address so wallets show their friendly Sign-in UI instead of a raw-signature warning
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 15:44:07 -05:00
martbost 0754a858c3 Fix stale dashboard right after own tx: fresh=1 cache bypass (one-shot via sessionStorage flag) set on upgrade success and post-join redirect
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 15:36:08 -05:00
martbost 70fc321c3e On-dashboard upgrades: qualified members upgrade their level right from /my/<id> - ownership enforced by matching the connected wallet to the position's account, exact BigInt cost read live via getAllCosts, MoonPay assist when underfunded, wallet-app deep links on mobile
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 15:30:50 -05:00
martbost ac5d29fc6e Dashboard freshness: bust the member cache on every indexed chain event + drop browser cache to 15s - joins/upgrades now visible on next page load instead of up to 2-3 min later
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 14:52:03 -05:00
martbost 6ebe436cf3 Rotation queue: reconcile against live chain directs in normalizeStatuses - never activate a sponsor the chain says is already 2/2 qualified (also syncs stale direct counts upward)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 14:37:48 -05:00
martbost dd6644bc3b MoonPay links: /buy/pol is a soft-404 - switch to the live /buy/matic page (POL's old-name slug) + copy note that MATIC is POL's former name
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 14:11:07 -05:00
martbost 9a1833f2b0 Wallet-verified member messaging (matrix-lines permissions, admin visibility)
- messages.js: challenge/personal_sign/recover auth (vendored pinned
  js-sha3 0.9.3 + noble-secp256k1 1.7.1, server-side only; self-tested
  positive + tamper cases), 30d HttpOnly sessions, message store on the
  volume, matrix-line permissions (your downline direct or broadcast, your
  upline chain - nothing else, so spam is impossible by construction),
  daily rate limits (30 direct / 3 broadcasts), 1500-char plain text
- chain.js: memberIdByAccount (wallet -> position for sign-in)
- API: msg-challenge/-verify/-me/-inbox/-send/-read public + msg-unread
  (count only, no auth) + admin/messages (full visibility, disclosed to
  members in the UI)
- Dashboard: Messages card with unread bell, one-tap wallet sign-in,
  inbox with auto-read, compose with to-ID or whole-team broadcast
- Admin: Member Messages review table
- Chatbot canned answer + AI system prompt updated

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 13:31:31 -05:00
martbost e31b01e338 Dormant company-rotation mode (publicRotationMode=chain, root #2) + multi-root teamRootId alert gating - founders' deal 2026-08-19, flip deferred until team link migration + Marty's right-leg position secured
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 12:39:01 -05:00
martbost c64a716fcd Fix indexer race: instant verify (join-now auto-submission) pre-cached new members, making the log tail skip their registration (referrer directCount never bumped - #41 stuck at 1/2 despite #134). preIndexed flag + merge on event + one-time re-snapshot migration.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 10:50:20 -05:00
martbost ffd6fb9785 Join page: silent wallet auto-detect on load (eth_accounts, no prompts) + Trust deep link coin_id=966 so it opens the join page, not the site root
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 10:26:20 -05:00
martbost dc4a79c13b Join page: Trust Wallet loop rescue - DApp-Browser enable deep link + mark MetaMask path recommended
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 10:21:21 -05:00
martbost 506db9de81 Mobile wallet deep links on the join page: no injected wallet -> offer Open-in-MetaMask/Trust buttons that reopen this URL (ref included) inside the wallet's dApp browser
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 10:12:55 -05:00
martbost d620555209 MoonPay card on-ramp for crypto-new members (zero custody)
- GET /api/public/moonpay-url: returns a MoonPay checkout link for POL on
  Polygon (pol_polygon). With partner keys in config (moonpayPublicKey/
  moonpaySecretKey, now PATCHable), the URL is HMAC-signed and prefilled
  with the member's own wallet address + shortfall amount; without keys it
  falls back to MoonPay's generic buy page. MoonPay is merchant of record -
  the site never touches funds.
- Join page: when the connected wallet can't cover the Premium entry, a
  funding box appears with the exact shortfall, a buy button (new tab), and
  a refresh-balance button.
- Training page: "buy POL with a card" callout after the funding video with
  the three things to get right (POL, Polygon network, own address).
- Start page: one-line card-buy pointer under the sponsor card.
- Chatbot canned answer + AI system prompt updated (funding guidance).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 09:44:01 -05:00
martbost f0a35a0127 Coach card: raise row cap 8 -> 10 so high-value entries like a funded at-risk member aren't trimmed
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 07:07:13 -05:00
martbost 43753dda4e Coaching Radar: separate Marty-owned positions (config.ownerIds) into their own action-item block, exclude from member-nudge tiers
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 06:24:22 -05:00
martbost 2872a30b96 Coaching scan: expose earnedPol + next upgradeCost on at-risk entries for funded-vs-timing nudge framing
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 06:13:41 -05:00
martbost dae2de4248 Fix 'fmt is not defined' in the admin Coaching Radar (helper was function-local elsewhere)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 06:10:22 -05:00
martbost a3fbd1b2a9 Teach-forward framing across all coaching surfaces (founders' doctrine)
Every coaching output now ends by teaching the recipient how to teach:
point them at the Coach Your Team panel on THEIR own dashboard and tell
them to run the same play for their two.

- Member dashboard dCoach footer: "you're not coaching two people - you're
  teaching two coaches"; easy-win rows add "show them how you spotted it"
- Admin Coaching Radar: teach-forward rule footer
- AI chat system prompt: COACHING DOCTRINE section so chat answers frame
  guidance teach-forward

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 05:35:43 -05:00
martbost a835291eab Coaching Radar: live downline triage in admin + member dashboards
- chain.js getCoachingScan(rootId): classifies everyone below a root into
  atRisk (POL forming they can't catch - corrected bought-level rule),
  rollForward (qualified-at-Scintilla with entry rewards covering Ascensus),
  and oneAway (1/2 directs)
- Admin: GET /api/admin/coaching?root= (name-decorated) + "Coaching Radar"
  panel with tiered who/what-to-say/POL-at-stake rows, auto-loaded
- Member dashboards: memberPublic now returns .coach scoped to the member's
  own leg; new "Coach your team" card shows the same triage so every member
  coaches their own team - computed live, no snapshots or cron needed
- Chatbot canned answer + AI system prompt updated to describe the panel

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 05:15:45 -05:00
martbost 9966dc1728 Fix off-by-one in catch-eligibility: catcher must be AT the bought level
The pipeline widget, owner upgrade alerts, and the org routing/leak map all
treated a position as eligible to catch a payment at the buyer's PRE-upgrade
level (level >= depth). Verified against on-chain history: position 6, at
exactly the pre-upgrade level (Ascensus) and qualified, was passed over on
position 8's Fabrica buy - so the contract requires the catcher to be at the
level being BOUGHT (depth+1), matching the "stay one level ahead" doctrine.

- chain.js getOwnerUpgradeNeeds: eligible now pLevel >= depth+1; neededLevel
  reported as the bought level (was one low, so alerts would have stayed
  silent in exactly the situation they exist for)
- chain.js getOrgRouting catcher(): same correction in the routing simulation
- my.js pipeline: needLevel/eligible/summary-text ladder corrected; warnings
  now name the right level

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 16:54:07 -05:00
martbost b66d3a50e8 Team-depth breakdown: members per generation on admin org panel + member dashboard
- chain.js getOrgShare now returns genCounts (breadth-first members per
  generation below the root)
- Admin "Your Organization vs. the Network" panel renders a Gen 1..N bar list
  with fill-vs-capacity (2^n slots)
- Member dashboard "Your team" card gains a Team Depth section computed from
  the subtree client-side, labeling each generation with the level whose
  upgrade pays that position (gen D pays at the level D+1 buy)
- AI chat system prompt updated to describe the new dashboard section

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 16:40:22 -05:00
martbost 9dbe7eddcb Track the join funnel end-to-end through the self-enroll page
- Self-enroll pageviews now tracked as the "joinnow" event (track.js loaded
  on the page; server whitelist + admin tiles/columns extended)
- A confirmed on-chain registration in the wallet-connect flow now auto-posts
  to the submit-id API, so every self-enroll join records a submission with
  source + clickid attribution and fires the purchase event and BeMob postback
  with no manual ID entry
- Optional name/handle field on the join page feeds the submission and the
  team Telegram alert
- Admin Traffic panel: Join-now views tile, Join-now -> Confirmed conversion,
  and a per-source Confirmed column for campaign-level ROI reading

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 16:37:09 -05:00
martbost f0e938f065 Add the new integrated-join-process training video (Video 4)
New 4-min screen recording of the on-site wallet-connect join flow becomes
Video 4; the old dApp walkthrough is relabeled as the Video 5 backup method
and the payments explainer moves to Video 6. Chatbot canned answers and the
AI system prompt now describe the updated video lineup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 08:19:12 -05:00
martbost 5aceb84863 Add EIP-6963 multi-wallet picker to the join tools
Both /join-now and /direct-join now discover every injected wallet (Brave,
MetaMask, SafePal, Trust, Coinbase…) via EIP-6963 and, when more than one is
present, show a 'Choose your wallet' picker on connect — instead of blindly
grabbing window.ethereum (which silently hangs when e.g. Brave's built-in wallet
wins the slot). Shared public/rmc-wallet.js; provider resolved on connect and
wallet events bound once after. Falls back to window.ethereum for legacy
single-provider wallets. CSP-safe (6963 icons are data URIs).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 08:01:07 -05:00
martbost 853e4736c9 Reword /start steps for the wallet-connect join flow + dApp fallback link
Steps 4-6 rewritten for /join-now (connect wallet, sponsor auto-assigned,
review+sign, land on dashboard, introduce yourself) instead of the old official-
dApp instructions; step 1 now mentions Trust Wallet. Added a small secondary
'official RM Circle dApp' fallback link under the join button (carries the
current sponsor's referral URL) for robustness — primary path stays /join-now.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 07:47:12 -05:00
martbost 629df6336c Wire the join funnel to the live /join-now self-enroll page
/join-now now honors ?ref=<id> (resolves that member's moving-link joinTarget;
falls back to the global rotation sponsor). Repointed: /start 'Join With Current
Sponsor' -> /join-now; /my pitch buttons -> /join-now?ref=<id>; invite page
/join/<id> join button -> /join-now?ref=<id>; bare /join redirect -> /join-now.
'Get Started' learn CTAs still go to /start for onboarding. When the flag is off,
/join-now gracefully redirects to /start, so the wiring is safe either way.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 07:37:19 -05:00
martbost e14c541e5e Add dormant public direct-join fallback (/join-now) + post-join redirect
/join-now: public self-enroll page gated behind config.dappFallbackPublic
(default off -> redirects to /start, invisible until needed). Auto-assigns the
current rotation sponsor via /api/public/current-sponsor, registers the user's
own wallet, then redirects to /my/<newId> so new members land on their live
position instead of guessing their ID. HTML lives in private/, served only via
the flagged route. Reuses the proven contract engine. Admin /direct-join now
also shows a 'View position ->' link to /my/<newId> after a successful join.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 07:09:57 -05:00
martbost 962eacd44c Show the new position ID (and upgrade result) in /direct-join
After submit, poll eth_getTransactionReceipt and read the member id from the
MemberRegistered event (topics[1]); surface it in a prominent success box plus
the activity log, instead of leaving the user to find it in Telegram. Same for
upgrades (shows the new level). Reverts are reported clearly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 06:22:07 -05:00
martbost c5b5ef7f86 Fix infinite refresh loop on /direct-join with Trust Wallet/Brave
chainChanged handler called location.reload(); wallets that fire chainChanged
on page load turned that into an endless refresh that blocked Connect. Handle
accountsChanged/chainChanged in place instead of reloading.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 06:12:32 -05:00
martbost 438b27ea3b Add admin-gated direct on-chain enrollment fallback (/direct-join)
Contingency tool: if the official RM Circle dApp ever goes down, positions can
still be created/upgraded straight from the member's own wallet. Vanilla JS
talks only to window.ethereum (CSP-safe, no external libs), builds register()
[0x30de37e4, sponsorId+tier, value=base*1.05] and upgrade() [0xd55ec697,
value=next-level cost] calls decoded from live txs, reads prices via
getAllCosts() and position via getMember(address). Page lives outside public/
and is served only through a getSession-gated route, so it's admin-only. The
contract is public and immutable, so this cements a company-domain-independent
path to enroll.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 05:38:26 -05:00
martbost c165226779 Teach the chatbot to handle recruiting objections honestly
Adds pyramid/Ponzi, 'if my 2 can't get their 2', affordability, 'not a
salesperson', and 'people quit' to both the chat.js canned KB and the
server.js AI system prompt (kept in sync). Answers distinguish this from a
pyramid (no pooled funds, same-tx peer-to-peer, verifiable on-chain), stay
honest (spillover fills the matrix but never qualifies; upgrades optional),
and never promise income. Keywords are apostrophe-free to match the punctuation-
stripped matcher.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 04:57:00 -05:00
martbost d48ecd3f5f Add leaders' objection-handling section to /tools
Six common recruiting objections as native <details> accordions (CSP-safe,
no inline JS), each with an honest 'the truth' mechanics note plus a
copy-ready 'say this' reply. Keeps team leaders accurate (spillover fills
the matrix but never qualifies; upgrades optional; verify on-chain) and
never promises income. Standalone team-resources/objection-handling.md kept
in sync.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 04:45:03 -05:00
martbost 99378daf01 Owner upgrade alerts go to email only, not Telegram
The private 'upgrade #N soon' owner alert was firing to both email and the
Telegram feed; Marty wants it in his inbox only. Drop the sendTelegram call
(the email on the line above already covers every owner watcher). Payout and
recruiting Telegram feeds are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-17 15:19:29 -05:00
martbost 1695f712c6 Wire new matrix placements in ~60s, not once a day
The live tail wired a new member into its parent's matrix slots with a
guess-based fill and silently gave up on any fetchMember hiccup, deferring
to the once-daily full snapshot — so a placement could take up to 24h to
appear in the tree (observed: #119 qualified #38 on-chain but the dashboard
card still showed 1/2 with an open slot).

Now placement reads the parent's two slots straight from the contract
(getMatrixChildren) — authoritative and order-independent — and any member
that can't wire on its first pass is queued and retried every tick via
drainPendingWire(). Trees reflect real placements within one ~60s poll.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-17 15:17:39 -05:00
martbost 436306f4d0 /my: default to pitch on link visits + big Join button above the fold
- default tab now: shared /my/<id> link -> Team Build pitch; form lookup /
  returning member on bare /my / #dash link -> dashboard (replaces the flaky
  "have you seen this ID before" heuristic that dumped returning prospects
  straight into the dashboard).
- added a big gold "Join the Team" CTA in the hero (right column), above the
  fold, so a sold visitor can join without scrolling past the video.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-17 08:39:52 -05:00
martbost 45797bdf9a Rebuild /my as a two-purpose tabbed page
Turns the member page into a persistent, tabbed dual-purpose page:
- Persistent context strip: "Member #X's RM Circle page · Verified · Qualified"
- Tab 1 "The Team Build": pitch for promoted-link visitors — hook, embedded
  overview video, 3 steps, live proof (member's real on-chain numbers), Join
  under #X CTA. Persistent (replaces the dismissible cold-intro banner).
- Tab 2 "Position Dashboard": the full dashboard as-is (facts, plan, matrix,
  pipeline, alerts, share, payments, lineage).
- Default: cold visitor opens on the pitch, the member opens on their dashboard;
  both always one tap apart. Retired the coldIntro banner + its handler.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-17 08:31:07 -05:00
martbost c91a530b7e Recruiting Telegram feed: add inline "Get Started" button to rmcircle.team
sendTelegram() takes an optional reply_markup; the recruiting posts carry an
inline URL button (🚀 Get Started — rmcircle.team) under every event, so the
busy new-members feed converts attention into clicks to the home page.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-17 07:40:02 -05:00
martbost 0fff3c92e0 Add recruiting-framed payout feed to a second Telegram topic
sendTelegram() now takes an optional topicId; the same team events that post to
the internal team-build topic also fan out a recruiting-framed version (social
proof + CTA to rmcircle.team, no internal/contact detail) to the new-members
topic. Gated on config.telegramRecruitTopicId — dormant until set.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-17 07:34:45 -05:00