Codync
免費、開源的 1:1 替代方案,取代 Grok Bot 與 Muse。從 iPhone、Mac 或 Linux 桌面將 Claude Code、Codex、Cursor 與 40+ 程式碼代理人作為持續機器人傳訊。群組聊天、主題串…
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Open-source Next.js platform for RAG-powered AI chatbots: 100+ models, pgvector search, visual config UI, voice, WhatsApp, and MCP tools. MIT licensed.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Before setup, decide which architecture fits your use case. ChatRAG supports two modes with the same codebase:
One Knowledge Base, Multiple Users
┌─────────────────────────┐
│ Application │
├─────────────────────────┤
│ Shared Knowledge Base │
│ (All users access same │
│ documents) │
├─────────────────────────┤
│ User A │ User B │ User C│
│ Chats │ Chats │ Chats │
│(Private)│(Private)│(Private)│
└─────────────────────────┘
Perfect For:
Features:
Isolated Workspaces, Team Collaboration
┌──────────────────────────────┐
│ Application │
├──────────────────────────────┤
│ User A │ User B │ Team C │
│ Personal │Personal │Shared │
│ Workspace │Workspace│Workspace│
│(Auto) │(Auto) │(Created)│
├───────────┼─────────┼────────┤
│Private KB │Private KB│Team KB │
└──────────────────────────────┘
Perfect For:
Features:
Are you building a SaaS product with multiple customers?
├─ YES → Multi-Tenant Mode
│ └─ Each customer needs isolated data
│
└─ NO → Does everyone access the same knowledge base?
├─ YES → Single-Tenant Mode
│ └─ Perfect for chatbots, docs, assistants
│
└─ NO → Need team collaboration?
├─ YES → Multi-Tenant Mode
│ └─ Teams with shared workspaces
│
└─ NO → Single-Tenant Mode
└─ Simplest option
| Feature | Single-Tenant | Multi-Tenant |
|---|---|---|
| Knowledge Base | Shared globally | Isolated per organization |
| Chat History | User-isolated | User + Org isolated |
| Team Management | ❌ No | ✅ Roles (owner/admin/member/viewer) |
| Document Isolation | ❌ No | ✅ Complete isolation |
| Storage Quotas | ❌ No | ✅ Per-organization |
| Subscriptions | User-level | Organization-level |
| Team Invitations | ❌ No | ✅ Email-based |
| Setup Time | ~10 minutes | ~20 minutes |
| Database Tables | 14 tables | 18 tables |
| Best For | Single product/service | SaaS platforms |
📖 Need More Details? See the complete comparison and implementation reference in README_DEPLOYMENT_MODES.md.
🚀 Ship in Minutes
Visual config UI lets you launch a production-ready chatbot in under 10 minutes
💪 Enterprise Ready
Dual-mode architecture with RLS, real-time updates, and battle-tested security
♾️ Unlimited Deployment
Build unlimited chatbots for yourself or clients with full white-label support
Language Models
Advanced Features
HNSW-Optimized Vector Search - Lightning-fast semantic search
| Feature | Description |
|---|---|
| Vector Search | HNSW indexes with 15-28x speed improvement |
| Query Time | <50ms for semantic search |
| Document Support | PDF, DOCX, TXT, HTML, RTF, EPUB |
| Smart Processing | Auto-chunking with configurable overlap |
| Embeddings | 1536-dimensional vectors (OpenAI) |
| Pure Semantic | Simplified for better accuracy |
✅ Node.js >=20.9.0 and npm
✅ Supabase account (free tier works)
✅ OpenAI API key (for embeddings)
✅ At least one AI provider API key
For: AI Twins, Product Documentation, Internal Knowledge Bases
git clone https://github.com/areia-ai/chatrag.git
cd chatrag
npm install
Option A: Interactive (Recommended)
npm run configure-deployment
# Select "1" for Single-Tenant
# Follow prompts for API keys
Option B: Manual
# Create .env.local with:
NEXT_PUBLIC_CHATRAG_DEPLOYMENT_MODE=single-tenant
# Database
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# AI
OPENAI_API_KEY=your_openai_key
OPENROUTER_API_KEY=your_openrouter_key
# Option 1: Automatic
npm run db:setup
# Option 2: Manual via Supabase Dashboard
# 1. Go to: https://supabase.com/dashboard/project/YOUR_PROJECT/sql/new
# 2. Copy contents of: supabase/single-tenant-setup.sql
# 3. Paste and execute
# Start configuration UI (optional but recommended)
npm run config # http://localhost:3333
# Start your chatbot
npm run dev # http://localhost:3000
✅ Done! Your single-tenant chatbot is ready. All users will access the same knowledge base with private chat history.
For: SaaS Products, Enterprise Deployments, Agency Solutions
git clone https://github.com/areia-ai/chatrag.git
cd chatrag
npm install
Option A: Interactive (Recommended)
npm run configure-deployment
# Select "2" for Multi-Tenant
# Follow prompts for API keys
# Enable multi-tenant features when asked
Option B: Manual
# Create .env.local with:
NEXT_PUBLIC_CHATRAG_DEPLOYMENT_MODE=multi-tenant
# Multi-Tenant Features
ENABLE_ORGANIZATIONS=true
ENABLE_TEAM_INVITES=true
ENABLE_STORAGE_QUOTAS=true
ENABLE_USAGE_ANALYTICS=true
# Database
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# AI
OPENAI_API_KEY=your_openai_key
OPENROUTER_API_KEY=your_openrouter_key
# Option 1: Automatic
npm run db:setup
# Option 2: Manual via Supabase Dashboard
# 1. Go to: https://supabase.com/dashboard/project/YOUR_PROJECT/sql/new
# 2. Copy contents of: supabase/multi-tenant-setup.sql
# 3. Paste and execute
# Start configuration UI (optional but recommended)
npm run config # http://localhost:3333
# Start your chatbot
npm run dev # http://localhost:3000
Auto-Personal Organizations:
Team Workspaces:
// Users can create team workspaces via UI or API
POST /api/organizations
{
"name": "Acme Corp",
"slug": "acme-corp"
}
✅ Done! Your multi-tenant platform is ready. Users get personal workspaces automatically and can create team workspaces.
Learn More:
Support for the latest reasoning-capable AI models:
| Model | Method | Configuration |
|---|---|---|
| OpenAI o1/o3 | Effort levels | low / medium / high |
| Claude 3.7+ | Token-based | Up to 32k reasoning tokens |
| DeepSeek R1 | Dual method | Effort + tokens |
| Gemini Thinking | Token-based | Configurable limits |
Configure globally or per-message:
NEXT_PUBLIC_REASONING_ENABLED=true
NEXT_PUBLIC_DEFAULT_REASONING_EFFORT=medium
NEXT_PUBLIC_MAX_REASONING_TOKENS=8000
Document Processing
Intelligent chunking with configurable overlap for optimal context
HNSW Search
15-28x faster with production-optimized indexes (m=64, ef=200)
Semantic Matching
Pure vector similarity for accurate, relevant results
Dual-Provider Architecture - Maximum flexibility and reliability
// Automatically selects based on config
WHATSAPP_PROVIDER=koyeb // or flyio
Features:
Access at http://localhost:3333 to configure:
Organizations & Workspaces:
Team Collaboration:
Data Isolation:
Subscription Management:
Your RAG_SYSTEM_PROMPT MUST include {{context}}:
You are an AI assistant with access to documents.
Context:
{{context}}
Answer based on the context above.
⚠️ Without {{context}}, RAG won't work!
# Embedding model (best performance)
OPENAI_EMBEDDING_MODEL=text-embedding-3-small
# WhatsApp provider (choose koyeb or flyio)
WHATSAPP_PROVIDER=flyio
| Metric | Traditional RAG | ChatRAG (HNSW) | Improvement |
|---|---|---|---|
| Single Query | 100-500ms | <50ms | 🚀 15-28x |
| 10 Concurrent Users | 800-2000ms | <100ms | 🚀 20x |
| 100k Documents | 1-3 seconds | <200ms | 🚀 15x |
| Accuracy | 95% | 98% | ✨ +3% |
chatrag/
├── src/
│ ├── app/ # Next.js app router
│ ├── components/ # React components
│ └── lib/ # Core utilities
│ ├── mcp/ # MCP integration
│ └── whatsapp/ # WhatsApp providers
├── voice-agent/ # Real-time voice service (LiveKit)
├── baileys-whatsapp/ # WhatsApp integration service
├── scripts/
│ └── config-ui/ # Visual config UI
├── supabase/
│ ├── single-tenant-setup.sql
│ └── multi-tenant-setup.sql
└── AGENTS.md # Canonical AI assistant guide
Single-Tenant (14 tables):
document_chunks - Vector embeddingsdocuments - File metadatachats - Conversationsfolders - Organizationsubscriptions - PaymentsMulti-Tenant (18 tables):
organizations - Workspacesorganization_members - Team with rolesteam_invitations - Invitation systemtenant_usage - Usage trackingREADME_DEPLOYMENT_MODES.mdChatRAG is optimized for AI-assisted development. Use:
Claude Code
CLAUDE.md imports AGENTS.md, so Claude Code picks up the rules automatically.
Cursor IDE
# Cursor reads AGENTS.md automatically.
# To pin it as a Project Rule instead:
mkdir -p .cursor/rules
cp AGENTS.md .cursor/rules/chatrag.md
Windsurf IDE
# Add as a Workspace Rule
# Copy relevant sections from AGENTS.md
# into Windsurf's Rules settings
Other AI Tools (Copilot, Codeium, Gemini, etc.)
# Reference AGENTS.md manually
# Copy relevant sections when prompting
💡 Tip: AGENTS.md contains all the context agents need. Adapt to your tool's rules format if needed.
If you ever see UI jank during heavy local dev, you can temporarily enable these env flags, then restart npm run dev:
# Disable verbose console spam from debugging
NEXT_PUBLIC_DISABLE_DEBUG_LOGS=true
# Reduce animations during profiling
NEXT_PUBLIC_REDUCED_MOTION=true
# Opt-in when profiling component render times
NEXT_PUBLIC_ENABLE_PERF_MONITOR=false
Best practices that prevent re-renders:
useShallow from zustand/react/shallow instead of subscribing to the whole store.NEXT_PUBLIC_CHATRAG_DEPLOYMENT_MODE in .env.localENABLE_ORGANIZATIONS=true and other flags are setnpm run db:setup again with correct mode{{context}} exists in RAG_SYSTEM_PROMPTtext-embedding-3-smallsupabase/fix-multi-tenant-rls.sqlENABLE_ORGANIZATIONS=truePull requests are welcome. Read CONTRIBUTING.md first, and AGENTS.md if you're pointing an AI agent at the code. Report security issues privately as described in SECURITY.md, not in a public issue.
ChatRAG is released under the MIT License. Use it, change it, ship it to clients, or build a product on it, commercial or not. Keep the copyright notice and license text in your copies.
The license covers the code, not the ChatRAG name or logo. If you publish or sell your own version, give it its own name. See TRADEMARKS.md.
Built with amazing technologies:
Built with 🧡 for developers who ship fast