Commit Graph

276 Commits

Author SHA1 Message Date
martbost c418aa516a Add auto-tweet of on-chain payout proof to @cryptoteambuild (Blotato)
New tweet.js posts a tweet to X via Blotato each time the indexer emits
a NEW team payout. Org-gated to the #21 organization; fires on all
payout types. Ships DISABLED (config.tweetEnabled default off / env
TWEET_ON_PAYOUT), so nothing posts until explicitly turned on.

Safety: dedupes by tx key (persisted to DATA_DIR/tweeted-payouts.json)
so restarts never re-post; a min-gap queue keeps bursts under Blotato's
30/min limit; API key read from env BLOTATO_API_KEY or DATA_DIR key
file, never committed or logged. Varied emoji/hashtag templates with a
CTA (+UTM) to the main page; deterministic template pick avoids X
duplicate-content rejection. Admin config allowlist gains tweetEnabled,
tweetCtaUrl, tweetHashtags, blotatoTwitterId.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 11:35:05 -05:00
martbost d36a405581 Paginate the live payment proof feed (Show more / Show fewer)
The feed showed only the latest 12 of 136 recorded payouts. Now:
- chain.getPayoutsPublic(offset,limit) returns a page of the full
  reversed history plus total/offset/limit/hasMore (limit capped 100).
- /api/public/payouts accepts ?offset & ?limit (defaults 0/40, so the
  live poll + toast detection are unchanged).
