Commit Graph

8 Commits

Author SHA1 Message Date
martbost f47c4ecd54 Rotator: shared Central-day formatter in summary (toLocaleDateString with timeZone built a formatter per hit; the status strip took ~4 s)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:08:05 -05:00
martbost 1c400bd87d Rotator: reuse one Intl.DateTimeFormat per time zone in cellAt (bestHours built one per hit; a 10k-hit link's stats took ~4 s and blocked the event loop)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:05:53 -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 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 75d95d84d6 Scanner and rotator accept bare domains (scheme added for them); clearer scanner error
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 16:27:17 -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 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 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