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).
- 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.).
- Interactive UI: 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
β βββ history/ # Chat history management
β βββ onboarding/ # First-time user experience
β βββ settings/ # App configuration and customization
β βββ splash/ # Initial loading screen
βββ services/ # OllamaService, StorageService
βββ main.dart # Application entry point
- Real-time streaming responses from Ollama models
- Support for multimodal inputs (text and images)
- Interactive message bubbles with copy/share options
- Markdown rendering for rich text formatting
- System prompt integration for specialized behaviors
- Persistent local storage using Hive
- Organize chats with custom names and tags
- Bulk operations for managing multiple conversations
- Search functionality to find specific conversations
- Dynamic theme switching (light/dark mode)
- Adjustable chat bubble appearance (colors, radius, opacity)
- Font size customization
- Avatar visibility toggle
- Background color options
- Ollama endpoint configuration
- Default model selection
- System prompt management
- Privacy controls
- Haptic feedback preferences
- 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)
The app includes Google AdMob integration for monetization through banner and rewarded ads.
- Get AdMob IDs: Create an account at AdMob Console
- Update Constants: Replace test IDs in
lib/core/constants/app_constants.dart:// Replace these with your production AdMob IDs static const String admobAppIdAndroid = 'YOUR_ANDROID_APP_ID'; static const String bannerAdUnitId = 'YOUR_BANNER_AD_UNIT_ID'; static const String rewardedAdUnitId = 'YOUR_REWARDED_AD_UNIT_ID';
- Update AndroidManifest: Replace the test app ID in
android/app/src/main/AndroidManifest.xml:<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="YOUR_ANDROID_APP_ID"/>
- iOS Setup: Add
GADApplicationIdentifiertoios/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





