A modern, real-time AI chat application with text, voice, and video capabilities.
- π€ Real-time AI chat with streaming responses
- ποΈ Voice chat with speech recognition
- π File upload support (text/images)
- π₯ Video chat with recording and image capture
- π Web search capabilities
- π¬ Customizable system prompts
- π€ Advanced reasoning with step-by-step thinking
- π Multiple AI model support
- π¨ Modern, responsive UI
- π User authentication and profiles with Supabase
- πΎ Chat history with session management
- π½οΈ Menu data integration for restaurant assistant
- π Structured output rendering
- π Usage analytics and admin dashboard
- βΏ Comprehensive accessibility features
- π Internationalization with multiple languages
- π§ User preferences and settings
- Multiple AI Provider Support
- OpenRouter Integration
- Claude 2
- Gemini Pro
- Llama 2 70B
- Mistral 7B
- OpenAI Direct Integration
- GPT-3.5 Turbo
- GPT-4
- GPT-4 Turbo
- GPT-4o
- GPT-4 Vision
- Anthropic Direct Integration
- Claude 3 Opus
- Claude 3 Sonnet
- Claude 3 Haiku
- Google Gemini Direct Integration
- Gemini Pro
- Gemini Pro Vision
- Gemini 1.5 Pro
- GROQ Integration
- Llama 3 70B
- Llama 3 8B
- Mixtral 8x7B
- Gemma 7B
- Deepseek Integration
- Deepseek Chat
- Deepseek Coder
- Deepseek LLM 67B
- Hugging Face Integration
- Mixtral 8x7B
- Llama 2 70B
- Gemma 7B
- Phi-2
- StableLM Zephyr 3B
- OpenRouter Integration
- Voice Synthesis with ElevenLabs
- Real-time streaming responses
- Advanced reasoning capabilities
- Tool function support for web search and other capabilities
- β‘ Real-time WebSocket communication
- π Advanced audio processing
- πΉ Video recording and image capture
- π€ Modular AI provider architecture
- π Web search integration
- π¬ System prompt customization
- π± Mobile-first responsive design
- π Secure API key management
- π― High-performance architecture
- Node.js 18+
- npm or yarn
- Modern web browser
# Clone the repository
git clone https://github.com/yourusername/w3j-assistant.git
# Navigate to project directory
cd w3j-assistant
# Install dependencies
npm install
# Create environment file
cp .env.example .env
# Start development server
npm run dev
-
AI Provider API (Required - choose one)
- OpenRouter API
- Visit OpenRouter
- Create an account
- Generate API key
- Add to .env:
VITE_OPENROUTER_KEY=your_key
- OpenAI API
- Visit OpenAI
- Create an account
- Generate API key
- Add to .env:
VITE_OPENAI_KEY=your_key
- Google Gemini API
- Visit Google AI Studio
- Create an account
- Generate API key
- Add to .env:
VITE_GEMINI_KEY=your_key
- GROQ API
- Visit GROQ
- Create an account
- Generate API key
- Add to .env:
VITE_GROQ_KEY=your_key
- Deepseek API
- Visit Deepseek
- Create an account
- Generate API key
- Add to .env:
VITE_DEEPSEEK_KEY=your_key
- Hugging Face API
- Visit Hugging Face
- Create an account
- Generate API key
- Add to .env:
VITE_HUGGINGFACE_KEY=your_key
- OpenRouter API
-
ElevenLabs API (Optional - for voice)
- Visit ElevenLabs
- Create an account
- Generate API key
- Add to .env:
VITE_ELEVENLABS_KEY=your_key
-
Google Search API (Optional - for web search)
- Visit Google Cloud Console
- Create a project and enable Custom Search API
- Generate API key
- Create a Custom Search Engine and get the CSE ID
- Add to .env:
VITE_GOOGLE_API_KEY=your_key
VITE_GOOGLE_CSE_ID=your_cse_id
-
Supabase (Required - for authentication and data storage)
- Visit Supabase
- Create a new project
- Get your project URL, anon key, and service key
- Add to .env:
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_SUPABASE_SERVICE_KEY=your_supabase_service_key
VITE_ENCRYPTION_KEY=your_encryption_key_for_api_keys
- Run the SQL migrations in
supabase/migrations/
to set up the database schema - The migrations will create tables for:
- User profiles and preferences
- API key storage (encrypted)
- Chat history
- Analytics tracking
- Restaurant information
react-ai-chat/
βββ src/
β βββ utils/
β β βββ aiService.js # Base AI service interface
β β βββ aiServiceFactory.js # Factory for creating AI services
β β βββ openRouterService.js # OpenRouter implementation
β β βββ openAIService.js # OpenAI implementation
β β βββ geminiService.js # Google Gemini implementation
β β βββ chatService.js # Unified chat service
β β βββ videoService.js # Video processing
β β βββ websocket.js # WebSocket management
β β βββ audioProcessor.js # Audio handling
β β βββ streamProcessor.js # Stream management
β βββ components/
β β βββ VideoChat.jsx # Video chat component
β β βββ ui/
β β βββ card.jsx # UI components
β βββ App.jsx # Main component
β βββ main.jsx # Entry point
β βββ index.css # Global styles
βββ public/
β βββ favicon.svg # App icon
βββ docs/
βββ DOCUMENTATION.md # Technical docs
βββ ROADMAP.md # Development plan
βββ TESTING_PLAN.md # Testing strategy
βββ VIDEO_IMPLEMENTATION.md # Video features
# Development
npm run dev # Start dev server
npm run build # Build for production
npm run preview # Preview production build
# Testing
npm run test # Run tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage report
# Linting
npm run lint # Run ESLint
npm run format # Format with Prettier
# Unit tests
npm run test
# E2E tests
npm run test:e2e
# Coverage report
npm run test:coverage
-
Unit Tests
- Components
- Services
- Utilities
-
Integration Tests
- Chat flow
- Voice processing
- Video processing
- File handling
-
E2E Tests
- Complete user flows
- API integration
- Error scenarios
# Build
npm run build
# Preview
npm run preview
-
Netlify
- Connect repository
- Configure build settings
- Deploy
-
Docker
# Build image
docker build -t w3j-assistant .
# Run container
docker run -p 80:80 w3j-assistant
- Environment variables
- Local storage encryption
- Secure transmission
- Input validation
- File type checking
- Size limitations
- Local processing
- Secure storage
- Privacy controls
- Fork repository
- Create feature branch
- Make changes
- Submit pull request
- Follow code style
- Add tests
- Update documentation
- Keep commits clean
See ROADMAP.md for planned features and enhancements.
- Check documentation
- Search issues
- Open new issue
- Join discussions
MIT License - see LICENSE for details
- OpenRouter API
- ElevenLabs
- Supabase
- React community
- Open source contributors
Built with β€οΈ using React, Vite, and TailwindCSS