Public landing page (live stats, how it plays and pays, honest fine print), tester briefing moved to /testers, badge art served from /badges/ (cached, cross-origin) for IAP cards and link previews, signed /api/partner/player for the IAP Games card, /api/public/stats

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-01 04:36:56 -05:00
parent a7498b562d
commit bc28136e04
4 changed files with 152 additions and 36 deletions
+69 -35
View File
@@ -3,52 +3,86 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<meta name="robots" content="noindex,nofollow">
<title>Drip Runner · tester briefing</title>
<title>Drip Runner · hop the network, get paid in POL</title>
<meta name="description" content="A fast runner game for InstantAdPay members. Clear chapters, refuel on member pages, collect POL in your wallet.">
<meta property="og:title" content="Drip Runner: hop the network, get paid in POL">
<meta property="og:description" content="A fast runner game for InstantAdPay members. Clear chapters, refuel on member pages, collect POL.">
<meta property="og:image" content="https://driprunner.saasy.top/badges/ch5.jpg">
<meta name="twitter:card" content="summary_large_image">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Orbitron:wght@600;800;900&family=Manrope:wght@400;600;800&family=JetBrains+Mono:wght@500;700&display=swap">
<link rel="stylesheet" href="/site.css">
<style>
.hero{display:grid;grid-template-columns:1.1fr .9fr;gap:28px;align-items:center;padding:24px 0 8px}
@media (max-width:760px){.hero{grid-template-columns:1fr}}
.hero h1{font:900 clamp(30px,6vw,48px)/1.02 var(--display);letter-spacing:.04em;margin:10px 0 12px;text-transform:uppercase}
.hero h1 em{font-style:normal;background:linear-gradient(180deg,var(--gold2),var(--gold) 55%,#E08A00);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p.lead{font-size:16px;color:var(--ink2);max-width:52ch}
.cta{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 6px}
.cta .btn{font-size:15px;padding:14px 20px}
.art{position:relative;aspect-ratio:1;max-width:420px;width:100%;justify-self:center}
.art img{position:absolute;width:62%;border-radius:18px;box-shadow:0 30px 60px -20px rgba(0,0,0,.9),0 0 50px -10px rgba(34,211,238,.4)}
.art img:nth-child(1){left:0;top:6%;transform:rotate(-7deg)}
.art img:nth-child(2){right:0;top:0;transform:rotate(6deg)}
.art img:nth-child(3){left:19%;bottom:0;transform:rotate(-1deg);z-index:2}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:22px 0}
@media (max-width:560px){.stats{grid-template-columns:repeat(2,1fr)}}
.stat b{font-size:22px}
.cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.cols .card{margin:0;max-width:none}
.cols h3{font:800 14px var(--display);letter-spacing:.1em;text-transform:uppercase;margin:0 0 6px;color:var(--ink)}
.cols p{font-size:14px;margin:0}
.step{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;font:800 13px var(--display);color:#07101F;background:linear-gradient(180deg,var(--gold2),var(--gold));margin-bottom:8px}
.fine{font-size:12px;color:var(--muted);margin-top:26px;max-width:70ch}
</style>
</head>
<body>
<div class="wrap">
<p class="logo">Drip<span>Runner</span></p>
<p style="margin-top:8px"><span class="chip sig">closed trial</span> <span class="chip">InstantAdPay members only</span></p>
<p>Thanks for testing. Drip Runner is a small game that pays real POL, and the POL comes from the ads you watch inside it. You are here to find out whether that loop feels good and whether it holds up. Nothing is polished yet, so say what you see.</p>
<div class="wrap" style="max-width:1000px">
<section class="hero">
<div>
<p class="logo" style="font-size:22px">Drip<span>Runner</span></p>
<h1>Hop the network.<br><em>Get paid in POL.</em></h1>
<p class="lead">A fast little runner game for InstantAdPay members. Grab gold drips, dodge the bots, clear chapters. Your first clear of every chapter drips POL into your game balance, and it pays out to the wallet on your InstantAdPay account.</p>
<div class="cta">
<a class="btn" href="https://instantadpay.com/api/my/driprunner">Play with InstantAdPay</a>
<a class="btn ghost" href="/play">Try a run first</a>
</div>
<p class="muted">New to InstantAdPay? The first button signs you up free with just your email, then drops you straight into the game.</p>
</div>
<div class="art" aria-hidden="true">
<img src="/badges/magnet.jpg" alt="">
<img src="/badges/shield.jpg" alt="">
<img src="/badges/ch5.jpg" alt="">
</div>
</section>
<div class="card">
<h1>Get in</h1>
<ol class="steps">
<li><div><b>Tap this button</b>InstantAdPay signs you across. No new account, no new password. If you are not signed in to InstantAdPay in this browser, it asks for your email code first and then brings you straight back into the game.<br><a class="btn" style="margin-top:10px" href="https://instantadpay.com/api/my/driprunner">Open Drip Runner</a></div></li>
<li><div><b>Come back any time</b>Once signed in, <a href="/play">driprunner.saasy.top/play</a> opens the game directly for 30 days on this device. The lobby also has links back to your InstantAdPay dashboard and this page.</div></li>
<li><div><b>Have a wallet on your IAP account</b>You can play without one, but POL payouts go to the wallet on file at InstantAdPay, and your game progress follows your member id once a wallet is linked. Link it under Wallet on your IAP dashboard before you play.</div></li>
</ol>
<p class="muted">If you see "not on the tester list", your IAP account has not been added yet. Tell Marty which username you use.</p>
<div class="stats" id="stats">
<div class="stat"><small>Players</small><b id="sPlayers">·</b></div>
<div class="stat"><small>Refuels</small><b id="sRefuels">·</b></div>
<div class="stat"><small>Chapter drips</small><b id="sDrips">·</b></div>
<div class="stat"><small>POL paid out</small><b id="sPaid">·</b></div>
</div>
<h2>How it plays</h2>
<ul>
<li><b>Tap to hop.</b> The courier drops when you do nothing and hops when you tap. Space bar works on a computer.</li>
<li><b>Gold drips</b> are the score. <b>Magenta bots</b> end the run. From chapter 2, <b>orange firewalls</b> have to be threaded through the gap.</li>
<li><b>Fuel</b> drains all the time. Every drip tops it up a little. Empty tank, run over.</li>
<li><b>Chapters.</b> Each chapter has a drip goal for one run. Clear it and you move up. The first time you clear a chapter, a drip of POL lands in your game balance.</li>
</ul>
<div class="cols">
<div class="card"><span class="step">1</span><h3>Tap to hop</h3><p>The courier drops when you let go and hops when you tap. Gold drips are your score and top up your fuel. Magenta bots end the run, and from chapter 2 you thread orange firewalls.</p></div>
<div class="card"><span class="step">2</span><h3>Clear chapters</h3><p>Each chapter has a drip goal for one run. Clear it and you move up. The first clear of every chapter pays a POL drip into your game balance.</p></div>
<div class="card"><span class="step">3</span><h3>Refuel, don't restart</h3><p>Out of fuel or hit by a bot? Refuel with a short visit to a member's page or a member video. Your run picks up exactly where it stopped.</p></div>
</div>
<h2>Where the POL comes from</h2>
<ul>
<li>When a run ends you can <b>refuel</b> instead of restarting. Refuel opens a real InstantAdPay verified visit: a member's page, a short timer, a quick icon check. Then your run continues where it died, fuel full.</li>
<li>That visit is paid for by the advertiser. A share of it goes into the game's <b>POL pool</b>, and the pool is the only thing chapter drips are paid from. No refuels, no pool, no POL. That is the whole experiment.</li>
<li>Your <b>game balance</b> pays out to your wallet once it reaches the threshold shown on the Balance screen. Payouts run every couple of minutes, and the transaction link shows up in your history.</li>
<li>In the <b>hangar</b>, drips buy the magnet and the Mk II courier. The shield and the slow field cost POL, taken from your game balance before it pays out.</li>
</ul>
<div class="cols">
<div class="card"><h3>Advertisers fund it</h3><p>Every refuel is a verified visit an InstantAdPay advertiser already paid for. A share of that spend goes into the game's POL pool, and chapter drips are paid only from the pool.</p></div>
<div class="card"><h3>Paid to your wallet</h3><p>When your game balance reaches <span id="sThreshold">the payout line</span> POL, it is sent on Polygon to the wallet on your InstantAdPay account, with the transaction link in your history.</p></div>
<div class="card"><h3>The hangar</h3><p>Drips buy the Drip Magnet and the Courier Mk II. The Shield Core and Slow Field cost POL from your game balance, and that POL goes straight back into the pool.</p></div>
<div class="card"><h3>Bring your team</h3><p>Share your link from the lobby. When people on your InstantAdPay team refuel, <span id="sRef">a share</span> of what each refuel adds to the pool goes to your game balance.</p></div>
</div>
<h2>What to tell Marty</h2>
<ul>
<li>Did the refuel work the first time, and did the run really continue where it stopped?</li>
<li>Did the sponsor page load inside the refuel screen, or did you get a blank frame?</li>
<li>Did a chapter drip show up in your balance after your first clear? If it said the pool was empty, say so, that is expected until refuels have happened.</li>
<li>Anything on your phone that looked wrong: text cut off, buttons you could not reach, a run that ended for no reason.</li>
<li>Honest one: would you refuel again just to keep a run alive?</li>
</ul>
<p class="muted">Amounts are trial placeholders and can change during the test. Nothing here is a promise of income.</p>
<div class="cta" style="margin-top:26px">
<a class="btn" href="https://instantadpay.com/api/my/driprunner">Play with InstantAdPay</a>
<a class="btn ghost" href="/play">Try a run first</a>
</div>
<p class="fine">Drip Runner pays small amounts of POL for play that the game can verify. Amounts depend on the pool, which is funded by the ad visits players make, and can change. Nothing here is a promise of income. One account per person. Part of the Crypto Team Build Network, alongside InstantAdPay and PolHunter.</p>
</div>
<script src="/landing.js"></script>
</body>
</html>
+10
View File
@@ -0,0 +1,10 @@
(function () {
'use strict';
var $ = function (id) { return document.getElementById(id); };
var n = function (v, d) { return Number(v || 0).toLocaleString('en-US', { maximumFractionDigits: d || 0 }); };
fetch('/api/public/stats').then(function (r) { return r.json(); }).then(function (s) {
$('sPlayers').textContent = n(s.players); $('sRefuels').textContent = n(s.refuels); $('sDrips').textContent = n(s.chapterDrips); $('sPaid').textContent = n(s.polPaid, 3);
if (s.thresholdPol) $('sThreshold').textContent = n(s.thresholdPol, 2);
if (s.refSharePct) $('sRef').textContent = s.refSharePct + ' percent';
}).catch(function () { $('stats').hidden = true; });
})();
+54
View File
@@ -0,0 +1,54 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<meta name="robots" content="noindex,nofollow">
<title>Drip Runner · tester briefing</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Orbitron:wght@600;800;900&family=Manrope:wght@400;600;800&family=JetBrains+Mono:wght@500;700&display=swap">
<link rel="stylesheet" href="/site.css">
</head>
<body>
<div class="wrap">
<p class="logo">Drip<span>Runner</span></p>
<p style="margin-top:8px"><span class="chip sig">closed trial</span> <span class="chip">InstantAdPay members only</span></p>
<p>Thanks for testing. Drip Runner is a small game that pays real POL, and the POL comes from the ads you watch inside it. You are here to find out whether that loop feels good and whether it holds up. Nothing is polished yet, so say what you see.</p>
<div class="card">
<h1>Get in</h1>
<ol class="steps">
<li><div><b>Tap this button</b>InstantAdPay signs you across. No new account, no new password. If you are not signed in to InstantAdPay in this browser, it asks for your email code first and then brings you straight back into the game.<br><a class="btn" style="margin-top:10px" href="https://instantadpay.com/api/my/driprunner">Open Drip Runner</a></div></li>
<li><div><b>Come back any time</b>Once signed in, <a href="/play">driprunner.saasy.top/play</a> opens the game directly for 30 days on this device. The lobby also has links back to your InstantAdPay dashboard and this page.</div></li>
<li><div><b>Have a wallet on your IAP account</b>You can play without one, but POL payouts go to the wallet on file at InstantAdPay, and your game progress follows your member id once a wallet is linked. Link it under Wallet on your IAP dashboard before you play.</div></li>
</ol>
<p class="muted">If you see "not on the tester list", your IAP account has not been added yet. Tell Marty which username you use.</p>
</div>
<h2>How it plays</h2>
<ul>
<li><b>Tap to hop.</b> The courier drops when you do nothing and hops when you tap. Space bar works on a computer.</li>
<li><b>Gold drips</b> are the score. <b>Magenta bots</b> end the run. From chapter 2, <b>orange firewalls</b> have to be threaded through the gap.</li>
<li><b>Fuel</b> drains all the time. Every drip tops it up a little. Empty tank, run over.</li>
<li><b>Chapters.</b> Each chapter has a drip goal for one run. Clear it and you move up. The first time you clear a chapter, a drip of POL lands in your game balance.</li>
</ul>
<h2>Where the POL comes from</h2>
<ul>
<li>When a run ends you can <b>refuel</b> instead of restarting. Refuel opens a real InstantAdPay verified visit: a member's page, a short timer, a quick icon check. Then your run continues where it died, fuel full.</li>
<li>That visit is paid for by the advertiser. A share of it goes into the game's <b>POL pool</b>, and the pool is the only thing chapter drips are paid from. No refuels, no pool, no POL. That is the whole experiment.</li>
<li>Your <b>game balance</b> pays out to your wallet once it reaches the threshold shown on the Balance screen. Payouts run every couple of minutes, and the transaction link shows up in your history.</li>
<li>In the <b>hangar</b>, drips buy the magnet and the Mk II courier. The shield and the slow field cost POL, taken from your game balance before it pays out.</li>
</ul>
<h2>What to tell Marty</h2>
<ul>
<li>Did the refuel work the first time, and did the run really continue where it stopped?</li>
<li>Did the sponsor page load inside the refuel screen, or did you get a blank frame?</li>
<li>Did a chapter drip show up in your balance after your first clear? If it said the pool was empty, say so, that is expected until refuels have happened.</li>
<li>Anything on your phone that looked wrong: text cut off, buttons you could not reach, a run that ended for no reason.</li>
<li>Honest one: would you refuel again just to keep a run alive?</li>
</ul>
<p class="muted">Amounts are trial placeholders and can change during the test. Nothing here is a promise of income.</p>
</div>
</body>
</html>
+19 -1
View File
@@ -210,13 +210,31 @@ const server = http.createServer(async (req, res) => {
// ---- static + pages ----
if (p === '/' || p === '/index.html') { if (curtained(req, res, u)) return; return sendFile(res, path.join(PUBLIC_DIR, 'index.html')); }
if (p === '/testers') { if (curtained(req, res, u)) return; return sendFile(res, path.join(PUBLIC_DIR, 'testers.html')); } // the pre-launch briefing
if (p === '/play') return sendFile(res, path.join(PUBLIC_DIR, 'play.html'));
if (p === '/admin') return sendFile(res, path.join(PUBLIC_DIR, 'admin.html')); // the page asks for the key; every /api/admin call checks it
if (p === '/spawn.js') return sendFile(res, path.join(__dirname, 'lib', 'spawn.js'));
if (/^\/[a-z0-9._-]+\.(css|js|png|jpg|svg|ico|webp|mp4)$/i.test(p) && !p.includes('..')) return sendFile(res, path.join(PUBLIC_DIR, p.slice(1)));
if (/^\/(badges\/)?[a-z0-9._-]+\.(css|js|png|jpg|svg|ico|webp|mp4)$/i.test(p) && !p.includes('..')) return sendFile(res, path.join(PUBLIC_DIR, p.slice(1)), p.startsWith('/badges/') ? { 'Cache-Control': 'public, max-age=86400', 'Access-Control-Allow-Origin': '*' } : undefined); // badge art is also shown on InstantAdPay and in link previews
// ---- member API ----
if (p.startsWith('/api/')) {
// the landing page's live numbers (public, no personal data)
if (p === '/api/public/stats' && req.method === 'GET') {
const players = Object.values(store.read('players', {})).filter(x => x.memberId > 0).length;
const paid = store.read('payouts', []).filter(x => x.status === 'paid');
return json(res, 200, { players, refuels: store.read('refuels', []).length, chapterDrips: store.read('drips', []).length,
polPaid: Math.round(paid.reduce((n, x) => n + x.pol, 0) * 10000) / 10000, payouts: paid.length, dripPol: Number(ledger.settings().dripPol), thresholdPol: Number(ledger.settings().thresholdPol), refSharePct: Number(ledger.settings().refSharePct) || 0 });
}
// IAP's Games page asks for a player's line on the card: signed with the shared secret, read only (2026-10-01)
if (p === '/api/partner/player' && req.method === 'GET') {
const m = Number(u.searchParams.get('m')), ts = String(u.searchParams.get('ts') || ''), sig = String(u.searchParams.get('sig') || '');
if (!SECRET || !m || !ts || Math.abs(Date.now() - Number(ts)) > 5 * 60000) return json(res, 401, { error: 'bad request' });
const want = crypto.createHmac('sha256', SECRET).update('player:' + m + ':' + ts).digest('hex');
if (want.length !== sig.length || !crypto.timingSafeEqual(Buffer.from(want), Buffer.from(sig))) return json(res, 401, { error: 'bad signature' });
const pl = game.player(m); if (!pl) return json(res, 200, { played: false });
const b = ledger.balance(m);
return json(res, 200, { played: true, chapter: pl.chapter, best: pl.best, unpaid: b.unpaid, paidTotal: b.paidTotal, earnedTotal: b.earnedTotal });
}
const me = sso.fromRequest(req);
if (p.startsWith('/api/admin/')) {
if (!admin(req, u)) return json(res, 403, { error: 'admin key' });