Free check partly gated behind joining the network (Marty 2026-11-16)

Not signed in: grade, verdict, first finding and the opinion line; the rest (scores, findings,
chain facts, screenshot, evidence) stays on the server. Join or sign in by one-time email link
(hub /v1/join with the wwi.ref sponsor when HUB_JOIN=1; staging reads only). 1 free check a day
without an account, 3 for members. Red flags deduped (deterministic VERIFIED one kept), grade
recomputed on read. Privacy: joining and emails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-16 11:36:29 -06:00
parent 5f1a8239f5
commit 47de249a8b
20 changed files with 317 additions and 56 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ const CANNED = [
a: 'The findings are public facts, each tagged VERIFIED, INFERRED or UNKNOWN and linked to its source. The scores, grade and verdict are our opinion, formed by applying our published rubric to those facts. A report is information about code and on-chain records, not financial advice and not a judgment of any person.' },
{ id: 'free', title: 'How many free checks do I get?', q: ['How many free checks?', 'Is it free?', 'Why can I not run another check?'], tags: ['free', 'limit'],
re: /(how many (free )?checks|is (it|this) free|free check limit|no more (free )?checks)/i,
a: 'Every visitor gets 3 free checks a day. A free check is a short scorecard: a verdict, six category scores and the top findings, each tagged. The deep report is the full write-up.' },
a: 'Without an account you get 1 free check a day and see its grade, verdict and first finding. Join free (one account across the network, no wallet needed) to get 3 free checks a day and the full free scorecard: six category scores, every top finding, the chain facts and the website screenshot. The deep report is the full write-up.' },
{ id: 'price', title: 'What does a deep report cost?', q: ['How much is a deep report?', 'Prices', 'What is the 10 pack?'], tags: ['price', 'deep report', 'pack', 'watch'],
re: /(how much|price|cost).*(report|pack|watch)|(deep report|10 ?pack|watch alerts?).*(cost|price|how much)/i,
a: 'One deep report is $10. Ten deep reports are $79 ($7.90 a report). Watch alerts are $9 for 3 months on one contract, one payment that stops by itself. All are one-time payments on Polygon with SafePal or any other crypto wallet. No subscriptions.' + (STAGING ? ' On this staging site payments are not live yet: they arrive at launch.' : '') },
@@ -37,7 +37,7 @@ const FACTS = () => [
'- PUBLIC ONLY: every check uses only public information anyone could look up: public blockchain records, verified or decompiled public contract code, the project public website. No private data, no hacking, no signing in to or interacting with the project, no moving funds. Read-only. Never asks anyone to connect a wallet to run a check.',
'- OPINION: findings are public facts tagged VERIFIED (on chain), INFERRED (code, simulation, website text) or UNKNOWN. Scores, grade and verdict are our opinion from the published rubric (six categories: control and upgradeability 25, custody and exit paths 25, economic design 20, insider flows 15, disclosure vs code 10, trajectory 5; a critical red flag forces High risk). Not financial advice, not a judgment of any person. Projects can reply in their public thread.',
'- FACT GATE: every address, transaction and number in a written report must match the evidence, or the report is not shown and only the facts read straight from the chain are shown.',
'- LIMITS AND PRICES: 3 free checks a day per visitor. Deep report $10, 10 reports $79, watch alerts $9 for 3 months. One-time payments on Polygon, SafePal or any other crypto wallet.' + (STAGING ? ' Staging: payments arrive at launch.' : ''),
'- LIMITS AND PRICES: 1 free check a day without an account (grade, verdict and first finding shown; the rest after joining free), 3 a day for signed-in members. Deep report $10, 10 reports $79, watch alerts $9 for 3 months. One-time payments on Polygon, SafePal or any other crypto wallet.' + (STAGING ? ' Staging: payments arrive at launch.' : ''),
'- SPONSORS: 20% to the direct sponsor, 5% on levels 2 to 5, company 60%; pass-up over people who never bought here; voucher redemptions pay nothing.',
'- PAGES: Terms ' + URL_ + '/terms, Disclaimer ' + URL_ + '/disclaimer, Privacy ' + URL_ + '/privacy. Run by TrustClickz. SUPPORT: ' + SUPPORT
].join('\n');
+6
View File
@@ -26,6 +26,9 @@ const SCHEMA = [
line_json TEXT, split_json TEXT, note VARCHAR(300), real_money TINYINT NOT NULL DEFAULT 0, INDEX (at), INDEX (buyer), INDEX (buyer_username), INDEX (buyer_wallet)) ENGINE=InnoDB`,
`CREATE TABLE IF NOT EXISTS members (email VARCHAR(190) PRIMARY KEY, hub_id VARCHAR(40), username VARCHAR(60), wallet CHAR(42), sponsor VARCHAR(60), created BIGINT, last_seen BIGINT,
INDEX (username), INDEX (wallet)) ENGINE=InnoDB`,
`CREATE TABLE IF NOT EXISTS joins (token_hash CHAR(64) PRIMARY KEY, email VARCHAR(190) NOT NULL, username VARCHAR(40), ref VARCHAR(60), optin TINYINT NOT NULL DEFAULT 0,
to_path VARCHAR(200), created BIGINT NOT NULL, expires BIGINT NOT NULL, confirmed_at BIGINT, ip_hash CHAR(24), status VARCHAR(16) NOT NULL DEFAULT 'pending',
mailed TINYINT NOT NULL DEFAULT 0, hub_result VARCHAR(300), INDEX (email), INDEX (created)) ENGINE=InnoDB`,
`CREATE TABLE IF NOT EXISTS sessions (id CHAR(48) PRIMARY KEY, email VARCHAR(190) NOT NULL, created BIGINT NOT NULL, expires BIGINT NOT NULL, INDEX (email)) ENGINE=InnoDB`
];
@@ -36,6 +39,9 @@ async function init(url) {
try { await pool.query('SELECT 1'); break; } catch (e) { if (i === 29) throw e; await new Promise(r => setTimeout(r, 2000)); }
}
for (const s of SCHEMA) await pool.query(s);
for (const a of ['ALTER TABLE members ADD COLUMN optin TINYINT NOT NULL DEFAULT 0', "ALTER TABLE members ADD COLUMN via VARCHAR(20)"]) {
try { await pool.query(a); } catch (e) { if (!/Duplicate column/i.test(e.message)) throw e; }
}
}
const q = (sql, args) => pool.query(sql, args).then(r => r[0]);
const one = async (sql, args) => (await q(sql, args))[0] || null;
+94
View File
@@ -0,0 +1,94 @@
// Join free / sign in by email (Marty 2026-11-16: the free check is partly gated behind joining the network).
// One form for both: a visitor enters their email and we send a one-time link (30 minutes). Opening it:
// - an existing network member (the hub knows the email): signs in here as that member
// - a new person: joins the network through the hub (POST /v1/join {email, ref, username}, sponsor = the wwi.ref referral cookie,
// so the member who shared the link gets the new member), then signs in. HUB_JOIN=1 writes the join; without it (staging) the
// hub is only read and nobody is created there: the session is local to this site.
// - a member the hub blocked: refused
// Then the browser lands back on the page they came from (to = a relative path only), so a report opens unlocked.
// Mail: MAIL_URL (a relay taking JSON {from, to, subject, text}, MAIL_KEY as bearer). Unset = no mail is sent (staging): the admin
// page lists pending links, and on staging only, addresses at the reserved test domains example.com/.org/.net get the link back in
// the answer (those domains cannot receive mail, so nobody real is involved).
// Emails: the sign-in link only, plus network news if the person ticked the opt-in box; every news email carries an unsubscribe link.
'use strict';
const crypto = require('crypto');
const EMAIL_RE = /^[a-z0-9._%+-]{1,64}@[a-z0-9.-]{1,190}\.[a-z]{2,24}$/;
const NAME_RE = /^[A-Za-z0-9_.-]{3,30}$/;
const TEST_RE = /@example\.(com|org|net)$/;
const TTL = 30 * 60000;
let D = null;
const sha = s => crypto.createHash('sha256').update(String(s)).digest('hex');
const safeTo = t => { t = String(t || '/my'); return /^\/(?!\/)[A-Za-z0-9/_.?=&%-]{0,190}$/.test(t) ? t : '/my'; };
async function mail(to, subject, text) {
const url = String(process.env.MAIL_URL || '').trim(); if (!url) return false;
const r = await fetch(url, { method: 'POST', signal: AbortSignal.timeout(10000), headers: { 'Content-Type': 'application/json', Authorization: 'Bearer ' + String(process.env.MAIL_KEY || '') },
body: JSON.stringify({ from: process.env.MAIL_FROM || 'WebWorthIt <no-reply@webworthit.com>', to, subject, text }) });
return r.ok;
}
async function hubJoin(email, ref, username) {
const raw = JSON.stringify({ email, ref: ref || undefined, username: username || undefined }); const ts = String(Date.now());
const sig = crypto.createHmac('sha256', String(process.env.HUB_SECRET).trim()).update(ts + '\n' + raw).digest('hex');
const r = await fetch(String(process.env.HUB_URL).trim().replace(/\/+$/, '') + '/v1/join', { method: 'POST', body: raw, signal: AbortSignal.timeout(8000),
headers: { 'Content-Type': 'application/json', 'X-Hub-Site': String(process.env.HUB_SITE || 'webworthit').trim(), 'X-Hub-Ts': ts, 'X-Hub-Sig': sig } });
const j = await r.json().catch(() => ({}));
if (r.status !== 200) return { ok: false, status: r.status, error: j && j.error };
return { ok: true, created: !!j.created, person: j.person || null };
}
async function start(req, res) {
const { db, json, readBody, cookies, unsign, ipHash, limited } = D;
if (limited(req, 'join', 5, 15 * 60000)) return json(res, 429, { error: 'Too many tries from this connection. Wait 15 minutes.' });
const b = await readBody(req);
const email = String(b.email || '').trim().toLowerCase();
if (!EMAIL_RE.test(email)) return json(res, 400, { error: 'That email address does not look right.' });
const username = b.username && NAME_RE.test(String(b.username)) ? String(b.username) : null;
const recent = await db.one('SELECT COUNT(*) n FROM joins WHERE email = ? AND created > ?', [email, Date.now() - 3600000]);
if (Number(recent.n) >= 3) return json(res, 429, { error: 'We already sent links to that address in the last hour. Check your inbox and spam folder.' });
const token = crypto.randomBytes(24).toString('base64url');
const ref = unsign(cookies(req)['wwi.ref']);
const to = safeTo(b.to);
await db.q('INSERT INTO joins (token_hash, email, username, ref, optin, to_path, created, expires, ip_hash) VALUES (?,?,?,?,?,?,?,?,?)',
[sha(token), email, username, ref || null, b.optin ? 1 : 0, to, Date.now(), Date.now() + TTL, ipHash(req)]);
const link = 'https://' + D.SITE_HOST + '/join/confirm?t=' + token;
let mailed = false;
try { mailed = await mail(email, 'Your WebWorthIt sign-in link', 'Open this link within 30 minutes to sign in to WebWorthIt (one account across the network). New here? The same link creates your free account.\n\n' + link + '\n\nIf you did not ask for this, ignore this email: nothing happens without the link.'); } catch (e) { mailed = false; }
if (mailed) await db.q('UPDATE joins SET mailed = 1 WHERE token_hash = ?', [sha(token)]);
const out = { ok: true, mailed };
if (!mailed && D.STAGING && TEST_RE.test(email)) out.testLink = link; // staging, reserved test domain only
if (!mailed && !out.testLink) out.note = D.STAGING ? 'Staging: email is not switched on yet, so no link was sent.' : 'We could not send the email. Try again in a few minutes.';
return json(res, 200, out);
}
async function confirm(req, res, u) {
const { db, hubpeople } = D;
const t = String(u.searchParams.get('t') || '');
const bad = msg => { res.writeHead(302, { Location: '/join?err=' + encodeURIComponent(msg), 'Cache-Control': 'no-store' }); res.end(); };
if (!/^[A-Za-z0-9_-]{20,60}$/.test(t)) return bad('That link is not valid.');
const row = await db.one('SELECT * FROM joins WHERE token_hash = ?', [sha(t)]);
if (!row || row.status !== 'pending') return bad('That link was already used. Ask for a new one.');
if (row.expires < Date.now()) return bad('That link has expired. Ask for a new one.');
const r0 = await db.q("UPDATE joins SET status = 'used', confirmed_at = ? WHERE token_hash = ? AND status = 'pending'", [Date.now(), sha(t)]);
if (!r0.affectedRows) return bad('That link was already used. Ask for a new one.');
const email = row.email;
let person = null, result = '';
const look = await hubpeople.resolve({ email }).catch(() => ({ ok: false }));
if (look.ok && look.person && look.person.blocked) { await db.q('UPDATE joins SET hub_result = ? WHERE token_hash = ?', ['blocked on the hub', sha(t)]); return bad('This account cannot sign in. Contact network support.'); }
if (look.ok && look.person) { person = look.person; result = 'existing network member, signed in'; }
else if (String(process.env.HUB_JOIN || '') === '1' && hubpeople.on()) {
const j = await hubJoin(email, row.ref, row.username).catch(e => ({ ok: false, error: e.message }));
if (!j.ok) { await db.q('UPDATE joins SET hub_result = ? WHERE token_hash = ?', [('hub join failed ' + (j.status || '') + ' ' + (j.error || '')).slice(0, 300), sha(t)]); return bad('Joining the network did not work just now. Try again in a few minutes.'); }
person = j.person; result = (j.created ? 'joined the network' : 'already on the network') + (row.ref ? ', sponsor ref ' + row.ref : '');
} else {
result = look.ok ? 'staging: HUB_JOIN is off, nobody was created on the hub; local session only' + (row.ref ? ' (ref ' + row.ref + ' would be the sponsor)' : '') : 'hub unreachable; local session only';
}
await db.q('UPDATE joins SET hub_result = ? WHERE token_hash = ?', [result.slice(0, 300), sha(t)]);
const ck = await D.makeSession(email, { hubId: person && person.id, username: person && person.username, wallet: person && hubpeople.wallet(person), sponsor: person && person.sponsor ? person.sponsor.username : null,
optin: !!row.optin, via: person ? 'email-hub' : 'email-local' });
res.writeHead(302, { Location: safeTo(row.to_path), 'Set-Cookie': ck, 'Cache-Control': 'no-store', 'Referrer-Policy': 'no-referrer' }); res.end();
}
function init(deps) { D = deps; return { start, confirm }; }
module.exports = { init, safeTo, TEST_RE };
+2 -2
View File
@@ -8,10 +8,10 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=1">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
<main class="wrap" style="padding-top:64px;padding-bottom:64px"><h1 style="font-size:40px">Page not found</h1><p><a href="/">Back to WebWorthIt</a></p></main>
<script src="/assets/common.js?v=1"></script>
<script src="/assets/common.js?v=2"></script>
</body>
</html>
+3 -3
View File
@@ -8,7 +8,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=1">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
<main class="wrap" style="padding-top:32px;padding-bottom:40px;display:flex;flex-direction:column;gap:20px">
@@ -16,7 +16,7 @@
<div id="tok" class="card"><span>Admin token</span><div style="display:flex;gap:10px;flex-wrap:wrap"><input id="token" class="code" type="password" style="flex:1 1 300px"><button id="save" class="btn dark" type="button">Open</button></div></div>
<div id="out"></div>
</main>
<script src="/assets/common.js?v=1"></script>
<script src="/assets/admin.js?v=1"></script>
<script src="/assets/common.js?v=2"></script>
<script src="/assets/admin.js?v=2"></script>
</body>
</html>
+3
View File
@@ -19,6 +19,9 @@
return '<tr><td>' + ct(c.created) + '</td><td>' + esc(c.kind) + '</td><td><a href="/c/' + esc(c.id) + '" target="_blank">' + esc(c.website || '') + ' ' + esc(WWI.short(c.address) || '') + ' ' + esc(c.chain || '') + '</a>' + (c.error ? '<br><span style="color:var(--acc2)">' + esc(c.error.slice(0, 160)) + '</span>' : '') + '</td><td>' + esc(c.status) + (c.status !== 'done' ? ' (' + esc(c.step || '') + ')' : '') + '</td><td>' + esc(c.model || '') + '</td><td>$' + Number(c.cost_usd || 0).toFixed(4) + '</td><td>' + (tm ? Math.round(tm.total_s) + ' s' : '') + '</td>'
+ '<td><label><input type="checkbox" data-pub="' + esc(c.id) + '"' + (c.is_public ? ' checked' : '') + '> ' + esc(c.public_label || '') + '</label></td></tr>';
}).join('') + '</tbody></table></div></div>';
h += '<div class="card"><span class="t">Join and sign-in links (no email is sent while MAIL_URL is unset)</span><div class="tblwrap"><table class="t"><thead><tr><th>When</th><th>Email</th><th>Ref</th><th>Opt-in</th><th>Back to</th><th>Status</th><th>Hub</th></tr></thead><tbody>' + (j.joins || []).map(function (x) {
return '<tr><td>' + ct(x.created) + '</td><td>' + esc(x.email) + '</td><td>' + esc(x.ref || '') + '</td><td>' + (x.optin ? 'yes' : 'no') + '</td><td>' + esc(x.to_path || '') + '</td><td>' + esc(x.status) + (x.mailed ? ', mailed' : '') + '</td><td>' + esc(x.hub_result || '') + '</td></tr>';
}).join('') + '</tbody></table></div></div>';
h += '<div class="card"><span class="t">Test purchases and the sponsor line (nothing paid in staging)</span><div class="tblwrap"><table class="t"><thead><tr><th>When</th><th>Buyer</th><th>Item</th><th>Via</th><th>Ref</th><th>Line source</th><th>Would pay</th><th>Company</th></tr></thead><tbody>' + j.purchases.map(function (p) {
var s = p.split || {}; var l = p.line || {};
return '<tr><td>' + ct(p.at) + '</td><td>' + esc(p.buyer_username ? '@' + p.buyer_username : p.buyer || 'visitor') + '</td><td>' + esc(p.item) + ' $' + Number(p.usd).toFixed(2) + '</td><td>' + esc(p.via) + '</td><td>' + esc(p.ref || '') + '</td><td>' + esc(l.source || '') + (l.ok === false ? ' (hub partial)' : '') + '<br><span style="font-size:12px">' + (l.line || []).map(function (x) { return (x.username ? '@' + esc(x.username) : esc(WWI.short(x.wallet) || '?')) + (x.qualified ? ' (bought)' : ' (passed over)'); }).join(' &gt; ') + '</span></td><td>'
+19
View File
@@ -0,0 +1,19 @@
// /join: one email form for joining free and for signing in (a one-time link). Lands back on ?to= (the report that was locked).
(function () {
'use strict';
var $ = WWI.$, q = new URLSearchParams(location.search);
var to = q.get('to') || '/my'; if (!/^\/(?!\/)/.test(to)) to = '/my';
if (q.get('err')) $('msg').textContent = q.get('err');
$('hubBtn').href = '/sso/start?mode=go&to=' + encodeURIComponent(to);
fetch('/api/config').then(function (r) { return r.json(); }).then(function (c) { if (c.member) { $('form').classList.add('hide'); $('msg').innerHTML = 'You are signed in. <a href="' + WWI.esc(to) + '">Continue</a>'; } });
$('form').addEventListener('submit', function (e) {
e.preventDefault(); $('go').disabled = true; $('msg').textContent = '';
WWI.post('/api/join', { email: $('email').value.trim(), optin: $('optin').checked, to: to }).then(function (j) {
$('go').disabled = false;
if (!j.ok) { $('msg').textContent = j.error || 'That did not work. Try again.'; return; }
if (j.mailed) $('msg').textContent = 'Check your inbox: we sent a link that signs you in (or creates your free account). It works for 30 minutes.';
else if (j.testLink) $('msg').innerHTML = 'Staging test address: no email is sent. <a href="' + WWI.esc(j.testLink) + '">Open the sign-in link</a>.';
else $('msg').textContent = j.note || 'No link was sent.';
});
});
})();
+29 -1
View File
@@ -80,6 +80,34 @@ var Render = (function () {
var deep = v.kind === 'deep' && v.report ? '<div style="display:flex;flex-direction:column;gap:16px">' + deepSections(v.report, ex) + '<span class="opinion">' + OPINION + '</span></div>' : '';
return head + '<div class="res-body"><div class="res-main">' + main + '</div><div class="res-side">' + side + '</div></div>' + deep;
}
function draw(el, v) { el.innerHTML = v.status === 'done' ? done(v) : steps(v); }
// not signed in: the server sent only the grade, the verdict, the first finding and counts of what is locked
function gated(v) {
var ex = v.explorer, g = v.grade || {}, L = v.locked || {};
var title = v.address ? WWI.short(v.address) : (v.website || 'Check');
var head = '<div class="res-head"><div style="display:flex;flex-direction:column;gap:6px"><span class="eyebrow">Free check</span>'
+ '<h2 class="sec">' + esc(title) + (v.chainName ? ' <span style="font-weight:500;color:var(--mut)">on ' + esc(v.chainName) + '</span>' : '') + '</h2>'
+ '<span class="mono" style="font-size:14px;color:var(--ink2)">' + (v.address && ex ? '<a class="src" href="' + ex + '/address/' + esc(v.address) + '" target="_blank" rel="noopener nofollow">' + esc(WWI.short(v.address)) + '</a>' : '') + (v.readAt ? ' &middot; read ' + esc(v.readAt.time) + ' &middot; block ' + Number(v.readAt.block).toLocaleString('en-US') : '') + '</span></div>'
+ (g.grade ? '<div class="gradebox ' + gradeCls(g.grade) + '"><div class="g">' + esc(g.grade) + '</div><div class="n">' + (g.forced_by_flag ? 'One critical flag caps the grade at High, whatever the other scores. ' : '') + 'Our opinion, from the published rubric applied to the public facts.</div></div>' : '') + '</div>';
var f = v.report && v.report.top_findings && v.report.top_findings[0];
var first = f ? '<div class="find"><span class="tag ' + esc(f.tag) + '">' + esc(f.tag) + '</span><span>' + link(f.text, ex) + '</span></div>'
: v.firstFact ? '<div class="find"><span class="tag ' + esc(v.firstFact.tag) + '">' + esc(v.firstFact.tag) + '</span><span>' + link(v.firstFact.text, ex) + (v.firstFact.source ? ' <a class="src" style="font-size:13px" href="' + esc(v.firstFact.source) + '" target="_blank" rel="noopener nofollow">source</a>' : '') + '</span></div>' : '';
var items = [];
if (L.scores) items.push(L.scores + ' category scores');
if (L.findings) items.push(L.findings + ' more finding' + (L.findings === 1 ? '' : 's'));
if (L.flags) items.push(L.flags + ' critical flag' + (L.flags === 1 ? '' : 's') + ' explained');
if (L.facts) items.push(L.facts + ' facts read straight from the chain, with sources');
if (L.screenshot) items.push('the website screenshot');
if (L.siteVsCode) items.push('website claims vs code');
var to = '/c/' + v.id;
var main = (v.report && v.report.verdict ? '<div><b>Our verdict (opinion):</b> ' + link(v.report.verdict, ex) + '</div>' : '')
+ (first ? '<div class="finds"><span class="disp" style="font-weight:700;font-size:17px">First finding (public fact)</span>' + first + '</div>' : '')
+ '<span class="opinion">' + OPINION.replace('below', 'in this report') + '</span>';
var lock = '<div class="card dk" style="gap:12px"><span class="disp" style="font-weight:700;font-size:20px">Join free to see the full report: one account across the network</span>'
+ (items.length ? '<span class="b">Still locked: ' + esc(items.join(', ')) + '.</span>' : '')
+ '<span class="b" style="font-size:14px">Joining is free and never asks you to connect a wallet. Members get 3 free checks a day.</span>'
+ '<div style="display:flex;gap:10px;flex-wrap:wrap"><a class="btn org" href="/join?to=' + encodeURIComponent(to) + '">Join free</a><a class="btn line" style="background:transparent;color:var(--on);border-color:var(--on3)" href="/sso/start?mode=go&amp;to=' + encodeURIComponent(to) + '">I am a member: sign in</a></div></div>';
return head + '<div class="res-body"><div class="res-main">' + main + '</div><div class="res-side">' + lock + '</div></div>';
}
function draw(el, v) { el.innerHTML = v.status === 'done' ? (v.gated ? gated(v) : done(v)) : steps(v); }
return { draw: draw, OPINION: OPINION, link: link };
})();
+3 -3
View File
@@ -8,7 +8,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=1">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
<div class="wrap legal-grid" style="padding-top:40px;padding-bottom:56px"><main class="legal"><p class="eyebrow">Updated November 16, 2026</p><h1>Disclaimer</h1>
@@ -17,7 +17,7 @@
<p><b>Not advice.</b> A report is information about code and on-chain records. It is not financial advice and it is not a judgment of any person. Nothing on this site tells you to join, leave, buy, sell or withdraw. Make your own decision, with your own research.</p>
<p><b>Code and records, not people.</b> We describe what a contract can do and what the chain shows. We do not say anything about the intentions or character of anyone behind a project. A project can reply to its check in its public thread.</p>
<p><b>Limits.</b> Our tools read public nodes, which can fail or return less than the full history. Function names for unverified code come from public signature databases and are marked INFERRED. What we cannot see is marked UNKNOWN.</p></main><aside id="sideSlot" aria-label="Advertisement"></aside></div>
<script src="/assets/common.js?v=1"></script>
<script src="/assets/side.js?v=1"></script>
<script src="/assets/common.js?v=2"></script>
<script src="/assets/side.js?v=2"></script>
</body>
</html>
+5 -5
View File
@@ -8,7 +8,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=1">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
<div style="background: #F3F5F1; color: #0E2A22; font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 16px; line-height: 1.55">
@@ -30,7 +30,7 @@
</select>
</div>
<button id="runBtn" type="submit" style="font-family: Archivo, sans-serif; font-weight: 700; font-size: 17px; padding: 14px 24px; border-radius: 6px; border: 0; background: #E2541B; color: #FFFFFF; cursor: pointer">Run free check</button>
<span style="font-size: 13px; color: #A9BEB1">Fill in one or both. With both, we compare what the website promises against what the code does. 3 free checks a day. Read-only: a check never asks you to connect a wallet.</span>
<span style="font-size: 13px; color: #A9BEB1">Fill in one or both. With both, we compare what the website promises against what the code does. 1 free check a day, 3 a day when you join free (one account across the network). Read-only: a check never asks you to connect a wallet.</span>
<span id="formErr" role="alert" style="color: #FFB599; font-size: 14px"></span><span id="freeLeft" style="font-size: 13px; color: #A9BEB1"></span>
</form>
</div>
@@ -261,8 +261,8 @@
</div>
</div>
<script src="/assets/common.js?v=1"></script>
<script src="/assets/render.js?v=1"></script>
<script src="/assets/index.js?v=1"></script>
<script src="/assets/common.js?v=2"></script>
<script src="/assets/render.js?v=2"></script>
<script src="/assets/index.js?v=2"></script>
</body>
</html>
+29
View File
@@ -0,0 +1,29 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Join free or sign in | WebWorthIt</title>
<meta name="description" content="One account across the network. Join WebWorthIt free or sign in with a one-time email link.">
<meta name="theme-color" content="#0E2A22">
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
<main class="wrap" style="padding-top:48px;padding-bottom:56px;max-width:640px;display:flex;flex-direction:column;gap:18px">
<h1 style="font-size:40px">Join free, or sign in</h1>
<p style="margin:0;color:var(--ink2)">One account across the network. Enter your email and we send you a one-time link: it signs you in if you are already a member, or creates your free account if you are new. Joining never asks you to connect a wallet.</p>
<form id="form" class="card" novalidate>
<label for="email" style="font-weight:600">Email</label>
<input id="email" class="code" type="email" autocomplete="email" required placeholder="you@example.com">
<label style="font-size:14px;color:var(--ink2);display:flex;gap:8px;align-items:flex-start"><input id="optin" type="checkbox"> Also send me network news and tips (optional, unsubscribe any time)</label>
<button id="go" class="btn org" type="submit">Send my link</button>
</form>
<p id="msg" role="status" style="margin:0"></p>
<p style="margin:0;font-size:14px;color:var(--ink2)">Signed in on InstantAdPay or LinkSpin already? <a id="hubBtn" href="/sso/start?mode=go">Sign in with the network</a>. See the <a href="/privacy">Privacy Policy</a> for how emails are used.</p>
</main>
<script src="/assets/common.js?v=2"></script>
<script src="/assets/join.js?v=2"></script>
</body>
</html>
+3 -3
View File
@@ -8,14 +8,14 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=1">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
<main class="wrap" style="padding-top:40px;padding-bottom:40px;display:flex;flex-direction:column;gap:20px">
<h1 style="font-size:40px">My checks</h1>
<div id="out"><p>Loading...</p></div>
</main>
<script src="/assets/common.js?v=1"></script>
<script src="/assets/my.js?v=1"></script>
<script src="/assets/common.js?v=2"></script>
<script src="/assets/my.js?v=2"></script>
</body>
</html>
+10 -4
View File
@@ -8,7 +8,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=1">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
<div class="wrap legal-grid" style="padding-top:40px;padding-bottom:56px"><main class="legal"><p class="eyebrow">Updated November 16, 2026</p><h1>Privacy Policy</h1>
@@ -16,12 +16,18 @@
<h2>What we store</h2>
<ul>
<li><b>The checks you run.</b> The website and the contract address you entered, the chain, the time, and the result we produced.</li>
<li><b>A hashed version of your IP address.</b> We use it only to count the 3 free checks a day. We store a one-way hash, never the raw address.</li>
<li><b>A hashed version of your IP address.</b> We use it only to count free checks (1 a day without an account, 3 a day for members). We store a one-way hash, never the raw address.</li>
<li><b>Screenshots of public pages.</b> When you enter a website, our own browser opens that public page and saves a screenshot, so the report shows what the page said at that time.</li>
<li><b>If you sign in with the network:</b> your network email, username and the wallet address on your network account, so your checks, vouchers and referral link follow you. When you buy, the sponsor line that would be paid is recorded with the sale.</li>
<li><b>Vouchers and test codes</b> you redeem, with the time, so a code is used only as often as it allows.</li>
<li><b>A browser cookie</b> that keeps your vouchers and settings on this browser, and a cookie that remembers who referred you (30 days).</li>
</ul>
<h2>Joining and emails</h2>
<ul>
<li>Joining WebWorthIt is free and gives you one account across the network: the same account signs you in on the other network sites. Your network sponsor is the member whose link brought you here.</li>
<li>To join or sign in you give your email address. We send you a one-time sign-in link. That email is sent because you asked for it.</li>
<li>Network news and tips are sent only if you tick the box to receive them. Every one of those emails has an unsubscribe link, and you can unsubscribe at any time.</li>
</ul>
<h2>What we never do</h2>
<ul>
<li>We never ask anyone to connect a wallet to run a check. A check is read-only.</li>
@@ -33,7 +39,7 @@
<h2>Your choices</h2>
<p>Ask network support to delete your data. The network hub removes it from every network site, except what the blockchain or the law keeps.</p>
<p>Questions: <a href="https://instantadpay.com/support?from=webworthit">network support</a>. WebWorthIt is run by TrustClickz.</p></main><aside id="sideSlot" aria-label="Advertisement"></aside></div>
<script src="/assets/common.js?v=1"></script>
<script src="/assets/side.js?v=1"></script>
<script src="/assets/common.js?v=2"></script>
<script src="/assets/side.js?v=2"></script>
</body>
</html>
+4 -4
View File
@@ -8,15 +8,15 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=1">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
<main class="wrap" style="padding-top:40px;padding-bottom:40px;display:flex;flex-direction:column;gap:24px">
<div id="live" style="display:flex;flex-direction:column;gap:24px"><div class="steps">Loading the check...</div></div>
<p style="margin:0"><a href="/#check">Run another check</a></p>
</main>
<script src="/assets/common.js?v=1"></script>
<script src="/assets/render.js?v=1"></script>
<script src="/assets/report.js?v=1"></script>
<script src="/assets/common.js?v=2"></script>
<script src="/assets/render.js?v=2"></script>
<script src="/assets/report.js?v=2"></script>
</body>
</html>
+3 -3
View File
@@ -8,7 +8,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=1">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
<div class="wrap legal-grid" style="padding-top:40px;padding-bottom:56px"><main class="legal"><p class="eyebrow">The published rubric</p><h1>How a check is scored</h1><p>Our findings are public facts, each one tagged and linked to its on-chain or website source. The scores, the grade (for example &quot;High risk&quot;) and the verdict are our opinion, formed by applying our published rubric to those public facts.</p><p>Score each category 0 to 10 (10 = worst), then weight. A single &quot;critical&quot; red flag caps the overall</p>
@@ -87,7 +87,7 @@
</ul>
<h2>Grade bands</h2>
<p>0 to 25 Low, 26 to 50 Moderate, 51 to 75 Elevated, 76 to 100 High (or forced High by a red flag).</p></main><aside id="sideSlot" aria-label="Advertisement"></aside></div>
<script src="/assets/common.js?v=1"></script>
<script src="/assets/side.js?v=1"></script>
<script src="/assets/common.js?v=2"></script>
<script src="/assets/side.js?v=2"></script>
</body>
</html>
+4 -4
View File
@@ -8,7 +8,7 @@
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=1">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
<div class="wrap legal-grid" style="padding-top:40px;padding-bottom:56px"><main class="legal"><p class="eyebrow">Updated November 16, 2026</p><h1>Terms and Conditions</h1>
@@ -20,14 +20,14 @@
<h2>Accuracy</h2>
<p>We check every address, transaction and number in a written report against the evidence our tools read. A report that does not pass that check is not shown; only the facts read straight from the chain are shown. Public nodes can fail or limit what they return, so every report says which block range was read and what could not be read. Blockchain records change all the time: a report describes the state at the block it names.</p>
<h2>Free checks, deep reports and vouchers</h2>
<ul><li>Every visitor gets 3 free checks a day.</li><li>Deep reports, report packs and watch alerts are one-time payments. No subscriptions.</li><li>Vouchers add reports or free checks as stated on the voucher, may expire, and have no cash value.</li><li>Sponsor rewards: when someone a member referred buys, the sponsor line is paid as published on the site (20% to the direct sponsor, 5% on levels 2 to 5). You are paid only when people choose to buy. Voucher redemptions pay nothing.</li></ul>
<ul><li>Every visitor gets 1 free check a day; members (free to join) get 3 a day. Without an account a free check shows the grade, the verdict and the first finding; members see the full free report.</li><li>Deep reports, report packs and watch alerts are one-time payments. No subscriptions.</li><li>Vouchers add reports or free checks as stated on the voucher, may expire, and have no cash value.</li><li>Sponsor rewards: when someone a member referred buys, the sponsor line is paid as published on the site (20% to the direct sponsor, 5% on levels 2 to 5). You are paid only when people choose to buy. Voucher redemptions pay nothing.</li></ul>
<h2>Fair use</h2>
<p>Do not use the site to attack, overload or scrape other services, and do not enter sites or addresses you have no reason to check. We may limit or refuse checks to keep the service working for everyone.</p>
<h2>No warranty</h2>
<p>WebWorthIt is provided as it is. To the extent the law allows, TrustClickz is not liable for decisions you make with or without a report. See the <a href="/disclaimer">Disclaimer</a>.</p>
<h2>Contact</h2>
<p><a href="https://instantadpay.com/support?from=webworthit">Network support</a>.</p></main><aside id="sideSlot" aria-label="Advertisement"></aside></div>
<script src="/assets/common.js?v=1"></script>
<script src="/assets/side.js?v=1"></script>
<script src="/assets/common.js?v=2"></script>
<script src="/assets/side.js?v=2"></script>
</body>
</html>
+12 -1
View File
@@ -157,7 +157,18 @@ function grade(report, E) {
if (eoaUp.length) flags.push({ text: 'One personal wallet can replace the code in a single transaction (' + eoaUp.join(', ') + ').', tag: 'VERIFIED', source: 'rubric red flag 1' });
const v = (E && E.verification) || {};
if (E && E.proxy && E.proxy.upgradeable && !(v.implementation && v.implementation.match)) flags.push({ text: 'The implementation behind the upgradeable proxy has no verified source on Sourcify.', tag: 'VERIFIED', source: 'rubric red flag 2' });
for (const f of report.critical_flags || []) if (typeof f === 'string' && f.trim()) flags.push({ text: f.trim(), tag: 'INFERRED', source: 'model, from the rubric list' });
// the model often restates the deterministic red flags: keep one per issue, the deterministic VERIFIED one
const has1 = flags.some(f => f.source === 'rubric red flag 1'), has2 = flags.some(f => f.source === 'rubric red flag 2');
const words = t => new Set(String(t).toLowerCase().match(/[a-z]{4,}/g) || []);
const similar = (a, b) => { const A = words(a), B = words(b); let n = 0; for (const w of A) if (B.has(w)) n++; return n / Math.max(1, Math.min(A.size, B.size)) >= 0.5; };
for (const f of report.critical_flags || []) {
if (typeof f !== 'string' || !f.trim()) continue;
const t = f.trim();
if (has1 && /(upgrad|replace (the )?code|single[- ](eoa|wallet|key)|one (personal )?wallet|\beoa\b|owner key)/i.test(t)) continue;
if (has2 && /(unverified|not verified|no verified|source)/i.test(t)) continue;
if (flags.some(x => similar(x.text, t))) continue;
flags.push({ text: t, tag: 'INFERRED', source: 'model, from the rubric list' });
}
let band = overall == null ? null : overall <= 25 ? 'Low risk' : overall <= 50 ? 'Moderate risk' : overall <= 75 ? 'Elevated risk' : 'High risk';
const forced = flags.length > 0 && band !== 'High risk';
if (flags.length) band = 'High risk';
+56 -11
View File
@@ -22,13 +22,16 @@ const hubpeople = require('./hubpeople');
const hubevents = require('./hubevents');
const netsites = require('./netsites');
const chatbot = require('./chatbot');
const joinMod = require('./join');
const reportMod = require('./report');
const PORT = Number(process.env.PORT || 3000);
const STAGING = process.env.STAGING === '1';
const SITE_HOST = process.env.SITE_HOST || 'webworthit.com';
const IS_PROD = process.env.NODE_ENV === 'production';
const PUB = path.join(__dirname, 'public');
const FREE_PER_DAY = 3;
const FREE_PER_DAY = 3; // a signed-in network member
const FREE_PER_DAY_GUEST = 1; // not signed in (Marty 2026-11-16: the free check is partly gated behind joining the network)
const SECRET = (() => {
if (process.env.SESSION_SECRET) return process.env.SESSION_SECRET;
const f = path.join(DATA_DIR, '.secret'); try { return fs.readFileSync(f, 'utf8').trim(); } catch (e) {}
@@ -80,7 +83,10 @@ async function member(req) {
}
function holderOf(req, m) { if (m) return 'm:' + m.email; const t = unsign(cookies(req)['wwi.t']); return t ? 't:' + t : null; }
const unlocked = req => unsign(cookies(req)['wwi.unlock']) === 'test';
async function freeLeft(req) { const r = await db.one('SELECT n FROM daily_free WHERE day = ? AND ip_hash = ?', [today(), ipHash(req)]); return Math.max(0, FREE_PER_DAY - (r ? r.n : 0)); }
// the daily free counter: per member when signed in (3 a day), per hashed IP when not (1 a day)
const freeKey = (req, m) => m ? hmac('m|' + m.email).slice(0, 24) : ipHash(req);
const freeCap = m => (m ? FREE_PER_DAY : FREE_PER_DAY_GUEST);
async function freeLeft(req, m) { const r = await db.one('SELECT n FROM daily_free WHERE day = ? AND ip_hash = ?', [today(), freeKey(req, m)]); return Math.max(0, freeCap(m) - (r ? r.n : 0)); }
async function creditsOf(holder) { if (!holder) return { deep: 0, free_extra: 0 }; return (await db.one('SELECT deep, free_extra FROM credits WHERE holder = ?', [holder])) || { deep: 0, free_extra: 0 }; }
// ---- network sign-in (hub provider; pairwise fallback is off unless NETWORK_SSO_SECRET is set AND the peer lists this site) ----
@@ -101,7 +107,7 @@ networksso.init({ self: 'webworthit', hubSite: 'webworthit', peer: 'iap', peerBa
await db.q('INSERT INTO sessions (id, email, created, expires) VALUES (?,?,?,?)', [sid, email, Date.now(), Date.now() + 30 * 86400000]);
return cookie('wwi.sid', sid, 30 * 86400, true);
},
landing: to => to, signinPath: to => '/my?signin=1&to=' + encodeURIComponent(to || '/my') });
landing: to => to, signinPath: to => '/join?to=' + encodeURIComponent(to || '/my') });
hubevents.init({ dataDir: DATA_DIR, site: 'webworthit', end: async who => {
const rows = await db.q('SELECT s.id, s.email, s.created, m.hub_id, m.wallet FROM sessions s LEFT JOIN members m ON m.email = s.email');
const ids = rows.filter(s => s.created < who.before && who.match({ email: s.email, hubId: s.hub_id, wallet: s.wallet, address: s.wallet })).map(s => s.id);
@@ -109,17 +115,32 @@ hubevents.init({ dataDir: DATA_DIR, site: 'webworthit', end: async who => {
return ids.length;
} });
const join = joinMod.init({ db, json, readBody, cookie, cookies, unsign, ipHash, limited, hubpeople, STAGING, SITE_HOST,
makeSession: async (email, extra) => {
await db.q('INSERT INTO members (email, hub_id, username, wallet, sponsor, created, last_seen, optin, via) VALUES (?,?,?,?,?,?,?,?,?) ON DUPLICATE KEY UPDATE hub_id = COALESCE(VALUES(hub_id), hub_id), username = COALESCE(VALUES(username), username), wallet = COALESCE(VALUES(wallet), wallet), sponsor = COALESCE(VALUES(sponsor), sponsor), last_seen = VALUES(last_seen), optin = GREATEST(optin, VALUES(optin))',
[email, extra.hubId || null, extra.username || null, extra.wallet || null, extra.sponsor || null, Date.now(), Date.now(), extra.optin ? 1 : 0, extra.via || 'email']);
const sid = crypto.randomBytes(24).toString('hex');
await db.q('INSERT INTO sessions (id, email, created, expires) VALUES (?,?,?,?)', [sid, email, Date.now(), Date.now() + 30 * 86400000]);
return cookie('wwi.sid', sid, 30 * 86400, true);
} });
// ---- views ----
const SHORT = a => a ? a.slice(0, 6) + '...' + a.slice(-4) : '';
// The free check is partly gated (Marty 2026-11-16): a visitor who is not signed in sees the grade, the verdict, the FIRST finding
// and the opinion line; everything else stays on the server until they join the network or sign in. Never gated: deep reports
// (paid), public checks ("Network, checked", shared public links), admin-run checks, and the staging test code.
const isGated = (c, viewer) => c.kind === 'free' && !c.is_public && c.holder !== 'admin' && !viewer.member && !viewer.unlocked;
function publicView(c, opts) {
const steps = c.steps_json ? JSON.parse(c.steps_json) : {};
const rep = c.report_json ? JSON.parse(c.report_json) : null;
const E = c.evidence_json ? JSON.parse(c.evidence_json) : null;
const site = c.site_json ? JSON.parse(c.site_json) : null;
if (rep && rep.report && E) rep.grade = reportMod.grade(rep.report, E); // recomputed on read: rubric weights + deduped red flags
const v = { id: c.id, kind: c.kind, status: c.status, created: c.created, website: c.website, chain: c.chain, chainName: (jobs.CHAINS[c.chain] || {}).name, address: c.address,
pickedNote: c.picked_note, steps: jobs.STEPS.map(k => Object.assign({ key: k, name: jobs.STEP_NAMES[k] }, steps[k] || { state: 'waiting' })), queuePos: jobs.qpos(c.id),
error: c.status === 'failed' ? c.error : null, label: c.public_label, isPublic: !!c.is_public };
if (c.status !== 'done') return v;
if (opts.gated) return gatedView(c, v, rep, E, site);
v.timings = c.timings_json ? JSON.parse(c.timings_json) : null;
v.cost = Number(c.cost_usd) || 0; v.model = c.model;
v.facts = c.facts_json ? JSON.parse(c.facts_json) : [];
@@ -135,6 +156,22 @@ function publicView(c, opts) {
return v;
}
function gatedView(c, v, rep, E, site) {
const facts = c.facts_json ? JSON.parse(c.facts_json) : [];
const r = rep && rep.report;
const finds = r && Array.isArray(r.top_findings) ? r.top_findings : [];
v.gated = true;
v.explorer = E ? E.explorer : null;
if (E && E.read_at) v.readAt = { block: E.read_at.block, time: E.read_at.time_ct };
if (rep) v.grade = { grade: rep.grade.grade, overall: rep.grade.overall, forced_by_flag: rep.grade.forced_by_flag };
v.report = r ? { verdict: r.verdict, top_findings: finds.slice(0, 1) } : null;
if (!r && facts.length) v.firstFact = facts[0];
v.factcheck = c.factcheck_json ? { passed: !!JSON.parse(c.factcheck_json).passed } : null;
v.locked = { findings: Math.max(0, finds.length - 1), scores: r && r.scores ? Object.keys(r.scores).length : 0, flags: rep && rep.grade && rep.grade.flags ? rep.grade.flags.length : 0,
facts: facts.length, screenshot: !!(site && site.ok), siteVsCode: !!(r && r.site_vs_code) };
return v;
}
async function startCheck(req, res, b, m) {
const kind = b.kind === 'deep' ? 'deep' : 'free';
let site = b.website ? website.normalizeUrl(b.website) : null;
@@ -149,13 +186,14 @@ async function startCheck(req, res, b, m) {
let via = null;
if (kind === 'free') {
if (!unlocked(req)) {
const left = await freeLeft(req);
const left = await freeLeft(req, m);
if (left <= 0) {
const cr = await creditsOf(holder);
if (!(cr.free_extra > 0)) return json(res, 429, { error: 'You have used your 3 free checks for today. They come back tomorrow (Central time).', freeLeft: 0 });
if (!(cr.free_extra > 0)) return json(res, 429, m ? { error: 'You have used your 3 free checks for today. They come back tomorrow (Central time).', freeLeft: 0 }
: { error: 'You have used your free check for today. Join free (one account across the network) for 3 checks a day.', freeLeft: 0, join: true });
await db.q('UPDATE credits SET free_extra = free_extra - 1, updated = ? WHERE holder = ? AND free_extra > 0', [Date.now(), holder]); via = 'voucher credit';
} else {
await db.q('INSERT INTO daily_free (day, ip_hash, n) VALUES (?,?,1) ON DUPLICATE KEY UPDATE n = n + 1', [today(), ih]);
await db.q('INSERT INTO daily_free (day, ip_hash, n) VALUES (?,?,1) ON DUPLICATE KEY UPDATE n = n + 1', [today(), freeKey(req, m)]);
}
}
} else {
@@ -177,7 +215,7 @@ async function startCheck(req, res, b, m) {
return json(res, 200, { id, kind, via });
}
const PAGES = { '/': 'index.html', '/my': 'my.html', '/admin': 'admin.html', '/privacy': 'privacy.html', '/terms': 'terms.html', '/disclaimer': 'disclaimer.html', '/rubric': 'rubric.html' };
const PAGES = { '/join': 'join.html', '/': 'index.html', '/my': 'my.html', '/admin': 'admin.html', '/privacy': 'privacy.html', '/terms': 'terms.html', '/disclaimer': 'disclaimer.html', '/rubric': 'rubric.html' };
const server = http.createServer(async (req, res) => {
let u; try { u = new URL(req.url, 'http://x'); } catch (e) { res.writeHead(400); return res.end(); }
@@ -208,7 +246,7 @@ const server = http.createServer(async (req, res) => {
// api
if (p === '/api/config' && req.method === 'GET') {
const m = await member(req); const holder = holderOf(req, m); const cr = await creditsOf(holder);
return json(res, 200, { staging: STAGING, freeLeft: unlocked(req) ? null : await freeLeft(req), freePerDay: FREE_PER_DAY, unlocked: unlocked(req), credits: cr,
return json(res, 200, { staging: STAGING, freeLeft: unlocked(req) ? null : await freeLeft(req, m), freePerDay: freeCap(m), unlocked: unlocked(req), credits: cr,
member: m ? { username: m.username, wallet: m.wallet ? SHORT(m.wallet) : null, sponsor: m.sponsor, refLink: m.username ? 'https://' + SITE_HOST + '/?ref=' + encodeURIComponent(m.username) : null } : null,
sso: networksso.hubOn(), zones: ZONES, prices: sponsor.ITEMS, sponsorPct: { levels: sponsor.LEVEL_PCT, company: sponsor.COMPANY_PCT } });
}
@@ -216,14 +254,18 @@ const server = http.createServer(async (req, res) => {
let mm;
if ((mm = /^\/api\/check\/([A-Za-z0-9]{12})$/.exec(p)) && req.method === 'GET') {
const c = await db.one('SELECT * FROM checks WHERE id = ?', [mm[1]]); if (!c) return json(res, 404, { error: 'No check with that id.' });
return json(res, 200, publicView(c, { full: true }));
const m = await member(req);
return json(res, 200, publicView(c, { full: true, gated: isGated(c, { member: m, unlocked: unlocked(req) }) }));
}
if ((mm = /^\/api\/check\/([A-Za-z0-9]{12})\/shot\.jpg$/.exec(p)) && req.method === 'GET') {
const c = await db.one('SELECT kind, is_public, holder FROM checks WHERE id = ?', [mm[1]]);
if (!c || isGated(c, { member: await member(req), unlocked: unlocked(req) })) { res.writeHead(c ? 403 : 404, headers()); return res.end(); }
const s = await db.one('SELECT mime, bytes FROM screenshots WHERE check_id = ?', [mm[1]]); if (!s) { res.writeHead(404, headers()); return res.end(); }
res.writeHead(200, headers({ 'Content-Type': s.mime, 'Cache-Control': 'public, max-age=86400' })); return res.end(s.bytes);
}
if ((mm = /^\/api\/check\/([A-Za-z0-9]{12})\/evidence$/.exec(p)) && req.method === 'GET') {
const c = await db.one('SELECT pack_md FROM checks WHERE id = ?', [mm[1]]); if (!c || !c.pack_md) return json(res, 404, { error: 'No evidence pack for this check.' });
const c = await db.one('SELECT pack_md, kind, is_public, holder FROM checks WHERE id = ?', [mm[1]]); if (!c || !c.pack_md) return json(res, 404, { error: 'No evidence pack for this check.' });
if (isGated(c, { member: await member(req), unlocked: unlocked(req) })) return json(res, 403, { error: 'Join free to see the full report.', join: true });
res.writeHead(200, headers({ 'Content-Type': 'text/plain; charset=utf-8', 'Cache-Control': 'no-store' })); return res.end(c.pack_md);
}
if (p === '/api/network-checks' && req.method === 'GET') {
@@ -263,6 +305,8 @@ const server = http.createServer(async (req, res) => {
await db.q('INSERT INTO credits (holder, deep, updated) VALUES (?,?,?) ON DUPLICATE KEY UPDATE deep = deep + VALUES(deep), updated = VALUES(updated)', [holder, n, Date.now()]);
return json(res, 200, { ok: true, credits: await creditsOf(holder), split: r.split });
}
if (p === '/api/join' && req.method === 'POST') return join.start(req, res);
if (p === '/join/confirm' && req.method === 'GET') return join.confirm(req, res, u);
if (p === '/api/me' && req.method === 'GET') {
const m = await member(req); if (!m) return json(res, 200, { member: null, sso: networksso.hubOn() });
const checks = await db.q('SELECT id, kind, website, chain, address, status, created FROM checks WHERE member = ? ORDER BY created DESC LIMIT 30', [m.email]);
@@ -282,7 +326,8 @@ const server = http.createServer(async (req, res) => {
const promos = await db.q('SELECT * FROM promo_codes ORDER BY created DESC');
const redemptions = await db.q('SELECT * FROM promo_redemptions ORDER BY at DESC LIMIT 300');
const cost = await db.one('SELECT COUNT(*) n, SUM(cost_usd) usd FROM checks');
return json(res, 200, { checks, purchases: purchases.map(x => Object.assign(x, { line: JSON.parse(x.line_json || 'null'), split: JSON.parse(x.split_json || 'null') })), promos, redemptions, cost, staging: STAGING, zones: ZONES, sso: networksso.hubOn(), hub: hubpeople.view ? hubpeople.view() : null });
const joins = await db.q('SELECT email, username, ref, optin, to_path, created, confirmed_at, status, mailed, hub_result FROM joins ORDER BY created DESC LIMIT 100');
return json(res, 200, { joins, checks, purchases: purchases.map(x => Object.assign(x, { line: JSON.parse(x.line_json || 'null'), split: JSON.parse(x.split_json || 'null') })), promos, redemptions, cost, staging: STAGING, zones: ZONES, sso: networksso.hubOn(), hub: hubpeople.view ? hubpeople.view() : null });
}
if (p === '/api/admin/promo' && req.method === 'POST') {
const b = await readBody(req);
+5 -5
View File
@@ -21,7 +21,7 @@ rep('<option>BNB Chain</option><option>Polygon</option><option>Ethereum</option>
'<option value="bsc">BNB Chain</option><option value="polygon">Polygon</option><option value="eth">Ethereum</option><option value="base">Base</option>')
rep('<button type="button" style="font-family: Archivo', '<button id="runBtn" type="submit" style="font-family: Archivo')
rep('3 free checks a day. Read-only: a check never asks you to connect a wallet.</span>',
'3 free checks a day. Read-only: a check never asks you to connect a wallet.</span>\n<span id="formErr" role="alert" style="color: #FFB599; font-size: 14px"></span><span id="freeLeft" style="font-size: 13px; color: #A9BEB1"></span>')
'1 free check a day, 3 a day when you join free (one account across the network). Read-only: a check never asks you to connect a wallet.</span>\n<span id="formErr" role="alert" style="color: #FFB599; font-size: 14px"></span><span id="freeLeft" style="font-size: 13px; color: #A9BEB1"></span>')
# live result goes right after the hero
rep('<!-- problem / agitate / solve -->', '<div id="heroSlot"></div>\n<!-- live result -->\n<div id="live" class="wrap hide" style="padding-top: 48px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 24px"></div>\n<div id="liveSlot"></div>\n<!-- problem / agitate / solve -->')
# sample label
@@ -84,15 +84,15 @@ head = '''<!doctype html>
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=1">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
<div style="background: #F3F5F1; color: #0E2A22; font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 16px; line-height: 1.55">
'''
tail = '''</div>
<script src="/assets/common.js?v=1"></script>
<script src="/assets/render.js?v=1"></script>
<script src="/assets/index.js?v=1"></script>
<script src="/assets/common.js?v=2"></script>
<script src="/assets/render.js?v=2"></script>
<script src="/assets/index.js?v=2"></script>
</body>
</html>
'''
+25 -5
View File
@@ -6,7 +6,7 @@ UPDATED = 'November 16, 2026'
def page(title, desc, body, scripts=('common.js',), legal=False):
sc = ''.join('<script src="/assets/%s?v=1"></script>\n' % s for s in scripts)
sc = ''.join('<script src="/assets/%s?v=2"></script>\n' % s for s in scripts)
main = body
if legal:
main = ('<div class="wrap legal-grid" style="padding-top:40px;padding-bottom:56px"><main class="legal">%s</main><aside id="sideSlot" aria-label="Advertisement"></aside></div>' % body)
@@ -20,13 +20,13 @@ def page(title, desc, body, scripts=('common.js',), legal=False):
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=1">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
%s
%s</body>
</html>
''' % (html.escape(title), html.escape(desc), main, sc + ('<script src="/assets/side.js?v=1"></script>\n' if legal else ''))
''' % (html.escape(title), html.escape(desc), main, sc + ('<script src="/assets/side.js?v=2"></script>\n' if legal else ''))
PUBLIC_LINE = ('Every WebWorthIt check uses only public information that anyone could look up on their own: public blockchain records, '
@@ -42,12 +42,18 @@ privacy = '''<p class="eyebrow">Updated %s</p><h1>Privacy Policy</h1>
<h2>What we store</h2>
<ul>
<li><b>The checks you run.</b> The website and the contract address you entered, the chain, the time, and the result we produced.</li>
<li><b>A hashed version of your IP address.</b> We use it only to count the 3 free checks a day. We store a one-way hash, never the raw address.</li>
<li><b>A hashed version of your IP address.</b> We use it only to count free checks (1 a day without an account, 3 a day for members). We store a one-way hash, never the raw address.</li>
<li><b>Screenshots of public pages.</b> When you enter a website, our own browser opens that public page and saves a screenshot, so the report shows what the page said at that time.</li>
<li><b>If you sign in with the network:</b> your network email, username and the wallet address on your network account, so your checks, vouchers and referral link follow you. When you buy, the sponsor line that would be paid is recorded with the sale.</li>
<li><b>Vouchers and test codes</b> you redeem, with the time, so a code is used only as often as it allows.</li>
<li><b>A browser cookie</b> that keeps your vouchers and settings on this browser, and a cookie that remembers who referred you (30 days).</li>
</ul>
<h2>Joining and emails</h2>
<ul>
<li>Joining WebWorthIt is free and gives you one account across the network: the same account signs you in on the other network sites. Your network sponsor is the member whose link brought you here.</li>
<li>To join or sign in you give your email address. We send you a one-time sign-in link. That email is sent because you asked for it.</li>
<li>Network news and tips are sent only if you tick the box to receive them. Every one of those emails has an unsubscribe link, and you can unsubscribe at any time.</li>
</ul>
<h2>What we never do</h2>
<ul>
<li>We never ask anyone to connect a wallet to run a check. A check is read-only.</li>
@@ -69,7 +75,7 @@ terms = '''<p class="eyebrow">Updated %s</p><h1>Terms and Conditions</h1>
<h2>Accuracy</h2>
<p>We check every address, transaction and number in a written report against the evidence our tools read. A report that does not pass that check is not shown; only the facts read straight from the chain are shown. Public nodes can fail or limit what they return, so every report says which block range was read and what could not be read. Blockchain records change all the time: a report describes the state at the block it names.</p>
<h2>Free checks, deep reports and vouchers</h2>
<ul><li>Every visitor gets 3 free checks a day.</li><li>Deep reports, report packs and watch alerts are one-time payments. No subscriptions.</li><li>Vouchers add reports or free checks as stated on the voucher, may expire, and have no cash value.</li><li>Sponsor rewards: when someone a member referred buys, the sponsor line is paid as published on the site (20%% to the direct sponsor, 5%% on levels 2 to 5). You are paid only when people choose to buy. Voucher redemptions pay nothing.</li></ul>
<ul><li>Every visitor gets 1 free check a day; members (free to join) get 3 a day. Without an account a free check shows the grade, the verdict and the first finding; members see the full free report.</li><li>Deep reports, report packs and watch alerts are one-time payments. No subscriptions.</li><li>Vouchers add reports or free checks as stated on the voucher, may expire, and have no cash value.</li><li>Sponsor rewards: when someone a member referred buys, the sponsor line is paid as published on the site (20%% to the direct sponsor, 5%% on levels 2 to 5). You are paid only when people choose to buy. Voucher redemptions pay nothing.</li></ul>
<h2>Fair use</h2>
<p>Do not use the site to attack, overload or scrape other services, and do not enter sites or addresses you have no reason to check. We may limit or refuse checks to keep the service working for everyone.</p>
<h2>No warranty</h2>
@@ -117,6 +123,19 @@ admin = '''<main class="wrap" style="padding-top:32px;padding-bottom:40px;displa
<div id="out"></div>
</main>'''
joinp = '''<main class="wrap" style="padding-top:48px;padding-bottom:56px;max-width:640px;display:flex;flex-direction:column;gap:18px">
<h1 style="font-size:40px">Join free, or sign in</h1>
<p style="margin:0;color:var(--ink2)">One account across the network. Enter your email and we send you a one-time link: it signs you in if you are already a member, or creates your free account if you are new. Joining never asks you to connect a wallet.</p>
<form id="form" class="card" novalidate>
<label for="email" style="font-weight:600">Email</label>
<input id="email" class="code" type="email" autocomplete="email" required placeholder="you@example.com">
<label style="font-size:14px;color:var(--ink2);display:flex;gap:8px;align-items:flex-start"><input id="optin" type="checkbox"> Also send me network news and tips (optional, unsubscribe any time)</label>
<button id="go" class="btn org" type="submit">Send my link</button>
</form>
<p id="msg" role="status" style="margin:0"></p>
<p style="margin:0;font-size:14px;color:var(--ink2)">Signed in on InstantAdPay or LinkSpin already? <a id="hubBtn" href="/sso/start?mode=go">Sign in with the network</a>. See the <a href="/privacy">Privacy Policy</a> for how emails are used.</p>
</main>'''
nf = '''<main class="wrap" style="padding-top:64px;padding-bottom:64px"><h1 style="font-size:40px">Page not found</h1><p><a href="/">Back to WebWorthIt</a></p></main>'''
files = {
@@ -127,6 +146,7 @@ files = {
'report.html': page('Check', 'A WebWorthIt check: public facts with sources, and our opinion from the published rubric.', report, ('common.js', 'render.js', 'report.js')),
'my.html': page('My checks', 'Your WebWorthIt checks and referral link.', my, ('common.js', 'my.js')),
'admin.html': page('Admin', 'WebWorthIt admin.', admin, ('common.js', 'admin.js')),
'join.html': page('Join free or sign in', 'One account across the network. Join WebWorthIt free or sign in with a one-time email link.', joinp, ('common.js', 'join.js')),
'404.html': page('Not found', 'Page not found.', nf),
}
for k, v in files.items():