Document DB v12 - Improved Interceptors with Soft Delete Integration, AI protections, & Admin UI with Aspire Integration! How!?
Getting Started
| GitHub | |
| Downloads |
Frameworks
.NET
.NET MAUI
Operating Systems
Android
iOS
macOS
Shiny.DocumentIntelligence is two halves of one pipeline:
IDocumentScanner— launches the platform’s own document camera (edge detection, perspective correction, multi-page) and hands back clean page images.IDocumentExtractor— turns those images into typed data: receipts, invoices, driver’s licenses, passports and payment cards.
Everything runs on-device. No cloud OCR service, no per-page cost, no document leaving the phone.
Install & register
Section titled “Install & register”dotnet add package Shiny.DocumentIntelligencebuilder.Services.AddDocumentIntelligence();That single call registers IDocumentScanner, ITextRecognizer, IBarcodeReader, IDataDetector and
IDocumentExtractor — the native implementation for the current platform in each case.
Platform manifest entries
Section titled “Platform manifest entries”| Platform | Required |
|---|---|
| iOS / Mac Catalyst | NSCameraUsageDescription in Info.plist |
| Android | Nothing — see below |
| macOS (AppKit) | Nothing — the user picks files through NSOpenPanel |
Or generate the full set of files — packages, registration, manifests and permissions — with the builder below:
Scan and extract
Section titled “Scan and extract”public class ExpenseService(IDocumentScanner scanner, IDocumentExtractor extractor){ public async Task<ReceiptData?> CaptureReceipt() { if (!scanner.IsSupported) return null;
var scan = await scanner.ScanAsync(new DocumentScanRequest { PageLimit = 1 }); if (scan.IsCancelled) return null;
var doc = await extractor.ExtractAsync(scan, DocumentType.Receipt); return doc.Receipt; // Merchant, Date, Subtotal, Tax, Total, Currency, Items }}Platform support
Section titled “Platform support”| Platform | Scanner | OCR | Barcodes | Data detector |
|---|---|---|---|---|
| iOS / Mac Catalyst | VisionKit document camera | Apple Vision | Apple Vision | NSDataDetector |
| Android | ML Kit document scanner (can emit PDF) | ML Kit | ML Kit | — |
| macOS (AppKit) | File picker + Vision deskew | Apple Vision | Apple Vision | NSDataDetector |
Windows / bare net10.0 | throws | throws | throws | inert |
Gate your UI on IsSupported rather than on a platform check — it also covers OS-version floors (the iOS
document camera needs iOS 13+).
What can be extracted
Section titled “What can be extracted”DocumentType | Strategy | Result |
|---|---|---|
Receipt | OCR + heuristics | ReceiptData — merchant, date, subtotal, tax, total, currency, line items |
Invoice | OCR + heuristics | InvoiceData — vendor, number, dates, totals, line items |
DriversLicense | AAMVA PDF417 barcode decode | LicenseData — name, DOB, licence number, address, plus the full AAMVA element map |
Passport | ICAO 9303 MRZ parse | PassportData — names, passport number, nationality, dates, with check-digit validation |
CreditCard | OCR + Luhn validation | CreditCardData — PAN, network, expiry, cardholder |
Unknown | OCR only | RawText |
See Extraction for the details, including the deliberate security choices in the payment-card path.
Where next
Section titled “Where next”- Scanning — the modal scanner, per-platform behaviour, PDFs
- Extraction — typed results, OCR layout, the seams you can replace