Public
IS-REAL AI client acquisition and sales automation OS
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

IS-REAL AI Sales OS — Market Hunter

A production market-intelligence worker that continuously scans public web sources for genuine furniture-buying opportunities in Nigeria (Lagos, Ogun, Ibadan, Abuja), qualifies them with Gemini, scores purchase intent, and stores them as actionable sales leads — with a live dashboard and WhatsApp outreach links.

No fabricated buyers, contacts, prices, evidence, or opportunities. Ever. All contact details and values come only from public evidence surfaced by the hunter; anything not publicly stated is stored as empty.

Live URL

Dashboard + API: https://is-real-sales-os.val.run/

What it does

Rendering mermaid diagram...
  1. Discover — runs targeted searches of public web sources for buyer signals across product categories (sofas, wardrobes, beds, kitchen cabinets, office/hotel/salon/construction furniture). Surfaces only genuinely public pages.
  2. Qualify & score — batches evidence to Gemini, which returns strict JSON: opportunity requirement, location, optional contact fields (only when public), 0–100 intent score, optional opportunity value, confidence, and reject reasons.
  3. Store — qualified leads (intent ≥ 50) are written to the val's SQLite DB with a SHA-256 deduplication key; re-surfaced duplicates are counted and skipped, not re-stored. Hunt history is recorded too.
  4. Act — each lead carries a wa.me outreach link to IS-REAL's business WhatsApp 0916 072 6032, prefilled with an evidence-driven message referencing the prospect's requirement and IS-REAL's site.

Files

FileTypeRole
market-hunter.tsintervalScheduled worker, runs on cron, logs structured results
lib/hunter.tsscriptOrchestrator: discovery → Gemini → storage, SQLite schema, query helpers
lib/sources.tsscriptPublic-source discovery + parsing
lib/gemini.tsscriptGemini qualification/scoring (reads GEMINI_API_KEY)
index.tshttpHono dashboard + API (manual hunt, leads, hunts, stats)

Configuration (environment variables)

  • GEMINI_API_KEY (required) — Google AI Studio key used to qualify/score leads. Read securely at runtime via Deno.env.get("GEMINI_API_KEY") — never hardcoded.
  • MARKET_SOURCES (optional) — comma-separated direct public URLs to hunt instead of search.
  • MIN_INTENT_SCORE (optional, default 50) — minimum intent score to store a lead.
  • QUERY_LIMIT (optional, default 60) — max search queries per hunt.

👉 Add GEMINI_API_KEY here: https://www.val.town/x/isrealmodernfurniture/is-real-ai-sales-os/environment-variables?key=GEMINI_API_KEY

HTTP API

  • GET / — live dashboard (real leads + hunt history)
  • POST /api/hunt — run a market hunt now (manual trigger)
  • GET /api/leads?status=&location=&q=&order= — list leads
  • GET /api/leads/:id — single lead
  • POST /api/leads/:id/status — set lead status (form status=new|contacted|quoted|closed|rejected)
  • GET /api/hunts — hunt history
  • GET /api/stats — counts by status/location + latest hunt
  • GET /api/config — config status

Schedule

The worker runs automatically on a cron (every 4 hours, UTC). It can also be triggered from the dashboard / POST /api/hunt, or run manually.

Verified behaviors

  • Gemini API key read via Deno.env.get() (secure). ✓
  • Real public-source discovery + Gemini qualification + scoring. ✓
  • SHA-256 deduplication; duplicates counted, not stored twice. ✓
  • Leads + hunt history persisted in project-scoped SQLite. ✓
  • Dashboard renders saved leads and latest hunt from the DB. ✓
  • WhatsApp outreach deep links use IS-REAL business line 09160726032 (2349160726032) and reference https://is-real-modern-furniture-gr29qv.v2.appdeploy.ai/
  • Strict no-fabrication rules enforced in the Gemini prompt and storage layer. ✓