Comprehensive AI Chatbot Management Platform with Advanced RAG Features
Features โข Quick Start โข Documentation โข Roadmap โข Contributing
CBase is a production-ready AI chatbot management platform featuring advanced RAG (Retrieval-Augmented Generation) capabilities, inspired by Chatbase's legacy RAG learning chatbots. Build, train, and deploy intelligent AI agents with comprehensive knowledge bases, analytics, and real-time testing capabilities.
- ๐ง Advanced RAG System - Auto-training with document ingestion, vector embeddings, and semantic search
- ๐ค Agent Management - Complete lifecycle management for AI chatbots
- ๐ Analytics Dashboard - Real-time metrics, insights, and performance tracking
- ๐ฌ Live Playground - Interactive testing environment with RAG-enhanced responses
- ๐ Chat Logs - Comprehensive conversation history and export capabilities
- โ๏ธ Settings & Integrations - Database integrations (Supabase, Neon), S3 storage, and more
Train your AI agents with custom knowledge sources:
- Multiple Source Types: Text, files (PDF, DOCX), URLs, Q&A pairs
- Smart Text Processing: Overlapping chunk segmentation with boundary detection
- Vector Embeddings: 1536-dimensional vectors via OpenAI-compatible API
- Semantic Search: Cosine similarity-based retrieval with relevance scoring
- Batch Training: Process multiple sources efficiently
- Real-time Status: Monitor training progress and job status
Complete control over your AI chatbots:
- Full CRUD Operations: Create, read, update, delete agents
- Configuration: System prompts, models (GPT-4, GPT-3.5), temperature, tokens
- Conversation Starters: Pre-defined quick replies for users
- Constraints: Rate limiting, visibility controls, max length settings
- Status Tracking: Active, training, needs retraining indicators
- Templates: Pre-built agent templates for common use cases
Understand your chatbot performance:
- Message Analytics: Total counts, user/bot distribution, trends over time
- Topic Analysis: Category breakdown and trend identification
- Signal Scores: Quality metrics and threshold alerts
- Performance Metrics: Response times, success rates, error tracking
- Emoji Usage: Sentiment analysis and usage patterns
- Custom Reports: Export analytics as CSV, PDF, or JSON
Test and refine your agents:
- Live Chat Interface: Real-time AI responses with streaming
- RAG Toggle: Enable/disable knowledge retrieval on-the-fly
- Configuration Panel: Adjust settings without leaving the playground
- System Prompt Editor: Inline editing with preview
- Export Results: Save test sessions for analysis
- Debug Mode: View RAG context and relevance scores
Beautiful, accessible interface:
- Dark Mode: Purple/indigo themed dark interface (default)
- Responsive Design: Optimized for desktop, tablet, and mobile
- Accessibility: WCAG 2.1 AA compliant
- Smooth Animations: Framer Motion powered interactions
- Loading States: Skeleton loaders and progress indicators
- Toast Notifications: User-friendly feedback system
- Node.js 18.x or 20.x LTS
- pnpm 10.4.1 or higher
- MySQL 8.0+
- OpenAI API Key or compatible endpoint
# Clone the repository
git clone https://github.com/o9nn/cbase.git
cd cbase
# Install dependencies
pnpm install
# Configure environment
cp .env.example .env
# Edit .env with your configuration
# Run database migrations
pnpm run db:push
# Start development server
pnpm run devThe application will be available at http://localhost:3000
# Using Docker Compose
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down- Development Roadmap - Complete feature roadmap (Phases 1-12)
- Features Checklist - Detailed feature status tracking
- API Documentation - Complete API reference
- Deployment Guide - Production deployment instructions
- RAG Documentation - Complete RAG system guide
- RAG Quick Start - Quick start and overview
- RAG Examples - Code examples
- Implementation Summary - Technical implementation details
- Final Report - Project completion report
- React 19 - Modern UI library
- TypeScript - Type-safe development
- TailwindCSS - Utility-first styling
- Radix UI - Accessible component primitives
- Framer Motion - Smooth animations
- React Query - Data fetching and caching
- Wouter - Lightweight routing
- Node.js - Runtime environment
- Express - Web framework
- tRPC - Type-safe API layer
- Drizzle ORM - Type-safe database access
- MySQL - Primary database
- Zod - Schema validation
- Vite - Fast build tool
- pnpm - Efficient package manager
- PM2 - Process manager
- Docker - Containerization
- nginx - Reverse proxy
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Client (React) โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ Agents โ โKnowledge โ โAnalytics โ โSettings โ โ
โ โ Page โ โ Base โ โDashboard โ โ Panel โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ tRPC API
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Server (Node.js) โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ Router โ โ RAG Core โ โ Storage โ โ
โ โ (tRPC) โ โ Service โ โ (S3/Local) โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Drizzle ORM
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Database (MySQL) โ
โ โโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Agents โ โ Knowledge โ โ Chat Sessions & โ โ
โ โ Table โ โ Sources & โ โ Messages โ โ
โ โ โ โ Embeddings โ โ โ โ
โ โโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Phase 1-7: Core platform with RAG system (85% complete)
- Agent management system
- RAG knowledge training
- Chat logs and analytics
- Interactive playground
- Settings and integrations
- Dark mode UI with purple/indigo theme
- Comprehensive documentation
-
Phase 8: File upload & processing โ
- PDF, DOCX, DOC, TXT, MD file support
- Automatic text extraction and RAG processing
- File management UI with status tracking
- Secure file handling with authorization
-
Phase 9: URL scraping & web crawling โ
- Single URL and multi-page crawling
- Configurable crawl depth (1-3 levels)
- Max pages limit (5-50 pages)
- HTML content extraction with cheerio
- HTML to Markdown conversion
- Robots.txt compliance
- Same-domain restriction
- SSRF protection and URL validation
- Automatic RAG processing of crawled content
- Enhanced testing infrastructure
- Performance optimization
- Phase 10: Advanced training & optimization
- Phase 11: Multi-language support
- Phase 12: Enterprise features & scaling
- Vector database migration
- Team collaboration features
- Public API & webhooks
See DEVELOPMENT_ROADMAP.md for complete details.
Train chatbots with FAQs, policies, and documentation for accurate, context-aware support.
Index API references, code docs, and guides for developer assistance.
Load product information and sales materials for intelligent customer interactions.
Train with course materials and textbooks for personalized learning assistance.
cbase/
โโโ client/ # Frontend React application
โ โโโ src/
โ โ โโโ pages/ # Page components
โ โ โโโ components/ # Reusable components
โ โ โโโ lib/ # Utilities and helpers
โ โโโ public/ # Static assets
โโโ server/ # Backend Node.js application
โ โโโ _core/ # Core server functionality
โ โโโ db.ts # Database operations
โ โโโ rag.ts # RAG service
โ โโโ routers.ts # API routes
โโโ drizzle/ # Database schema and migrations
โโโ examples/ # Code examples
โโโ docs/ # Documentation
# Development
pnpm run dev # Start dev server with hot reload
# Building
pnpm run build # Build for production
pnpm run start # Start production server
# Quality
pnpm run check # TypeScript type checking
pnpm run format # Format code with Prettier
pnpm run test # Run tests
# Database
pnpm run db:push # Run database migrationsCreate a .env file with:
# Required
DATABASE_URL=mysql://user:pass@host:3306/db
FORGE_API_KEY=your-api-key-here
# Optional
FORGE_API_URL=https://api.openai.com/v1
AWS_ACCESS_KEY_ID=your-aws-key
AWS_SECRET_ACCESS_KEY=your-aws-secret
S3_BUCKET=your-bucket-name
# โ ๏ธ WARNING: Never commit actual credentials to version control!
# Use environment variables or secure secrets management in production.See DEPLOYMENT_GUIDE.md for complete configuration.
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test -- --watch
# Run tests with coverage
pnpm test -- --coverage- Unit Tests: 80% coverage target
- Integration Tests: Critical paths covered
- E2E Tests: User journey validation
- Average Response Time: < 2s for RAG queries
- Embedding Generation: ~100ms per chunk
- Database Queries: < 100ms average
- Page Load Time: < 3s initial load
- API Uptime: 99.9% target
- Database indexing on frequently queried fields
- React Query caching for API responses
- Batch embedding generation
- Code splitting and lazy loading
- CDN for static assets
- JWT-based authentication
- Session management with secure cookies
- Input validation with Zod schemas
- SQL injection prevention via ORM
- XSS protection
- CSRF protection
- Rate limiting
- API key management
Please report security vulnerabilities via GitHub Security Advisories: https://github.com/o9nn/cbase/security/advisories
Do not open public issues for security concerns.
We welcome contributions! Please see our contributing guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Write tests for new features
- Update documentation as needed
- Follow the existing code style
- Use conventional commits
Be respectful, inclusive, and professional. See CODE_OF_CONDUCT.md.
This project is licensed under the MIT License - see the LICENSE file for details.
This project is inspired by Chatbase's legacy RAG learning chatbot system, bringing advanced knowledge training capabilities to modern AI chatbot management.
Built with amazing open-source technologies:
- React, TypeScript, Node.js
- TailwindCSS, Radix UI, Framer Motion
- tRPC, Drizzle ORM, MySQL
- And many more listed in package.json
- Documentation: Complete docs in repository
- GitHub Issues: Report bugs
- GitHub Discussions: Ask questions
- GitHub: @o9nn
- Repository: o9nn/cbase
Current Version: 2.2.0
Status: Production Ready โ
Last Updated: January 31, 2026
- 93% feature complete (Phases 8 & 9 completed)
- 180+ features implemented
- 18 API endpoints (4 new URL crawling endpoints added in Phase 9)
- 8 major pages
- 5 database tables (added fileUploads, webCrawlJobs)
- 3,600+ lines of code added for file processing and URL crawling
- 3 database tables for RAG
- 1,775 lines of code added in RAG implementation (Phase 7)
โจ URL Scraping & Web Crawling
- Crawl single URLs or entire websites
- Configurable crawl depth (1-3 levels deep)
- Max pages limit (5-50 pages)
- Smart content extraction from HTML
- HTML to Markdown conversion
- Robots.txt compliance
- Same-domain restriction for security
- SSRF protection with URL validation
- Automatic RAG processing of crawled content
- Real-time crawl job status tracking
โจ File Upload & Processing
- Upload PDF, DOCX, DOC, TXT, MD files
- Automatic text extraction
- Seamless RAG integration
- File management UI with status tracking
โจ Complete RAG knowledge training system
โจ Advanced vector search with semantic similarity
โจ Batch training capabilities
โจ Real-time training job tracking
โจ Comprehensive analytics dashboard
โจ Export functionality (CSV, PDF)
โจ Dark mode UI with purple/indigo theme
๐ Enhanced web content processing pipeline
๐ Improved security with SSRF protection
๐ Better error handling for network operations
๐ Enhanced file processing pipeline
๐ Improved security with ownership verification
๐ Better error handling for file operations
๐ Enhanced performance with database optimization
๐ Improved error handling and user feedback
๐ Better documentation with examples
๐ Responsive design for all devices
๐ Accessibility improvements (WCAG 2.1 AA)
- ๐ Scheduled auto-retraining
- ๐ Multi-language support
- ๐ข Team collaboration features
- ๐ Public API and webhooks
- ๐ฑ Mobile app
Made with โค๏ธ by the CBase Team