A powerful, open-source React Native mobile app for scanning and extracting text from images using OCR (Optical Character Recognition).
Features β’ Demo β’ Installation β’ Usage β’ Contributing β’ License
- π· Camera with Guide Overlay - Align text perfectly with visual guides
- π High-Accuracy OCR - Extract text from images with detailed debugging
- π Copy to Clipboard - One-tap copy for easy sharing
- π Privacy-First - Photos automatically deleted after processing
- β‘ Real-time Processing - Fast OCR with progress indicators
- π Debug Mode - Detailed network logs and API response analysis
- π¨ Clean UI - Modern, intuitive interface
- π Cross-Platform - Works on iOS, Android, and Web
Scan with Guide:
- Professional camera interface with alignment guides
- Green corner markers for precise framing
- Darkened overlay for clear guidance
Quick Scan:
- Instant photo capture with built-in cropping
- Fast processing for simple documents
- Node.js 18+ and pnpm
- Expo Go app (for testing on physical device)
- iOS Simulator or Android Emulator (optional)
-
Clone the repository
git clone https://github.com/yourusername/scan-text-app.git cd scan-text-app -
Install dependencies
pnpm install
-
Set up environment variables
# Copy the example environment file cp .env.example .env # Edit .env and add your OCR.space API key (optional) # If you skip this step, the app will use a demo API key with rate limits
Get your free API key at OCR.space (25,000 requests/month free tier)
-
Start the development server
pnpm start
-
Run on your device
-
Scan with Guide (Recommended)
- Tap "π· Scan with Guide" button
- Camera opens with alignment overlay
- Position text within the square guide
- Tap capture button
- Text appears automatically
-
Quick Scan (Alternative)
- Tap "Quick Scan (No Guide)"
- Take photo and crop as needed
- Text is extracted and displayed
-
Copy & Share
- Review extracted text
- Tap "π Copy to Clipboard"
- Paste anywhere on your device
Check the browser console or debug panel for:
- OCR API response times
- Image quality scores
- Confidence levels
- Error details
The app uses environment variables for configuration. Edit your .env file:
# Required: Your OCR.space API key
# Get one free at https://ocr.space/ocrapi (25,000 requests/month)
OCR_API_KEY=your_api_key_here
# Optional: Enable debug logging
DEBUG=false
# Optional: OCR Engine (1=faster, 2=more accurate)
OCR_ENGINE=2
# Optional: OCR Language (eng, spa, fra, deu, etc.)
OCR_LANGUAGE=engNote: If you don't set OCR_API_KEY, the app will use a demo key with rate limits.
Camera Guide Dimensions (app/camera.tsx):
const GUIDE_WIDTH = SCREEN_WIDTH * 0.85; // 85% of screen
const GUIDE_HEIGHT = SCREEN_HEIGHT * 0.4; // 40% of screenOCR Settings (app/index.tsx):
formData.append("language", "eng"); // Language: eng, spa, fra, etc.
formData.append("OCREngine", "2"); // Engine: 1 or 2
formData.append("scale", "true"); // Image scaling
formData.append("detectOrientation", "true"); // Auto-rotate| Category | Technology |
|---|---|
| Framework | React Native 0.81.5 |
| Platform | Expo ~54.0.20 |
| Routing | Expo Router ~6.0.14 |
| Language | TypeScript 5.9.2 |
| Camera | expo-camera 17.0.8 |
| OCR | OCR.space API |
| HTTP Client | axios 1.13.1 |
| Package Manager | pnpm |
scan-text-app/
βββ app/
β βββ index.tsx # Main scanner screen
β βββ camera.tsx # Camera with guide overlay
β βββ _layout.tsx # App navigation layout
βββ assets/ # Images, fonts, icons
βββ components/ # Reusable UI components
βββ constants/ # App constants
βββ hooks/ # Custom React hooks
βββ types/ # TypeScript type definitions
β βββ env.d.ts # Environment variable types
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore rules
βββ app.json # Expo configuration
βββ babel.config.js # Babel configuration
βββ package.json # Dependencies
βββ tsconfig.json # TypeScript config
βββ LICENSE # MIT License
βββ README.md # This file
βββ CONTRIBUTING.md # Contribution guidelines
βββ CODE_OF_CONDUCT.md # Community guidelines
We love contributions! Please read our Contributing Guide to get started.
Quick Start for Contributors:
- Fork the repo
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
See CONTRIBUTING.md for detailed guidelines.
- Web platform: Camera guide overlay not available (uses standard image picker)
- OCR.space free tier: Limited to 25,000 requests/month
- Image quality: Poor lighting or blurry images may reduce accuracy
- Environment variable support for API keys β
- Multiple OCR provider support (AWS Textract, Google Vision)
- Offline OCR with Tesseract.js
- Multi-language support UI
- Batch processing
- Text editing before copy
- History/favorites
- Dark mode
- Export to PDF/TXT
This project is licensed under the MIT License - see the LICENSE file for details.
- Expo - Amazing React Native framework
- OCR.space - Free OCR API
- React Native Community - Excellent documentation
Project Maintainer: Nenad Kostic
- GitHub: @nkostic
Project Link: https://github.com/nkostic/scan-text-expo
Built with β€οΈ using React Native & Expo
If you found this helpful, please β star the repo!