尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗An AI assistant that answers a small business's customers on WhatsApp, Instagram and Facebook Messenger, around the clock. It replies from the business's own knowledge base, takes and manages bookings, sends documents, flags hot leads, and hands the chat to a person when it should. Owners run it from a web dashboard: inbox, knowledge, bookings, templates and settings.
Built solo end to end: multi-tenant backend, AI reply loop, dashboard, landing page (captus.cc), and a test harness that runs whole conversations against a real model.
Full feature list and backlog: FEATURES.md.
flowchart LR
C[Customer on WhatsApp / Instagram / Messenger] -->|Meta webhook| W[Fastify /webhook<br/>signature check, dedupe]
W -->|debounced job| Q[(BullMQ on Redis)]
Q --> K[Reply worker]
K -->|RAG: pgvector| DB[(Postgres<br/>Row Level Security per business)]
K -->|tools: book, cancel, send doc,<br/>hand over, hot lead| DB
K <-->|function calling,<br/>model fallback chain| G[Gemini]
K -->|Graph API| C
D[Owner dashboard<br/>Next.js + Clerk] -->|REST| A[Fastify API] --> DB
fb_… / ig_…) in place of a phone number, so the worker, bookings and inbox are shared. Only sending and the webhook parser know the difference.src/lib/llmFallback.ts).npm run eval scores the assistant on 52 customer messages (grounded answers, made-up-fact traps, Malay/Chinese, complaints, prompt injection, bookings, cross-business leaks) with rule checks plus an LLM judge, and reports pass rates, invented-fact rate, handover recall, latency and tokens. It caught small hallucinations ("our signature latte") and overpromising, and showed the trade-off of the prompt fix. Results and what they mean: docs/eval.md.e2e/ boots the real backend and workers against throwaway Postgres + Redis in Docker, a mock Meta Graph API and the real Gemini. 54 conversation scenarios, failure injection (Postgres down, Redis wiped, model retired, sends refused) and a load test of 50 chats at once.| Path | What |
|---|---|
src/ | Backend: Fastify API + BullMQ workers, one process (src/main.ts) |
src/routes/ | Meta webhook, dashboard API, admin API, Google OAuth, document downloads |
src/lib/ | AI reply loop (gemini.ts, llmFallback.ts, systemPrompt.ts), booking, templates, reminders, follow-ups, WhatsApp / Messenger clients (whatsapp.ts, messenger.ts, channels.ts) |
src/db/ | Postgres access + schema.sql (every tenant table uses Row Level Security) |
src/scripts/ | CLI helpers (onboard, ingest, link-user, status, create-reminder-template) |
dashboard/ | Owner dashboard (Next.js + Clerk). See dashboard/README.md |
landing/ | Static landing page for captus.cc |
e2e/ | End-to-end stress harness (mock Meta, real Gemini) |
docs/archive/ | Original architecture and MVP plan, kept for reference only |
docker compose up -d # Postgres (pgvector) + Redis
cp .env.example .env # fill in WhatsApp, Gemini and Clerk keys
npm install
npm run migrate
npm run dev # API on :3000
npm run dev:worker # workers (separate terminal)
To get Meta's webhooks to your machine, run a tunnel (e.g. cloudflared tunnel --url http://localhost:3000). Then set <tunnel>/webhook as the callback in the Meta app.
npm run typecheck
npm run e2e # all phases; needs Docker Desktop
npm run e2e scenarios # or: failures | load
E2E_ONLY=booking npm run e2e # one scenario by name
npm run eval # answer-quality eval, see docs/eval.md
The e2e run uses the real GEMINI_API_KEY, and a full run uses a large share of the free daily quota.
| Piece | Where |
|---|---|
| Backend + workers | Render free web service captus-backend (Singapore), api.captus.cc, from render.yaml |
| Redis | Render free Key Value captus-redis. No persistence: queued jobs are lost on restart. Reminders are rebuilt from the DB at startup. |
| Postgres | Neon free, ap-southeast-1 |
| Dashboard | Vercel project captus-cc, app.captus.cc |
| Landing | Vercel, captus.cc |
| Uptime | UptimeRobot pings https://api.captus.cc/health every 5 min (keeps Render's free tier awake) |
Pushing to main deploys everything. Migrations run on every boot (they're idempotent). Operator alerts show up in the Render logs as [OPS ALERT] and are sent to OWNER_NOTIFY_NUMBER on WhatsApp.