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.
Lead qualifying from any data source. Point your form tools and webhooks at one endpoint (it accepts JSON POST bodies), and AI researches every lead on the live web and scores it against your ideal customer profile.
Rendering mermaid diagram...
- Click Remix
- Swap your own criteria into
PROMPT.md— keep the output fields - POST lead data to this val's URL from any source. The same URL is your dashboard — watch leads drop in, get researched, and get scored.
A Hono backend serves the webhook, a JSON API, and a client-side React dashboard.
backend/index.ts— routes.POST /stores any JSON payload and responds instantly (add query params to tag sources, e.g.?source=signup-page); scoring runs in the background.GET /serves the dashboard,GET /api/leadsfeeds it.backend/agent.ts— GPT-5 with web search researches each lead and returns{name, company, score, reasoning}. Runs on Val Town's built-in OpenAI, so there are no API keys to set up (it's rate-limited; setOPENAI_API_KEYto use your own account for real volume). Leads with anemailorgithub_usernameare first enriched (person, LinkedIn, company, work history) via Val Town's People Data Labs proxy — Pro includes $10/month of matches.backend/db.ts— one SQLite row per lead:input_data(what you sent),output_data(what the AI concluded). Add fields toPROMPT.mdand they show up in the dashboard.backend/notify.ts— set theSLACK_WEBHOOK_URLenv var to get a Slack message the moment a lead scores 80+; without it, nothing happens.frontend/— the React dashboard: leads sorted by score (green 80+, yellow 50-79, gray below), click one for detail, and a built-in webhook tester. Edit components infrontend/components/.shared/types.ts— theLeadshape both sides share.
Want leads from GitHub activity on your repos? Remix github-leads instead — the same engine plus a cron that watches your GitHub orgs.
The dashboard is gated with std/oauth: only members of the org that owns the val can see it, so your remix is private automatically. The webhook routes stay public so external systems can submit leads. This template's own dashboard is left public as a live preview.