<<<<<<< HEAD
=======
A fully functional, cross-platform Flutter application for Optical Character Recognition (OCR) on images. OCRify supports Windows, macOS, Linux (Desktop), Android & iOS (Mobile), and Web (Browser).
- Cross-Platform Support: Works on Windows, macOS, Linux, Android, iOS, and Web
- Image Upload/Selection: Pick images from device or upload files with preview
- OCR Functionality:
- Desktop: Uses native Tesseract installation for high-performance OCR
- Mobile: Optimized for mobile devices with platform-specific implementations
- Web: Browser-based OCR processing (placeholder for Tesseract.js integration)
- Modern UI/UX: Material 3 design with adaptive layout for different screen sizes
- Three Main Tabs:
- Select Image: Upload and preview images for OCR processing
- Extracted Text: View OCR results with copy to clipboard functionality
- History: Track all OCR operations with success/failure status
- Local Storage: Hive-based local storage for OCR history and results
- Error Handling: Graceful handling of unsupported formats and processing failures
- Progress Tracking: Real-time progress updates during OCR processing
- Flutter 3.9.0+ and Dart 3.9.0+
- Git for cloning the repository
- Tesseract OCR installed and available in PATH
- Windows: Download from UB-Mannheim
- macOS:
brew install tesseract - Linux:
sudo apt install tesseract-ocr
-
Clone the repository
git clone <repository-url> cd ocrify
-
Install Flutter dependencies
flutter pub get
-
Generate Hive adapters (for local storage)
flutter packages pub run build_runner build
# Run on Linux
flutter run -d linux
# Run on Windows
flutter run -d windows
# Run on macOS
flutter run -d macos
# Run on Android
flutter run -d android
# Run on iOS
flutter run -d ios
# Run on Web
flutter run -d chrome# Build for Linux
flutter build linux --release
# Build for Windows
flutter build windows --release
# Build for macOS
flutter build macos --release
# Build for Android
flutter build apk --release
# Build for iOS
flutter build ios --release
# Build for Web
flutter build web --releaseocrify/
βββ lib/
β βββ core/
β β βββ app.dart # Main application widget
β βββ features/
β β βββ ocr/
β β βββ domain/
β β β βββ services/
β β β βββ ocr_service.dart # OCR service interface & implementations
β β βββ presentation/
β β βββ pages/
β β β βββ home_page.dart # Main home page with tabs
β β βββ providers/
β β β βββ image_provider.dart # Image selection state
β β β βββ ocr_provider.dart # OCR processing state
β β β βββ history_provider.dart # History management state
β β βββ widgets/
β β βββ image_selection_tab.dart # Image upload/selection tab
β β βββ ocr_results_tab.dart # OCR results display tab
β β βββ history_tab.dart # History management tab
β βββ shared/
β βββ models/
β β βββ ocr_result.dart # OCR result data model
β β βββ ocr_history_item.dart # History item data model
β βββ services/
β βββ utils/
β βββ platform_utils.dart # Platform detection utilities
βββ assets/
β βββ images/ # Image assets
β βββ js/ # JavaScript files for web
βββ test/ # Unit and widget tests
βββ pubspec.yaml # Dependencies and configuration
- No environment variables required for basic functionality
- Tesseract path detection is automatic on desktop platforms
- Android: Permissions configured in
android/app/src/main/AndroidManifest.xml - iOS: Privacy descriptions in
ios/Runner/Info.plist - Web: PWA configuration in
web/manifest.json - Desktop: Native Tesseract integration
- Select Image: Use the "Select Image" tab to choose an image file
- Start OCR: Click "Start OCR" to begin text extraction
- Automatic Navigation: The app automatically switches to the "Extracted Text" tab when processing is complete
- View Results: See the extracted text with processing details and metadata
- Copy Text: Use the copy button to copy extracted text to clipboard
- Check History: View processing history in the "History" tab
- Automatic Tab Switching: After OCR completion, users are automatically taken to the results tab
- Smooth Animations: Smooth transitions between tabs and animated success indicators
- Progress Tracking: Real-time progress updates during OCR processing
- Smart Navigation: Prevents unnecessary tab switches and respects user manual navigation
- JPEG/JPG
- PNG
- BMP
- TIFF
- WebP
- Desktop: Uses Tesseract with PSM 6 (uniform block of text) and OEM 3 (default engine)
- Mobile: Platform-optimized settings
- Web: Browser-based processing (placeholder)
# Unit tests
flutter test
# Specific test file
flutter test test/ocr_service_test.dart
# With coverage
flutter test --coverage- Data models: 100% coverage
- OCR services: Platform-specific implementations
- UI components: Widget testing
- State management: Provider testing
Error: Tesseract is not installed. Please install Tesseract from https://github.com/tesseract-ocr/tesseract
Solution: Install Tesseract OCR for your platform and ensure it's in PATH
- Linux: Ensure required development packages are installed
- Windows: Check Visual Studio build tools
- macOS: Verify Xcode command line tools
- File picker warnings are informational and don't affect functionality
- These are known issues with the file_picker plugin
- Desktop: Use high-quality images for better OCR accuracy
- Mobile: Optimize image size before processing
- Web: Consider image compression for faster uploads
- 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
- Follow Flutter best practices
- Use Riverpod for state management
- Maintain test coverage above 80%
- Add comprehensive documentation
- Follow Material 3 design principles
This project is licensed under the MIT License - see the LICENSE file for details.
- Tesseract OCR: Open-source OCR engine
- Flutter Team: Cross-platform framework
- Riverpod: State management solution
- Hive: Local storage solution
- Issues: Report bugs and feature requests via GitHub Issues
- Discussions: Join community discussions
- Documentation: Check the wiki for detailed guides
- Initial release
- Cross-platform OCR functionality
- Material 3 UI design
- Local storage with Hive
- Riverpod state management
- Comprehensive testing suite
OCRify - Making text extraction simple across all platforms! π
6b2d53f (Initial commit: OCRify v1.0.0 - Cross-platform OCR application with Google ML Kit integration)