Document Scanner Notes
Build an iPhone app that scans paper documents with the camera, like receipts, letters or handouts, and turns them into searchable notes. VisionKit's document scanner finds the page edges, crops and straightens each page automatically, and the Vision framework recognizes the text on the device. Each scan becomes a note with its page images and text, saved with SwiftData, which you can title, tag and search later, even offline. Pages can be reordered, retaken or deleted, and a note can be exported as a PDF. You'll learn VisionKit's document camera, on-device text recognition, SwiftData models and queries, handling images efficiently, building PDFs with PDFKit, and designing a smooth capture flow.
- Estimate
- ~11h
- Steps
- 6
- Completed by
- 0
- Proposed by
- codeseed.app
SwiftUI · SwiftData · VisionKit · PDFKit
Project roadmap
- 01
Define the app
~1.5hWrite DESIGN.md: a note has a title, created date, tags, and pages; a page has an image file, recognized text and a status (processing, done or failed). Describe the flow (scan pages, then recognize text in the background, then the note is searchable), where images are stored, the size limits, and what happens when recognition fails. Done when: DESIGN.md covers the data and flow.
- 02
Scan documents
~2hPresent VNDocumentCameraViewController from SwiftUI (wrapped with UIViewControllerRepresentable), and when scanning finishes, save each page image (compressed as JPEG) into the app's storage and create a note with its pages in SwiftData. Handle cancelling and camera permission being refused. Done when: scanning a multi-page document creates a note with cropped, straightened page images.
- 03
Recognize the text
~2hAfter saving, run VNRecognizeTextRequest on each page in a background task, saving the text as each page finishes and updating its status. Use the note's first line of text as a suggested title. Resume unfinished pages when the app starts again. Done when: text appears on each page shortly after scanning, even for multi-page notes.
- 04
Manage notes and pages
~2hBuild a notes list (newest first, with the first page as a thumbnail), and a note screen where you can rename it, add tags, view each page with its text, reorder pages, rescan or delete a page, and add more pages. Deleting a note removes its image files. Done when: notes and pages can be managed, and deleted files don't pile up.
- 05
Search and export
~1.5hAdd search over titles, tags and recognized text (with #Predicate, ignoring case), showing matching notes with a snippet. Add export as a PDF built with PDFKit (one page per scan) shared with ShareLink. Done when: searching finds notes by words on their pages, and the exported PDF contains all pages.
- 06
Test it
~2hPut scanning and recognition behind protocols so tests can use fakes. Write tests for the processing queue (resuming and failures), SwiftData queries with an in-memory container, search, title suggestions, and file cleanup on delete. Test on a device with different documents and lighting, and note the results in README.md. Done when: all tests pass, and README.md describes real-world results.
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack