Status: Maintenance Mode
This web version receives critical fixes and migration work only. New product development is moving to Chat_Buddy_iOS. Before moving devices or testing the iOS importer, export a JSON backup from Settings. See WEB_TO_IOS_MIGRATION.md.
API-key warning: this is a browser application. Any
VITE_*_API_KEYsupplied at build time is embedded in the public JavaScript bundle. Public deployments must use a server-side proxy or require each user to enter their own key at runtime.Latest review: the security, data-integrity, CI, and UI/UX remediation was verified through a real OpenRouter Agent/persona conversation on 2026-08-13 in the comprehensive review.
AI Chat Companion
A modern, responsive AI chat application featuring multiple personalities, anime characters, group chats, and bilingual support.
- 13 Unique AI Personas: 5 original characters + 8 anime characters
- Each persona has distinct personality traits, speaking styles, and interests
- Works with OpenRouter, DeepSeek, OpenAI, and other OpenAI-compatible APIs
Meet your favorite anime characters:
- Hatsune Miku - Cheerful virtual idol
- Rem - Devoted maid from Re:Zero
- Rin Tohsaka - Tsundere magus from Fate
- Naruto Uzumaki - Determined ninja
- L - Genius detective from Death Note
- Zero Two - Mysterious darling
- Asuna - Brave swordswoman from SAO
- Gojo Satoru - The strongest from Jujutsu Kaisen
- Create groups with multiple AIs
- AIs interact with you and each other
- Customize AI capabilities per group
- Seamless English/Chinese interface switching
- All UI elements, documentation, and AI responses support both languages
- "Macaroon Orange" theme with WeChat-inspired design
- Smooth animations and responsive layout
- Works on desktop and mobile
- Chats and settings saved in browser
- No account required
- Privacy-focused design
- Multi-message: AI can send consecutive messages like real users
- Typing indicators: See when AI is "typing"
- Proactive messaging: AI may reach out on their own
- WeChat-style time display
- AI Dynamic Posts: AI friends post daily life updates based on their location and personality
- Smart Interactions: AI intelligently comments on and likes your posts
- WeChat-style Features: Location tags, privacy settings, and cover photos
- Emoji Reactions: React to posts with ๐โค๏ธ๐๐ฅ๐ฎ๐ข
| Requirement | Version |
|---|---|
| Node.js | ^20.19.0, ^22.13.0, or >=24.0.0 |
| npm | v7+ |
| DeepSeek API Key | Optional, for AI responses |
# 1. Clone the repository
git clone https://github.com/Luckycat133/Chat_Buddy.git
cd Chat_Buddy
# 2. Install dependencies
npm install
# 3. Configure environment
# Copy .env.example to .env and edit
cp .env.example .env
# Edit .env with your API settings
# 4. Start development server
npm run dev| Variable | Required | Description |
|---|---|---|
VITE_AI_API_URL |
Yes | API Base URL (e.g., https://api.deepseek.com) |
VITE_AI_API_KEY |
Yes | Your API key for AI responses |
VITE_AI_MODEL |
Yes | Model name (default: nvidia/nemotron-3-ultra-550b-a55b:free) |
Provider setup: the default preset uses OpenRouter with one fixed free model. Other OpenAI-compatible endpoints can be configured manually. Runtime keys entered in Settings live in
sessionStorageonly; build-timeVITE_*secrets are still embedded in the client bundle, so production deployments should use a server-side proxy.
- Click the "+" button or navigate to "New Chat"
- Select one or more AI friends
- For group chats, optionally set a group name
- Click "Create Chat" to start
- Type your message in the input field
- Press Enter or click Send
- AIs will respond based on their personality and context
- In a group, one eligible AI responds to each user turn to avoid model fan-out
- A normal persona or Agent reply uses one request to the configured text model. There are no automatic model fallbacks or hidden retries.
- Explicit tools are precomputed when their arguments are unambiguous. If the model must infer tool arguments, the visible function-calling flow may use two text-model requests: choose the tool, then explain the verified result.
- Conversation titles, durable-memory capture, Moments background activity, quizzes, idiom games, palettes, and deterministic math run locally with zero model requests. Up to eight independently extracted durable facts are injected when relevant instead of replaying an extra model-generated summary.
- An explicit Scholar search uses one Tavily retrieval plus one text-model synthesis. Explicit image generation uses one MiniMax image request and no text-model request.
- Text-to-speech runs only after the user clicks Read Aloud; the generated audio is cached for repeat playback.
- Provider errors remain visible with a manual Retry action instead of spending another request automatically.
- Request efficiency never comes from discarding the user's task: the latest input is preserved, up to 48 recent messages / 100,000 characters are available, and output ceilings range from 1,600 to 6,144 tokens according to the task.
npm run prompt:benchguards those capability contracts. The current specialist prompts intentionally use about 146 more estimated tokens (+11.5%) for stronger Coder/Sensei instructions; savings come from request fan-out and irrelevant per-turn sections, not from weakening the answer.- Task Agents and personas stream answers into one in-place message. Requests to the fixed Nemotron model use OpenRouter
reasoning.effort: "none"with reasoning excluded because live validation showed optional extended reasoning could consume the completion budget; normal inference and function calling remain enabled. - If an upstream response reaches its length limit, the completed text stays visible with an explicit truncation notice. For math tools, the exact local result and symbolic form remain authoritative even when provider synthesis is unusable. The app never spends a hidden retry.
- Language: Switch between English and Chinese
- Theme: Macaroon Orange (default)
- Help: View FAQ and usage tips
- About: Check version and changelog
See docs/ARCHITECTURE.md for details.
- Frontend: React 19, Vite
- Styling: TailwindCSS
- State: Clean Architecture (ChatEngine + Context)
- AI: one configured OpenRouter/OpenAI-compatible text model; Tavily and MiniMax only for explicit search/media actions
- Storage: LocalStorage (settings) + IndexedDB (chats, documents, and media)
src/
โโโ core/ # Domain logic (pure JS)
โ โโโ chat/
โโโ services/ # Infrastructure (API, Storage)
โโโ features/ # Feature modules
โ โโโ chat/
โ โโโ moments/
โโโ providers/ # Context composition
โโโ components/ # Shared UI
โโโ pages/ # Routes
graph LR
A[User] --> B[ChatComposer]
B --> C[ChatEngine]
C --> D[AIPipeline]
D --> E[AI API]
E --> D
D --> C
C --> F[Storage]
C --> G[UI]
We welcome contributions! Please follow these 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
- Use ESLint for JavaScript/JSX linting
- Follow React best practices
- Write meaningful commit messages
- Add bilingual support for new UI text
- Use GitHub Issues
- Include steps to reproduce
- Provide browser and OS information
See CHANGELOG.md for version history.
Current Web Version: v0.4.1
- ๐ผ๏ธ Immersive Background System: 20+ AI-generated backgrounds for each persona
- ๐ Dark Mode Overhaul: Complete CSS variable system with glass effects
- ๐ฑ iOS 26 Style: Refined border-radius and subtle animations
- ๐จ Per-Chat Backgrounds: Custom background for each conversation
- ๐ง Specialized AI Agents: 6 task-focused assistants (Coder, Muse, Scholar, etc.)
- ๐ก๏ธ Authorized Tool Calling: deny-by-default persona tool allowlists; arbitrary browser code execution is disabled
- ๐ธ Enhanced AI Moments with dynamic posting and smart comments
- ๐ Location tags and visibility settings (Public/Private/etc.)
- ๐ฌ Reply threads and emoji reactions in Moments
- ๐ฅ Moments/Timeline with AI auto-posting
- ๐ซ Friends management with groups
- ๐ฏ Daily Check-in and Achievements
- ๐งง Red Packet and Gift system
- ๐ฎ Rock-Paper-Scissors mini game
- ๐ Emoji picker with 8 categories
MIT License - see LICENSE for details.
Made with โค๏ธ for anime fans and AI enthusiasts