diff --git a/public/assets/plan-lab.js b/public/assets/plan-lab.js new file mode 100644 index 0000000..eb316fe --- /dev/null +++ b/public/assets/plan-lab.js @@ -0,0 +1,582 @@ +// Reach Ladder plan simulator (unlisted /plan-lab). Built from the working artifact, 2026-09-27. +(function(){ + // ── the plan: width, ladder, gap rule ── + // unq: what a pass-up does at an unqualified member ('skip' = passes over them; 'licence' = buys their next licence, never cash) + // wm: cash watermark. A member who qualifies late is paid cash only by their own directs and by positions created after they qualified. + const PLAN = { w: 4, maxL: 8, shape: 'stepped', steps: [10,20,50,100,175,300,500,750], gap: 'fund', unq: 'licence', wm: true, + // placeholder products, one per level, until the real ones exist (Marty, 27 Sep): edit in the plan row + split: 0.5, // entry split: this share of the net entry to the placement upline, the rest to the recruiter (decided 27 Sep) + half: true, // one-direct half step: one recruit unlocks cash from depths 1-2 (levels 2-3); two recruits unlock full reach + fee: 0.20, // admin fee, OUT of every price, to a receiver wallet in the same block (Marty, 27 Sep: 20%, same as InstantAdPay). The other 80% climbs. + products: ['Widget 1','Widget 2','Widget 3','Widget 4','Widget 5','Widget 6','Widget 7','Widget 8'] }; + function product(L){ return PLAN.products[L - 1] || ('Widget ' + L); } + function net(L){ return price(L) * (1 - PLAN.fee); } // what climbs after the admin fee + const MAXD = { 2: 8, 3: 5, 4: 4, 5: 3 }, DEFD = { 2: 6, 3: 4, 4: 3, 5: 3 }; // drawable depth per width + function price(L){ + const P = Number(document.getElementById('price').value) || 0; + if (PLAN.shape === 'flat') return P; + if (PLAN.shape === 'linear') return P * L; + if (PLAN.shape === 'ratio') return Math.round(P * Math.pow(1.25, L - 1)); + const s = PLAN.steps; if (L <= s.length) return s[L - 1]; + const r = s.length > 1 && s[s.length - 2] ? s[s.length - 1] / s[s.length - 2] : 1.5; + return Math.round(s[s.length - 1] * Math.pow(r, L - s.length)); + } + const $$ = n => '$' + Math.round(n).toLocaleString('en-US'); + const cnt = n => Math.round(n).toLocaleString('en-US'); + + // ── the drawn tree ── + let DEPTHS = 3, W = 1400, ROW = 0; + const H = 470, TOP = 48, GUT = 250; + const svg = document.getElementById('tree'); + const NS = 'http://www.w3.org/2000/svg'; + function geometry(){ W = Math.max(1400, GUT + Math.pow(PLAN.w, DEPTHS) * 9 + 30); ROW = (H - TOP - 30) / DEPTHS; svg.setAttribute('viewBox', '0 0 ' + W + ' ' + H); svg.style.minWidth = Math.max(980, Math.round(W * 0.8)) + 'px'; } + let quiet = false, tally = null, tallyOrigin = null, licUpFlag = false; + // audit: every dollar spent must be received by someone (a position, or 'above'); licences are never money + const AUD = { spent: 0, received: 0, above: 0, treasury: 0 }; + function feeOn(gross){ const f = gross * PLAN.fee; AUD.received += f; AUD.treasury += f; } // the admin wallet's share of a gross price + window.reachAudit = () => ({ treasury: Math.round(AUD.treasury * 100) / 100, spent: Math.round(AUD.spent * 100) / 100, received: Math.round(AUD.received * 100) / 100, above: Math.round(AUD.above * 100) / 100, ok: Math.abs(AUD.spent - AUD.received) <= 0.01 + 1e-9 * AUD.spent }); + function tallyFor(d){ return tally[d] || (tally[d] = { n: 0, L: 0, youCash: 0, youLic: 0, above: 0, licUp: 0, cash: {}, lic: {} }); } + let nodes = [], byId = {}, you, totals, youLedger = [], nextId = 0; + function mkNode(depth, parent, idx){ + const n = { id: nextId++, depth, parent, idx, children: [], level: 1, directs: 2, get qual(){ return this.directs >= 2; }, cashFrom: 0, cashFromHalf: 0, cash: 0, entry: 0, x: 0, y: 0 }; + nodes.push(n); byId[n.id] = n; + if (parent) { parent.children.push(n); parent.entry += net(1); AUD.spent += price(1); AUD.received += net(1); feeOn(price(1)); if (parent === you) { totals.entry += net(1); } } // Rule 0: the entry pays the upline directly above + return n; + } + function layout(){ + for (const n of nodes) { + const slots = Math.pow(PLAN.w, n.depth), slotW = (W - GUT - 30) / slots; + n.x = GUT + slotW * (n.idx + 0.5); n.y = TOP + n.depth * ROW; + } + } + function radius(n){ if (n === you) return 17; const s = Math.pow(PLAN.w, n.depth); return s <= 4 ? 14 : s <= 16 ? 12 : s <= 64 ? 10 : s <= 256 ? 7 : s <= 1024 ? 5 : 4; } + function labelled(n){ return n === you || Math.pow(PLAN.w, n.depth) <= 64; } + + function build(){ + DEPTHS = DEFD[PLAN.w]; + geometry(); + nodes = []; byId = {}; nextId = 0; AUD.spent = 0; AUD.received = 0; AUD.above = 0; AUD.treasury = 0; + totals = { entry: 0, cash: 0, lic: 0, licV: 0, cashN: 0 }; youLedger = []; + function mk(depth, parent, idx){ + const n = mkNode(depth, parent, idx); + if (depth < DEPTHS) for (let k = 0; k < PLAN.w; k++) mk(depth + 1, n, idx * PLAN.w + k); + return n; + } + you = null; + you = mk(0, null, 0); + // entries from your directs were credited before `you` existed: count them now + totals.entry = you.children.length * net(1); you.entry = totals.entry; + you.level = Number(document.getElementById('youLevel').value); + layout(); + draw(); paintPays(); renderTotals(); depthLabel(); clearLog('Reset. Click a position, or run a wave.'); + const le = document.getElementById('last'); if (le) { le.className = 'last'; le.textContent = 'Nothing bought yet. Your ' + you.children.length + ' directs each paid their entry (' + $$(price(1)) + ') to you. Click a ringed position: its next purchase reaches you.'; } + } + + function draw(){ + while (svg.firstChild) svg.removeChild(svg.firstChild); + for (let d = 1; d <= DEPTHS; d++) { + const r = document.createElementNS(NS, 'rect'); + r.setAttribute('x', 0); r.setAttribute('y', TOP + d * ROW - ROW/2); r.setAttribute('width', W); r.setAttribute('height', ROW); + r.setAttribute('class', 'band'); r.setAttribute('id', 'band' + d); + svg.appendChild(r); + const t = document.createElementNS(NS, 'text'); + t.setAttribute('x', 12); t.setAttribute('y', TOP + d * ROW + 4); t.setAttribute('class', 'bandlabel'); t.setAttribute('id', 'bl' + d); + svg.appendChild(t); + } + for (const n of nodes) if (n.parent) { + const p = document.createElementNS(NS, 'path'); + p.setAttribute('d', `M${n.parent.x},${n.parent.y} C${n.parent.x},${(n.parent.y+n.y)/2} ${n.x},${(n.parent.y+n.y)/2} ${n.x},${n.y}`); + p.setAttribute('class', 'edge'); p.setAttribute('id', 'e' + n.id); + svg.appendChild(p); + } + for (const n of nodes) { + const g = document.createElementNS(NS, 'g'); + g.setAttribute('class', 'node' + (n === you ? ' you' : '') + (n.qual ? '' : ' unq')); + g.setAttribute('id', 'n' + n.id); g.setAttribute('tabindex', '0'); g.setAttribute('role', 'button'); + const r = radius(n); + const c = document.createElementNS(NS, 'circle'); + c.setAttribute('cx', n.x); c.setAttribute('cy', n.y); c.setAttribute('r', r); + g.appendChild(c); + const t = document.createElementNS(NS, 'text'); + t.setAttribute('x', n.x); t.setAttribute('y', n.y); t.setAttribute('id', 't' + n.id); + if (labelled(n)) t.textContent = n.level; + if (r <= 10) t.setAttribute('style', 'font-size:9px'); + g.appendChild(t); + if (n.depth === 1 && n.idx === 0) { + const dl = document.createElementNS(NS, 'text'); + dl.setAttribute('x', n.x); dl.setAttribute('y', n.y - r - 4); dl.setAttribute('class', 'bandlabel'); dl.setAttribute('style', 'text-anchor:middle;font-weight:700'); + dl.textContent = 'YOUR DIRECTS'; g.appendChild(dl); + } + const m = document.createElementNS(NS, 'text'); + m.setAttribute('x', n.x); m.setAttribute('y', n.y + r + 3); m.setAttribute('class', 'mny'); m.setAttribute('id', 'm' + n.id); + g.appendChild(m); + const title = document.createElementNS(NS, 'title'); + g.appendChild(title); + g.addEventListener('click', e => { e.stopPropagation(); onClick(n, g); }); + g.addEventListener('keydown', e => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onClick(n, g); } }); + svg.appendChild(g); + } + for (const n of nodes) refreshNode(n); + const yl = document.createElementNS(NS, 'text'); + yl.setAttribute('x', you.x + 26); yl.setAttribute('y', you.y + 4); yl.setAttribute('class', 'bandlabel'); yl.textContent = 'YOU'; + svg.appendChild(yl); + paintReach(); + } + + function paintReach(){ + const A = you.level; + for (let d = 1; d <= DEPTHS; d++) { + const band = document.getElementById('band' + d), lbl = document.getElementById('bl' + d); + if (!band) continue; + if (d < A) { band.setAttribute('fill', 'var(--reach-soft)'); lbl.textContent = `depth ${d} · cash to you at level ${d+1}` + (d === 1 ? ' (and entries)' : ''); } + else if (d === A) { band.setAttribute('fill', 'var(--lic-soft)'); lbl.textContent = `depth ${d} · 1st level-${d+1} = your licence`; } + else { band.setAttribute('fill', 'transparent'); lbl.textContent = `depth ${d} · past you until level ${d}`; } + } + } + + function refreshNode(n){ + const g = document.getElementById('n' + n.id), t = document.getElementById('t' + n.id); + if (!g) return; + g.classList.toggle('unq', !n.qual); + if (labelled(n)) t.textContent = n.level; + const got = n.cash + n.entry; + g.querySelector('title').textContent = (n === you ? `You · level ${n.level}` : `#${n.id} · depth ${n.depth} · level ${n.level} · ${n.directs} direct${n.directs === 1 ? '' : 's'}`) + (got ? ` · collected ${$$(got)}` : ''); + const m = document.getElementById('m' + n.id); + if (m) m.textContent = got && radius(n) >= 7 ? $$(got) : ''; + } + + // Rule 1 plus the gap rule. A payment of `amt` for level L, starting from `from`: skip `skipN` + // uplines, then climb to the first qualified upline. Under 'skip' a qualified upline more than one + // level behind is passed over too. Returns {to, skipped[], path[]}; to === null means it climbed past you. + // `rem`: a remainder left over after funding a licence. Remainders are cash only, to the first qualified + // upline that already holds the level; they never issue a licence, because they can be smaller than one. + // may `u` take CASH from a payment whose buyer is `origin`? Qualified, and (watermark off, or the buyer is + // u's own direct, or the buyer's position was created after u qualified) + // may `u` take CASH for a level-L payment whose buyer is `origin`? + // two directs: any level, from own directs or positions created after the second direct arrived + // one direct (half step on): levels 2-3 only (depths 1-2), from own directs or positions created after the first arrived + function cashOk(u, origin, L){ + const own = !PLAN.wm || !origin || origin.parent === u; + if (u.directs >= 2) return own || origin.id >= u.cashFrom; + if (PLAN.half && u.directs === 1 && L <= 3) return own || origin.id >= u.cashFromHalf; + return false; + } + function route(from, L, skipN, rem, origin){ + const skipped = [], path = []; + let cur = from.parent; + for (let i = 0; i < skipN && cur; i++) { path.push(cur); cur = cur.parent; } + while (cur) { + path.push(cur); + if (cur.level >= L) { + if (cashOk(cur, origin, L)) return { to: cur, kind: 'cash', skipped, path }; + skipped.push({ n: cur, why: cur.directs === 0 ? 'no directs, holds the level: cash passes them' : cur.directs === 1 ? (PLAN.half && L <= 3 ? 'one direct: this position joined before it: cash passes them' : 'one direct: cash only from depths 1-2' + (PLAN.half ? '' : ' (half step off)')) : 'qualified after this position joined: cash passes them' }); + } else if (!rem) { + const behindOk = PLAN.gap === 'fund' || cur.level >= L - 1, licOk = cur.qual || PLAN.unq === 'licence'; + if (behindOk && licOk) return { to: cur, kind: 'lic', skipped, path }; + skipped.push({ n: cur, why: !licOk ? 'fewer than two directs' : `holds level ${cur.level}, needs ${L-1}` }); + } else skipped.push({ n: cur, why: `holds level ${cur.level}, a remainder pays only holders of ${L}` }); + cur = cur.parent; + } + return { to: null, skipped, path }; + } + + // One payment and everything that follows from it: licence, cascade, remainder. + function pay(from, L, amt, skipN, steps, flashes, rem, origin){ + const r = route(from, L, skipN, rem, origin); + for (const s of r.skipped) { steps.push({ kind: 'skip', text: `${name(s.n)} skipped (${s.why})` }); flashes.push([s.n, 'flash-skip']); } + if (!r.to) { + if (tally) { const t = tallyFor(tallyOrigin); if (licUpFlag) t.licUp += amt; else t.above += amt; } + AUD.received += amt; AUD.above += amt; + steps.push({ kind: 'cash', text: `${$$(amt)} of level-${L} money went on above you, to your own upline (the company, in this view).` }); + markPath(from, null, 'hot-cash'); return; + } + const to = r.to; + if (r.kind === 'cash') { + to.cash += amt; AUD.received += amt; refreshNode(to); + if (tally) { const t = tallyFor(tallyOrigin); if (to === you) t.youCash += amt; else t.cash[to.depth] = (t.cash[to.depth] || 0) + amt; } + if (to === you) { totals.cash += amt; totals.cashN++; youLedger.unshift({ from, L, kind: 'cash', amt }); renderTotals(); } + steps.push({ kind: 'cash', text: `${name(to)} already holds level ${to.level}: cash, ${$$(amt)}.` }); + flashes.push([to, 'flash-cash']); markPath(from, to, 'hot-cash'); return; + } + // behind the level: this payment is their next licence (under 'skip' that is always level L) + const n = to.level + 1, cost = net(n); // a licence is worth the level's climbing amount, after the fee + to.level = n; refreshNode(to); + if (tally) { const t = tallyFor(tallyOrigin); if (to === you) t.youLic++; else t.lic[to.depth] = (t.lic[to.depth] || 0) + 1; } + if (to === you) { totals.lic++; totals.licV += cost; youLedger.unshift({ from, L: n, kind: 'lic', amt: cost }); paintReach(); renderTotals(); } + steps.push({ kind: 'lic', text: `${name(to)} held level ${n-1}: this is their licence ${n}${n < L ? ' (funded by a level-' + L + ' payment)' : ''}${to.qual ? '' : ' (fewer than two directs: a licence, never cash)'}. Upgraded. Their level-${n} cost climbs from their position…` }); + flashes.push([to, 'flash-lic']); markPath(from, to, 'hot-lic'); + const wasYou = licUpFlag; if (to === you) licUpFlag = true; + pay(to, n, cost, n - 2, steps, flashes, false, origin); // the cascade: the licence cost climbs (same buyer's money) + licUpFlag = wasYou; + const left = amt - cost; + if (left > 0.005) { steps.push({ kind: 'cash', text: `The remaining ${$$(left)} of that level-${L} payment climbs on as cash to the first upline holding level ${L}.` }); pay(to, L, left, 0, steps, flashes, true, origin); } + } + function purchase(from, L, steps, flashes){ AUD.spent += price(L); feeOn(price(L)); pay(from, L, net(L), L - 2, steps, flashes, false, from); } + + function markPath(from, to, cls){ + if (quiet) return; + let cur = from; + while (cur && cur !== to) { const e = document.getElementById('e' + cur.id); if (e) e.classList.add(cls); cur = cur.parent; } + } + function name(n){ return n === you ? 'YOU' : `#${n.id} (${n.depth === 1 ? 'your direct' : n.depth === 2 ? 'grandchild, depth 2' : 'depth ' + n.depth})`; } + + function clearHot(){ + svg.querySelectorAll('.edge').forEach(e => e.classList.remove('hot-cash', 'hot-lic', 'hot-skip')); + svg.querySelectorAll('.node').forEach(g => g.classList.remove('flash-cash', 'flash-lic', 'flash-skip', 'flash-src')); + } + + function onClick(n, g){ if (n === you) return; openPop(n, g); } + const pop = document.createElement('div'); pop.className = 'pop'; pop.hidden = true; document.body.appendChild(pop); + function closePop(){ pop.hidden = true; } + function openPop(n, g){ + const r = g.querySelector('circle').getBoundingClientRect(); + const nxt = n.level + 1; + const rt = nxt <= PLAN.maxL ? route(n, nxt, nxt - 2, false, n) : { to: null }; + const where = rt.to === you ? 'lands on YOU' : rt.to ? 'pays ' + name(rt.to) : 'goes above you (to your own upline)'; + const how = rt.to ? (rt.kind === 'lic' ? ' as their licence ' + (rt.to.level + 1) + '' + (rt.to.level + 1 < nxt ? ', the remainder climbs on' : '') : ' as cash, ' + $$(price(nxt))) : ''; + const skipped = rt.skipped && rt.skipped.length ? '
skipping ' + rt.skipped.map(x => name(x.n)).join(', ') : ''; + pop.innerHTML = '
' + (n.depth === 1 ? 'YOUR DIRECT · ' : n.depth === 2 ? 'A GRANDCHILD (depth 2) · ' : 'depth ' + n.depth + ' · ') + '#' + n.id + ' · holds level ' + n.level + ' · ' + n.directs + ' direct' + (n.directs === 1 ? '' : 's') + '
' + + '
' + (nxt <= PLAN.maxL ? 'Buying level ' + nxt + ' (' + $$(price(nxt)) + ') ' + where + how + skipped + '.' : 'At the top of the ladder.') + '
' + + (nxt <= PLAN.maxL ? '' : '') + + '
Directs: ' + n.directs + '
' + + [0, 1, 2].filter(k => k !== n.directs).map(k => '').join(''); + pop.hidden = false; + const w = 250, h = pop.offsetHeight || 140; + let left = r.left + r.width / 2 - w / 2, top = r.bottom + 8; + left = Math.max(8, Math.min(left, window.innerWidth - w - 8)); + if (top + h > window.innerHeight - 8) top = r.top - h - 8; + pop.style.left = left + 'px'; pop.style.top = top + 'px'; + const pb = document.getElementById('popBuy'); if (pb) pb.onclick = () => { closePop(); buy(n); }; + pop.querySelectorAll('[data-dir]').forEach(b => b.onclick = () => { + closePop(); const k = Number(b.dataset.dir); + if (k >= 1 && n.directs < 1) n.cashFromHalf = nextId; // the first direct arrives now: depths 1-2 pay from here on + if (k >= 2 && n.directs < 2) n.cashFrom = nextId; // the second: full reach from here on + n.directs = k; refreshNode(n); paintPays(); + const older = cnt(nodes.filter(x => x.id < nextId && x !== n).length); + const msg = k === 2 ? name(n) + ' now has two directs: full reach, cash from its own directs and from positions that join from now on. The ' + older + ' existing positions keep passing it.' + : k === 1 ? name(n) + ' now has one direct: ' + (PLAN.half ? 'cash from depths 1-2 (levels 2-3), from its own directs and from positions that join from now on' : 'no cash until the second (half step is off)') + (PLAN.unq === 'licence' ? '; licences still reach it.' : '.') + : name(n) + ' now has no directs: cash passes over it' + (PLAN.unq === 'licence' ? ', licences still reach it.' : '.'); + renderLast(null, null, null, msg, k ? 'cash' : 'none'); + addLog([{ kind: k ? 'cash' : 'skip', text: msg }], name(n)); + }); + } + document.addEventListener('click', e => { if (!pop.hidden && !pop.contains(e.target) && !e.target.closest('.node')) closePop(); }); + document.addEventListener('keydown', e => { if (e.key === 'Escape') closePop(); }); + + function renderLast(n, L, steps, override, cls){ + const el = document.getElementById('last'); + if (override) { el.className = 'last ' + (cls || ''); el.innerHTML = override; return; } + const lic = steps.filter(s => s.kind === 'lic'); + const cash = steps.filter(s => s.kind === 'cash'); + const youLic = lic.some(s => /^YOU held/.test(s.text)); + const youCash = cash.some(s => /^YOU already/.test(s.text)); + let text = '' + name(n) + ' bought level ' + L + ' (' + product(L) + ') for ' + $$(price(L)) + '. '; + if (youLic) text += 'That payment was your licence: you were upgraded in the same transaction and the cost went on above you.'; + else if (youCash) text += 'It reached you as cash' + (lic.length ? ', after issuing ' + lic.length + ' licence' + (lic.length > 1 ? 's' : '') + ' on the way up' : '') + '.'; + else if (lic.length) text += 'It became a licence for ' + lic[0].text.split(' held')[0] + ' and the money climbed on from there.'; + else if (cash.length && !/above you/.test(cash[0].text)) text += 'It paid ' + cash[0].text.split(' already')[0] + ' as cash.'; + else text += 'It went above you, to your own upline.'; + const why = youLic || youCash ? '' : 'Not yours: a depth-' + n.depth + ' position pays you only when it buys level ' + (n.depth + 1) + '. It holds level ' + L + ' now' + (L < n.depth + 1 ? ', so ' + (n.depth + 1 - L) + ' more purchase' + (n.depth + 1 - L > 1 ? 's' : '') + ' until its next one reaches you.' : '.') + ''; + el.className = 'last ' + (youLic ? 'lic' : youCash ? 'cash' : 'none'); + el.innerHTML = text + why; + } + + function buy(n){ + const L = n.level + 1; + if (L > PLAN.maxL) return; + clearHot(); + n.level = L; refreshNode(n); + const steps = [], flashes = [[n, 'flash-src']]; + purchase(n, L, steps, flashes); + for (const [m, c] of flashes) { const g = document.getElementById('n' + m.id); if (g) g.classList.add(c); } + addLog(steps, `${name(n)} bought level ${L} for ${$$(price(L))}`); + renderLast(n, L, steps); + paintPays(); + return steps; + } + + function paintPays(){ + for (const n of nodes) { + if (n === you) continue; + const g = document.getElementById('n' + n.id); if (!g) continue; + const r = n.level + 1 <= PLAN.maxL ? route(n, n.level + 1, n.level - 1, false, n) : { to: null }; + g.classList.toggle('pays', r.to === you); + } + } + + function wave(){ + clearHot(); + const before = you.level, cashBefore = totals.cash; + const steps = []; + quiet = true; tally = {}; + const order = nodes.filter(n => n !== you).sort((a, b) => a.depth - b.depth || a.idx - b.idx); + let bought = 0, licYou = 0, skipYou = 0; + for (const n of order) { + if (!n.qual) continue; + const L = n.level + 1; if (L > PLAN.maxL) continue; + tallyOrigin = n.depth; const tf = tallyFor(n.depth); tf.n++; tf.L = L; + n.level = L; refreshNode(n); bought++; + const sub = [], fl = []; + const licBefore = totals.lic; + purchase(n, L, sub, fl); + if (totals.lic > licBefore) licYou++; + if (sub.some(s => /went on above you/.test(s.text))) skipYou++; + } + quiet = false; + renderWaveTable(); + const after = you.level; + steps.push({ kind: 'lic', text: `${bought} positions each bought one level, shallow to deep.` }); + steps.push({ kind: after > before ? 'lic' : 'cash', text: after > before + ? `YOU went from level ${before} to ${after} without buying anything: ${licYou} licence${licYou === 1 ? '' : 's'} were funded from below.` + : (before >= DEPTHS + ? `YOU stayed at level ${before}: your org is only ${DEPTHS} deep, and licence ${before + 1} is funded by a depth-${before} position buying level ${before + 1}. Nothing that deep exists here. Grow the org to keep climbing.` + : `YOU stayed at level ${before}: nothing at depth ${before} bought level ${before + 1} this wave.`) }); + steps.push({ kind: 'cash', text: `Cash to you this wave: ${$$(totals.cash - cashBefore)}.` }); + if (skipYou) steps.push({ kind: 'skip', text: `${skipYou} payment${skipYou === 1 ? '' : 's'} went on above you: levels that pay uplines higher than you. Not a miss.` }); + addLog(steps, 'Wave'); + renderLast(null, null, null, 'Wave: ' + steps.map(s => s.text).join(' '), after > before ? 'lic' : 'cash'); + paintPays(); + } + + function renderWaveTable(){ + const box = document.getElementById('waveBox'), tb = document.querySelector('#waveTable tbody'); + if (!box || !tb || !tally) return; + tb.innerHTML = ''; + for (const d of Object.keys(tally).map(Number).sort((a, b) => a - b)) { + const t = tally[d]; + const toYou = [t.youLic ? '' + t.youLic + ' licence' + (t.youLic > 1 ? 's' : '') + '' : '', t.youCash ? '' + $$(t.youCash) + '' : ''].filter(Boolean).join(' + ') || '—'; + const others = Object.keys(t.cash).concat(Object.keys(t.lic)).filter((v, i, a) => a.indexOf(v) === i).map(Number).sort((a, b) => a - b) + .map(k => 'depth ' + k + ': ' + (t.cash[k] ? $$(t.cash[k]) : '') + (t.lic[k] ? (t.cash[k] ? ' + ' : '') + t.lic[k] + ' licence' + (t.lic[k] > 1 ? 's' : '') : '')).join('
') || '—'; + const tr = document.createElement('tr'); + const above = [t.above ? $$(t.above) : '', t.licUp ? $$(t.licUp) + ' (your licence cost, climbing)' : ''].filter(Boolean).join(' + ') || '—'; + tr.innerHTML = '' + d + '' + t.L + ' (' + $$(price(t.L)) + ')' + t.n + '' + toYou + '' + others + '' + above + ''; + tb.appendChild(tr); + } + box.hidden = false; + } + function addLog(steps, head){ + const ol = document.getElementById('logList'); + if (ol.firstChild && /Nothing yet|Reset\./.test(ol.firstChild.textContent)) ol.innerHTML = ''; + const h = document.createElement('li'); h.className = 'head'; h.textContent = head; ol.prepend(h); + let after = h; + for (const s of steps) { + const li = document.createElement('li'); + const chip = document.createElement('span'); chip.className = 'chip ' + s.kind; chip.textContent = s.kind === 'lic' ? 'licence' : s.kind === 'skip' ? 'skip' : 'cash'; + li.appendChild(chip); li.appendChild(document.createTextNode(' ' + s.text)); + after.after(li); after = li; + } + while (ol.children.length > 60) ol.removeChild(ol.lastChild); + } + function clearLog(msg){ document.getElementById('logList').innerHTML = `
  • ${msg}
  • `; } + const lastShown = {}; + function setV(id, text){ + const el = document.getElementById(id); if (!el) return; + if (lastShown[id] !== undefined && lastShown[id] !== text) { el.classList.remove('bump'); void el.offsetWidth; el.classList.add('bump'); } + lastShown[id] = text; el.textContent = text; + } + function renderTotals(){ + if (!you) return; + setV('mLevel', you.level); + const sl = document.getElementById('youLevel'); if (sl && Number(sl.value) !== you.level && you.level <= Number(sl.max)) { sl.value = you.level; document.getElementById('youLevelVal').textContent = you.level; } + const mr = document.getElementById('mReach'); if (mr) mr.textContent = you.level; + setV('mEntry', $$(totals.entry)); + const en = document.getElementById('mEntryN'); if (en) en.textContent = you.children.length + ' directs × ' + $$(net(1)) + ' (the ' + $$(price(1)) + ' entry after the fee), no qualification'; + setV('mCash', $$(totals.cash)); + const cn = document.getElementById('mCashN'); if (cn) cn.textContent = totals.cashN + ' payment' + (totals.cashN === 1 ? '' : 's'); + setV('mLic', totals.lic); + const lv = document.getElementById('mLicV'); if (lv) lv.textContent = 'worth ' + $$(totals.licV) + ', paid by your org'; + setV('mTotal', $$(totals.entry + totals.cash + totals.licV)); + setV('mFuel', $$(AUD.treasury)); const fs = document.getElementById('mFuelS'); if (fs) fs.textContent = PLAN.fee ? Math.round(PLAN.fee * 100) + '% out of every price; the other ' + Math.round((1 - PLAN.fee) * 100) + '% climbs' : 'no fee: the whole price climbs'; + const ol = document.getElementById('youLedger'); + if (ol) { + ol.innerHTML = ''; + if (!youLedger.length) ol.innerHTML = '
  • Nothing yet.
  • '; + for (const e of youLedger.slice(0, 10)) { + const li = document.createElement('li'); + li.innerHTML = '' + (e.kind === 'lic' ? 'licence' : 'cash') + ' ' + (e.kind === 'lic' ? 'your licence ' + e.L + ', funded by ' : 'level-' + e.L + ' money from ') + name(e.from) + '' + (e.kind === 'lic' ? 'licence ' + e.L + ' (' + $$(e.amt) + ')' : '+' + $$(e.amt)) + ''; + ol.appendChild(li); + } + } + const ln = document.getElementById('ledgerNote'); if (ln) ln.textContent = 'Each position pays you at most once per level, so the count is what matters: at level L there are ' + PLAN.w + '^' + '(L−1) positions at the depth that pays you, and each pays the level-L price.'; + ladder(); + } + + document.getElementById('youLevel').addEventListener('input', e => { + document.getElementById('youLevelVal').textContent = e.target.value; + you.level = Number(e.target.value); refreshNode(you); paintReach(); paintPays(); renderTotals(); + }); + document.getElementById('wave').addEventListener('click', wave); + + function at(path){ let n = you; for (const ch of path) n = n.children[ch === 'L' ? 0 : 1]; return n; } + const TOUR = [ + { step: 'Step 1 of 7 · your licence', say: 'You hold level 1, like every new member, and so do your directs (labelled). Their entries already paid you. Your FIRST direct buys level 2. Level-2 money pays the first upline, which is you, and you hold exactly one level below, so this payment IS your licence 2: you are upgraded in the same transaction and the money continues above you. No cash yet.', + act: () => buy(at('L')) }, + { step: 'Step 2 of 7 · cash', say: 'Your SECOND direct buys level 2. You now hold level 2, so this one is cash: the level-2 price to you. Watch the bar.', + act: () => buy(at('R')) }, + { step: 'Step 3 of 7 · not yours', say: 'A grandchild, under your first direct, buys level 2. Level-2 money stops at the FIRST upline, its own parent, who already holds level 2, so it is that parent\'s cash and never reaches you. That is why the rings matter: a position pays you only at the one level that maps to its depth.', + act: () => buy(at('LL')) }, + { step: 'Step 4 of 7 · your licence 3', say: 'The same grandchild buys level 3. Level-3 money skips one upline and lands on you; you hold level 2, exactly one below, so this is your licence 3. The amber band steps down a depth and the rings move.', + act: () => buy(at('LL')) }, + { step: 'Step 5 of 7 · cascade', say: 'One purchase can pay two people. A depth-3 position under your second direct buys level 2. It pays its parent (depth 2), who holds exactly level 1: that parent gets licence 2, and the parent\'s own level-2 cost climbs to your second direct as cash. One buyer, one licence issued, one cash payment.', + act: () => buy(at('RLL')) }, + { step: 'Step 6 of 7 · skipped', say: 'Your first direct now has NO directs of its own (dashed). Its other child buys level 2. That money would pay the parent, but the parent has recruited nobody, so cash passes over it and keeps climbing: you catch it. Qualification decides who is skipped; it never holds money back. (With one direct, the half step would let the parent keep this one.)', + act: () => { const l = at('L'); l.directs = 0; refreshNode(l); paintPays(); buy(at('LR')); } }, + { step: 'Step 7 of 7 · the wave', say: 'Everything at once: every position buys one level, shallow to deep. Read the table that appears under the strip: one row per depth, where that depth\'s money went. Then press Run a wave again and watch your level climb without buying anything.', + act: () => wave() }, + { step: 'Done', say: 'That is the whole plan. Now switch the gap rule and the width at the top and run waves again: the tree resets, and the difference shows up in the money bar.', act: null } + ]; + let ti = -1; + function tourShow(){ + const t = TOUR[ti]; document.getElementById('tourStep').textContent = t.step; document.getElementById('tourSay').textContent = t.say; + const nx = document.getElementById('tourNext'); nx.hidden = false; nx.textContent = t.act ? 'Show me' : 'Finish'; + document.getElementById('tourStart').textContent = 'Restart tour'; + } + document.getElementById('tourStart').addEventListener('click', () => { document.getElementById('youLevel').value = 1; document.getElementById('youLevelVal').textContent = '1'; build(); ti = 0; tourShow(); }); + document.getElementById('tourNext').addEventListener('click', () => { + const t = TOUR[ti]; + if (t.act) { t.act(); } + if (ti < TOUR.length - 1) { ti++; tourShow(); } + else { document.getElementById('tourNext').hidden = true; } + }); + document.getElementById('reset').addEventListener('click', () => { document.getElementById('youLevel').value = 1; document.getElementById('youLevelVal').textContent = '1'; build(); }); + document.getElementById('grow').addEventListener('click', grow); + function depthLabel(){ const el = document.getElementById('depthLabel'); if (el) el.textContent = DEPTHS + ' deep, ' + cnt(nodes.length - 1) + ' positions'; const g = document.getElementById('grow'); if (g) g.disabled = DEPTHS >= MAXD[PLAN.w]; } + function grow(){ + if (DEPTHS >= MAXD[PLAN.w]) return; + const leaves = nodes.filter(n => n.depth === DEPTHS); + DEPTHS++; + let entries = 0; + for (const n of leaves) for (let k = 0; k < PLAN.w; k++) { mkNode(n.depth + 1, n, n.idx * PLAN.w + k); entries += net(1); } + geometry(); layout(); draw(); paintPays(); renderTotals(); depthLabel(); + addLog([{ kind: 'lic', text: `The org is now ${DEPTHS} deep: ${leaves.length * PLAN.w} new level-1 positions joined at the bottom and paid ${$$(entries)} of entries to the row above. Everything else is as it was.` }], 'Grew one depth'); + } + + // ── ladder table ── + const priceEl = document.getElementById('price'); + function ladder(){ + document.getElementById('priceVal').textContent = '$' + priceEl.value; + const tb = document.querySelector('#ladder tbody'); if (!tb) return; tb.innerHTML = ''; + const rows = [1]; const top = Math.min(12, PLAN.maxL); + for (let L = 2; L <= top; L++) rows.push(L); + if (PLAN.maxL > 12) rows.push('gap', 20, 'gap', PLAN.maxL); + let climb = 0; for (let L = 1; L <= PLAN.maxL; L++) climb += price(L); + for (const L of rows) { + const tr = document.createElement('tr'); + if (L === 'gap') { tr.className = 'gap'; tr.innerHTML = '⋮'; tb.appendChild(tr); continue; } + const d = L === 1 ? 1 : L - 1, pos = Math.pow(PLAN.w, d); + if (you && L === you.level + 1) tr.className = 'you'; + tr.innerHTML = `${L}${you && L === you.level + 1 ? ' your next' : ''}${product(L)} placeholder${L === 1 ? 'entries from depth 1, no qualification' : 'depth ' + d + ', buying level ' + L}${cnt(pos)}${$$(pos * net(L))}${$$(price(L))}${L === 1 ? ' everyone pays this to enter' : ' or the first payment from depth ' + d + ''}`; + tb.appendChild(tr); + } + const ln = document.getElementById('ladderNote'); if (ln) ln.textContent = PLAN.w + '-wide, ' + PLAN.maxL + ' levels. Potential is one payment from every position at the depth that pays that level, so it grows ' + PLAN.w + '× per level on its own; the price ladder only sets the dollars, and ' + Math.round(PLAN.fee * 100) + '% of every price goes to the admin wallet before anything climbs. Climbing all ' + PLAN.maxL + ' levels yourself would cost ' + $$(climb) + ', which nobody has to do: the first payment at each depth is the licence.'; + } + priceEl.addEventListener('input', () => { renderTotals(); for (const n of nodes) refreshNode(n); if (dp) deepRender(); }); + + // ── deep simulator: the same rules on counts per depth ── + let dp = null; + function deepReset(){ + const fill = Number(document.getElementById('deepFill').value) / 100, D = PLAN.maxL; + dp = { D, levels: [], counts: [], lic: [], licV: [], cash: [], entry: [], pays: [], waves: 0, above: 0, spent: 0, treasury: 0 }; + window.deepAudit = () => { const rec = dp.cash.reduce((a, b) => a + b, 0) + dp.entry.reduce((a, b) => a + b, 0) + dp.above + dp.treasury; return { spent: Math.round(dp.spent), received: Math.round(rec), ok: Math.abs(dp.spent - rec) <= 1 + 1e-9 * dp.spent }; }; + for (let d = 0; d <= D; d++) { + dp.levels[d] = 1; + dp.counts[d] = d === 0 ? 1 : Math.max(1, Math.round(Math.pow(PLAN.w * fill, d))); + dp.lic[d] = 0; dp.licV[d] = 0; dp.cash[d] = 0; dp.entry[d] = 0; dp.pays[d] = 0; + } + for (let d = 1; d <= D; d++) { dp.entry[d - 1] += dp.counts[d] * net(1); dp.spent += dp.counts[d] * price(1); dp.treasury += dp.counts[d] * price(1) * PLAN.fee; } // Rule 0, once, when the org is built + deepRender('Reset. Everyone at level 1, you included; entries paid.'); + } + // n payments of `amt` for level L from depth `from`: skip `skipN`, then the gap rule on aggregate levels + function deepPay(n, from, L, amt, skipN, rem){ + if (n <= 0) return; + let r = from - 1 - skipN; + while (r >= 0 && !(rem ? dp.levels[r] >= L : (PLAN.gap === 'fund' || dp.levels[r] >= L - 1))) r--; + if (r < 0) { dp.above += n * amt; return; } + if (dp.levels[r] >= L) { dp.cash[r] += n * amt; dp.pays[r] += n; return; } + const nl = dp.levels[r] + 1, cost = net(nl); + const granted = Math.min(dp.counts[r], n); + dp.lic[r] += granted; dp.licV[r] += granted * cost; dp.levels[r] = nl; + deepPay(granted, r, nl, cost, nl - 2); // the licence costs climb from depth r + if (amt - cost > 0.005) deepPay(granted, r, L, amt - cost, 0, true); // the remainder climbs on, cash only + deepPay(n - granted, from, L, amt, skipN); // the rest of this depth's payments, now that r has moved up + } + function deepWave(){ + if (!dp) deepReset(); + for (let d = 1; d <= dp.D; d++) { const L = dp.levels[d] + 1; if (L > PLAN.maxL) continue; dp.spent += dp.counts[d] * price(L); dp.treasury += dp.counts[d] * price(L) * PLAN.fee; deepPay(dp.counts[d], d, L, net(L), L - 2); dp.levels[d] = Math.max(dp.levels[d], L); } + dp.waves++; + } + function deepRender(note){ + document.getElementById('dLevel').textContent = dp.levels[0]; + document.getElementById('dReach').textContent = Math.min(dp.levels[0], dp.D); + document.getElementById('dEntry').textContent = $$(dp.entry[0]); + document.getElementById('dCash').textContent = $$(dp.cash[0]); + document.getElementById('dCashN').textContent = cnt(dp.pays[0]) + ' payment' + (dp.pays[0] === 1 ? '' : 's'); + document.getElementById('dLic').textContent = dp.lic[0]; + document.getElementById('dLicV').textContent = 'worth ' + $$(dp.licV[0]); + document.getElementById('dWaves').textContent = dp.waves; + document.getElementById('dAbove').textContent = $$(dp.above); + document.getElementById('dFuel').textContent = $$(dp.treasury); + const tb = document.querySelector('#deepTable tbody'); tb.innerHTML = ''; + const maxCash = Math.max(1, ...dp.cash.map((c, d) => d === 0 ? 0 : c)); + for (let d = 0; d <= dp.D; d++) { + const tr = document.createElement('tr'); + tr.className = d === 0 ? 'you' : d <= dp.levels[0] ? 'reach' : d === dp.levels[0] + 1 ? 'next' : ''; + const per = dp.counts[d] ? (dp.cash[d] + dp.entry[d]) / dp.counts[d] : 0; + tr.innerHTML = '' + (d === 0 ? 'YOU' : d) + '' + cnt(dp.counts[d]) + '' + dp.levels[d] + '' + cnt(dp.lic[d]) + '' + $$(dp.entry[d]) + '' + $$(dp.cash[d]) + '' + + '' + (d === 0 ? '' : '') + '' + $$(per) + ''; + tb.appendChild(tr); + } + if (note) document.getElementById('deepNote').textContent = note; + } + function deepRun(k){ + const before = dp ? dp.levels[0] : 1; let ran = 0; + for (let i = 0; i < k; i++) { if (dp && dp.levels[0] >= PLAN.maxL) break; deepWave(); ran++; } + const after = dp.levels[0]; + deepRender(ran + ' wave' + (ran === 1 ? '' : 's') + ' run. ' + (after > before ? 'You went from level ' + before + ' to ' + after + ' without buying anything: the first payment at each new depth was your licence.' : after >= PLAN.maxL ? 'You hold level ' + PLAN.maxL + ', the top of the ladder. Every payment from every depth is cash from here on.' : 'Your level did not move this time.')); + } + document.getElementById('deepWave').addEventListener('click', () => deepRun(1)); + document.getElementById('deepWave5').addEventListener('click', () => deepRun(5)); + document.getElementById('deepToTop').addEventListener('click', () => deepRun(80)); + document.getElementById('deepReset').addEventListener('click', deepReset); + document.getElementById('deepFill').addEventListener('input', e => { document.getElementById('deepFillVal').textContent = e.target.value + '%'; deepReset(); }); + + // ── plan controls ── + function applyPlan(){ + PLAN.w = Number(document.getElementById('width').value); + PLAN.maxL = Number(document.getElementById('levels').value); + PLAN.shape = document.getElementById('shape').value; + PLAN.steps = document.getElementById('steps').value.split(',').map(s => Number(s.trim())).filter(n => n > 0); + PLAN.products = document.getElementById('products').value.split(',').map(s => s.trim()).filter(Boolean); + PLAN.fee = Number(document.getElementById('fee').value) || 0; + if (!PLAN.steps.length) PLAN.steps = [10]; + document.getElementById('stepsCtl').hidden = PLAN.shape !== 'stepped'; + document.getElementById('priceCtl').hidden = PLAN.shape === 'stepped'; + document.getElementById('gapSkip').setAttribute('aria-pressed', String(PLAN.gap === 'skip')); + document.getElementById('gapFund').setAttribute('aria-pressed', String(PLAN.gap === 'fund')); + document.getElementById('unqSkip').setAttribute('aria-pressed', String(PLAN.unq === 'skip')); + document.getElementById('unqLic').setAttribute('aria-pressed', String(PLAN.unq === 'licence')); + document.getElementById('halfOff').setAttribute('aria-pressed', String(!PLAN.half)); + document.getElementById('halfOn').setAttribute('aria-pressed', String(PLAN.half)); + document.getElementById('wmOff').setAttribute('aria-pressed', String(!PLAN.wm)); + document.getElementById('wmOn').setAttribute('aria-pressed', String(PLAN.wm)); + const yl = document.getElementById('youLevel'); yl.max = PLAN.maxL; yl.value = 1; // a new plan starts you at level 1, like everyone + document.getElementById('youLevelVal').textContent = yl.value; + document.getElementById('deepHead').textContent = 'All ' + PLAN.maxL + ' levels, simulated by depth'; + svg.setAttribute('aria-label', PLAN.w + '-wide matrix under you'); + build(); deepReset(); + } + for (const id of ['width', 'levels', 'shape']) document.getElementById(id).addEventListener('change', applyPlan); + document.getElementById('steps').addEventListener('change', applyPlan); + document.getElementById('products').addEventListener('change', applyPlan); + document.getElementById('fee').addEventListener('change', applyPlan); + document.getElementById('gapSkip').addEventListener('click', () => { PLAN.gap = 'skip'; applyPlan(); }); + document.getElementById('gapFund').addEventListener('click', () => { PLAN.gap = 'fund'; applyPlan(); }); + document.getElementById('unqSkip').addEventListener('click', () => { PLAN.unq = 'skip'; applyPlan(); }); + document.getElementById('unqLic').addEventListener('click', () => { PLAN.unq = 'licence'; applyPlan(); }); + document.getElementById('halfOff').addEventListener('click', () => { PLAN.half = false; applyPlan(); }); + document.getElementById('halfOn').addEventListener('click', () => { PLAN.half = true; applyPlan(); }); + document.getElementById('wmOff').addEventListener('click', () => { PLAN.wm = false; applyPlan(); }); + document.getElementById('wmOn').addEventListener('click', () => { PLAN.wm = true; applyPlan(); }); + + applyPlan(); +})(); diff --git a/public/plan-lab.html b/public/plan-lab.html new file mode 100644 index 0000000..d35d846 --- /dev/null +++ b/public/plan-lab.html @@ -0,0 +1,281 @@ + + + + + + +Reach Ladder · plan lab + + + + + + + + +
    +
    Compensation plan · working draft · 27 Sep 2026
    +

    Your reach is your level. Width does the rest.

    +

    A forced matrix with the same two-directs rule to receive, and three things RM Circle does not have: every payment that reaches you is either cash or your next licence, and the contract knows which; the matrix can be wider than two, so the people you build sit within your reach instead of 28 deep; and prices step up with the product, never double. The working plan is 4 wide, 8 levels, a stepped ladder and the fund-the-gap rule; the other settings are there to compare against.

    + +
    +

    Eight rules, and nothing else

    +
    +
    PLACEMENT

    Shallowest open slot under your recruiter

    Your sponsor is the person whose link you used, always. You are placed in the shallowest open slot in their organisation, breadth-first, so orgs fill wide before they fill deep. Decided 27 Sep.

    +
    RULE 0

    Level 1 is the entry

    Everyone pays the same to come in. After the admin fee, half goes to the recruiter and half to the upline directly above the placement, no qualification, never a licence. Someone with no recruiter is assigned to a member who needs a direct. (In this drawn tree every position was recruited by its upline, so both halves land there.)

    +
    RULE 1

    A level-L purchase pays one upline

    Skip the first L−2 uplines outright. Then pay the first one with two directs. Same climb as RM Circle today.

    +
    RULE 2

    So depth d pays you when it buys level d+1

    The positions at depth d under you are the ones whose level-(d+1) purchases land on you. Depth 1 also pays you its entries.

    +
    RULE 3

    Reach = your level

    At level A you collect cash from depths 1 to A. The first payment from depth A is your next licence. Deeper money routes past you, for now.

    +
    RULE 4

    The gap rule

    Fund the gap (decided 27 Sep, with the stepped ladder): a payment that reaches someone more than one level behind buys their next licence, and the remainder climbs on as cash. Nobody qualified is ever skipped. The RM Circle skip is kept as a switch for comparison only.

    +
    RULE 5

    Licences reach everyone, cash reaches the qualified

    A pass-up that reaches a member with fewer than two directs buys their next licence; the cost climbs on. Cash steps up with recruits: no directs, entries only; one direct, cash from depths 1 and 2; two directs, full reach. Each step counts from the moment it was reached: cash comes from your own directs and from positions created after it. Positions that passed you before keep passing you.

    +
    RULE 6

    The licence cascades, the contract holds nothing

    When a licence is issued, its cost moves up that member's chain by Rule 1 and lands on the first person already at that level. Every coin leaves in the block it arrived.

    +
    +
    + +
    +

    Simulator

    +

    You are the black node. Click any position: a small menu tells you where its next purchase would go before you buy, then lets you buy it or mark it as having one direct (dashed, gets skipped). The strip under the tree says in plain words what each purchase did. Run a wave has the whole organisation buy one level, shallow to deep, so you can watch your own level climb without buying anything.

    +
    +
    +
    Your level
    1
    reach = depth 1 to 1
    +
    Entries to you
    $0
    from your directs, no qualification
    +
    Cash to you
    $0
    0 payments
    +
    Licences funded for you
    0
    worth $0, paid by your org
    +
    Total received
    $0
    entries + cash + licences
    +
    Admin fee, to the receiver wallet
    $0
    20% out of every price
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    1
    +
    +
    +
    +
    +
    glowing ring = this position's next purchase lands on youshaded band = within your reachcash to the recipientlicence issued (cost keeps climbing)skipped: one direct, or behind the level under the skip rule
    +
    +
    Guided tour
    Seven clicks, one rule each: cash, licence, cascade, skip, "not yours", and the wave. Press Start; the tree resets and each step tells you what to look at before it happens.
    +
    +
    +
    +
    Nothing bought yet. Click a ringed position first: its money reaches you.
    + +
    +
    +

    Every step, in order

    +
    1. Nothing yet. Click a position, or run a wave.
    +
    +
    +

    Money that reached you, newest first

    +
    1. Nothing yet.
    +

    +

    A wave pays you from every depth up to your reach, and the first payment from the depth at your reach is your next licence. Everyone starts at level 1, you included. In the first wave your directs buy level 2: the first of those payments is your licence 2, the rest is cash. Every wave after that carries you up one rung, funded from below.

    +
    +
    +
    +
    + +
    +

    All 8 levels, simulated by depth

    +

    A drawn tree stops early. This runs the same rules on counts per depth with every position qualified (the unqualified and late-qualifier rules need individual positions, so they live in the tree above), so it goes the whole way up the ladder. Every depth's positions buy one level per wave; each purchase climbs the rule, the first payment to a depth one level behind is its licence and the cost keeps climbing, the rest is cash. Fill is how full the matrix is: 100% is a perfect tree (widthd positions at depth d), lower values thin it out with depth the way real organisations do. Entries are paid once, when the org is built.

    +
    +
    +
    100%
    +
    +
    +
    +
    +
    +
    +
    Your level
    1
    reach = depth 1 to 1
    +
    Entries to you
    $0
    your directs' level 1
    +
    Cash to you
    $0
    0 payments
    +
    Licences funded for you
    0
    worth $0
    +
    Waves run
    0
    one level per position per wave
    +
    Went above you
    $0
    levels that pay uplines higher than you
    +
    Admin fee
    $0
    to the receiver wallet
    +
    +
    DepthPositionsLevel nowLicences fundedEntriesCash collectedPer position
    +

    +
    +
    + +
    +

    The ladder, in numbers: one product per level

    +

    +
    +
    LevelDeliversPaid byPositions therePotential, if full, after the feeCost to you
    +
    +
    + +

    Mechanics only. Prices are illustrative knobs, not proposals. What each licence delivers is a separate decision.

    +
    + + +

    Unlisted working page for planning. Not a member page, not an offer. Every number here is a mechanic, not a prediction.

    + + + diff --git a/server.js b/server.js index 7d58eb6..0f3e2ea 100644 --- a/server.js +++ b/server.js @@ -3448,7 +3448,9 @@ const server = http.createServer(async (req, res) => { return res.end(blog.renderPost(post, related)); } if (p === '/wallets') return sendFile(res, path.join(PUBLIC_DIR, 'wallets.html')); - if (p === '/friday') return sendFile(res, path.join(PUBLIC_DIR, 'friday.html')); // Five Dollar Friday bridge page: ?ref= works like any page (Marty, 2026-09-25) + if (p === '/friday') return sendFile(res, path.join(PUBLIC_DIR, 'friday.html')); + if (p === '/plan-lab') return sendFile(res, path.join(PUBLIC_DIR, 'plan-lab.html'), { 'X-Robots-Tag': 'noindex, nofollow' }); // Reach Ladder simulator for Marty's planning group: unlisted, shared by link (2026-09-27) + if (p === '/plan-lab') return sendFile(res, path.join(PUBLIC_DIR, 'plan-lab.html')); // Reach Ladder simulator for Marty's planning group: unlisted, shared by link (2026-09-27) // Five Dollar Friday bridge page: ?ref= works like any page (Marty, 2026-09-25) if (p === '/launch') return sendFile(res, path.join(PUBLIC_DIR, 'launch.html')); if (/^\/view\/[a-f0-9]{32}$/.test(p)) return sendFile(res, path.join(PUBLIC_DIR, 'view.html')); m = /^\/uploads\/([a-z0-9]{24}\.(?:png|jpg|webp|gif|mp4|webm))$/.exec(p);