Skip to content

A modern Android document scanning application built with ML Kit for optical character recognition (OCR) and document classification.

Notifications You must be signed in to change notification settings

Biplab2014/SmartScan

Repository files navigation

SmartScan

A modern Android document scanning application built with Jetpack Compose that uses ML Kit for optical character recognition (OCR) and document classification.

Features

  • 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

Tech Stack

  • 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

Requirements

  • Android API 24+ (Android 7.0)
  • Camera permission
  • Internet permission (for ML Kit)

Setup

  1. Clone the repository
  2. Open in Android Studio
  3. Sync project with Gradle files
  4. Run the app on a device or emulator with camera support

Permissions

The app requires the following permissions:

  • CAMERA - For document scanning
  • INTERNET - For ML Kit functionality
  • READ_EXTERNAL_STORAGE - For accessing stored images
  • WRITE_EXTERNAL_STORAGE - For saving captured images (API 28 and below)

Architecture

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

Key Components

  • CameraScreen: Document capture interface
  • HomeScreen: Document list and search
  • DocumentDetailScreen: View document details
  • OCRService: Text extraction using ML Kit
  • DocumentClassificationService: Document type classification
  • DocumentProcessingService: Orchestrates OCR and classification

Project Structure

app/src/main/java/com/app/smartscan/
├── data/
│   ├── dao/
│   ├── database/
│   ├── model/
│   └── repository/
├── di/
├── service/
├── ui/
│   ├── components/
│   ├── navigation/
│   ├── screens/
│   ├── theme/
│   └── viewmodel/
└── SmartScanApplication.kt

License

This project is licensed under the MIT License.

About

A modern Android document scanning application built with ML Kit for optical character recognition (OCR) and document classification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors