How ossappscollective/oss-documentscanner works
The repository contains two NativeScript apps: OSS Document Scanner and OSS CardWallet. The main app entry starts document, OCR, security, network, and sync services, then selects a camera, card-list, or other UI entry point. The scanner’s broader workflow includes capture and image processing, document/OCR management, and PDF export; CardWallet has pass and barcode features. Sync supports local folders and remote providers. Source excerpts are limited, so uncertain links between UI components, processing, and services are omitted; documented provider and feature branches are shown at their existing paths.
Main entry points: app.ts App startup · BasePDFSyncService.ts PDF sync · BaseDataSyncService.ts Document sync · sync.ts Sync service
Components 25
App entry and UI
- App startup
app/app.ts - Camera UI
app/components/camera/Camera.svelte - Card list
app/components/list/CardsList.svelte - Document lists
app/components/list/DocumentsList.svelte - Passcode security
app/services/security.ts
Documents and scanning
- Document service
app/services/documents.ts - Document model
app/models/OCRDocument.ts - Image processing
plugin-nativeprocessor/index.android.ts - OCR service
app/services/ocr.ts - OCR results
app/components/ocr/OCRDataView.svelte - PDF export
app/services/pdf/PDFExporter.ts - PDF preview
app/components/pdf/PDFPreview.svelte
Sync and storage
- Sync service
app/services/sync.ts - Document sync
app/services/sync/BaseDataSyncService.ts - Image sync
app/services/sync/BaseImageSyncService.ts - PDF sync
app/services/sync/BasePDFSyncService.ts - Google Drive
app/services/sync/gdrive/GoogleDriveDataSyncService.ts - OneDrive
app/services/sync/onedrive/OneDriveDataSyncService.ts - WebDAV
app/services/sync/webdav/WebdavDataSyncService.ts - Local folders
app/services/sync/local/LocalFolderPDFSyncService.ts - Paperless NGX
app/services/sync/paperless/PaperlessNgxPDFSyncService.ts
CardWallet features
- Pass model
app/models/PKPass.ts - Pass display
app/components/pkpass/PKPassView.svelte - Barcode tools
app/components/qrcode/CreateBarcode.svelte
Other components
- User
Connections 22
- User → App startup: launches
- App startup → Camera UI: selects camera
- App startup → Card list: selects cards
- App startup → Document lists: selects documents
- App startup → Document service: starts
- App startup → OCR service: starts
- App startup → Sync service: starts
- App startup → Passcode security: starts
- Document service → Document model: uses
- Sync service → Document sync: coordinates
- Document sync → Document model: reads and writes
- Document sync → Google Drive: provider sync
- Document sync → OneDrive: provider sync
- Document sync → WebDAV: provider sync
- PDF sync → Local folders: local provider
- Sync service → Image sync: coordinates
- Sync service → PDF sync: coordinates
- PDF sync → Google Drive: provider sync
- PDF sync → OneDrive: provider sync
- PDF sync → WebDAV: provider sync
- PDF sync → Paperless NGX: provider sync
- Pass display → Pass model: displays