π Gemma 4 Good Hackathon Submission - Harnessing the power of Gemma 4 to drive positive change and global impact.
A cross-platform Flutter desktop application that brings AI assistance to your fingertips through customizable keyboard shortcuts, intelligent screen interaction, and local on-device AI inference using Gemma 4.
Version: 1.0.2 | Status: β Production Ready | Hackathon: Gemma 4 Good
-
Gemma 4 Local Inference (NEW!) - On-device AI processing with privacy-first approach
- Powered by
flutter_gemmapackage - No API calls required - runs completely offline
- Supports multimodal inputs (text + images)
- Perfect for sensitive data and privacy-conscious applications
- Powered by
-
Google Gemini 2.0 Flash - Cloud-based advanced conversational AI
- Real-time streaming responses
- Full conversation history with local storage
- Search and filter past conversations
- Export chat history
- Vision AI - Capture and analyze any part of your screen
- Instant AI-powered visual insights
- OCR text extraction from screenshots
- Automatic image processing
- Create personalized shortcuts for instant AI command execution
- Support for complex key combinations
- Multiple command types (text & screenshot)
- Quick access to frequently used AI tasks
- Manage shortcuts from settings
- Monitor AI usage and request history
- View detailed statistics and analytics
- Track remaining free requests (20 limit)
- Request counter with daily reset
- Detailed request information screen
- Dark/Light Theme Support - Beautiful Material Design UI
- Responsive layout for all screen sizes
- Smooth animations and transitions
- Intuitive navigation with tabs
- Professional color scheme
- Lemon Squeezy Integration - Secure license validation
- Free tier with 20 daily requests
- Pro tier with unlimited requests
- License activation and deactivation
- License status indicator
- Isar Database - Fast local SQLite storage
- All data stored locally on your machine
- No cloud dependency
- Automatic data persistence
- Conversation history backup
- Windows - Native Windows integration
- macOS - Native macOS integration with Cocoa
- Linux - Full Linux support
- Platform-specific optimizations
- Consistent experience across all platforms
lib/
βββ core/ # Configuration & themes
β βββ config/ # App configuration
β βββ constants/ # App constants
β βββ themes/ # Light & dark themes
βββ services/ # Business logic
β βββ ai/ # AI integrations
β β βββ gemma4_service.dart # Local Gemma 4 inference β NEW
β βββ database/ # Isar database
β βββ license/ # License management
β βββ shortcuts/ # Keyboard shortcuts
β βββ screen/ # Screenshot & OCR
β βββ cache/ # Response caching
β βββ logging/ # Structured logging
β βββ error/ # Error handling
β βββ prompts/ # Prompt management
β βββ request/ # Request tracking
β βββ window/ # Window management
βββ models/ # Data models
βββ presentation/ # UI layer
β βββ screens/ # App screens
β βββ widgets/ # Reusable widgets
βββ providers/ # State management
| Service | Purpose |
|---|---|
| Gemma4Service | Local Gemma 4 inference β NEW |
| DatabaseService | Local data persistence |
| LicenseService | License validation & management |
| ShortcutService | Keyboard shortcut registration |
| ScreenService | Screenshot capture & OCR |
| RequestCounterService | Usage tracking |
| AppLogger | Structured logging |
| ErrorHandler | Error management |
- Dashboard with recent requests
- Feature showcase
- Statistics overview
- Quick access to shortcuts
- License status indicator
- Gemma 4 model status β NEW
- Real-time AI conversations
- Message history
- Screenshot upload capability
- Streaming responses
- Switch between Gemma 4 (local) and Gemini (cloud) β NEW
- License status bar
- Keyboard shortcut management
- Add/edit/delete shortcuts
- Command type selection
- Shortcut configuration
- Gemma 4 model configuration β NEW
- View detailed request information
- Continue conversations
- Message history
- License status
- Flutter SDK 3.8.0+
- Dart SDK 3.8.0+
- macOS, Windows, or Linux
- For Gemma 4: Download Gemma 4 model files (e.g., from Hugging Face)
# Clone and navigate
cd ai_explainer
# Get dependencies
flutter pub get
# Generate code (Isar models)
flutter pub run build_runner build
# Run the app
flutter run -d <platform> # macos, windows, or linuxCreate a .env file or set environment variables:
export GEMINI_API_KEY=your_gemini_api_key
export LEMON_SQUEEZY_API_KEY=your_lemon_squeezy_key
export LEMON_SQUEEZY_STORE_ID=your_store_id- Download a Gemma 4 model (recommended:
gemma-2b-it-q4_0.gguffor desktop) - Place the model in your app's assets or documents directory
- The app will automatically detect and load the model
Example model paths:
- macOS:
~/Library/Application Support/bix_ai/models/gemma-2b-it-q4_0.gguf - Windows:
%APPDATA%/bix_ai/models/gemma-2b-it-q4_0.gguf - Linux:
~/.local/share/bix_ai/models/gemma-2b-it-q4_0.gguf
- flutter - UI framework
- provider - State management
- isar - Local database
- http - HTTP client
- window_manager - Window management
- hotkey_manager - Keyboard shortcuts
- screen_capturer - Screenshot capture
- screen_text_extractor - OCR
- shared_preferences - Local preferences
- google_fonts - Typography
- bot_toast - Toast notifications
- flutter_gemma β NEW - Local Gemma 4 inference
flutter test- Quick Start Guide - Service usage examples
- Project Analysis - Architecture details
- Production Readiness - Deployment checklist
- Testing Guide - Test execution
- Improvements Summary - Recent enhancements
- Gemma 4 Setup Guide - β NEW Model configuration
- β Gemma 4 Local Inference - Process sensitive data completely offline
- β All data stored locally
- β No cloud storage required (when using Gemma 4)
- β Secure license validation
- β JWT authentication ready
- β Environment-based configuration
- β No sensitive data logging
- 20 daily AI requests (Gemini cloud)
- Unlimited Gemma 4 local inference β NEW
- All core features
- Local data storage
- Screenshot analysis
- Custom shortcuts
- Unlimited AI requests (Gemini cloud)
- All free features
- Priority support
- Advanced analytics
This project is submitted to the Gemma 4 Good Hackathon with the mission to harness the power of Gemma 4 to drive positive change and global impact.
- Privacy-First AI - Enables users in sensitive fields (healthcare, legal, counseling) to use AI without data leaving their device
- Offline Accessibility - Works in areas with limited internet connectivity
- Cost-Free AI Access - No API costs make AI accessible to everyone
- Educational Tool - Helps users understand how local AI models work
- Multilingual Support - Gemma 4's multilingual capabilities help break language barriers
- Create a feature branch
- Make your changes
- Run tests:
flutter test - Submit a pull request
Proprietary - All rights reserved
For issues or questions:
- Check the documentation files
- Review test files for usage examples
- Check application logs with AppLogger
- Refer to IMPROVEMENTS_SUMMARY.md
Built with β€οΈ using Flutter and Gemma 4
Submitted to the Gemma 4 Good Hackathon