[![LinkedIn][linkedin-shield]][linkedin-url]
A cross-platform high-performance AI chat application built with Rust and React
Explore the documentation »
View Demo
·
Report Bug
·
Request Feature
This README is designed for developers
A modern desktop AI chat application built with Tauri, React, and Rust, supporting multi-platform deployment and local AI models.
- Project Overview
- Features
- Tech Stack
- Getting Started
- Usage Guide
- Project Structure
- Recent Updates
- Configuration
- Language Support
- Roadmap
- Contributing
- License
- Contact
- Acknowledgments
Chat Box Rust React is a local-first AI conversation application designed to provide secure, efficient, and user-friendly human-AI interaction. By integrating large language models, users can engage in natural language conversations while enjoying a clean, minimal interface and smooth interactions. The application supports both local and remote AI models while maintaining high performance and responsiveness.
- 🌟 Clean, Minimal UI for distraction-free experience
- 📝 Multi-conversation management with chat history
- 🔊 Voice input with real-time speech-to-text
- 📊 Markdown format support with code highlighting
- 🏎️ Streaming responses with real-time AI replies
- 🛡️ Local-first approach protecting data privacy
- 🌍 Cross-platform support
- 🔧 Multiple AI backend support (Ollama & Candle)
- 💾 SQLite database for conversation storage
- 🎨 React with Tailwind CSS for modern styling
- Frontend: React + TypeScript + Vite + Tailwind CSS
- Backend: Rust + Tauri
- Data Storage: SQLite
- AI Frameworks:
- Ollama (for remote/local model serving)
- Candle (for native Rust AI inference)
- Voice Processing: Vosk (speech recognition)
- Node.js (>= 16.0.0)
- Rust (>= 1.60.0)
- Tauri Development Environment
- Clone the repository
git clone https://github.com/horldsence/chat_box_rust.git
cd chat-box-rust-react
- Install dependencies
npm install
# or
pnpm install
- Run in development mode
npm run tauri dev
# or
pnpm tauri dev
- Build the application
npm run tauri build
# or
pnpm tauri build
- Create New Conversation: Click the "+" button in the left panel to create a new conversation
- Message Interaction: Type your question in the input box, then press send button or Enter key
- Voice Input: Click the microphone icon to start voice input
- Manage Conversations: Select, rename, or delete conversations in the left panel
- Configure Settings: Adjust AI models, interface, and system parameters through the settings panel
See the complete documentation for more features.
chat-box-rust-react/
├── src/ # Frontend code
│ ├── components/ # React components
│ ├── hooks/ # Custom React hooks
│ ├── types/ # TypeScript type definitions
│ ├── utils/ # Utility functions
│ └── assets/ # Static assets
├── src-tauri/ # Tauri backend code
│ ├── crates/ # Rust workspace crates
│ │ ├── agent/ # AI agent implementation
│ │ └── initialize/ # Initialization logic
│ └── src/ # Main Rust source code
│ ├── commands/ # Tauri commands
│ ├── services/ # Backend services
│ └── utils/ # Utility modules
└── package.json # Node.js dependencies
- Complete UI overhaul with clean, minimal design
- Improved usability and reduced visual clutter
- Better responsiveness for different screen sizes
- Enhanced accessibility features
- More consistent styling throughout the application
- Fixed API command parameter mismatch issues
- Improved message streaming functionality
- Fixed database message storage and retrieval
- Added debug tools for troubleshooting
- Enhanced error handling and logging
- Added comprehensive documentation
- Created debugging guides
- Improved code comments and API documentation
- Added various README files for different aspects of the project
The application uses configuration files for customization:
tailwind.config.js
: UI theming and styling configuration- Environment configuration through Tauri's configuration mechanism
- Runtime settings through the Settings panel
- Multiple Model Support: Use various AI models based on your needs
- Local Inference: Use Candle for Rust-native AI inference with Hugging Face models
- Remote Inference: Connect to external AI services for more powerful models
Chat Box Rust React provides documentation in multiple languages:
The application interface also supports multiple languages which can be configured in the settings.
- Support for more large language models
- Add text-to-speech functionality
- Enhance offline mode experience
- Implement plugin system
- Multi-language interface support
- Cloud synchronization capabilities
- Document collaboration features
See open issues for more information.
Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Project Maintainer: Peng - horldjason@outlook.com
Project Link: https://github.com/horldsence/chat_box_rust