Welcome to InjaChat! This project is our official entry into the T3 Chat Cloneathon, an exciting open-source competition initiated by Theo (@theo on X/Twitter). Our goal is to build a client-first, performance-optimized AI chat application that not only mirrors T3 Chat's functionality but surpasses it through innovative features and architecture.
Built entirely with Svelte 5 and SvelteKit, InjaChat leverages cutting-edge web technologies to deliver an unparalleled chat experience optimized for both LLM conversations and AI image generation workflows.
This project exists to participate in and win the T3 Chat Cloneathon by showcasing the superior capabilities of Svelte in building complex, real-time AI applications.
The T3 Chat Cloneathon is an open-source competition challenging developers to build their best clone of T3 Chat, emphasizing strong UI/UX and innovative features.
- Official Tweet: https://x.com/theo/status/1931515264497254402
- Official Cloneathon Page: https://cloneathon.t3.chat
InjaChat is built with a client-first architecture that prioritizes:
- Local State Management: Advanced client-side state with minimal server dependencies
- Offline Capabilities: Core functionality works without internet connection
- Progressive Enhancement: Features gracefully degrade/enhance based on capabilities
- Edge Computing: Leveraging Cloudflare Workers for global performance
- Zero-Latency UI: Optimistic updates and instant user feedback
- Sub-100ms Response Times: Optimized for lightning-fast interactions
- Minimal Bundle Size: Tree-shaking and code-splitting for optimal loading
- Memory Efficiency: Smart garbage collection and resource management
- Battery Optimization: Efficient algorithms that preserve device battery life
- Node.js (LTS version recommended)
- pnpm, bun, or npm
-
Clone the repository:
git clone git@github.com:inja-online/inja_chat.git cd inja_chat -
Install dependencies:
pnpm install # or bun install # or npm install
-
Configure Environment Variables: Create a
.envfile in the root directory:# LLM Providers OPENAI_API_KEY=your_openai_key ANTHROPIC_API_KEY=your_anthropic_key GOOGLE_AI_API_KEY=your_google_key # Image Generation STABILITY_API_KEY=your_stability_key MIDJOURNEY_API_KEY=your_midjourney_key # Database & Auth DATABASE_URL=your_database_url AUTH_SECRET=your_auth_secret
-
Run the development server:
pnpm dev # or bun dev # or npm run dev
Access the application at
http://localhost:5173
- Multi-LLM Chat Integration: Support for OpenAI GPT-4, Claude, Gemini, and local models
- Authentication & Sync: Secure user auth with real-time chat synchronization
- Offline-First Operation: Core chat functionality works without internet
- Local Model Support: Run smaller LLMs directly in the browser via WebAssembly
- Edge-Optimized Routing: Smart request routing through global CDN
- Progressive Web App: Full PWA with app-like experience
- Client-Side Encryption: End-to-end encryption for sensitive conversations
- Smart Caching: Intelligent conversation and model response caching
- Background Sync: Seamless sync when connection returns
- Streaming Response UI: Real-time typing indicators with character-by-character display
- Context Window Management: Smart context pruning and conversation summarization
- Multi-Model Conversations: Switch models mid-conversation seamlessly
- Custom System Prompts: User-defined AI personas and behavior templates
- Conversation Templates: Pre-built prompts for common use cases
- Token Usage Analytics: Real-time cost tracking and usage optimization
- Response Quality Scoring: AI-powered response evaluation and ranking
- Auto-Retry Logic: Smart retry mechanisms for failed requests
- Model Performance Benchmarking: Built-in speed and quality comparisons
- Custom Fine-Tuned Model Support: Integration with user's fine-tuned models
- Multi-Provider Image Generation: Stable Diffusion, DALL-E, Midjourney integration
- Real-Time Image Editing: In-chat image modification and enhancement
- Style Transfer Capabilities: Apply artistic styles to generated images
- Image-to-Image Translation: Transform existing images with AI
- Batch Image Generation: Generate multiple variations simultaneously
- Custom Image Models: Support for specialized image generation models
- Image Upscaling & Enhancement: AI-powered image quality improvement
- Visual Prompt Builder: Drag-and-drop interface for complex image prompts
- Image History & Galleries: Organized collections of generated artwork
- Advanced Parameter Control: Fine-tune generation settings per request
- Chat Branching & Forking: Create alternative conversation paths
- Message Editing & Regeneration: Edit messages and regenerate responses
- Conversation Search: Full-text search across all chat history
- Smart Suggestions: AI-powered next message suggestions
- Voice Input/Output: Speech-to-text and text-to-speech integration
- Collaborative Chats: Share conversations for team collaboration
- Chat Export/Import: Backup and transfer conversations
- Conversation Analytics: Insights into chat patterns and productivity
- Universal File Upload: Support for 50+ file formats
- PDF Analysis & Chat: Intelligent document parsing and Q&A
- Image Recognition & Description: AI-powered image analysis
- Code File Understanding: Smart code analysis and suggestions
- Audio/Video Transcription: Convert media to text for chat context
- Large File Processing: Efficient handling of files up to 100MB
- OCR Integration: Extract text from images and documents
- File Versioning: Track changes in uploaded documents
- API Playground: Built-in testing interface for different models
- Custom Shortcuts: Keyboard shortcuts for power users
- Plugin System: Extensible architecture for custom features
- Webhook Integration: Connect with external services and workflows
- CLI Interface: Command-line tools for advanced users
- Bulk Operations: Process multiple chats/files simultaneously
- Advanced Export Options: JSON, CSV, Markdown export formats
- Development Tools: Built-in debugging and performance monitoring
- Adaptive Themes: Dynamic themes that adjust to content and time
- Accessibility First: Full WCAG 2.1 AA compliance
- Mobile-Optimized: Native mobile app experience
- Gesture Controls: Intuitive touch and mouse gestures
- Customizable Layouts: Personalized interface arrangements
- Focus Modes: Distraction-free chat environments
- Advanced Syntax Highlighting: Support for 200+ programming languages
- Math Rendering: LaTeX and MathML support for equations
- Zero-Knowledge Architecture: Server never sees unencrypted messages
- Local Data Storage: Sensitive data stays on user device
- GDPR Compliance: Full European privacy regulation compliance
- Audit Logs: Comprehensive logging for enterprise users
- Two-Factor Authentication: Enhanced account security
- Session Management: Advanced session control and monitoring
- Web Search Integration: Real-time search results in conversations
- Calendar Integration: Schedule and manage tasks through chat
- Email Integration: Send and receive emails via chat interface
- Social Media Posting: Share content across platforms
- Cloud Storage Sync: Integrate with Google Drive, Dropbox, etc.
- Database Query Interface: Chat with your databases
- Custom API Integrations: Connect any REST/GraphQL API
- Performance: Sub-100ms response times through client-first architecture
- Innovation: Unique features like local model support and offline operation
- User Experience: Intuitive interface with advanced customization options
- Scalability: Edge-optimized infrastructure for global performance
- Extensibility: Plugin system allowing unlimited customization
- Security: End-to-end encryption with zero-knowledge architecture
- Frontend: Svelte 5, SvelteKit, TypeScript
- Styling: Tailwind CSS, Shadcn/ui components
- State Management: Svelte 5 runes, Zustand for complex state
- Real-time: WebSockets, Server-Sent Events
- Database: Turso (SQLite), Prisma ORM
- Authentication: Auth.js, WebAuthn
- Deployment: Cloudflare Pages, Workers
- AI Integration: OpenAI, Anthropic, Google AI SDKs
- Image Processing: Canvas API, WebGL, WASM
- Core chat interface
- Basic LLM integration
- User authentication
- Image generation features
- File upload capabilities
- Advanced UI components
- Performance tuning
- Client-first features
- Security hardening
- Advanced features
- Testing and QA
- Final optimizations
- Performance: <100ms initial load, <50ms interaction response
- User Experience: >95% user satisfaction score
- Feature Completeness: 100% of mandatory + 80% of bonus features
- Code Quality: >90% test coverage, <5 critical issues
- Accessibility: WCAG 2.1 AA compliance
We welcome contributions from the community! Please read our contributing guidelines and join us in building the best AI chat application for the T3 Cloneathon.
This project is licensed under the AGPL-3.0-or-later license - see the LICENSE file for details.