Commit Graph

45 Commits

Author SHA1 Message Date
martbost c2178b4c6e Traffic-source catalog lives in catalog/ (DATA_DIR=/app/data is the runtime volume in production and would hide a shipped file)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 11:18:08 -05:00
martbost 211eb5a0e8 Traffic sources: network macros, campaign URLs, per-source postbacks, Reports dimension
A Source is a first-class record of a network a member buys traffic on (PropellerAds,
Zeropark, Adsterra, ExoClick and 25 more from the shipped catalog, or defined by hand).
It remembers the network's macro tokens and conversion postback, attaches to spin links,
builds the exact campaign URL to paste into the network, fires that network's own
postback only for clicks that came through it, and shows up in Reports by source and
by the zone / placement / site the macro carried.

- data/traffic-sources.json: catalog of 29 networks (BeMob template harvest), un-ignored
  via data/* + !data/traffic-sources.json; loader tolerates missing fields, null costModel,
  {{slot}} labels with spaces and parentheses, optional slots, unknown single-brace macros
- sources.js: DATA_DIR/sources.json model, 30 per account, 20 params, key allow-list,
  postbacks.validateUrl on the filled postback; list/create/update/get/urlFor/test
- rotator.js: update() takes sourceId (owner-checked), pub() exposes it, hits and conversions
  are stamped with the source at click time (sr), wider query allow-list (cost, creative,
  site, banner, keyword, geo, os, browser, device, carrier, format, external_id, visitor_id),
  summary() adds sources[] and placements[], sourceCounts(), detachSource()
- postbacks.js: fire() delivers the matching source's postback after the manual ones through
  the same deliver() (guards, retry, rate cap, auto-disable); log rows carry source; convertFor,
  inbound and the page lead path pass sourceId; fill/deliver/logForSource exported
- routes (GET and POST): /api/sources/catalog, /api/my/sources, /api/my/sources/<id>,
  /api/my/sources/<id>/url; /sources screen
- /sources Control Room screen (list + Campaign URL / Postback / Settings tabs, two-step
  New source dialog); Links share kit gets a source select and a "Campaign URL for <network>"
  first row; Reports gets Traffic sources and Placements; rail entry; chatbot canned answer,
  FACTS line and KNOWLEDGE_DATE 2026-10-12
- cr.css: phone rail icons only at 34px so ten entries fit; cache tags bumped to 20261012a

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 11:16:24 -05:00
martbost 13aa4f6b64 Published pages: img-src allows 'self' (a hosted page image on a plain-http host, such as the local recording boot, was blocked)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 07:10:47 -05:00
martbost f562cc50be Rail shows Training, Pipeline, Profile; profile carry-over from InstantAdPay; hero frame + relative page images; the "how is this different from InstantAdPay" answer
- Control Room rail: Training, Pipeline and Profile are first-class entries (phone bar keeps them behind More)
- /api/partner/registry: rows may carry profile {avatarUrl, bio, socials}; fills only empty fields on this side, member edits win after that
- Pages: uploaded images are stored as /u/pages/... paths (any host, local recordings included); the split hero frame keeps a 3:2 shape with a tinted ground when an image fails to load (was a thin white bar)
- Home page section + chatbot canned answer + FACTS: InstantAdPay = marketplace, LinkSpin = tool side, same line and wallet
- asset tags bumped to 20261011a

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 06:41:25 -05:00
martbost 16a9d9af92 Integration after the three tracks: Links share kit offers the best link per channel (link-hosts), uploaded page images pass the curtain, /publishers in traffic pages and sitemap, chatbot says dayparting and health checks are live, qualifying package is $25 in tank and dashboard copy
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 11:49:08 -05:00
martbost f52de70e9d Merge publishers track: publisher program page + zone tiers, LinkSpin chatbot rewrite, qualification copy fixes 2026-10-10 11:36:09 -05:00
martbost f63a37947a Publisher program (/publishers + zone tiers), chatbot rewritten for LinkSpin, $25 qualification copy fixes
Publisher program (Marty's zone-owner offer for outside site owners):
- /publishers public page: what a zone is, the nine sizes, the waterfall (member ads, network ads, house),
  what pays (viewable only, bots never, warm-up 100 views at 40%, cap), what credits buy, install in four steps
  with the origin lock explained, Standard/Verified tiers, FAQ, and a live "Network right now" strip
- GET /api/public/publishers: zones installed/live, viewable impressions and credits paid in the last 7 days,
  live rates, sizes, warm-up; computed in zones.js and cached a minute
- zones.js: per-zone tier (default standard); verified zones earn network views at nasViewsPerCreditVerified
  (default 8) instead of nasViewsPerCredit (10); member-campaign views stay at viewsPerCredit (5) on both tiers;
  rateFor/tierOf exported; a pay log (zones.json "pay") so credits can be reported by day; publisherTotals(days)
  returns {zones, live, views, viewable, credits, byDay, byZone} with Central day keys for the Reports screen
- admin: Tier select per zone in the Zones pane, saved via POST /api/admin/zones/:id (tier) or the alias
  /api/admin/zones/:id/tier; the admin list carries the 7-day publisher totals
- Zones screen: first-run "Add your site" card (site, size, copy the tag, check it is live) for new accounts and
  for /zones?start=1 from the publisher page; Verified tag on zone rows; rate note mentions the verified rate
- /partners (downline-builder kit) keeps its URL, gets the real LinkSpin ladder ($10 door to $500 Network, $25
  qualifies), the 10% + 10% admin split, and a cross-link to the publisher program

Chatbot: every canned answer and the AI knowledge block now describe LinkSpin (spin links, pages, zones and the
publisher tiers, audiences, promo tools with the five hook angles, blog; the six packages, the 50/20/10/10+10 split,
$25 qualification, pass-ups, the contract; email codes, Control Room screens, sponsor carry-over from the network
registry, free activation). InstantAdPay-only mechanics removed (dormant-lead rescue, Five Dollar Friday, Wired
Wednesday, games, mint passes, surf earn tab); the holding tank stays because /tools > My line still runs it here.

Copy: "Level 2 opens after two of your people buy a $25 or larger package" on the home page, contract, launch,
earning, my, plays pages and promo.js (the $20 figures that remain are the $100 example split amounts).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 11:34:42 -05:00
martbost 8606db6a8e Merge pages track: link-domain pool with safety checks, page image uploads, form provider labels, Reports pages + zones 2026-10-10 11:30:23 -05:00
martbost 0a30b1da60 Link-domain pool by channel + safety checks, hosted page images + provider allowlist, Reports pages and zones sections
Item 1 (domains.js): every short link domain in linkDomains gets a channel (email / messaging / social / reserve)
via the new linkDomainChannels site setting ("host:channel,..."; default order email, messaging, social, email,
reserve). Checks every 6 h + Admin > Link domains "Check now": Google Safe Browsing v4 when GSB_API_KEY is set
(unknown otherwise), URIBL + SURBL DNS lists (answer = listed, NXDOMAIN = clean, 127.0.0.1 or errors = unknown),
and a TelegramBot-UA reachability probe. Flagged or listed = BURNED: out of domains.live() (no new links or
pages on it, existing /r/ codes still resolve), admin told once via telegramAdminChatId or ADMIN_EMAIL.
State in DATA_DIR/domains.json. New: GET /api/my/link-hosts, GET+POST /api/admin/domains, admin pane.
/api/my/pages now hands out hosts from domains.live().

Item 2 (pages.js, formrestyle.js): POST /api/my/pages/upload (raw image body, multipart, or JSON base64) for
png/jpg/webp up to 2 MB, 50 per member, magic bytes checked, sharp re-encode when installed, stored under
DATA_DIR/uploads/pages/<owner-hash>/<id>.<ext>, served at /u/pages/... immutable for a year; delete via
POST /api/my/pages/images/<id> {remove}. Pages editor: Upload image button beside the image field + a strip of
the member's images. Provider allowlist (17 autoresponders, Sendy by /subscribe path) exposed as `providers`;
the editor says "Recognised: AWeber" or "Unknown provider: plain post to <host>" at paste time; pub() carries
formProvider. Unknown hosts still allowed when parse-or-refuse passes.

Item 3 (zonereport.js, pages.summary): /api/my/reports returns {spins, pages, zones} (spins still spread at the
top level) for the chosen days; Pages and Zones sections on /reports with 30-day bars, totals, per-item tables,
phone width checked. Zone numbers are a read-only view over zones.json (zones.js untouched).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 11:28:47 -05:00
martbost 97b206f3b5 Dayparting + automatic destination health checks for the rotator
Hours: rotation.hours / destination.hours = null (always on) or 7 strings of 24 chars '1'/'0' (index 0 = Sunday); rotation.tz = IANA zone name or 'visitor' (country -> representative zone, Central when unknown). Outside the link's hours visitors go to the fallback (hit.oh = 1 so stats show it); a destination outside its own hours is skipped by the pick. Presets always/business/evenings/weekends, server-side validation of grid and zone (Intl), "my best hours" = top quarter of weekday-hour cells by uniques over 30 days, unlocks at 200 clicks.

Health (health.js): every 30 min each active destination and the fallback is fetched (10 s timeout, 5 redirects, HEAD then GET, 4 at a time) and classed ok / slow / dead / parked, with frameBlocked noted. Three failing checks in a row pause the destination (never the last live one of a rotation without a fallback); paused ones are re-checked every 6 h and come back after two clean passes only when LinkSpin paused them. Owner gets one on-site inbox notice per pause. POST /api/my/rotations/:id/health = Check now, once a minute.

Links screen: Hours chip + inline 7x24 editor (tap, drag to paint, presets, zone picker, plain-English summary, heat tint), per-destination clock button and chip, health dot + line per row, Check now button, auto-paused note.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 11:21:23 -05:00
martbost 616e8e5878 Join hooks: the five LinkSpin angles are server-known (squeeze layout, og copy, angle cookie, link stats) and the page shows the angle video with a join call to action
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 08:49:24 -05:00
martbost c515a01441 Pages domain: member pages publish at the root of site.pagesDomain (lookfirst.page), /p/<slug> kept everywhere; the pages host serves nothing else (/ -> app, unknown paths 404); Pages screen shows the new URLs
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 17:40:05 -05:00
martbost 92c5b777da First-party retargeting: audiences (automatic 'My visitors' fed by pages + zones, custom pixel audiences via /p.js + /p.gif, ls.vid cookie + 24 h soft key), include/exclude audience targeting on banner/text/login campaigns, zone tag sends credentials with CORS echo, audience-targeted campaigns never syndicate, Audiences panel on Zones and selector on Ads
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 16:42:02 -05:00
martbost ef06cd4baa /my redirector as an external script (CSP allows no inline scripts)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 15:40:10 -05:00
martbost 8ec82bd282 Retire the classic /my dashboard: control-room screens take over (links/ads/credits/wallet/team), leftover panes (welcome tour, line broadcast, pipeline, promo tools, training, profile) live at /tools as 'More' in the rail; /my redirects by #pane; every link and email retargeted
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 15:37:00 -05:00
martbost 4ac95bd0c0 Zones: ad-blocker proofing. House creatives served as /art/house-<slot>.svg (EasyList blocks any URL with an IAB size token like -728x90.), zone owners told not to wrap the tag in ad-named elements
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 15:00:50 -05:00
martbost a0f843d921 Signed /api/partner/registry: InstantAdPay pushes member rows live; new people become shell accounts with their line, existing shells gain username/wallet/sponsor
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 07:25:17 -05:00
martbost d215c025b0 /api/me sponsor fallback also capped at the on-chain member count (the Credits screen activates from /api/me)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 06:47:06 -05:00
martbost ab65439ad4 Sponsor fallback never names a position the contract does not have yet: on a fresh contract the first member joins with sponsor 0 and becomes #1 (Marty's activate(1) reverted 'Unknown sponsor')
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 06:41:54 -05:00
martbost 55584a7007 Wallet sends carry an explicit gas limit from the server's estimate (wallets that cannot estimate showed 'unable to get a gas fee' on buy and activate); Control Room rail expanded by default with a remembered Collapse toggle
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 06:25:06 -05:00
martbost 547c7ba465 Pre-launch whitelist LS_TESTERS: only listed emails/usernames can request or verify a sign-in code; public pages stay visible with the curtain down (Marty 2026-10-08)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-08 06:16:12 -05:00
martbost a6bfa1ba42 Page designer on the Branded Voice design system: palette x design (dark/light/editorial/ignition) x layout (stacked/split hero) + six niche presets with house hero images, procedural split visual with price chip, Look panel in the editor; ad zones + banner campaigns gain 336x280, 250x250, 125x125, 120x600 with house banners
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 16:40:21 -05:00
martbost 27b3727a9f Link domains are never curtained: spin links redirect and the mini-sites answer while linkspin.app stays covered (Marty wants to test traffic before launch)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 16:24:26 -05:00
martbost eab7106e65 Closed sign-ups no longer block the email code for members who already have an account (Marty was refused on production)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 16:11:09 -05:00
martbost 8b0e68fb0d Site switch coachMail: 0 turns the stall-nudge mailer off (pre-launch production carries imported shell accounts that must not be nudged)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 16:05:18 -05:00
martbost 63440f7213 LinkSpin badge set replaces the InstantAdPay images (v3); feed descriptions without emoji; legacy Qualified Start calculator uses the flat $25-$500 ladder and the legacy composer drops the retired ad types; share image ring redrawn
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 09:19:02 -05:00
martbost 3c52e2704a Contract, live ledger, terms, privacy and disclaimer on the Instrument scheme; contract page shows chain totals and never falls back to another contract's source; terms and privacy updated for links, pages, zones and leads; share images point at the LinkSpin image; toolkit banners use the LinkSpin house set
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 09:15:03 -05:00
martbost a50640c890 Credits screen in the Control Room (/credits): package picker from the catalog, POL quote, link wallet, buy with the sponsor hold and balance pre-flight, switch on payouts, card on-ramp, purchases from the chain; first-run username step in the shell; new join page on the Instrument scheme with sponsor chip, hook angles rewritten for LinkSpin, bare /join route; legacy angle OG copy corrected
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 09:09:38 -05:00
martbost dfb677bb09 New public home on the Instrument scheme: working demo (paste up to three pages, get a live spin link on a link domain, email code to keep it; demo spins are per browser, five per IP per hour, expire after 24 h unless claimed at sign-in), live strip from the chain and the rotator, the three free tools, the split card, the six-package ladder read from the catalog, LinkSpin share image; pub.css for every public page
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 08:58:57 -05:00
martbost ad744d8c0f Site host from one module: host.js exports SITE_HOST/SITE_URL and every module, email, Telegram post, QR, ad click URL and OG tag reads it (no more hard-coded test hostname); public pages carry {{SITE_URL}} filled at serve time; frame check carries the curtain pass for our own hosts so a test ad can point at a spin link; stale IAP sitemap removed
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 08:52:04 -05:00
martbost 6da444c790 Invite page: inline HTML escape (esc was not in scope)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 19:45:36 -05:00
martbost 15f663a56d Invite link: GET shows a sign-in button, POST spends the token (link previews were consuming it)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 19:34:34 -05:00
martbost 418b89956c Tester invite: admin-minted one-time sign-in link (/api/admin/invite -> /welcome/<token>, 24 h, creates the account, bypasses the sign-up gate)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 19:21:42 -05:00
martbost 6091f0b82a Instrument scheme across the Control Room: light workspace on a blueprint grid, dark chrome rail/topbar/status strip, signal-orange primary, gradient charts, corner-bracket tiles, LED readouts, gauges; /api/my/strip
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 19:10:03 -05:00
martbost 274c8fd78c Ads screen in the Control Room shell: buy banner/text/login ads, delivery across viewer, zones and network, earn viewer; login-ad gate after sign-in; member types limited to the three; welcome credits granted from the shell too
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 18:11:17 -05:00
martbost cfb9ed13d0 Zones guardrails: origin lock to the declared site, warm-up then earning, hold under 40% viewable, admin Zones pane with pause
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 17:38:08 -05:00
martbost e36b590788 Zone endpoints pass the curtain (embeds on members' sites must load while the app is curtained)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 17:21:08 -05:00
martbost e66a38dd74 Zones: ad slots on members' own sites (LinkSpin campaign > Network Ad Space > house waterfall, viewable-impression credits, /zones screen)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 17:20:19 -05:00
martbost 53f5d51821 Pages: bridge, review and squeeze pages from a scan plus an angle; parse-or-refuse forms; member-owned leads with CSV; served at /p/<slug> on every domain under a real CSP; lead event on the postback rails
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 16:06:11 -05:00
martbost 8e1ddb892f Control Room: shared shell with in-shell sign-in, Reports, Team and Wallet screens; postback rails (click ids, macros, lsid attribution, conversions, outbound + inbound postbacks with SSRF guards)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 15:52:07 -05:00
martbost 688d3c4bb5 Control Room front end, first screen: /links workspace on the rotator API (tokens in cr.css)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 14:59:10 -05:00
martbost ca89d15c2a A curtain in front of the whole app
Work in progress should not be readable by anyone who wanders in. CURTAIN=<secret> puts a
contentless "Coming soon" card in front of every request — pages, APIs, the rotator, the
link domains — with noindex headers and nothing that names the product or what it does.

Opening the site once with ?k=<secret> drops a cookie that lifts it for that browser.
Unsetting CURTAIN opens the site again, so this never has to be picked back out of the code.

It sits at the very top of the request handler, ahead of the rotator and the link-domain
sites, so there is no path around it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 04:31:56 -05:00
martbost 0374b04f0d Default-deny outbound mail and a sign-up gate
This is a test area on a testnet contract, but it was seeded on 15 Sep with a copy of
InstantAdPay's live member list and it carried a working SendGrid key. On 18 Sep the
coach's stall nudges fired on schedule and emailed 95 real people from it. One of them
clicked through and opened a fresh account two hours later.

Nothing was misconfigured. Every send site checked mailer.hasKey(), the key was there,
so every send site got a yes. The default was wrong, not the plumbing.

OUTBOUND=on is now required before anything can leave: hasKey() is false without it,
send() rejects outright, and the two mailing loops (coach nudges, lead drip) never start.
SIGNUPS=closed shuts the three registration doors and reports signupsOpen:false, which
also drops the email-code card from the UI. Members already here keep their dashboards.

A missing env var means silence now, not delivery.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 04:29:08 -05:00
martbost 158ee291a1 carry: carryNotices setting keeps notices on-site only in the test area 2026-09-15 16:39:42 -05:00
martbost 010e8d7ffc LinkSpin test area: InstantAdPay engine fork rebranded, network registry, sponsor carry-over with engine activation and claim window, rotator with /r/ redirects, link-domain mini-sites
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-15 16:16:52 -05:00