new-term-radar
Daily radar for new AI terms: names of new models, products and repos, caught on X, Hugging Face, GitHub and sitemaps before keyword tools list them.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證AI lead triage, call prep and follow-ups for real-estate sales (Next.js, Gemini/Groq, Supabase)
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗AI lead triage and call follow-up for real-estate salespeople. Paste in an inbound lead and the app tells you how good it is and why, what the customer wants, and what to do next. It also prepares you for the call, and after the call it turns your notes into a scheduled follow-up so no promise gets dropped.
| Requirement | Where |
|---|---|
| Lead intake form (name, location, requirement, budget, timeline, message) | + New lead → components/IntakeForm.tsx |
| AI analysis: summary, intent, requirements, objections, next action, suggested response | lib/prompts.ts → lib/leads.ts#analyzeLead → Analysis tab |
| Priority: score 0–100, Hot/Warm/Cold, urgency, plus reasons for the score | Same analysis call; the list is grouped and sorted in components/LeadList.tsx |
| Conversational interface grounded in the lead | Chat tab, streamed (app/api/leads/[id]/chat) |
| Scannable display | Cards, badges, bullets and tabs; each tab fits one screen |
| My feature: Call Prep + Post-Call Follow-up | Call tab, "Follow-ups due" group, Activity tab |
Analysis tells you which lead matters, but deals are lost on the call and especially in the follow-up ("I'll send the yield sheet by Thursday"… and then nothing). This feature covers the whole call:
flowchart LR
subgraph Browser
UI["page.tsx<br/>LeadList · LeadDetail<br/>(tabs: Analysis / Call / Chat / Activity)"]
end
subgraph "Next.js on Vercel (server only)"
API["API routes<br/>app/api/**/route.ts"]
LOGIC["lib/leads.ts<br/>analyze · call prep · call notes"]
PROMPTS["lib/prompts.ts<br/>system prompts · rubric · delimiters"]
AI["lib/ai.ts<br/>Gemini → Groq fallback<br/>JSON + Zod + retry · streaming"]
DB["lib/db.ts<br/>server-only"]
end
GEM[(Gemini API)]
GROQ[(Groq API)]
SUPA[(Supabase Postgres<br/>leads · events)]
UI -- "fetch JSON / text stream" --> API
API --> LOGIC
LOGIC --> PROMPTS
LOGIC --> AI
LOGIC --> DB
AI -- "1st try" --> GEM
AI -. "on error / 429 / timeout" .-> GROQ
DB --> SUPA
NEXT_PUBLIC_ variables), lib/db.ts imports server-only, and Supabase has row-level security on with no policies, so the public anon key can do nothing.lib/leads.ts.leads holds the form fields, analysis jsonb, plus score, tag and urgency as columns for sorting, call_prep jsonb, last_call jsonb, follow_up_date, follow_up_status, and chat jsonb.events holds the activity timeline.supabase/schema.sql.| Method & path | Does |
|---|---|
GET /api/leads | All leads |
POST /api/leads | Save the lead, then analyze it. If the AI fails, the lead is still saved and the error is shown |
GET /api/leads/:id | One lead + its timeline events |
PATCH /api/leads/:id | Mark follow-up done (the only manual edit) |
POST /api/leads/:id/analyze | Re-analyze |
POST /api/leads/:id/call-prep | Generate call prep |
POST /api/leads/:id/call-notes | Process notes → rescore, commitments, follow-up date, message |
POST /api/leads/:id/chat | Streamed chat reply (plain text); DELETE clears the chat |
POST /api/seed | Reset to 6 sample leads, analyzed by the real AI |
GEMINI_MODEL, default gemini-3.8-flash). Fallback: Groq (GROQ_MODEL, default openai/gpt-oss-120b).fetch, no SDKs. That's about 160 lines in lib/ai.ts.retry-after time it's given (up to 20 s) and retries once. If both fail, the user sees "The AI service is unavailable right now… try again in a minute".Structured output. Analysis, call prep and call notes all ask for JSON. Each provider's JSON mode is switched on, and Zod validates the exact shape: types, 0–100 range, enums, and array lengths (exactly 3 talking points, for example). If validation fails, the model gets its own output plus the specific errors and is asked once to correct it. A second failure shows a friendly error, so retries never loop.
Prompts (lib/prompts.ts):
score_reasons[] explains each score.follow_up_in_days. The code computes the date (LLMs are unreliable at calendar math), and the prompt includes today's date and weekday in India time.Safety and edge cases:
<customer_message> / <call_notes> delimiters, which the prompt says are data, never instructions. Any closing tag the customer writes inside their own text is removed. Injection attempts lower the score. Both injection tests in the seed and live tests scored ≤5 and were flagged.[placeholders] or "I'll confirm" instead.npm install
cp .env.example .env.local # then fill in the 4 keys, see docs/DEPLOY.md
npm run dev # http://localhost:3000, then click "Load samples"
npm run test:ai # 11 offline tests: fallback, retry, streaming (no keys needed)
Create the tables once by pasting supabase/schema.sql into the Supabase SQL Editor. Full setup and deployment: docs/DEPLOY.md.
npm run test:ai): 11 tests that fake fetch. They cover Gemini OK; Gemini 429 → Groq; Gemini key missing → Groq; Groq 429 → wait and retry; both fail → friendly error; JSON inside Markdown code fences; malformed JSON → one retry; wrong shape twice → error; Gemini streaming; Groq streaming fallback; an SSE event split across two network reads.fetch. It's small and explainable, and the model names are env vars, which mattered once both defaults were retired.gemini-3.8-flash (it resets at midnight Pacific, and the quota is per Google project, so local and live share it). After that, every request falls back to Groq: about 0.3 s for the rejected Gemini call plus about 1 s for Groq. The timeline shows "via groq". Answers can differ slightly between providers.properties table (price/sqft, parking, RERA, amenities) passed into the prompts, so the AI fills placeholders with facts instead of guessing.messages table for chat, and reminders when follow-ups are due (email or WhatsApp).app/page.tsx two-pane UI, state, "Load samples"
app/api/**/route.ts thin API routes (see table above)
components/ LeadList · LeadDetail (tabs) · IntakeForm · CallPrep · PostCall · ChatPanel · Timeline · ui
lib/ai.ts Gemini/Groq calls, fallback, JSON validation + retry, streaming
lib/prompts.ts all prompts, rubric, injection delimiters, length caps
lib/leads.ts analyzeLead · generateCallPrep · processCallNotes
lib/db.ts Supabase queries (server-only)
lib/schemas.ts Zod schemas + shared types + isFollowUpDue
lib/seed-data.ts 6 sample leads (+ call notes for the overdue one)
supabase/schema.sql tables, indexes, RLS
scripts/test-ai.ts offline tests
docs/DEPLOY.md setup and deployment guide
I used two AI tools, and I want to be clear about who did what.
Kimi (Moonshot AI) helped me write the product brief. I described the assignment and my ideas, and used Kimi to turn them into a detailed specification: the requirements, my own feature (Call Prep and Post-Call Follow-up), the stack, the AI design rules (structured JSON + Zod, Gemini → Groq fallback, prompt-injection defense, a scoring rubric based on budget, timeline, specificity and buying signals), and a step-by-step way of working with a commit and a test after each step.
Claude Code (Anthropic) was my AI pair programmer for the build.
What I did:
gemini-3.8-flash despite its free-tier limit.What Claude Code did: wrote the code, prompts, tests and documentation, ran the offline and live tests, and created the GitHub repo at my request. Live testing surfaced four issues: retired default models, the model asserting facts it couldn't know, Gemini's daily free-tier quota, and Groq's per-minute token limit. Each was fixed and is described under Testing above.