Commit Graph

111 Commits

Author SHA1 Message Date
martbost 2ab24681d7 My Progress: Custom lanes option — track any Boost Planner mix (e.g. L4+L4+L2)
Phase dropdown gains 'Custom lanes'; a lanes input derives profit/cycle
from LEVELS, maps the ladder rung to the highest lane, estimates
cycles-to-next accelerate-basis (labeled est.), persists with the rest
of the ROI state. Engine untouched; test_scenarios ALL PASS.
2026-08-03 19:29:11 +00:00
martbost 0b75bed258 Teach the calculator about staggering (12+7 cycle mechanics, Marty's ask)
- Sponsor Guide: new 'Weekly withdrawals: stagger the lanes' section (day-19
  unlock, 6-7 day offsets, one-time idle cost, flat-10%-fee math, pairs with
  Pocket/Park).
- Plan text (both variants): stagger tip before Quick Stats + cycle line now
  states 19 days = 12 clicking + 7-day hold, funds unlock at day 19.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 17:35:45 +00:00
martbost 98ebcb35cc ref=<ctb-username> with an empty chain now falls back to the COMPANY ref
A valid CTB member whose self+upline program-73 entries are both empty was
keeping their raw CTB username as the ClickBaitPays ref (a nonexistent CBP
account would eat the signups — Marty caught it live with ?ref=r0705243024).
Now: endpoint code no_entry (or its reason string) -> ref=cryptoteambuild,
hub aligned to the member, fix-it nudge shown. Unknown values still pass
through verbatim for genuine legacy CBP usernames.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 16:58:40 +00:00
martbost 0042bca9e5 CBP ref fallback chain: own entry -> upline sponsor's entry -> company (Marty's rule)
Endpoint walks one hop up ref_by when the member's own program-73 entry is
empty; response carries source: self|sponsor. Calculator shows an adapted
nudge on upline fallback (alignment held, but claim your own referrals).
Hub invite still aligns to the SHARER either way.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 16:53:48 +00:00
martbost 2e3c480358 Hub CTA button: dark text on gold (.team-callout a cyan out-specified the button color)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 16:43:34 +00:00
martbost ee81ed0f73 Team callout: CTB Network membership verbiage + hub CTA button (Marty's ask)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 16:41:20 +00:00
martbost f7f799f113 Team callout joins the hub funnel (was the @cryptoteambuild group link)
Last remaining Telegram destination on the page — now a hub-link that
personalizes to the sponsor's CTB Rewards invite like every other CTA.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 16:40:10 +00:00
martbost cefcc6abb0 Cross-wire rescue: either username works in either param
?ref=<ctb-username> now forward-resolves to the member's real ClickBaitPays
ref (Marty hit this live with ref=r03430451480 -> now resolves opgnetwerk);
?ctb=<cbp-username> reverse-resolves symmetrically. Wrong-slot links from
confused members self-heal instead of leaking CTB usernames into CBP refs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 16:34:10 +00:00
martbost 22b7e38e44 Fix: IDENT declared before updateAll() — TDZ crash broke init (ROI storage key reads it on first paint)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 16:21:33 +00:00
martbost f226181ac8 CTB sponsor alignment: hub funnel + identity resolution
Visitors now funnel to the CTB Rewards hub (ctbrewards.saasy.top/invite/
<ctb-username>) instead of the Telegram sponsor group - every group link
and the generated plan's handshake steps now point at the sponsor's hub
invite, which keeps referrals aligned in Crypto Team Build.

Identity layer: one member, two usernames. Share links may carry
?ctb=<ctb-username> (canonical) or legacy ?ref=<cbp-username>; the new
member-program-link.php endpoint on cryptoteambuild.com (downline-builder
program #73) resolves either direction. ?ctb= looks up the sponsor's own
ClickBaitPays ref for the signup buttons; ?ref= reverse-resolves the CTB
username so the hub invite personalizes. Endpoint down or entry missing ->
graceful fallback to cryptoteambuild + a visible sponsor nudge explaining
how to fix it (add your CBP username to the downline-builder entry).

Share URLs now carry both identities; Sponsor Guide documents the hub +
the downline-builder tip. Engine untouched: test_scenarios ALL PASS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 16:17:26 +00:00
martbost 0db3b1c8e6 Front-load strategy mode: pocket 50% until L6, then 25% (near-identical arrival to flat 25%, ~double the early draw)
- pocketPctFor(): per-phase pocket resolution ('frontload' sentinel); computePlan/boostSim/plan-text/summary-card all honor it
- strategy select + share param mode=frontload + Sponsor Guide entry
- tests 7b: frontload matches 50%-behavior below L6 and 25%-behavior from L6, total <= flat-50
2026-07-31 19:40:35 +00:00
martbost 5a6a3f0a04 Boost Planner: 'extra cash now' input finds the best campaign combo (any level mix, up to 3 lanes — slots rule confirmed by Marty)
- boostSim(): generic lane simulator to 3xL7, exact same reserve rules as computePlan (verified: agrees on all 8 baseline starts)
- enumerateBoostCombos(): every affordable add-on for the free slots, activation once per level
- Overview card ranks every combo vs 'just bank it' by time to endgame; share link carries &boost=
- test_scenarios section 8: baseline consistency, combo costs, ranking, the +$300 scenario (best: add L3+L2, 3 cycles faster than banking)
2026-07-31 18:58:57 +00:00
Claude (via Marty) 8e7420db30 Restore the hero Sign Up button (gold primary CTA) — referrals had no join action above the fold; existing guarded updateHeroSignupBtn wiring picks it up 2026-07-30 23:28:33 +00:00
Claude (via Marty) ab6452f322 Sponsor Guide surfaced: hero button + ?guide=1 deep link (was buried as 5th tab) 2026-07-30 23:27:10 +00:00
Claude (via Marty) 347a8a9219 Sponsor Guide: add Strategy section (Accelerate/Pocket/Park, who each fits, link carries it); note compare tab is accelerate-basis 2026-07-30 23:04:02 +00:00
Claude (via Marty) ae358dc05b Serve hero banners + og:image from the app itself instead of Gitea raw URLs (no external dependency for previews) 2026-07-30 23:02:10 +00:00
Claude (via Marty) feeef3e9d8 Mobile: let grid/flex items shrink (strategy-select min-content blew controls to 607px), wrap tabs, single-column controls under 480px 2026-07-30 22:56:23 +00:00
Claude (via Marty) ee13321067 Strategy modes: Accelerate / Pocket-a-% / Park-and-collect — one selector drives engine (pocketPct + parked terminals), table, timeline, chart, Year-1, summary cards, share URL, and single-path plan text (dual narrative removed). Tests cover all three modes. 2026-07-30 22:43:03 +00:00
Claude (via Marty) e2caf73c19 Derive cycles/months from the reserve-simulation engine (Marty-approved model): recycle carried campaigns, bank profits, roll final payout; carryover across phases; L7 lanes camp-only. All consumers (table, timeline, chart, Year-1, ROI, compare, plan text, ladder, My Progress) read one engine. Honest timelines (19d cycles). Tests extract the live code and cross-check an independent simulator. 2026-07-30 22:24:27 +00:00
Claude (via Marty) 63249c2b5d Referral-column toggle applied after tables render (headers+cells stay in sync); nginx no-cache on index.html so deploys reach browsers 2026-07-30 22:04:41 +00:00
Claude (via Marty) 4e2d97af56 Fix Phase-by-Phase money columns to phase totals (x cycles); null-guard removed heroSignupBtn that crashed init() on every load 2026-07-30 21:58:37 +00:00
Marty Bostick 7433b59a8f Fix: referral column visibility now respects checkbox, not just numPeople
- The second toggle block (lines 1718-1725) was overriding the checkbox state
- When numPeople > 0, it was showing sponsor columns regardless of checkbox
- Now uses  so both conditions must be met
- Referral columns stay hidden by default even when simulating a referral plan
2026-07-30 21:50:36 +00:00
Marty Bostick 69a6de26ef Fix: call updateAll() on page load so sponsor columns start hidden
- Added setTimeout(updateAll, 100) so the referral columns are hidden from the very first page render, not just after user interaction
- Without this, the <td> cells with .referral-col class were visible even though the checkbox was unchecked
2026-07-30 21:41:56 +00:00
Marty Bostick 8178b72df2 Fix: sponsor columns now properly hide when 'Show referral earnings' is off
- Added .referral-col class to overview body <td>s (10% and cumulative columns)
- Added .referral-col class to timeline body <td>s (commission and cumulative)
- Added .referral-col class to 'Sponsor's Cumulative' header in both overview and timeline tables
- All sponsor columns now hide/show together via the checkbox toggle
2026-07-30 21:39:16 +00:00
Marty Bostick bc002de22e Add 'Their Net Profit' column, rename labels for clarity
Phase table now has 7 columns:
- Their Gross Payout / Their Net Profit / Sponsor's 10% / Sponsor's Cumulative
- Timeline tab: 'Sponsor's Commission/Month' and 'Sponsor's Cumulative'
- Table-wrap overflow-x: auto for mobile scrollability
2026-07-30 21:25:18 +00:00
Marty Bostick b2b118a62f Fix hero stats: 56→40, ,268→,520 per PDF source of truth (10% fee was double-counted) 2026-07-30 21:11:35 +00:00
Marty Bostick 8b70b545a2 Fix: referral plan text now uses dynamic share URL with gift/self params instead of static bare link
When options change (gift level, self-fund level), the share link box and QR codes update correctly, but the plan text still showed the old bare referral link. Now the plan text uses the same getShareUrl() call that generates the custom share link, so the referral link in the plan text stays in sync with the selected options.
2026-07-30 18:45:58 +00:00
Marty Bostick 97e3f51ca9 Fix Phase-by-Phase Journey cumulative payout column
Bug: The 'Cumulative to You' column showed /usr/bin/bash.00 (no gift) or a frozen
value (with gift) instead of the actual running total of referral earnings.

Fix:
- Separate ROI tracking (cumulative until gift cost is recouped) from
  cumulative payout display (always accumulates across all phases)
- Use roiCum/roiRow for ROI tracking, cumRunning for display
- 3× L7 Endgame uses 1 cycle (not 0) so its contribution is counted
- Highlight phase where ROI is achieved (not the phase after it)

L1 Only: 5.48, L2+L1: 3.04, L3+L1: 47.68, L4+L3: 39.28,
L5+L4: 05.84, L6: ,527.92, L7: ,795.92, 3×L7: ,767.92
2026-07-30 18:36:15 +00:00
Marty Bostick b4cc75e8ac Fix scenario comparison chart showing zeros — use actualPeople for compare chart data 2026-07-29 22:38:26 +00:00
Marty Bostick 1f670b454e Fix scenario comparison table showing zeros — use actualPeople instead of numPeople on yr1/totalEG/monthly columns 2026-07-29 22:33:54 +00:00
Marty Bostick f694910785 Fix profit timeline chart bars showing zero — remove numPeople multiplier on bar datasets 2026-07-29 22:32:35 +00:00
Marty Bostick d537d166e2 Fix profit timeline showing all zeros for referrals — show actual profit/commission instead of multiplying by numPeople=0 2026-07-29 22:30:39 +00:00
Marty Bostick ae858d65a1 Remove chartProfitData reference that didn't exist — chart1 only shows referral dataset 2026-07-29 22:24:16 +00:00
Marty Bostick ec908668e8 Fix nested backtick syntax bug killing entire JS runtime — build referral chart dataset as JS object not template literal 2026-07-29 22:21:49 +00:00
Marty Bostick 85854fcbd8 Default numPeople to 0, hide referral cards & columns until they set people in downline 2026-07-29 22:13:26 +00:00
Marty Bostick 77d24b2657 Fix summary labels: 'Sponsor Covers' and 'Your Cost' instead of 'Your Cost' and 'Their Cost' 2026-07-29 22:06:46 +00:00
Marty Bostick e02193faae Fix tab button JS: revert erroneous IIFE invocation that broke event wiring 2026-07-29 22:02:18 +00:00
Marty Bostick 5da48ae59e Encode gift/self-fund in share URL so recipients see the exact plan 2026-07-29 21:56:13 +00:00
Marty Bostick 565d34c199 Show exact cycles to reach 0 minimum withdrawal per phase in plan 2026-07-29 21:41:42 +00:00
Marty Bostick 872a645b27 Fix: call generatePlan() from within updateAll() so referral plan preview populates on every change 2026-07-29 21:25:31 +00:00
Marty Bostick e7ddf5b11d Add Open Graph, Twitter Card, SEO meta tags, and canonical URL for social preview 2026-07-29 20:57:56 +00:00
Marty Bostick 4666e2076c Add mobile-only QR code under hero buttons for on-the-spot recruiting, update ref dynamically 2026-07-29 20:50:46 +00:00
Marty Bostick af79853142 Fix: call updateSharedLinkBox when calculator section expands so shared link populates 2026-07-29 20:47:35 +00:00
Marty Bostick f192957f2d Merge login button into hero-ctas row — both buttons now truly side-by-side, same class 2026-07-29 20:36:12 +00:00
Marty Bostick 90136372db Match login button to hero-btn dimensions, place side-by-side with Try the Profit Calculator 2026-07-29 20:34:38 +00:00
Marty Bostick 3cf5309b25 Turn hero login link into a proper button matching hero-btn-secondary style 2026-07-29 20:33:01 +00:00
Marty Bostick 03fdbe87e6 Add responsive hero banner: mobile image on screens < 768px, desktop on larger 2026-07-29 20:31:09 +00:00
Marty Bostick e2aed5bf88 Fix calc signup: inline script sets ref dynamically, no hardcoded href 2026-07-29 20:27:39 +00:00
Marty Bostick dae8ff17b4 Fix Sign Up button — add default href so it's clickable even before JS runs 2026-07-29 20:25:18 +00:00
Marty Bostick 9e43b35552 Add inline script after banner link to set ref immediately on DOM parse — fixes race condition 2026-07-29 20:21:51 +00:00