A modern Android document scanning application built with Jetpack Compose that uses ML Kit for optical character recognition (OCR) and document classification.
- Document Scanning: Capture documents using the device camera
- OCR Text Extraction: Extract text from scanned documents using Google ML Kit
- Document Classification: Automatically classify documents into categories:
- Receipts
- ID Cards
- Prescriptions
- Contracts
- Event Posters
- Invoices
- Other documents
- Document Management: Store, search, and manage scanned documents
- Modern UI: Built with Jetpack Compose and Material 3 design
- Language: Kotlin
- UI Framework: Jetpack Compose
- Architecture: MVVM with Repository pattern
- Dependency Injection: Hilt
- Database: Room
- Camera: CameraX
- OCR: Google ML Kit Text Recognition
- Navigation: Navigation Compose
- Async: Kotlin Coroutines & Flow
- Android API 24+ (Android 7.0)
- Camera permission
- Internet permission (for ML Kit)
- Clone the repository
- Open in Android Studio
- Sync project with Gradle files
- Run the app on a device or emulator with camera support
The app requires the following permissions:
CAMERA- For document scanningINTERNET- For ML Kit functionalityREAD_EXTERNAL_STORAGE- For accessing stored imagesWRITE_EXTERNAL_STORAGE- For saving captured images (API 28 and below)
The app follows Clean Architecture principles with:
- UI Layer: Compose screens and ViewModels
- Domain Layer: Use cases and business logic
- Data Layer: Repository, Room database, and ML Kit services
CameraScreen: Document capture interfaceHomeScreen: Document list and searchDocumentDetailScreen: View document detailsOCRService: Text extraction using ML KitDocumentClassificationService: Document type classificationDocumentProcessingService: Orchestrates OCR and classification
app/src/main/java/com/app/smartscan/
├── data/
│ ├── dao/
│ ├── database/
│ ├── model/
│ └── repository/
├── di/
├── service/
├── ui/
│ ├── components/
│ ├── navigation/
│ ├── screens/
│ ├── theme/
│ └── viewmodel/
└── SmartScanApplication.kt
This project is licensed under the MIT License.