- payouts.js keeps a deduped store keyed by payout key; the live poll
  refreshes the recent page while "Show more" pulls older pages 12 at a
  time (with slight overlap so a newly-arrived payout can't open a gap),
  and "Show fewer" collapses back. Verified in-browser: 12 → 48 → 136
  rows, button flips to "Show fewer", collapses to 12, 0 console errors.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 11:16:12 -05:00
martbost 95bc5bc90f Remove stray diagnostic script committed by accident
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 10:52:55 -05:00
martbost 086e64b3f6 Add home-page "Still have doubts?" trust band + fix CSP blocking inline styles
Home page: new reassurance band between the live payment feed and the
final CTA — surfaces the three doubts (rules can't change, money never
sits in the contract, keeps running if creators vanish) and routes
skeptics to /contract.

CSP fix (the real find): style-src was 'self' with no 'unsafe-inline',
so the browser was silently dropping EVERY inline style="" attribute
site-wide — the attribute stayed in the DOM but never applied. This is
why the earlier margin fix only worked once moved to a class, and why
the new card rendered left-aligned with a teal eyebrow. Added
'unsafe-inline' to style-src only (script-src stays locked to 'self').
Verified via computed styles + full-page screenshots: home, /contract,
/how-pay-works now render as authored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 10:52:43 -05:00
martbost 56890b025a Add "What if the creators disappear?" reassurance (verified on-chain)
Answers the durability question: the contract is autonomous and
immutable (no admin heartbeat, no pause, no expiry), and the four
admin wallets are plain EOAs — read live from contract storage and
confirmed via eth_getCode — so a lost/abandoned admin wallet can
never reject or jam a member payment; at worst the project's own fee
sits uncollected. No stored balance means nothing can be stranded.

- contract.html: new section 6 card
- chat.js: matching canned answer (creators-disappear keywords)
- server.js: RESILIENCE fact added to the AI system prompt

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 10:26:58 -05:00
martbost 279bcb5f25 Teach the chatbot everything we added (canned + AI prompt)
chat.js: new canned answers for how-you-get-paid (two streams + depth-
matched levels), Premium vs Standard tier, and the member dashboard/
alerts. server.js AI system prompt: added PAY FLOW, TIERS, and MEMBER
DASHBOARD facts, and refreshed the site-pages list (/how-pay-works,
/my, /disclaimer, spillover article). Both chat modes now answer the
questions this session surfaced (skips, standard tier, dashboards).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 10:15:42 -05:00
martbost 1c9048e088 Add Premium vs. Standard tier explainer to /how-pay-works
Preempts the "why did an amount come in smaller?" question (hit live with
Standard-tier #46): a clear card with a Premium/Standard amount table,
that tier is permanent (upgrading advances level not tier), and the team
play of joining Premium so the whole leg pays full value.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 10:12:50 -05:00
martbost 1929a928d8 Add /how-pay-works pay-flow diagram page
Visual explainer of the two income streams: entry rewards you keep, and
the depth-matched upgrade ladder (each layer pays you once, at the one
level matching its depth) as an SVG flow diagram. Route + CSS added;
linked from training body and all footers. Educational, on-chain-factual
framing with disclaimer link.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 10:06:36 -05:00
martbost 7b33e28d0c Personalized social previews for shared referral links
/my/:id and /join/:id are now served with server-injected, per-member
Open Graph + Twitter Card tags (social scrapers don't run JS, so the
per-ID meta must be in the static HTML). Strips any baked-in og/twitter
tags and injects a fresh ID-specific set — title/description reference
the member #, branded og-card.jpg image, canonical per-ID og:url. Bare
/my and /join paths unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 08:30:52 -05:00
martbost db8261be6e Center the stat numbers over their labels
Make .team-stat a centered flex column and force the .num to full-width
centered text — the big numbers were rendering left-aligned. Verified
0px off-center across all four tiles.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 07:29:43 -05:00
martbost 9467c4e840 Fix team-stats row spacing (inline margin-top wasn't applying)
The grid-3 inline margin-top:32px computed to 0 (collapsed against the
grid team-stats container), leaving the two rows touching. Use a class
margin-bottom:34px on .team-stats instead — verified 34px gap locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 07:25:47 -05:00
martbost 5de1eb8ecd Loosen spacing in the home team-stats showcase
Bump the stat-tile grid gap 16→22px and the gap to the mechanics cards
24→32px so the boxes breathe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 07:18:41 -05:00
martbost d805a33608 Add home "team by the numbers" showcase + why-a-winning-team-pays
Public /api/public/org-stats (from config.orgRootId, default 21) feeds a
prominent home-page band: share of the whole network, team size,
generations deep, and on-chain POL to the team — populated by bridge.js,
section hides itself if stats aren't ready. Paired with three mechanics
cards (spillover fills your matrix, depth pays as it climbs, the rotation
qualifies you) that make the "winning team" case honestly, plus the risk
caveat ("most participants may not profit") and a disclaimer link.
Live: 51.1% of members, 48 in the org, 10 generations, 25,423 POL.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 07:14:23 -05:00
martbost 7b6f629780 Add "Your Organization vs. the Network" live stat to admin
New chain.getOrgShare(rootId) + /api/admin/org-share endpoint compute an
org's share of the whole contract by both member count and total POL
paid, from in-memory state. Admin card (default root 21, saved to
config.orgRootId, auto-loads) shows the two headline percentages, a bar,
and the member/POL breakdown. Verified: #21 org = 51.1% of members,
49.5% of POL.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 07:07:27 -05:00
martbost 026b9e5d9b Show all eight generations in the depth-over-width matrix
Extended the "2 → 4 → 8 → 16 → 32" visual to the full doubling
2→4→8→16→32→64→128→256 (510 positions), keeping the 30-position first
milestone in the caption. Matrix is now data-driven (data-n) with
icons capped at 12 + a "+" for deeper generations so 256 stays compact;
compact icon styling + horizontal scroll safety.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 06:11:16 -05:00
martbost f5de98c214 Classify rotation joins by worked-sponsor status, not just active
A rotation joiner submits their ID after the rotation may have advanced
(esp. with auto-advance: the direct who completes a sponsor's 2/2 joined
under it, but the queue has already moved on). Keying "rotation" off the
currently-active sponsor mislabeled them "leg" (hit live: Harvey #92
under #36 after #36 qualified). Now: rotation if the on-chain referrer
is a queue sponsor that is active OR qualified (was/is worked); a
still-waiting or non-queue referrer stays a leg join, preserving the
original #49/#56-under-#46 fix. Auto-enqueue now parents the new
position to the actual on-chain referrer, not the current active.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 05:43:03 -05:00
martbost e1d6b782a2 Auto-advance rotation when a sponsor hits 2/2
Reverses the earlier manual-Qualify design (Marty 2026-08-15): when the
auto-count brings a queue sponsor to 2/2 directs, the sponsor is now
auto-qualified and normalizeStatuses activates the next waiting position
— same as clicking Qualify, but automatic. Previously it stopped at 2/2
"active" and waited for a manual click, which left the rotation looking
stuck (hit live with #36 Mad Dog). #36 qualified manually to catch up;
rotation advanced to #34 Janie.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 05:36:14 -05:00
martbost 0f5630e6d0 Disclaimer page, self-service member alerts, and admin login lockout
- /disclaimer: independent-resource, affiliate, earnings, risk, and
  not-advice disclosures; linked from all footers.
- Self-service alerts: members opt in with their email on /my/:id to get
  "you've been paid" + "upgrade needed" emails for their own position
  (same watcher as the owner alerts, extended). Signed unsubscribe link
  (/unsubscribe?id=&t=HMAC), on-chain-registration check, rate-limited,
  masked-email status, confirmation email.
- Admin login: timing-safe compare + per-IP lockout (8 fails -> 15 min,
  escalating). Previously unlimited/brute-forceable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 14:45:57 -05:00
martbost 8b3e82d960 Alert when an owned position needs upgrading to catch incoming pay
New owner upgrade watcher: every 5 min it checks config.ownerIds against
the chain state and, when a leg member is ONE upgrade from paying a
position that isn't eligible yet (below the required level, or not
qualified), emails config.ownerAlertEmail + pings Telegram — "upgrade
#24 to Fabrica, #61 is one upgrade from paying you 2,486 POL." Deduped
per (position, level) in owner-alerts.json, re-fires if the situation
recurs. Same warning renders inline in the admin "My Positions" panel
(upgradeNeeds in the income endpoint). New ownerAlertEmail settings
field. Detection logic unit-tested.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 14:27:50 -05:00
martbost 81d90fbe8e Add admin "My Positions — Income" panel
Aggregates every on-chain payment received by a set of owned IDs
(defaults to 21,24,25, saved to config.ownerIds and prefilled/auto-loaded
next time). Shows grand total + per-position totals and a merged,
newest-first ledger (to / from / entry-or-upgrade level / amount) via a
focused chain.getIncome read and an admin-gated /api/admin/income
endpoint. Verified: 5,064.43 POL across 21/24/25, 11 payments.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 14:08:21 -05:00
martbost 77310f8974 Add "Copy plain-English summary" to the pipeline widget
Generates a chat-ready, per-member explainer of the upgrade/generation
payment structure — the recurring "will I miss upgrades?" question
answered from that member's real position: their spot, the one rule
(each layer pays you once at one level), their ladder with amounts and
which layers they're already eligible for, an honest "you miss it only
if you fall behind" note, and a calibrated next move (no false urgency —
distinguishes a layer that's close from one still climbing). One click
copies it for pasting into Telegram/chat; works for any member by ID.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 12:52:01 -05:00
martbost a8c4b8e664 Contract now verified on Polygonscan too — update /contract
Source submitted and Exact Match confirmed on Polygonscan (TRUSTCorona,
Solidity 0.8.28) via the CDP-assisted flow. The two-registry explainer
becomes a both-registries-verified statement.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 12:23:49 -05:00
martbost af1ac403c5 Address the "Polygonscan says not verified" objection on /contract
A team member checked Polygonscan and saw unverified bytecode while the
page claims verified source. Both true: the source is exact-match
verified on Sourcify; Polygonscan is a separate registry nobody
submitted to. The page now explains the two-registry situation, that
the displayed bytecode is identical, and that Polygonscan publication
is in progress.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 11:56:25 -05:00
martbost eba405abac Add "Your pipeline" widget to member dashboards
Makes the depth-matched payment routing visible per member: walks their
subtree and shows who is ONE upgrade away from paying them (member at
depth D whose level equals D — their next upgrade routes to this
position first), the exact amounts from the contract's cost tables
(exposed via the member API), eligibility warnings (needs 2 directs /
needs level X), a ready-now total, and whether it covers their own next
upgrade. Members building toward their pay-you level are counted, with
the takeaway line "helping your leg upgrade IS your income."

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 11:08:07 -05:00
martbost d1aef1e3ff Add /contract — plain-language security review of the smart contract
Shareable page from the 2026-08-13 source review: code immutability
(no proxy/delegatecall/selfdestruct, Sourcify exact match), same-tx
distribution (no pooled funds), locked prices and fee constants, the
honest list of owner powers with the 50% entry-fee cap, where unmatched
pass-ups go, and verify-yourself links. Linked from all public footers,
the payment-proof note, and the chatbot (canned + AI prompt).

Also: passed-over lists now exclude structurally-skipped uplines — a
level-N payment never checks the first N-1 uplines, so listing them as
"not eligible" was misleading.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 10:51:34 -05:00
martbost 8d766161e8 Auto-sync queue levels from on-chain upgrades
When a queue member's MemberUpgraded event lands, their Level in the
rotation queue updates automatically (same op as the admin dropdown),
with a Telegram note. Current queue trued up against the chain: four
entries corrected (30, 35, 46 up to Ascensus; 56 down to Scintilla —
it had been set optimistically).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 10:47:45 -05:00
martbost 3a93fda3eb Align dashboard next-in-line with the rotation queue
The chain-only BFS pick could promote structurally-next but inactive
positions (#21's dashboard said #38 — not in the queue, likely inactive —
while the team rotation was working #36). Next-in-line now prefers the
active rotation sponsor when they're in the member's leg and unqualified,
then the first chain-order queue participant, falling back to the pure
structural pick for legs outside the queue.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 10:34:17 -05:00
martbost 62ad2da2fa Auto-enqueue rotation joins
A verified rotation join (@chriskelly8, ID 73 under #36) still required
a manual "add to queue" step from the Telegram message and got missed.
Rotation-path submissions now insert themselves into the sponsor queue
as waiting positions (name from the submission, level from chain,
parent = active sponsor, dedupe-guarded), and the Telegram alert reports
the queue position instead of asking for action. #73 was added manually
to catch up.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 10:23:25 -05:00
martbost dcb3fe4d43 Give cold visitors context on member dashboards
/my/<id> links circulate (address-bar shares, pre-/join links), and a
cold prospect landing there saw stats with no story. First-time viewers
of a position now get a banner: two-sentence RM Circle summary, a
"Read your invitation from this member" CTA into /join/<id>, a strategy
link, and the risk line. Hidden for repeat viewers of the same position
(likely the member) and dismissible per session.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 08:41:57 -05:00
martbost 29e0d6e791 Personal invite pages (/join/<id>) + auto-count queue directs from the chain
Prospects who clicked a member's shared /my link landed on a bare stats
dashboard with no explanation of the program. New /join/<id> page carries the
full bridge-page story (video, strategy, matrix, live on-chain payout proof)
personalized to one sponsor: their live position stats as proof, their ID
pinned on the dApp join button, and the submit-your-ID form locked to them
(source invite-<id>). Dashboard share buttons + QR codes now hand out the
invite page; /my stays the member dashboard. Invalid/unregistered invite ids
fall back to the /start rotation. Tracked as new 'join' event with an admin
traffic column.

Also: the chain indexer now auto-increments a rotation sponsor's directs when
a registration names them as referrer (same op as the admin ⊕), announcing it
on Telegram. At 2/2 it alerts to Qualify instead of auto-rotating — moving
the team focus stays a human decision.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 08:18:30 -05:00
martbost 532cb18b68 Split submissions into rotation vs leg paths — decided by the chain
Two leg-build members submitted the /start form thinking it was required,
polluting rotation bookkeeping. Rather than two forms, the server now
classifies every submission by on-chain truth: referrer == active
rotation sponsor -> "rotation" (Telegram says +1 direct, add to queue);
anyone else -> "leg" (correct sponsor credited, "no rotation action
needed"). The member dashboard gains its own "Just joined under this
position?" form so leg builders have a proper landing spot; /start
feedback explains each path to the submitter; admin submissions table
shows a rotation/leg chip. Verified against live data: ID 65 claiming
sponsor 36 correctly classified leg under #62.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 05:39:02 -05:00
martbost d9ac9c9806 Settle the doctrine: recommend retiring at 2/2, frame spillover as bonus
Marty's final framing: the teachable rule stays "get your 2, retire
your link, help your 2" — but a late signup on a qualified link is
presented everywhere as a welcome bonus (full entry reward + depth via
spillover), never a rule violation. Applied consistently across the
strategy page, start callout, chatbot (canned + AI prompt), training
article, and both share-card notes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 18:48:20 -05:00
martbost f0991c651b Finish spillover copy corrections in chat and share card
Remove the last "shallow legs" claim and reword "retires your link" —
a qualified link keeps working and spills depth; it just stops being
the team's focus.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 18:24:03 -05:00
martbost 72c8f137ae Correct spillover teaching across all site copy
The old copy claimed qualified links must be retired to avoid "extra
shallow legs" — factually wrong for this contract: extra signups on a
qualified link spill DOWNWARD (BFS) as depth, and the referrer keeps
earning the full entry reward on every signup with no cap at 2. Updated
the strategy flow, team-principle notice, strategy card, start-page
callout, chatbot (canned + AI prompt), training article, and the
qualified share card: the team play is still helping your 2 get their 2
(only own directs qualify a position), but continued personal promotion
is accurately described as paid depth-building, and spillover recipients
earn only when the spilled member upgrades — if qualified and leveled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 18:22:59 -05:00
martbost e3ac27e11c Keep qualification and matrix state live between snapshots
The tail added new members but never updated the referrer's directCount,
the parent's matrix slots, or the recipient's earnedPol — so a member
who qualified mid-day kept showing 1/2 in tree views until the next
daily snapshot (hit live: #63 joined under #35 at 22:56 UTC and #35
still displayed unqualified). Registrations now increment the referrer's
count and wire the new member into the parent's l/r; payouts bump the
recipient's earnedPol. One-time re-snapshot on deploy trues up the
stale state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 18:01:50 -05:00
martbost 0a05d97b32 Teach spillover in the chatbot and training page
- Chat: new canned answer covering spillover keywords (why "2 under me
  but 1/2 directs", pass-over eligibility) and the same facts added to
  the AI system prompt so both chat modes answer consistently.
- Training: "Understanding spillover" article after the videos — what it
  is, why it doesn't qualify you, why it still pays your position via
  matrix upgrade payments, and the qualified+leveled eligibility rule.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 16:05:44 -05:00
martbost 98865fb9b8 Correct the passed-over reason wording in the payout feed
Per the contract's _payUpline rule, uplines are skipped for lacking 2
directs OR the required level — not level alone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 15:17:49 -05:00
martbost 130fc42c45 Teach spillover in the matrix views
Tree nodes now carry referrerId, so positions placed by spillover (their
referrer differs from their matrix parent) get a teal "spillover · ref
#N" tag on cards in both the member dashboard and admin matrix, plus a
legend entry. When a member is unqualified but has spillover positions
under them — the classic "why do I have 2 under me but no checkmark?"
state — a callout explains that spillover grows the matrix but only
members joining with their own ID count toward 2/2, and points them at
their share link.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 15:13:22 -05:00
martbost 59dfca95bb Make the header brand a home link on all public pages
The RM logo + title in the nav now links back to / on the bridge,
start, training, and member-dashboard pages.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 15:09:57 -05:00
martbost 65b963b39b Persist admin sessions across redeploys
Sessions now load from and save to sessions.json in the data volume
(0600, atomic write, expired entries pruned on save), so a redeploy no
longer logs the admin out. Verified: session cookie survives a full
server restart.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 15:04:22 -05:00
martbost 6a9cd96b8c Qualified dashboards promote the next unqualified position in their leg
Instead of only pointing at the team rotator, a qualified member's share
card now runs the moving-link wave automatically: breadth-first,
left-to-right, the first position below them with fewer than 2 directs
becomes "next in line" — their QR, page link, and join CTA all carry
that position's ID. When it qualifies, the card rotates to the next one.
Falls back to the team rotator when the whole leg is qualified.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 14:58:31 -05:00
martbost 350d50798f Member dashboard: drill-down tree, list view, legend, and strategy-aware referral tool
- "Your team" now covers the member's FULL leg with click-to-drill
  pyramid, breadcrumb, and a list-view toggle (mirrors the admin matrix).
- Legend under both the member tree and admin matrix explaining the
  qualified checkmark, tier badges, and downline rollup.
- "Share this position" card: while under 2/2 it's a personal recruiting
  tool — per-member QR (vendored qrcode-generator, CSP-safe), copy link,
  and a join CTA carrying the member's ID as sponsor. At 2/2 the page
  automatically retires the link and redirects sharing to the team
  rotator, so personal referrals can't undermine the moving-link
  strategy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 14:53:06 -05:00
martbost 5a916bf12d Add scan-to-join QR code under the hero CTA
Self-hosted SVG QR (CSP-safe) pointing at /start?utm_source=qr, so
scanned visits appear as their own "qr" source row in admin analytics.
Sits between the CTA and "See the Strategy" on mobile for the
show-your-phone recruiting flow; centered below the buttons on desktop.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 14:38:59 -05:00
martbost 481423368b Add qualification badges to dashboard and matrix cards
Gold "★ Qualified" pill in the member-dashboard header (or an amber
"N more directs to qualify" pill), and a gold ✓ corner medallion on
every qualified position card in both the member tree and admin pyramid.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 14:36:36 -05:00
martbost 9f8898d2bd Add public member dashboard at /my/:id
Members enter their on-chain ID (or follow a /my/46-style link) and see
their own position: tier/level/directs/earnings facts, their subtree
pyramid with downline rollups and open slots, classified payment
history, and lineage to root — all chain-derived data only, none of the
admin operational config. Public endpoint /api/public/member is cached
(120s) and rate-limited (20/min/IP). Linked from the public footers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 14:35:05 -05:00
martbost c69ef6c1f6 Show downline count and downline POL on matrix positions
Each tree node now carries a rollup of its subtree — members below and
their combined earned POL — shown as a footer line on pyramid cards and
inline in the list view.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 14:28:21 -05:00
martbost 110b9c9dfe Classify income rows as entry vs upgrade instead of raw atLevel
The contract books income atLevel = the level the payer upgraded OUT of
(upgrade N->N+1 records atLevel=N), so an Ascensus upgrade pass-up was
displaying as "Scintilla". Income rows are now classified against the
contract's getAllCosts() tables — upgrade pass-ups arrive at full
upgrade cost, entry referral rewards at slot cost minus the 5% admin fee
— and display "Upgrade to Ascensus" / "Entry — Scintilla" in the admin
income table, public feed, and toasts. Stale snapshot rows re-classify
via a forced re-snapshot on boot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 14:18:12 -05:00
martbost e332a4f1c2 Allow renaming a sponsor from the queue
The name in the Sponsor Queue is now a click-to-rename control (pencil
appears on hover), using the existing PATCH endpoint; server trims and
caps the name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 13:47:07 -05:00
martbost 0f5f821b39 Email the admin a copy of every team-build alert
New config teamAlertEmail: the same team-gated on-chain events that post
to Telegram (registration, upgrade, payout at/below teamRootId) also go
to this address via SendGrid, so deep-leg activity surfaces even away
from Telegram.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 13:12:33 -05:00
martbost accd869c12 Default payment-email sender to marketingwithmarty.com
Both marketingwithmarty.com and mybrandedvoice.com are SendGrid
DKIM-authenticated; Marty's sending identity is marketingwithmarty.com,
so the default from and the admin label now reflect that.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 13:10:41 -05:00