A complete chat widget solution with both a React component library and standalone admin application for AI-powered customer support.
- Reusable React Widget: Install via
npm install @vezlo/assistant-chat - TypeScript Support: Full type definitions included
- Customizable: Themes, colors, positioning, and behavior
- Real-time Streaming: Live AI responses with Server-Sent Events (SSE) streaming support
- Style Isolation: Shadow DOM support for conflict-free integration
- π Complete Package Documentation
- Admin Dashboard: Configure widgets with live preview
- Playground: Test widgets in isolated environment
- Embed Code Generator: Get ready-to-use embed codes
- Docker Support: Easy deployment with Docker Compose
- Vercel Ready: One-click deployment to Vercel
- Shared Layout:
MainLayout+Headerprovide a consistent, Vercel-style shell across every page - Auth-Ready Context:
AppProviderexposes user/workspace state, token helpers, andProtectedRoutesupport for future login flows
npm install @vezlo/assistant-chatimport { Widget } from '@vezlo/assistant-chat';
function App() {
const config = {
uuid: 'your-widget-uuid',
apiUrl: 'http://localhost:3000',
apiKey: 'your-api-key',
title: 'AI Assistant',
themeColor: '#10b981',
// ... other config
};
return <Widget config={config} />;
}π Complete NPM Package Documentation
This repository also contains a standalone admin application for configuring and managing widgets.
# Clone and run the standalone app
git clone https://github.com/vezlo/assistant-chat.git
cd assistant-chat
npm install
npm run devFeatures:
- Admin dashboard for widget configuration
- Live preview and playground
- Embed code generation
- Docker and Vercel deployment support
- Theme + widget matrices: see
docs/THEME_WIDGET_CONFIG.mdfor every field, color mapping tips, and widget overrides
- Assistant Server: Both components require a running Assistant Server
- Node.js 18+ and npm
- React 18+ (for package usage)
- Realtime Updates (Optional): For agent handoff + live message sync, provide Supabase Realtime credentials
VITE_SUPABASE_URL: Supabase project URLVITE_SUPABASE_ANON_KEY: Supabase anon/public key- Without these, the widget works normally but wonβt receive realtime updates
- β React component library
- β TypeScript support
- β Tailwind CSS styling
- β Real-time streaming (SSE-based backend streaming)
- β Realtime updates (agent handoff, live message sync)
- β Customizable themes
- β Shadow DOM support
- β API integration included
- β Admin dashboard
- β Live widget preview
- β Playground testing
- β Embed code generation
- β Multiple widget management
- β Human agent support (conversation management, agent handoff)
- β Realtime updates (live message synchronization)
- β Docker support
- β Vercel deployment
npm run build
npm pack # Test locally
npm publish # Publish to NPMThe marketplace app deploys the frontend automatically, prompts you for the Assistant Server URL and optional API key, and ships both the chat UI and embeddable widget without any manual environment setup. After connecting your Vercel project you can immediately visit:
- Chat UI:
https://your-project.vercel.app/
This clones the repo into your GitHub account, spins up a new Vercel project using the default main branch, and links the same Vezlo integration so the Assistant Chat deployment can gather its Assistant Server URL and API key during setup.
# Install Vercel CLI
npm i -g vercel
# Deploy from local directory
vercel
# Set environment variables (required)
vercel env add VITE_ASSISTANT_SERVER_URL
vercel env add VITE_ASSISTANT_SERVER_API_KEY
# Optional: For realtime updates
vercel env add VITE_SUPABASE_URL
vercel env add VITE_SUPABASE_ANON_KEY
# Deploy to production
vercel --proddocker-compose upThis repository contains both the NPM package and standalone application:
assistant-chat/
βββ src/
β βββ components/Widget.tsx # Main widget component (used by both)
β βββ api/ # API services
β βββ types/ # TypeScript definitions
β βββ utils/ # Utility functions
β βββ config/ # Configuration
β βββ routes/ # Standalone app pages
βββ public/
β βββ widget.js # Embed script
βββ docs/ # Documentation
βββ README.md # This file (project overview)
βββ PACKAGE_README.md # NPM package documentation
βββ package.json # Package configuration
- Same Widget Code: Both the NPM package and standalone app use the same
Widget.tsxcomponent - Embed & Playground:
WidgetPage.tsxpowers the iframe, embed script, and playground preview using that same component - NPM Package: Publishes the widget component as a reusable library
- Standalone App: Uses the widget component directly for admin interface and playground
- No Duplication: Single source of truth for the widget component
AppProvidermanagesuser,workspace, auth token, and exposeslogin/logouthelpers plusProtectedRoutefor future API integration.Header&MainLayoutdeliver the new full-width, two-row dashboard shell (logo, workspace switcher, company badge, primary nav, profile dropdown).ConfigPage(dashboard) and every other route render insideMainLayout, so all future pages automatically inherit the header and spacing.LoginPagelives outside the layout and is already wired toAppProvider, making it ready for real authentication APIs.
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Codebase βββββΆβ src-to-kb βββββΆβ Knowledge Base β
β (Your Code) β β (Analysis) β β (Vector DB) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Chat Widget ββββββ Assistant Serverββββββ AI Queries β
β (This Package) β β (Backend) β β (RAG System) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
To enable AI-powered code analysis and intelligent responses, integrate with @vezlo/src-to-kb:
npm install -g @vezlo/src-to-kb
src-to-kb /path/to/your/codebase --output ./knowledge-baseThe Assistant Server will automatically use this knowledge base to provide intelligent answers about your codebase.
For detailed API integration documentation, see API Integration Guide.
- @vezlo/assistant-server - Backend API server
- @vezlo/src-to-kb - NPM package for code analysis
- @vezlo/ai-validator - AI validation tools
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
# Clone the repository
git clone https://github.com/vezlo/assistant-chat.git
cd assistant-chat
# Install dependencies
npm install
# Start development server
npm run dev
# Build the package
npm run build- Package Issues: Assistant Chat Issues
- Server Issues: Assistant Server Issues
- General Questions: Assistant Server Discussions
This project is dual-licensed:
- Non-Commercial Use: Free under AGPL-3.0 license
- Commercial Use: Requires a commercial license - contact us for details
Made with Love by Vezlo