diff --git a/.env.example b/.env.example
new file mode 100644
index 0000000..c931a79
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,23 @@
+# Viral Banner Blitz app env (Coolify later). Never commit real values. v1 is off-chain: no contract, no payments.
+DOCSTORE_URL= # mysql://user:pass@host:3306/vbb REQUIRED for any real launch (files are local prototype only)
+SITE_HOST=viralbannerblitz.com
+SESSION_SECRET= # random hex; default = generated into DATA_DIR/.secret
+ADMIN_TOKEN= # x-admin-token for /api/admin/status and /api/admin/ledger (8+ characters)
+NETWORK_SSO_SECRET= # same value as InstantAdPay + LinkSpin (network sign-in); they must also list vbb under wallets
+WALLETCONNECT_PROJECT_ID= # Reown id (IAP project); add the VBB domain to its allowlist first
+LOOP_SIZE=50 # banners in the loop
+VISITORS_PER_SHIFT=10 # verified unique visitors per shift
+VIEWS_PER_CYCLE=150 # network ad views recorded per completed cycle
+VISIT_SECONDS=6 # page visible this long before a visit counts
+VISITS_PER_IP_DAY=3 # browsers counted per connection per 24 h
+FREE_CREDITS_PER_DAY=1
+FREE_CREDIT_CAP=7 # free credits bank up to this many
+MAX_QUEUED_PER_MEMBER=3
+CREDIT_PACKS=10:3,40:10 # credits:usd, shown as coming soon
+LOOK_USD=2 # banner look, shown as coming soon
+SPONSOR_PCT=30 # planned on-chain split (company gets the rest); not used in v1
+PRIZES_VISITORS=15,7,3 # weekly prizes in USD (paid in POL), displayed only
+PRIZES_SOURCES=15,7,3
+LINK_PROBE=1 # 0 skips the target-link frame check (local tests only)
+CF_PROXIED=0 # 1 only if Cloudflare proxies the domain (then cf-connecting-ip is trusted)
+NETWORK_LOOKUP_URL= # default InstantAdPay /api/network/member; empty = off
diff --git a/config.js b/config.js
index 42844c8..4d4c088 100644
--- a/config.js
+++ b/config.js
@@ -1,11 +1,12 @@
// All runtime config comes from env (Coolify sets these). Read once.
-// VBB v1 is off-chain: no contract, no prices, no money. Rewards are recorded, not credited yet.
+// VBB v1 is off-chain: no contract, no payments. Planned prices are shown as "coming soon"; rewards are recorded, not credited yet.
const path = require('path');
let cfg = null;
function get() {
if (cfg) return cfg;
const e = process.env;
+ const list = (v, d) => String(v == null || v === '' ? d : v).split(',').map(x => x.trim()).filter(Boolean);
const num = (v, d, min, max) => { const n = Number(v); return Number.isFinite(n) && v !== '' && v != null ? Math.min(max, Math.max(min, Math.round(n))) : d; };
cfg = {
port: Number(e.PORT || 3000),
@@ -26,8 +27,15 @@ function get() {
visitWindowHours: 24, // one count per visitor key per 24 h
perIpDay: num(e.VISITS_PER_IP_DAY, 3, 1, 100), // distinct user agents counted per IP per 24 h (shared connections, UA rotation)
// members
+ freeCreditsPerDay: num(e.FREE_CREDITS_PER_DAY, 1, 0, 10), // Marty 2026-11-13: 1 free post credit a day on sign-in
freeCreditCap: num(e.FREE_CREDIT_CAP, 7, 1, 365), // daily free credits bank up to this many
maxQueuedPerMember: num(e.MAX_QUEUED_PER_MEMBER, 3, 1, 100), // banners one member may have waiting at once
+ // ---- Marty's approved numbers (2026-11-13). v1 takes no payments: packages show as "coming soon" with these planned prices,
+ // prizes are displayed only (no payout code yet), the split is kept here for the contract step.
+ packs: list(e.CREDIT_PACKS, '10:3,40:10').map(x => { const [credits, usd] = x.split(':').map(Number); return { credits, usd }; }).filter(x => x.credits > 0 && x.usd > 0),
+ lookUsd: Number(e.LOOK_USD || 2), // banner look (border + hover teaser), per banner, one-time
+ split: { sponsorPct: num(e.SPONSOR_PCT, 30, 0, 100), companyPct: 100 - num(e.SPONSOR_PCT, 30, 0, 100) }, // on-chain later, no line
+ prizes: { visitors: list(e.PRIZES_VISITORS, '15,7,3').map(Number).filter(x => x >= 0), sources: list(e.PRIZES_SOURCES, '15,7,3').map(Number).filter(x => x >= 0) }, // USD per place, paid in POL
linkProbe: e.LINK_PROBE !== '0', // check the target link answers and allows frames (off in the local smoke test)
iapBase: String(e.IAP_URL || 'https://instantadpay.com').replace(/\/+$/, ''),
lsBase: String(e.LS_URL || 'https://linkspin.app').replace(/\/+$/, ''),
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..e05a9d7
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,20 @@
+services:
+ vbb:
+ build: .
+ restart: unless-stopped
+ environment:
+ NODE_ENV: production
+ PORT: 3000
+ DATA_DIR: /app/data
+ SITE_HOST: ${SITE_HOST:-viralbannerblitz.com}
+ DOCSTORE_URL: ${DOCSTORE_URL:-}
+ SESSION_SECRET: ${SESSION_SECRET:-}
+ ADMIN_TOKEN: ${ADMIN_TOKEN:-}
+ NETWORK_SSO_SECRET: ${NETWORK_SSO_SECRET:-}
+ WALLETCONNECT_PROJECT_ID: ${WALLETCONNECT_PROJECT_ID:-}
+ volumes:
+ - vbb-data:/app/data # uploads only once DOCSTORE_URL is set
+ expose:
+ - "3000"
+volumes:
+ vbb-data:
diff --git a/public/admin.html b/public/admin.html
index f1a8805..0b23b1d 100644
--- a/public/admin.html
+++ b/public/admin.html
@@ -22,7 +22,7 @@
-
+
diff --git a/public/art/icon-192.png b/public/art/icon-192.png
new file mode 100644
index 0000000..5fdb069
Binary files /dev/null and b/public/art/icon-192.png differ
diff --git a/public/art/og-share.png b/public/art/og-share.png
new file mode 100644
index 0000000..c0d4c69
Binary files /dev/null and b/public/art/og-share.png differ
diff --git a/public/assets/leaders.js b/public/assets/leaders.js
index b4d0978..fb77fea 100644
--- a/public/assets/leaders.js
+++ b/public/assets/leaders.js
@@ -2,6 +2,14 @@
(async function () {
VBB.renderNav('/leaders'); VBB.renderFooter();
const $ = VBB.$, esc = VBB.esc;
+ // weekly prizes from config (Marty 2026-11-13): displayed only, no payout code yet
+ const c = await VBB.getConfig().catch(() => ({}));
+ const pz = c.prizes || {}; const place = ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th'];
+ const plist = (title, arr) => '
' + title + '
' + arr.map((v, i) => '
' + place[i] + ': $' + VBB.n(v) + ' in POL
').join('') + '
';
+ if ((pz.visitors || []).length || (pz.sources || []).length) {
+ $('pz').innerHTML = ((pz.visitors || []).length ? plist('Most visitors sent', pz.visitors) : '') + ((pz.sources || []).length ? plist('Most traffic sources', pz.sources) : '');
+ $('prizes').hidden = false;
+ }
const d = await VBB.getJSON('/api/leaders');
if (d.error) return VBB.status(d.error, 'err');
const wk = new Date(d.week + 'T12:00:00Z').toLocaleDateString('en-US', { month: 'long', day: 'numeric', timeZone: 'UTC' });
diff --git a/public/assets/static.js b/public/assets/static.js
index 9c1ece7..a2d32f4 100644
--- a/public/assets/static.js
+++ b/public/assets/static.js
@@ -7,4 +7,9 @@
if (c.perShift) set('perShift', c.perShift);
if (c.viewsPerCycle != null) set('views', VBB.n(c.viewsPerCycle));
if (c.visitSeconds) set('secs', c.visitSeconds);
+ // planned package prices from config (Marty 2026-11-13); still coming soon, nothing is sold here
+ const money = v => '$' + (Number.isInteger(v) ? v : Number(v).toFixed(2));
+ const pp = document.getElementById('pkPacks');
+ if (pp && c.packs && c.packs.length) pp.innerHTML = c.packs.map(p => '
' + VBB.n(p.credits) + ' post credits for ' + money(p.usd) + '