A premium, privacy-first, offline AI chat application for Android/iOS, integrating with Ollama via Termux. Experience powerful AI models directly on your device with a beautiful, customizable interface.
- Offline AI: Zero data latency. All chats processed locally via Ollama.
- Multimedia Support: Vision-capable chat (e.g., Llama 3.2 Vision, Llava).
- Media Gallery: Browse all shared images globally or per chat.
- File Attachments: Attach text/code files for context-aware answers.
- Premium Customization:
- Live Preview: Theme your chat bubbles, create presets, and adjust corner radius.
- Dynamic Chat History: Rename, bulk delete, and organize chats.
- System Prompts: 15+ rich presets (Productivity Coach, Fitness Trainer, etc.).
- Tag Management: Organize chats with tags and bulk tagging tools.
- Interactive UI: Fully native Material 3 design with haptic feedback, smooth animations, and a focused menu for messages.
- Markdown Support: Full rendering for code blocks, tables, and links.
- Privacy Centric: History stored locally using secure Hive database.
- Flutter SDK (Channel stable).
- Android Device (Recommended for Ollama/Termux) or Emulator.
- Termux (For running Ollama server on Android).
To run the AI engine locally on your phone:
- Install Termux: Download from F-Droid (Google Play version is outdated).
- Install Ollama:
pkg update && pkg upgrade pkg install ollama - Start Server:
ollama serve
- Download a Model (Open a new session):
ollama pull llama3.2 # Or any other model
Note: Ensure ollama serve is running in the background while using the app.
- Install Dependencies:
flutter pub get
- Generate Code (required for Hive adapters):
dart run build_runner build --delete-conflicting-outputs
- Run Application:
flutter run
- Build Release APK (with ProGuard & Dart obfuscation):
# Windows build_release.bat # Linux/macOS chmod +x build_release.sh && ./build_release.sh # Or manually: flutter build apk --release --obfuscate --split-debug-info=./debug_symbols
- Build Release App Bundle (for Google Play Store):
flutter build appbundle --release --obfuscate --split-debug-info=./debug_symbols --no-tree-shake-icons
The app uses ProGuard/R8 for Android and Dart obfuscation for enhanced security:
- Code Shrinking: Removes unused code, reducing APK size
- Optimization: Optimizes bytecode for better performance
- Obfuscation: Renames classes and methods to make reverse-engineering harder
- Resource Shrinking: Removes unused resources
Edit android/app/proguard-rules.pro to add custom keep rules if needed.
The debug_symbols/ folder contains symbol files for deobfuscating crash reports:
# To symbolicate a stack trace
flutter symbolize -i <crash_log> -d debug_symbols/Important: Keep the debug_symbols/ folder for each release to debug production crashes.
Recent security improvements have been implemented to ensure compliance with Google Play Store policies:
- All debug print statements have been removed or guarded with
kDebugModechecks - No sensitive information is exposed in production builds
- Clarified that data is stored in secure local Hive databases (on-device storage)
- Added note that data is stored locally in app sandbox with no encryption by default, but protected by device security
- Added information that the app uses HTTP for local Ollama communication (localhost:11434) onlyβno external data sent
- Added clarification that the app uses HTTP for local Ollama communication (localhost:11434) onlyβno external data sent
- Implemented proper release signing configuration with keystore.properties template
- Added fallback to debug signing for development environments
- Signing configuration loads from keystore.properties if exists, otherwise falls back to debug for dev
- Explicitly declared only needed permissions: INTERNET (for ads/Ollama), CAMERA, and READ_EXTERNAL_STORAGE (for images)
- Removed any implicit permissions
- Added Third-Party Licenses section listing all dependencies with links
- Added command to generate licenses.txt:
flutter pub deps --style=compact > licenses.txt
- Framework: Flutter (Dart)
- State Management: Riverpod (Providers & Notifiers)
- Storage: Hive (NoSQL, box-based persistence)
- Navigation: GoRouter
- Theme: Material 3 (Dynamic Color Support)
- Integration: Custom HTTP client for Ollama Streaming API
lib/
βββ core/ # Global constants, themes, router
β βββ constants/ # App-wide constants and presets
β βββ theme/ # Theme definitions and providers
β βββ widgets/ # Shared UI components
β βββ router.dart # Application routing configuration
βββ features/ # Feature modules
β βββ chat/ # Chat logic, UI, and bubbles
β β βββ domain/ # Data models and business logic
β β βββ presentation/ # Screens, widgets, and providers
β βββ media/ # Media gallery features
β βββ history/ # Chat history management
β βββ onboarding/ # First-time user experience
β βββ profile/ # User profile customization
β βββ settings/ # App configuration and customization
β βββ tags/ # Tag management UI
β βββ splash/ # Initial loading screen
βββ services/ # OllamaService, StorageService
βββ main.dart # Application entry point
## π¦ Versioning & Releases
We use a specific versioning pattern:
- Increment the 3rd number (patch) by 1 for each update.
- The 3rd number goes up to 100 (e.g., 1.0.99 -> 1.0.100).
- Once the 3rd number reaches 100, the next version resets it to 0 and increments the 2nd number (minor). For example: 1.0.100 becomes 1.1.0.
- Similarly, 1.1.100 becomes 1.2.0.
## π― Core Features
### Chat Interface
- Real-time streaming responses from Ollama models
- Support for multimodal inputs (text and images)
- Attach text files as context ("RAG-lite")
- Interactive message bubbles with copy/share options
- Message editing and regeneration workflows
- Markdown rendering for rich text formatting
- System prompt integration for specialized behaviors
### Chat History
- Persistent local storage using Hive
- Organize chats with custom names and tags
- Bulk operations for managing multiple conversations
- Search functionality to find specific conversations
- Global media gallery for chat images
### Customization
- Dynamic theme switching (light/dark mode)
- Adjustable chat bubble appearance (colors, radius, opacity)
- Font size customization
- Avatar visibility toggle
- Background color options
- Profile customization (display name and avatar color)
### Settings Management
- Ollama endpoint configuration
- Default model selection
- System prompt management
- Privacy controls
- Haptic feedback preferences
### Prompt Enhancer
- AI-powered prompt improvement using any Ollama model
- Fixed system prompt optimized for best enhancement results
- 5 free enhancements per 24 hours (watch ad to unlock more)
## π§© Media, Tags, and Attachments
- **Media Gallery**: Open **Settings β Media Gallery** to browse every image shared across chats, or tap the gallery icon in a chat to view media for that conversation.
- **Tag Management**: Use **Settings β Tag Management** to rename or delete tags globally.
- **File Attachments**: Tap the paperclip in the chat input to attach text files (TXT/MD/JSON/CSV/LOG). Attachments are injected into the prompt locally for context.
- **Attachment Limits**: Text attachments are limited to 200KB each to keep prompts fast and responsive.
## π° Monetization (AdMob)
The app includes Google AdMob integration for monetization through banner and rewarded ads.
### Setup for Production
1. **Get AdMob IDs**: Create an account at [AdMob Console](https://admob.google.com/)
2. **Android App ID**: Add `admobAppId` to your `key.properties` file (same file as signing keys):
```properties
admobAppId=ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy
Alternatively, set the ADMOB_APP_ID_ANDROID environment variable.
3. Ad Unit IDs: Pass IDs via --dart-define when building:
flutter build apk --dart-define=ADMOB_BANNER_ID=ca-app-pub-xxx/yyy --dart-define=ADMOB_REWARDED_ID=...(If not provided, the app will use Google Test IDs).
4. iOS Setup: Add GADApplicationIdentifier to ios/Runner/Info.plist
- Prompt Enhancements: 5 free per 24 hours, watch rewarded ad for 5 more
- Token System: 10,000 initial tokens, watch rewarded ad for +10,000
- Banner Ads: Displayed at bottom of Settings screen
Note: Test IDs are pre-configured for development. Always use test IDs during development to avoid policy violations.
- Endpoint: Default
http://127.0.0.1:11434(configurable in settings) - Model Management: Pull, delete, and list available models
- API Integration: Direct HTTP communication with Ollama REST API
- Theme Mode: Light/Dark/System preference
- Chat Styling:
- User/AI message colors
- Bubble corner radius (0-20)
- Font size (12-24)
- Message opacity (0.5-1.0)
- Bubble elevation (shadow effect)
- Layout Options:
- Chat padding adjustment
- Avatar visibility toggle
- Background color customization
- Auto-save: Toggle automatic chat saving
- Haptic Feedback: Enable/disable tactile responses
- Default Model: Set primary model for new chats
The application uses Riverpod for state management with a combination of:
NotifierProviderfor complex state logicFutureProviderfor asynchronous data loadingStateProviderfor simple state values
Hive is used for all local data storage:
- ChatBox: Stores chat sessions and messages
- SettingsBox: Persists user preferences
- SystemPromptsBox: Manages custom system prompts
GoRouter with ShellRoute provides:
- Bottom navigation between main sections
- Nested routes for settings sub-screens
- Type-safe navigation with path parameters
Custom HTTP client implementation for:
- Streaming responses from Ollama chat API
- Model listing and management
- Connection health checks
- Navigate to the Chat tab
- Select a model from the dropdown
- Type your message or attach an image
- Press send to initiate the conversation
- Go to Settings > Customization
- Adjust sliders for bubble radius, font size, and opacity
- Use color pickers to set message colors
- Toggle avatar visibility and other layout options
- Visit the History tab
- Long-press on chats for bulk operations
- Use the search bar to find specific conversations
- Tap the rename icon to customize chat titles
- Access Settings > Connection
- Update the Ollama endpoint URL if needed
- Select your preferred default model
- Test the connection to verify settings
- Android: Primary target platform with Termux integration
- iOS: Supported with manual Ollama setup
- Desktop: Experimental support via Flutter desktop
This project is licensed under the MIT License - see the LICENSE file for details.
The MIT License is a permissive open-source license that allows for commercial use, modification, distribution, and patent use, with the only requirement being that the original copyright notice and license text be included in all copies or substantial portions of the software.
For support, feature requests, or bug reports, please:
- Contact the development team
- Include your platform, Flutter version, and steps to reproduce
- Thanks to the Ollama team for enabling local AI inference
- Gratitude to the Flutter community for excellent documentation and packages
- Appreciation to all contributors and early adopters





