Skip to content

alfredang/scannerapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“„ Tertiary Scanner

Platform Swift SwiftUI VisionKit Offline App Store License

A clean, fast, fully-offline native iOS document scanner β€” scan, enhance, OCR, and export to PDF or JPG in a few taps. Nothing ever leaves your device.

Download on the App Store

Screenshots

iPhone iPad

About

Tertiary Scanner is a native iOS document scanner built with Swift 6, SwiftUI, and an MVVM architecture. It uses Apple's VisionKit document camera for edge detection and perspective correction, Core Image for enhancement filters, and the Vision framework for on-device OCR. Documents are stored locally with SwiftData β€” no account, no cloud, no tracking.

Key Features

Feature
πŸ“Έ Scanning β€” VisionKit auto edge detection, perspective correction, auto-crop, multi-page, manual corner adjust, retake, flash
🎨 8 enhancement filters β€” Original, Auto, White Document, Black & White, Denoise, Brighten, Sharpen Text, Receipt (live preview)
πŸ”€ OCR β€” Vision text recognition; copy, export, and search your library by content
πŸ“„ Export β€” single/multi-page PDF (A4 / Letter / fit, adjustable quality) and high-quality JPG
πŸ“€ Destinations β€” Photos, Files, iCloud Drive, native iOS Share Sheet (AirDrop, Mail, Messages, Print, …)
πŸ—‚οΈ Library β€” SwiftData-backed: thumbnails, rename, delete, duplicate, share, export, search
β™Ώ Accessibility β€” Dynamic Type, VoiceOver, Dark/Light, semantic colors

Tech Stack

Category Technologies
Language / UI Swift 6, SwiftUI, MVVM
Scanning VisionKit (VNDocumentCameraViewController)
OCR Vision (VNRecognizeTextRequest)
Image Processing Core Image (CIFilter)
PDF PDFKit / UIGraphicsPDFRenderer
Persistence SwiftData (metadata) + on-disk files (images/PDFs)
Project Gen XcodeGen (project.yml)
Min OS iOS 18+ Β· universal (iPhone + iPad)

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ SwiftUI Views ────────────────────────────┐
β”‚  Home Β· Scanner Β· Preview Β· Filter Β· Export Β· Library Β· Detail Β· Settings β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚ @MainActor @Observable                 β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚ ScannerViewModelβ”‚                       β”‚ LibraryViewModel β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚                                          β”‚
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€ Services (async) ───────────────▼───────────┐
   β”‚ ScannerService Β· OCRService Β· PDFService Β· ExportService Β· Storage β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       Core Imageβ”‚ Vision β”‚ PDFKit β”‚ Photos/Files           β”‚ SwiftData
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ ImageProcessor (shared CIContext) β”‚      β”‚ ScanDocument / ScanPage β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚  + files on disk        β”‚
                                               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Project Structure

scannerapp/
β”œβ”€β”€ project.yml                 # XcodeGen spec (signing, Info.plist, entitlements)
β”œβ”€β”€ DocumentScannerApp/
β”‚   β”œβ”€β”€ App/                    # @main App + SwiftData ModelContainer
β”‚   β”œβ”€β”€ Models/                 # ScanDocument, ScanPage (@Model), FilterType
β”‚   β”œβ”€β”€ Services/               # Scanner, OCR, PDF, Export, Storage
β”‚   β”œβ”€β”€ ViewModels/             # ScannerViewModel, LibraryViewModel
β”‚   β”œβ”€β”€ Views/                  # SwiftUI screens + Components/
β”‚   β”œβ”€β”€ Utilities/              # ImageProcessor, SettingsStore, Constants
β”‚   └── Resources/              # Assets.xcassets, PrivacyInfo.xcprivacy
β”œβ”€β”€ screenshots/                # App Store / README screenshots
└── .claude/skills/             # app-store-submission, mobile-ios-design, ipados-design-guidelines

Getting Started

Prerequisites

  • Xcode 26+ and XcodeGen (brew install xcodegen)

Build & Run

git clone https://github.com/alfredang/scannerapp.git
cd scannerapp
xcodegen generate
open DocumentScannerApp.xcodeproj

Or from the CLI (Simulator):

xcodebuild -project DocumentScannerApp.xcodeproj -scheme DocumentScannerApp \
  -destination 'platform=iOS Simulator,name=iPhone 17' build CODE_SIGNING_ALLOWED=NO

The Simulator has no camera, so the Scan button falls back to the photo picker. Launch with SCANNER_SEED_DEMO=1 to populate sample documents for testing/screenshots.

To run on a device, open the target β†’ Signing & Capabilities β†’ select your Team.

App Store

Tertiary Scanner is live on the App Store β€” download it here (com.tertiaryinfotech.scannerapp).

Download on the App Store

The end-to-end submission workflow (API-first, with the few web-UI-only steps documented) lives in .claude/skills/app-store-submission/.

Contributing

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/amazing)
  3. Commit your changes
  4. Open a Pull Request

License

Released under the MIT License.


Developed by Tertiary Infotech Academy Pte. Ltd.

⭐ Star this repo if you find it useful!

Powered by Tertiary Infotech Academy Pte Ltd

About

πŸ“„ Tertiary Scanner β€” a fast, fully-offline native iOS document scanner (Swift 6 / SwiftUI / MVVM). Scan, enhance, OCR & export to PDF/JPG. Now on the App Store.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors