martbost 04ded6822c Smarter chatbot matching by meaning (Marty 2026-11-16): the hub's semantic match (free core2 embeddings)
chatcore.js + netkb.js (route): a hand-off pattern still answers first; then the hub's POST /v1/kb/match answers with this
site's entry when it is sure, keeps or overrules the CANNED regex hit, and picks the AI prompt context, this site's own entries
first. 1.5 s timeout, then the hub is skipped for 30 s and the old pattern + BM25 path answers (NETKB_MATCH=0 = off).
netkb.js also has suggest() for the support desk (used by InstantAdPay and LinkSpin). Same chatcore.js in the six rebuilt
sites, same netkb.js in all eight. Test: node qa/netkb-semantic.test.mjs (decisions, fail soft, shared-file parity).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 05:37:03 -06:00

Stack POL

stackpol.com: every POL payout across the network, stacked. Live app since 2026-11-09 (replaced the Oct 1 placeholder in the same Coolify slot k6p591wzomylttvsva3e6w7i).

  • server.js (Node 20, no dependencies): home with live network totals, /programs, /earn/ per program, /ledger (?p=), opt-in member stacks at /, /blog (+ /blog/, /blog/tag/, /blog/feed.xml), /sitemap.xml, /robots.txt, /api/totals. Full SEO head on every page (layout.js): canonical, robots, Open Graph, Twitter card, JSON-LD (WebSite, Organization, FAQPage, BlogPosting, Breadcrumb, ItemList, VideoGame/WebApplication, ProfilePage).
  • Data: tools/indexer.py runs on core every 5 min (/etc/cron.d/stackpol-indexer, copy in /root/stackpol-indexer) and POSTs a snapshot to /api/ingest (Bearer STACK_INGEST_KEY, key file /root/.stackpol-ingest-key). Sources: each game's payout file, IAP + LinkSpin chain-index TierPaid events, Downline Banners chain-index Paid events (sponsor + line), Viral Banner Blitz VBBShop Paid role 0 + Claimed logs read from Polygon (scan cache /root/stackpol-indexer/vbb-chain.json) and on-chain-checked weekly prize transfers from VBB prizes.json, ViralAdBlitz VABShop Paid level 1-5 + Claimed logs (cache vab-chain.json), Earners Corner + PassiveDrip payout ledgers, wallet->username from IAP accounts/positions and LinkSpin accounts. Members are named only when opted in (/root/stackpol-indexer/optin.txt + IAP stack-optin.json).
  • Blog: content/blog/.json, one file per post (title, seoTitle, excerpt, body HTML, cover, tags, publishedAt, updated, faq[]). Same engine as InstantAdPay/LinkSpin blog.js, ported to file storage. Future-dated posts stay hidden until their time. Generators in tools/write_posts_*.py.
  • programs.js: program registry (keys match the indexer); game blurbs are InstantAdPay's own.
  • mockup/: the Oct design mockup (artifact https://claude.ai/artifact/1mN4dCYUcbw7EHicCdejM3).
  • Standing rule (Marty 2026-11-15): every rebuilt network site is added here when it goes live: a programs.js entry, its /earn/ page (automatic from the entry, plus public/img/.jpg 800x420) and an indexer source for its member payouts (house/company wallets excluded). ViralAdBlitz, 5xYourTeam and DownlineHydra added 2026-11-15.
  • Site assistant (2026-11-15): chat widget on every page (public/assets/chat.js + chat.css, loaded from layout.js). chatbot.js holds what it knows (CANNED + FACTS from this repo); chatcore.js, kb.js (kb.json is a MySQL document, see Storage) and netkb.js (the shared network knowledge on the hub, signed as HUB_SITE=stackpol with HUB_SECRET) are the same files as the rebuilt sites. OpenRouter key: Coolify env OPENROUTER_API_KEY. No admin KB editing on Stack POL. Test: node qa/chatbot.test.mjs.
  • Storage (Marty 2026-11-16: "they should live in the database"): MySQL, Coolify stackpol-mysql yw404lxgfkbb5n9s3pxu1hxk (db stackpol, binlog expiry 3 h persisted, in core's hourly dumps). App env DOCSTORE_URL; docstore.js (same file as LinkSpin, skips unchanged writes) keeps the data documents of DATA_DIR (/app/data, no volume) in table docs: stack-index.json (the last indexer snapshot minus at), stack-index-at.json ({at}), kb.json (chatbot entries), netkb-cache.json (network knowledge cache). Loaded before the server listens, so a deploy serves the last totals at once. The ingest API is unchanged. Without DOCSTORE_URL (local only) they are plain files in DATA_DIR.
S
Description
Stack POL: your bag of POL from across the network (stackpol.com)
Readme 11 MiB
Languages
JavaScript 58.8%
HTML 22.2%
Python 17.7%
CSS 1.2%
Dockerfile 0.1%