- Replace fake-site footer with dark-web launch CTA; fix HubChatter inside AppProviders (client crash) - Add /launch, DEPLOY.md, onions:list|status|health, list-onion-urls, install-systemd, onion-status - start.sh CYBERLUX_PREPARE_ONLY; copy pass on satellite pages; Navbar launch link - README: operator cheat sheet, phone Tor note, systemd via install-systemd.sh Made-with: Cursor
529 lines
20 KiB
TypeScript
529 lines
20 KiB
TypeScript
/**
|
||
* In-app search corpus: CyberLux ring routes only (this deployment).
|
||
* Used by /search — no outbound clearnet or third-party onions in the index.
|
||
*/
|
||
|
||
import { FORUM_RINGS } from "@/lib/forumRings";
|
||
import { SHOP_SELLERS } from "@/lib/shopSellers";
|
||
import { SYNDICATE_NODES } from "@/lib/syndicateNetwork";
|
||
import { ZONE_KEYWORD_SUFFIX, type CyberluxZoneKey } from "@/lib/cyberluxZoneLexicon";
|
||
|
||
export type SearchZone = "hub" | "forum" | "exchange" | "wiki" | "syndicate" | "account";
|
||
|
||
export type CyberluxSearchDoc = {
|
||
path: string;
|
||
title: string;
|
||
description: string;
|
||
/** Extra tokens matched by search (lowercase ok) */
|
||
keywords: string;
|
||
zone: SearchZone;
|
||
};
|
||
|
||
const ZONE_LABEL: Record<SearchZone, string> = {
|
||
hub: "Hub storefront",
|
||
forum: "Forum relay",
|
||
exchange: "Exchange relay",
|
||
wiki: "Wiki mirror",
|
||
syndicate: "Syndicate shell",
|
||
account: "Session / account",
|
||
};
|
||
|
||
const STATIC_DOCS: CyberluxSearchDoc[] = [
|
||
{
|
||
path: "/",
|
||
title: "CyberLux hub",
|
||
description:
|
||
"Neon sanctuary storefront: live SKU and vendor telemetry, curated drops, category lattice, terminal vault, encryption theatre, signed mirror rail, forum preview strip, wallet fiction, and Tor-native chrome.",
|
||
keywords:
|
||
"home hub sanctuary storefront candy shop skus vendors drops vault encryption mixer checkout forum preview tor onion mirror bundle wallet ritual grid category lattice telemetry",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/market",
|
||
title: "Candy market (full catalog)",
|
||
description:
|
||
"Layered market chrome: phosphor catalog grid, sidebar ops and trust rails, live SKU analytics, fulfillment pipeline prose, buyer intel annex, cart-to-checkout continuity, vendor hall links, bond-tier fiction.",
|
||
keywords:
|
||
"candy shop market catalog grid cart reviews ratings testimonials skus vendors stalls checkout layers onion analytics operations trust intel escrow pgp bond multisig dispute sla pipeline buyer vetting sku heat category rails",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/market/operations",
|
||
title: "Market — operations & pipeline",
|
||
description:
|
||
"Fulfillment stack fiction: draft cart, committed checkout, vendor ack, opaque tracking hashes, dispute ladder, floor mediators, council multisig releases, SLA tiers, cold-chain QA gates, mirror-coherent order ids.",
|
||
keywords:
|
||
"market ops fulfillment pipeline order-state machine sla vendor-ack ship-window tracking-hash dispute mediator council multisig qa-gate cold-chain bond express standard timeout release moderator queue",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/market/trust",
|
||
title: "Market — trust & escrow",
|
||
description:
|
||
"Four trust layers: collateral bond, chained PGP continuity, timed escrow cooling, two-of-three council; hygiene checklist for fingerprints, rotations, off-platform pressure, finalize scams, mirror bundle alignment.",
|
||
keywords:
|
||
"trust escrow pgp gpg fingerprint bond multisig settlement cold-storage hot-wallet buyer seller cooling finalize rotation signed-cleartext council arbitration key-hygiene phishing mirror scam chargeback",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/market/analytics",
|
||
title: "Market — floor analytics",
|
||
description:
|
||
"Telemetry derived from shopCatalog: category mix, currency histograms, limited-drop counts, rough USD notional — CSS bars only, no chart.js, same build on every onion host.",
|
||
keywords:
|
||
"analytics telemetry histogram category mix currency btc xmr eth usd limited drops skus velocity notional floor stats shopcatalog bars",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/market/intel",
|
||
title: "Market — buyer intelligence",
|
||
description:
|
||
"Threat model copy: stall signals table, hard stops, soft signals, review velocity fraud tells, mirror mismatch, rotation anomalies, cross-links to Void crawler and forum rings.",
|
||
keywords:
|
||
"intel vetting threat-model stall signals phishing scam mirror bundle hard-stop soft-signal review-velocity rating fraud opsec buyer safety crawler forum",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/vendors",
|
||
title: "Vendor hall",
|
||
description: "Vendor hall with bios, ratings, sales lore, and deep links to each stall’s shelf.",
|
||
keywords: "vendors sellers bazaar marketplace stalls handles merchant",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/vendor/apply",
|
||
title: "Apply to vend",
|
||
description: "Vendor onboarding intake — encrypted client queue with reference ids for bond review.",
|
||
keywords: "seller apply vendor stall onboarding application become seller",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/vault",
|
||
title: "The vault",
|
||
description: "Terminal-style vault for loyalty keys, receipts, and returning-buyer perks.",
|
||
keywords: "keys receipts encryption terminal loyalty",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/game",
|
||
title: "Profit simulator",
|
||
description: "Clicker / profit sim tied to wallet lore.",
|
||
keywords: "game clicker profit score arcade",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/mixer",
|
||
title: "Token blender",
|
||
description: "Token blender UI with session log theatre — opacity controls and hop graph.",
|
||
keywords: "mixer monero bitcoin privacy hops opacity",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/drops",
|
||
title: "Limited drops",
|
||
description: "Scarcity-style limited product drops and timers.",
|
||
keywords: "drops lottery limited flash sale urgency",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/checkout",
|
||
title: "Checkout ritual",
|
||
description: "Multi-step checkout flow, BTC verify hook, store credit.",
|
||
keywords: "pay cart order bitcoin crypto txid verify payment",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/sanctuary",
|
||
title: "Sanctuary",
|
||
description: "Calmer landing / refuge page in the hub chrome.",
|
||
keywords: "quiet calm refuge privacy rest",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/support",
|
||
title: "Offering / support",
|
||
description: "Support-adjacent ritual page, multisig notes.",
|
||
keywords: "help support contact offering ritual",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/links",
|
||
title: "Link garden",
|
||
description: "Curated link rows — internal endorsements plus external slots you can vet manually.",
|
||
keywords: "links directory webring endorsements trust reviews",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/webring",
|
||
title: "Webring",
|
||
description: "Retro webring hop between internal pages.",
|
||
keywords: "webring neighbors retro navigation",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/reviews",
|
||
title: "Review blog",
|
||
description: "Satirical review copy about the hub.",
|
||
keywords: "reviews blog rating opinion",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/trust",
|
||
title: "Trust dashboard",
|
||
description: "Heuristic trust dashboard — reputation signals and mirror alignment.",
|
||
keywords: "trust score metrics reputation verify",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/comparison",
|
||
title: "Marketplace comparison",
|
||
description: "Competitive matrix — vendor-selected metrics; read the footnotes.",
|
||
keywords: "compare tables markets chart",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/security-analysis",
|
||
title: "Security analysis",
|
||
description: "Pentest fantasy write-up page.",
|
||
keywords: "security audit analysis report encryption",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/testimonials",
|
||
title: "Testimonials",
|
||
description: "Buyer social proof wall — quotes and scorecards.",
|
||
keywords: "testimonials quotes buyers satisfied",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/presswire",
|
||
title: "Presswire",
|
||
description: "Satirical news feed tied to wallet flags.",
|
||
keywords: "news press wire rumors journalism",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/trees",
|
||
title: "Trees authority",
|
||
description: "Absurdist government trees certification page.",
|
||
keywords: "trees authority government bark certification",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/messages",
|
||
title: "Encrypted comms",
|
||
description: "Read-only chat fiction UI.",
|
||
keywords: "messages chat encrypted comms agent",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/wallets",
|
||
title: "Wallets gallery",
|
||
description: "Hardware wallet marketing pastiche.",
|
||
keywords: "wallets hardware ledger trezor",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/awards",
|
||
title: "Awards",
|
||
description: "Camp accolades page.",
|
||
keywords: "awards badges recognition",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/raffle",
|
||
title: "Raffle",
|
||
description: "Lottery / raffle urgency copy.",
|
||
keywords: "raffle lottery tickets prize odds",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/arb-academy",
|
||
title: "Arb academy",
|
||
description: "Trading / arbitration academy.",
|
||
keywords: "academy arbitrage trading learn course",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/inner-circle",
|
||
title: "Inner circle",
|
||
description: "Gated inner-circle shell — passphrase lore and staged unlock.",
|
||
keywords: "inner circle gate exclusive login",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/conspiracies",
|
||
title: "Conspiracies board",
|
||
description: "Conspiracy-themed lore page.",
|
||
keywords: "conspiracy board rumors theories",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/red-room",
|
||
title: "Red room",
|
||
description: "Restricted horror-themed lounge — enter at your own risk.",
|
||
keywords: "red room horror fiction warning",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/secret-layer",
|
||
title: "Secret layer",
|
||
description: "Hidden layer / password rumor page.",
|
||
keywords: "secret password easter egg layer",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/easter-eggs",
|
||
title: "Easter eggs",
|
||
description: "Hunt hints and meta references.",
|
||
keywords: "easter eggs hunt secrets",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/drop-box",
|
||
title: "Drop box",
|
||
description: "Anonymous drop fiction.",
|
||
keywords: "drop box upload leak",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/search",
|
||
title: "Void crawler (internal index)",
|
||
description:
|
||
"Closed-corpus AND crawler over signed in-app routes — hub, forum, exchange, wiki, syndicate shells, account flows; lexicon fog, zone onions, foreign clearnet and third-party onions excluded by design.",
|
||
keywords:
|
||
"search crawler void index query corpus lexicon tokens zone hub forum exchange wiki syndicate account onion tor internal-only AND tokens route document hit",
|
||
zone: "hub",
|
||
},
|
||
{
|
||
path: "/forum",
|
||
title: "Void Aggregate — forum home",
|
||
description:
|
||
"Ringed rumor ledger: pinned doctrine, per-ring feeds, hot new top sorts, staff locks, submit hooks, chatter spine, Void lexicon, onion relay chrome, distributed board fiction.",
|
||
keywords:
|
||
"forum void aggregate rings board threads posts replies votes hot new top pinned moderation search filter submit chatter relay onion",
|
||
zone: "forum",
|
||
},
|
||
{
|
||
path: "/forum/submit",
|
||
title: "Void Aggregate — new post",
|
||
description: "Submit a thread to a ring.",
|
||
keywords: "submit post create thread publish",
|
||
zone: "forum",
|
||
},
|
||
{
|
||
path: "/forum/handbook",
|
||
title: "Void Aggregate — operator handbook",
|
||
description:
|
||
"Canon table of contents: ring topology, submission contract, moderation ladder cross-links, reputation weight explainer, onion deep-link targets for dedicated forum hidden services.",
|
||
keywords:
|
||
"forum handbook operators canon topology rings doctrine void aggregate moderation reputation toc deep-link onion relay",
|
||
zone: "forum",
|
||
},
|
||
{
|
||
path: "/forum/moderation",
|
||
title: "Void Aggregate — moderation doctrine",
|
||
description:
|
||
"Tiered enforcement fiction: ring-scoped freeze, handle shadow ranking sink, network-wide exile with signed rationale stubs, appeals only through support tickets preserving audit hashes.",
|
||
keywords:
|
||
"forum moderation policy janitor council freeze shadowban exile appeal audit ticket support ban tier staff lock",
|
||
zone: "forum",
|
||
},
|
||
{
|
||
path: "/forum/reputation",
|
||
title: "Void Aggregate — reputation & weight",
|
||
description:
|
||
"Hot decay windows, top log caps, reply-weight with tenure bias, report priors, ring-specific temperature, shop-session commerce bump without global clout inflation.",
|
||
keywords:
|
||
"forum reputation karma weight sorting hot top decay cap reply report prior ring temperature vote brigade",
|
||
zone: "forum",
|
||
},
|
||
{
|
||
path: "/chatter",
|
||
title: "Hub chatter archive",
|
||
description: "Paged index of seeded threads about the main storefront.",
|
||
keywords: "chatter hub archive meta shop gossip",
|
||
zone: "forum",
|
||
},
|
||
{
|
||
path: "/exchange",
|
||
title: "The Exchange",
|
||
description:
|
||
"Stranger gazette classifieds: WTS and WTB stream, submit form, guidelines route, ledger analytics, serif broadsheet chrome, localStorage-backed rows, shared wallet session fiction with hub.",
|
||
keywords:
|
||
"exchange classifieds wts wtb sell buy listings gazette broadsheet column stranger localstorage submit guidelines ledger currency mix freshness",
|
||
zone: "exchange",
|
||
},
|
||
{
|
||
path: "/exchange/guidelines",
|
||
title: "Exchange — posting guidelines",
|
||
description:
|
||
"Posting law: required headline body price fields, prohibited scraper reposts and tracker paste bins, impersonation bans, unmoderated stance with abuse funnel to support and hub widgets.",
|
||
keywords:
|
||
"exchange rules policy guidelines classifieds prohibited paste tracker impersonation abuse support unmoderated field requirements",
|
||
zone: "exchange",
|
||
},
|
||
{
|
||
path: "/exchange/ledger",
|
||
title: "Exchange — ledger view",
|
||
description:
|
||
"Aggregates cyberlux-exchange-v1 local rows: WTS WTB counts, BTC XMR USD tag tallies, newest timestamps, span fiction — identical corpus to the board without external analytics SDKs.",
|
||
keywords:
|
||
"exchange ledger stats volume localstorage analytics wts wtb btc xmr usd timestamp span rows board parity",
|
||
zone: "exchange",
|
||
},
|
||
{
|
||
path: "/barter",
|
||
title: "Ash Pit (barter)",
|
||
description: "Have/want swap floor — goods, skills, data lanes.",
|
||
keywords: "barter swap ash pit trade goods services",
|
||
zone: "exchange",
|
||
},
|
||
{
|
||
path: "/hidden-wiki",
|
||
title: "Scrapbook wiki",
|
||
description: "Scrapbook wiki skin with stub .onion rows and internal CyberLux references.",
|
||
keywords: "hidden wiki directory onion links scrapbook mirror",
|
||
zone: "wiki",
|
||
},
|
||
{
|
||
path: "/darknet-atlas",
|
||
title: "Darknet Atlas",
|
||
description: "Taxonomy atlas: markets, leaks, whistleblowing, privacy, forums — analyst layout.",
|
||
keywords: "atlas taxonomy darknet categories literacy syllabus markets cybercrime leaks",
|
||
zone: "wiki",
|
||
},
|
||
{
|
||
path: "/syndicate",
|
||
title: "Syndicate network map",
|
||
description:
|
||
"Fuchsia operator console: themed /w slug index, topology explainer, routing lore, single Next build, chrome divergence only, persistence and wallet paths unified with hub fiction.",
|
||
keywords:
|
||
"syndicate network relays skins nodes map shells topology routing slug w-route operator console ingress persistence",
|
||
zone: "syndicate",
|
||
},
|
||
{
|
||
path: "/syndicate/topology",
|
||
title: "Syndicate — topology",
|
||
description:
|
||
"Ingress presentation persistence triple: Tor hostname to dedicated root, skin picker on /w/slug, browser storage namespacing, mirror bundle documentation for users.",
|
||
keywords:
|
||
"syndicate topology ingress presentation persistence relay graph network operator hostname skin storage mirror",
|
||
zone: "syndicate",
|
||
},
|
||
{
|
||
path: "/syndicate/routing",
|
||
title: "Syndicate — routing lore",
|
||
description:
|
||
"Dedicated onion rewrites, cookie and header behavior, canonical /w paths inside Next, absolute cross-vertical links, proxy.ts alignment storytelling for status boards.",
|
||
keywords:
|
||
"syndicate routing onion headers cookies mirrors canonical proxy rewrite absolute-path cross-vertical host",
|
||
zone: "syndicate",
|
||
},
|
||
{
|
||
path: "/dashboard",
|
||
title: "Personal dashboard",
|
||
description: "Signed-in profile, wallet snapshot, forum and listing activity counts.",
|
||
keywords: "dashboard account profile stats activity signin",
|
||
zone: "account",
|
||
},
|
||
{
|
||
path: "/sign-in",
|
||
title: "Sign in",
|
||
description: "Client-side session unlock — passphrase and handle for this mirror.",
|
||
keywords: "login signin session passphrase handle",
|
||
zone: "account",
|
||
},
|
||
{
|
||
path: "/sign-up",
|
||
title: "Create account",
|
||
description: "Register a local handle and passphrase.",
|
||
keywords: "register signup create account identity provision",
|
||
zone: "account",
|
||
},
|
||
{
|
||
path: "/account/hidden-services",
|
||
title: "Hidden services — account on every mirror",
|
||
description:
|
||
"Sign up or import a portable identity so forum, exchange, and wiki onion hosts share the same handle in-browser.",
|
||
keywords: "onion mirror hostname import export portable identity signup hidden services",
|
||
zone: "account",
|
||
},
|
||
];
|
||
|
||
const RING_DOCS: CyberluxSearchDoc[] = FORUM_RINGS.map((r) => ({
|
||
path: `/forum/ring/${r.slug}`,
|
||
title: `Void Aggregate · r/${r.shortName}`,
|
||
description: `${r.title} — ${r.about}`,
|
||
keywords: `${r.slug} ${r.shortName} ring board subreddit forum thread posts void aggregate tor onion relay hot new top ${r.title} ${r.about}`,
|
||
zone: "forum" as const,
|
||
}));
|
||
|
||
const VENDOR_DOCS: CyberluxSearchDoc[] = SHOP_SELLERS.map((seller) => ({
|
||
path: `/vendor/${seller.slug}`,
|
||
title: `Vendor stall · ${seller.handle}`,
|
||
description: `${seller.tagline} — ${seller.bio}`,
|
||
keywords: `${seller.slug} ${seller.handle} vendor stall seller merchant ${seller.specialty} ${seller.tagline} ${seller.bio}`,
|
||
zone: "hub" as const,
|
||
}));
|
||
|
||
const SYNDICATE_DOCS: CyberluxSearchDoc[] = SYNDICATE_NODES.map((n) => ({
|
||
path: `/w/${n.slug}`,
|
||
title: `Syndicate relay · ${n.slug}`,
|
||
description: n.tagline,
|
||
keywords: `${n.slug} syndicate relay skin themed shell node w-route chrome ingress operator cyberlux tor onion ${n.tagline}`,
|
||
zone: "syndicate" as const,
|
||
}));
|
||
|
||
function enrichZoneKeywords(doc: CyberluxSearchDoc): CyberluxSearchDoc {
|
||
const suffix = ZONE_KEYWORD_SUFFIX[doc.zone as CyberluxZoneKey] ?? "";
|
||
return {
|
||
...doc,
|
||
keywords: `${doc.keywords} ${suffix}`.replace(/\s+/g, " ").trim(),
|
||
};
|
||
}
|
||
|
||
/** Full corpus — dedupe by path, append per-zone lexicon for richer matching */
|
||
function mergeDocs(): CyberluxSearchDoc[] {
|
||
const map = new Map<string, CyberluxSearchDoc>();
|
||
for (const d of [...STATIC_DOCS, ...RING_DOCS, ...VENDOR_DOCS, ...SYNDICATE_DOCS].map(enrichZoneKeywords)) {
|
||
map.set(d.path, d);
|
||
}
|
||
return [...map.values()].sort((a, b) => a.path.localeCompare(b.path));
|
||
}
|
||
|
||
export const CYBERLUX_SEARCH_INDEX: CyberluxSearchDoc[] = mergeDocs();
|
||
|
||
/** Unique keyword chips for Void Crawler atmosphere UI (deduped, sorted). */
|
||
export const VOID_LEXICON_WORDS: string[] = (() => {
|
||
const s = new Set<string>();
|
||
for (const d of CYBERLUX_SEARCH_INDEX) {
|
||
for (const raw of d.keywords.split(/\s+/)) {
|
||
const t = raw.trim().toLowerCase().replace(/[^\w-]/g, "");
|
||
if (t.length > 2 && t.length < 32) s.add(t);
|
||
}
|
||
}
|
||
return [...s].sort((a, b) => a.localeCompare(b));
|
||
})();
|
||
|
||
export const CYBERLUX_SEARCH_INDEX_SIZE = CYBERLUX_SEARCH_INDEX.length;
|
||
|
||
export function searchZoneLabel(zone: SearchZone): string {
|
||
return ZONE_LABEL[zone];
|
||
}
|
||
|
||
/**
|
||
* AND search on title, description, keywords, and path (all lowercased).
|
||
*/
|
||
export function searchCyberluxIndex(raw: string, limit = 80): CyberluxSearchDoc[] {
|
||
const q = raw.trim().toLowerCase();
|
||
if (!q) return [];
|
||
const tokens = q.split(/\s+/).filter((t) => t.length > 0);
|
||
if (tokens.length === 0) return [];
|
||
|
||
return CYBERLUX_SEARCH_INDEX.filter((doc) => {
|
||
const hay = `${doc.title}\n${doc.description}\n${doc.keywords}\n${doc.path}`.toLowerCase();
|
||
return tokens.every((t) => hay.includes(t));
|
||
}).slice(0, limit);
|
||
}
|