73bee6c8260c9d40776b2fa8bab94b130d71b9e3
Login ad: every Control Room page asks (cr-shell.js loginAd, the per-tab sessionStorage guard is gone); the server answers with an ad only when the member's last finished view on LinkSpin is older than loginAdEveryHours (site setting, default 3). loginadclock.js (the same file as InstantAdPay), MySQL table login_ad_views through DOCSTORE_URL. POST /api/ads/login/seen at the end of the countdown restarts the clock only if the serve was dwell-2 s earlier. Member erase forgets the row. Admin site setting label.
Signed out: /api/ads/slot?type=login draws nothing and counts no view (bots, probes, previews cannot run up an advertiser's numbers).
Hop: a member who signed in here because another network site asked ("Sign in with LinkSpin", nsso.back) goes back there after the login ad (/sso/resume), from every Control Room screen, not only the retired /my.
networksso.js: the network-wide copy (loop guard 120 s, fivex, unknown r refused); fivex added to the wallets map (FIVEX_URL, default https://5xyourteam.com).
Tests: qa/networksso-partner.e2e.mjs (same file as InstantAdPay, in run.sh): partner via LinkSpin, LinkSpin clock, signed-out slot; networksso e2e retries a keep-alive ECONNRESET. qa sso: ALL PASSED; qa member: ALL PASSED (2 known warnings; networksso e2e flaked on ECONNRESET once, passes with the retry).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5xYourTeam as a network site (2026-11-15): fixed network link nw5x -> https://5xyourteam.com/{s2}?ref={s1} on the admin account, catalog network template 5xyourteam + NET_SRC fivex/5xyourteam, netsites CODES fivex: nw5x; qa netsrc expects eight network links + nw5x redirect
DownlineHydra as a network site (2026-11-15 go-live): fixed network link nwdh -> https://downlinehydra.com/{s2}?ref={s1} on the admin account (catalog network template downlinehydra + NET_SRC dh/downlinehydra already there), netsites CODES downlinehydra: nwdh; qa netsrc expects nine network links + nwdh redirect. LOCAL, not run here (qa on hold for the VAB lane's suite)
DownlineHydra as a network site (2026-11-15 go-live): fixed network link nwdh -> https://downlinehydra.com/{s2}?ref={s1} on the admin account (catalog network template downlinehydra + NET_SRC dh/downlinehydra already there), netsites CODES downlinehydra: nwdh; qa netsrc expects nine network links + nwdh redirect. LOCAL, not run here (qa on hold for the VAB lane's suite)
5xYourTeam as a network site (2026-11-15): fixed network link nw5x -> https://5xyourteam.com/{s2}?ref={s1} on the admin account, catalog network template 5xyourteam + NET_SRC fivex/5xyourteam, netsites CODES fivex: nw5x; qa netsrc expects eight network links + nw5x redirect
LinkSpin — site
Membership advertising with immutable on-chain settlement. Zero-dependency Node server (RM Circle pattern): static pages + JSON API + SSE ledger.
Architecture
server.js— http server: pages,/api/*,/join/<id>sponsor links, SSE feedchain.js— contract reader + persistent event indexer (free public RPCs)auth.js— SIWE wallet sign-in (EIP-4361), sessions in the volumeaccounts.js— site-side records only (free members, last-touch sponsor attribution, handles). The CHAIN is the source of truth for money/credits.public/— landing, live ledger, member area; no client libraries
Chain flip (rehearsal → mainnet)
Everything chain-specific lives in data/config.json (volume):
{contract, chainId, chainName, explorer, rpcs, deployBlock}.
Defaults point at the Amoy rehearsal deployment. Launch = deploy the
mainnet contract, wipe accounts.json/sessions.json/chain-index.json,
PATCH /api/admin/chain with the mainnet values, set rehearsal:false via
/api/admin/site. Same code, different config.
Run
PORT=3100 node server.js # DATA_DIR defaults to ./data
Admin API auth: Authorization: Bearer $ADMIN_PASSWORD.
Spec: ../CONTRACT-SPEC.md (v1.0.3-frozen). Contracts: ../contracts/.
Description
Languages
JavaScript
81.3%
HTML
13.9%
CSS
3.8%
Python
0.7%
Shell
0.3%