尚未偵測到更新。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.