L'interface de chat IA ultime. Une application web moderne (React 19 + Vite) utilisant OpenRouter pour accΓ©der aux meilleurs LLM du marchΓ©. Design polychrome, gestion d'Γ©tat avec Zustand et expΓ©rience utilisateur fluide.
Your customizable, stylish AI chat companion.
A modern, intuitive interface for interacting with the best language models via OpenRouter.
Live Demo | Features | Installation | Configuration | Usage | Contributing
PolyChat-AI is a next-generation AI chat web application designed to deliver an exceptional, interactive, and visually unique user experience. Built with modern web technologies, it emphasizes customization, performance, and accessibility.
- Multi-Model Access: Connect to OpenRouter API for access to 100+ language models (GPT-4, Claude, Gemini, and more)
- AI Image Generation: Generate images using multimodal models with automatic retry and fallback
- RAG Context Enhancement: Local embeddings for intelligent conversation context
- Themed Interface: Multiple visual themes including modern dark/light and retro pixel art styles
- Optimal Performance: Modern React architecture with Vite for ultra-fast load times
- Security: Secure API key management with local storage
- Responsive Design: Interface adapted for all devices (desktop, tablet, mobile)
| Layer | Technology |
|---|---|
| Frontend | React 19 + TypeScript + Vite |
| Styling | Tailwind CSS 4 with custom themes |
| State Management | Zustand for performant state handling |
| API | OpenRouter for language model access |
| Embeddings | @xenova/transformers for local RAG |
| Build Tool | Vite for ultra-fast development and builds |
- OpenRouter Integration: Access to 100+ language models through a single API
- Popular Models: GPT-4o, Claude 4 Sonnet, Gemini 2.5 Pro, and many more
- Real-time Streaming: Fluid responses with live character count and loading animations
- Dynamic Model Switching: Change models mid-conversation seamlessly
- Multi-Model Chat: Run up to 3 AI models simultaneously in a grid layout for comparison
Generate images directly within your conversations using multimodal AI models.
| Feature | Description |
|---|---|
| Supported Models | Gemini 2.5 Flash, GPT-4o, Claude 3.5 Sonnet |
| Size Options | 256x256, 512x512, 1024x1024 |
| Style Presets | Natural, Vivid, Digital Art, Photorealistic, Anime, Oil Painting, Watercolor |
| Mood Settings | Bright, Dark, Serene, Dramatic, Playful, Mysterious |
| Lighting Options | Natural, Studio, Dramatic, Soft, Neon, Golden Hour |
| Smart Features | Automatic prompt optimization, retry with fallback models on failure |
Intelligent conversation context using local embeddings for enhanced AI responses.
- Local Processing: Uses @xenova/transformers with all-MiniLM-L6-v2 model
- Privacy-Focused: All processing done locally, no data sent to external services
- Smart Context: Automatically retrieves semantically relevant conversation history
- Configurable: Enable/disable in settings based on your needs
- Intelligent History: Save and manage conversations with search functionality
- Multiple Sessions: Handle multiple conversations simultaneously
- Message Regeneration: Regenerate assistant responses with a single click
- Inline Model Info: See which model generated each response
Jump-start conversations with professionally crafted templates across 7 categories:
| Category | Templates | Examples |
|---|---|---|
| Programming | 4 | Advanced Code Review, Debugging, Optimization, Documentation |
| Writing | 3 | Professional Content Creation, Grammar & Style Review, Email Writing |
| Analysis | 2 | Comprehensive Data Analysis, Market Research & Competitive Analysis |
| Creative | 2 | Structured Brainstorming, Professional Story Writing |
| Learning | 2 | Clear Concept Explanation, Personalized Study Plan |
| Business | 2 | Comprehensive Business Strategy, Presentation Preparation |
| Personal | 2 | SMART Goal Setting, Structured Decision Making |
Each template includes:
- Detailed system prompts optimized for the task
- User message templates with placeholders
- Suggested models for best results
- Usage examples
Apply instant transformations to selected text or code:
| Action | Icon | Description |
|---|---|---|
| Explain Code | π‘ | Get detailed explanations with examples |
| Optimize | β‘ | Performance and efficiency improvements |
| Debug | π | Systematic bug analysis and solutions |
| Add Comments | π | Generate comprehensive documentation |
| Translate | π | Multi-language translation |
| Summarize | π | Create concise summaries |
| Review | β | Code and text review with suggestions |
| Improve | π§ | General quality improvements |
| Simplify | π― | Reduce complexity while maintaining meaning |
| Expand | π | Elaborate and add detail to content |
| Theme | Description |
|---|---|
| Dark Mode | Elegant interface with dark background |
| Light Mode | Clean, modern light interface |
| Pixel Art | Retro style with animations |
| Hacker | Terminal-style with custom cursor |
Personalize your interface with: Violet, Blue, Green, Rose, Orange, Teal, Red, Cyan
- System Instructions: Customize AI behavior with custom prompts
- Conversation Tone: Neutral, Formal, Friendly, Professional, Enthusiastic
- Notifications: Configure alerts for new responses
- Default Model: Set your preferred model
Access detailed usage statistics with Ctrl + U:
- Total Conversations: Number of conversations created
- Messages Exchanged: User and assistant message counts
- Average Response Time: Model performance metrics
- Per-Model Statistics: Usage breakdown by model
Experience PolyChat-AI instantly without installing anything:
Live Demo: https://polychat-ai-xi.vercel.app
Or deploy your own instance:
- Node.js (version 18 or higher)
- npm or yarn
- OpenRouter API Key (free tier available)
-
Clone the repository
git clone https://github.com/Teeflo/PolyChat-AI.git cd PolyChat-AI -
Install dependencies
npm install # or yarn install -
Start the development server
npm run dev # or yarn dev -
Open your browser
The application will be available at
http://localhost:5173
-
Get your free API key:
- Visit OpenRouter.ai
- Create a free account
- Generate your API key
-
Automatic configuration:
- On first launch, a modal will appear
- Enter your OpenRouter API key
- The key will be securely stored in
localStorage
-
Manual configuration:
- Open settings (βοΈ icon)
- Go to the "API" tab
- Enter your API key
Select from 4 themes and 8 accent colors in the settings panel to match your preferences.
Enable or disable RAG (Retrieval Augmented Generation) in settings. When enabled, the AI will use semantic search to find relevant context from your conversation history.
-
Initial Setup:
- Follow the automatic onboarding
- Enter your OpenRouter API key
- Choose your preferred model
-
Start a Conversation:
- Click "New Conversation"
- Select a model (optional)
- Start typing your message
- Click the template icon in the chat input
- Browse categories or search for specific templates
- Select a template to apply its system prompt
- Fill in the placeholder fields
- Send your message
- Type or paste your code/text in the chat
- Click on a quick action button
- The action will be applied with optimized prompts
- Receive AI-enhanced results
- Click the multi-model icon to enable grid view
- Select up to 3 different models
- Send a message to compare responses side-by-side
- Each response shows which model generated it
- Use a prompt like "Generate an image of..."
- Select an image-capable model (Gemini 2.5 Flash, GPT-4o, etc.)
- The system will automatically optimize your prompt
- If generation fails, fallback models will be tried automatically
| Shortcut | Action |
|---|---|
Ctrl/Cmd + U |
Open usage dashboard |
Ctrl/Cmd + K |
Open settings |
Ctrl/Cmd + N |
New conversation |
Ctrl/Cmd + S |
Save conversation |
Ctrl/Cmd + / |
Show help |
PolyChat-AI/
βββ public/ # Static files (logo, icons, etc.)
βββ src/
β βββ assets/ # Resources (images, etc.)
β βββ components/ # React components
β β βββ Chat/ # Chat window and features
β β βββ Layout/ # Layout components (Header, Sidebar)
β β βββ Settings/ # Settings components
β β βββ Onboarding/ # First-launch components
β β βββ ui/ # Generic UI components
β βββ context/ # React context (ChatProvider)
β βββ data/ # Static data (conversation templates)
β βββ hooks/ # Custom hooks (useChat, useSettings, etc.)
β βββ services/ # Business logic and API calls
β β βββ openRouter.ts # OpenRouter API + image generation
β β βββ ragService.ts # RAG with local embeddings
β β βββ modelsApi.ts # Model fetching and filtering
β β βββ localStorage.ts # Data persistence
β βββ styles/ # CSS files and global themes
β βββ types/ # TypeScript definitions
β βββ utils/ # Utility functions
β βββ App.tsx # Root application component
β βββ main.tsx # Application entry point
βββ .gitignore
βββ .prettierrc # Prettier configuration
βββ eslint.config.js # ESLint configuration
βββ package.json # Dependencies and scripts
βββ README.md # This file
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite configuration
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
TypeScript check + production build |
npm run preview |
Preview production build locally |
npm run lint |
Check code quality with ESLint |
npm run format |
Format code with Prettier |
# Install dependencies
npm install
# Start development mode
npm run dev
# Production build
npm run build
# Check code quality
npm run lint
# Format code
npm run formatContributions are what make the open-source community thrive. Any contribution you make will be greatly appreciated.
-
Report a Bug
- Open an issue with the "bug" tag
- Describe the problem in detail
- Include steps to reproduce
-
Suggest an Enhancement
- Open an issue with the "enhancement" tag
- Explain your idea and its benefits
- Discuss implementation approach
-
Submit Code
- Fork the project
- Create a feature branch
- Commit your changes
- Open a Pull Request
-
Fork the Project
git clone https://github.com/YOUR_USERNAME/PolyChat-AI.git cd PolyChat-AI -
Create your feature branch
git checkout -b feature/AmazingFeature
-
Commit your changes
git commit -m 'feat: Add AmazingFeature' -
Push to the branch
git push origin feature/AmazingFeature
-
Open a Pull Request
- TypeScript: Use TypeScript for all new code
- ESLint: Follow the configured linting rules
- Prettier: Format code before committing
- Commits: Use conventional commit messages
- Tests: Add tests for new features when possible
- Message Size: Limited by the context window of the selected model
- History Storage: Local storage only (no cloud synchronization)
- Model Availability: Dependent on OpenRouter API availability
- Image Generation: Requires models that support image output
- Long Messages: Split large messages into multiple parts
- Backup: Export important conversations regularly
- Unavailable Models: The application automatically suggests alternatives
This project is distributed under the MIT License. See the LICENSE file for more information.
- β Commercial Use: Allowed
- β Modification: Allowed
- β Distribution: Allowed
- β Private Use: Allowed
- β Liability: Not guaranteed
- β Warranty: None provided
- OpenRouter for language model API access
- React Team for the excellent framework
- Vite Team for the ultra-fast build tool
- Tailwind CSS for the utility-first CSS framework
- Zustand for simple, performant state management
- @xenova/transformers for browser-based ML embeddings
- Documentation: See this README
- Bug Report: Open an issue
- Discussions: GitHub Forum
- Contact: Create an issue
- Website: PolyChat-AI
- Documentation: Project Wiki
- Releases: Versions
- Analytics: Statistics
Created with care by Teeflo
Planned features for upcoming releases:
- Display Model Capabilities: Show model capabilities (image reasoning, document analysis, etc.) directly in the model selector
- Image Editing & Regeneration: Add options to edit generated images or create variations
- History Panel Improvement: Modernize the conversation history panel design for better readability
- Cloud Synchronization: Optional cloud backup for conversations
- Custom Templates: Create and save your own conversation templates
- Voice Input: Add speech-to-text for hands-free interaction
- Export Options: Export conversations to Markdown, PDF, or JSON formats
Your contributions are welcome!