5xYourTeam The Draft v1 (phase 1, local only): weekly earned-order draft of holding-tank people, picks as adoptions (stub tank), coaching tools, cards, boards, trust pack
$10 one-time DraftPosition purchases (sponsor 25%, L2-5 5%, 10% Best Coach pot, 45% company) with keeper-signed hub-line vouchers; pure draft engine with a mocked clock; no contact data anywhere; Telegram to an outbox unless TG_LIVE=1. Unit 60/60, smoke 156/156 (Playwright 1280/390). Not deployed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
# 5xYourTeam app: The Draft (5xyourteam.com rebuild)
|
||||
|
||||
Phase 1, LOCAL ONLY (Marty 2026-11-15). Nothing here is deployed; no contract is on chain; the holding tank is a local stub
|
||||
that adopts nobody and sends no mail; Telegram posts go to an outbox. Plain Node http server, no framework (the ViralAdBlitz /
|
||||
DownlineHydra pattern). Contract: `../contracts` (DraftPosition).
|
||||
|
||||
## What it does
|
||||
|
||||
- **A position**: $10 one-time in POL (never a subscription). It gives 5 instant picks from the current pool and a spot in every
|
||||
weekly draft. Paid through DraftPosition: sponsor 25%, levels 2-5 5% each (pass-up over people with no position, 20 places),
|
||||
10% to the Best Coach prize pot wallet, 45% company. The server builds the `buy()` call with a keeper-signed EIP-712 line
|
||||
voucher from the hub line (shop.js, the VABShop pattern); the watcher records each `Purchase` once and adds the instant picks.
|
||||
- **The draft** (draft.js, pure and unit-tested with a mocked clock; league.js wires it): every Monday 7 PM Central (env), 5 rounds,
|
||||
straight order. Draft order is EARNED: most of last week's picks started (payouts on or a first purchase), then started ever,
|
||||
then the earlier position, then a fixed shuffle of (week, coach). A coach in the draft room (the board pinged within 2 minutes)
|
||||
gets a 90-second clock; an away coach is auto-picked at once from their own queue, else the best available by scouting score.
|
||||
A coach with 10 open picks is skipped for that slot. A draft missed by more than 6 hours (app down) is skipped, never run late.
|
||||
- **Picks are adoptions** (tankpool.js): every pick goes through `tank.adopt()` first. The pool never has anyone locked on a
|
||||
network contract, already sponsored, adopted twice (every pick counts, plus the network's count), spam/throwaway, or inside the
|
||||
24-hour sign-up grace. An unconverted pick returns to the pool after 3 days, unless that person has now had 2 adoptions (then
|
||||
they stay with the coach). A started pick stays. A coach cannot release a pick in its first 48 hours.
|
||||
- **Coaching tools** (`/team`): stat tiles (on my team, started this week, next draft spot, back to pool soon), the focused pick
|
||||
card (scouting stats, the 5 getting-started steps, one-tap messages, the composer and thread, release), the rest of the team,
|
||||
who to help first (back to pool soon, one step from payouts, quiet), the draft queue. Someone who is a pick sees their coach,
|
||||
the steps and the thread, and the coach's builder links. Messages go through the site only. No email, phone or any contact
|
||||
data is ever shown, stored from sign-in, or exported (smoke-tested).
|
||||
- **Scouting stats** on draft cards: last seen, the door they came from, wallet linked, game plays and title, POL earned in
|
||||
games and surfing where the network tracks it ("not tracked yet" otherwise, never invented). Earnings show to coaches only.
|
||||
- **Cards**: trading cards Rookie (drafted), Starter (wallet), Pro (payouts on), All-Star (first purchase), Hall of Fame (holds a
|
||||
position of their own). Public cards show milestones, never earnings. Coach page `5xyourteam.com/<username>`.
|
||||
- **Boards**: Best Coach (picks started inside the Central week; tie = got there first), the week's pot (10% of positions sold
|
||||
that week, from the Purchase events), Rookie of the Week (the pick that climbed highest that week), last week's top 3.
|
||||
- **Builder** (`/builder`, wild.js from DownlineHydra, the CryptoTeamBuild builder programs seeded from
|
||||
`data-seed/programs.seed.json`): coaches save referral IDs; their picks see the coach's link for each program.
|
||||
- **Trust pack** (proof.js): `/ledger` (every share with its place in the line, passed over, pot, company; Best Coach payouts
|
||||
with tx), `/contract` (live facts incl. the prize wallet), toasts (positions, picks, level-ups), Telegram sale card (rotated
|
||||
proof images), Draft Day card (`/draftday/<monday>` 1080x1080, PNG via `tools/art.mjs --draftday`), a line per pot payout;
|
||||
Terms / Earnings Disclaimer / Privacy naming TrustClickz, 615 Green Valley Drive, Moody, AL 35004; the network footer from the
|
||||
hub (netsites.js, 5xYourTeam added locally as `fivex`, LinkSpin code `nw5x`).
|
||||
- **Promo kit** (`/promote`, `/api/promo-kit?u=`): 21 creatives `public/art/kit/fx-{draft,coach,cards}-{shape}.png`, swipe copy.
|
||||
- **Old links**: `/?<old>`, `/splashpg.php?r=`, `/lcp.php?r=`, `/index.php?r=` 301 to the coach page via the old-ref map
|
||||
(`POST /api/admin/oldrefs`), `/members/*` to `/team`, any other `*.php` to `/`.
|
||||
- **Admin** (`/admin`, `ADMIN_TOKEN`): status, run a tick, the week's pot shares, record a pot payout (`POST /api/admin/pot/paid`),
|
||||
old-link map. Test-only: `POST /api/admin/clock` (needs `ALLOW_TEST_CLOCK=1`, refused in production), `POST /api/admin/stub/status`.
|
||||
- **Data**: docstore.js (MySQL via `DOCSTORE_URL`, the LinkSpin copy that skips unchanged writes): document `fivex.json` + row
|
||||
tables `fx_picks`, `fx_msgs`, `fx_refids`; `hubreport.json`, `oldrefs.json`, `tg-outbox.json`, `stub-tank.json` are documents.
|
||||
|
||||
## Look
|
||||
|
||||
The approved draft-night mockup (2026-11-14): stadium navy #0b1530 / bar #07102a, gold #ffc93c rule and accents, red #ff4d4d
|
||||
week tag, white scouting cards with navy heads, Oswald + Inter. One stylesheet `public/assets/fx.css`.
|
||||
Deviation from the mockup on purpose: the mockup's coach card showed an email line; it is gone (no contact data, Marty's rule).
|
||||
|
||||
## Run and test
|
||||
|
||||
```
|
||||
npm ci
|
||||
node server.js # prototype mode (files, stub tank); never launch this way
|
||||
node qa/unit.test.cjs # 60 checks: tiers, tank rules, earned order, the clocked draft, returns, boards, the split model
|
||||
# against the fork rehearsal (to the wei), Central weeks, the league end to end
|
||||
node qa/smoke.mjs # 156 checks against stand-in hub / chain / Telegram (ports 3561-3564) + Playwright 1280/390
|
||||
UI_FONTS=1 node qa/smoke.mjs # same, Google Fonts allowed so qa/out screenshots show the real type
|
||||
node tools/pages.mjs # regenerate public/*.html (one source of copy + legal facts)
|
||||
node tools/art.mjs # icon, OG, proof cards, kit, tier cards; --draftday <base> <monday> for a Draft Day PNG
|
||||
```
|
||||
|
||||
## Phase 2 (needs Marty's go): see the open questions in the build report
|
||||
|
||||
Hub `HUB_SITES` entry `fivex` + secret; `tankpool.js` hub mode (pool read, adopt through the tank, status); the network-sites list
|
||||
and LinkSpin `nw5x`; the contract on chain with the prize wallet; DOCSTORE_URL; old-member reconciliation; PolHunter mission.
|
||||
Reference in New Issue
Block a user