* enulator test * enulator fix * fix adb name * fix path for detox * fix api * fix path * fix path * path * path * path * fix: start Metro before emulator-runner to avoid pipe block * add bare-minimum e2e workflow using release build (no Metro) * fix: use debug instrumentation APK against release app build * remove viewer.e2e.ts, requires launch args bridge not yet wired up * cleanup: remove E2E from build-android workflow, revert release detox config * basic new readme * remove bad change
LensApp
A small React Native document scanner. Point it at a page, it crops the edges, lets you review, and saves a PDF you can share.
Built on top of react-native-document-scanner-plugin, with react-native-html-to-pdf for export and react-native-share for sending things out.
What's in it
- Scan multi-page documents with automatic edge detection
- Review pages before saving (reorder, retake, apply a filter)
- Persist scans locally, rename them, view them later
- Export as PDF and share
Screens live in src/screens/ — Home, Scan, Review, Viewer. Navigation is plain state in App.tsx; there's no router dependency. Document storage is a simple hook (src/hooks/useDocumentStore.ts).
Requirements
- Node 18+
- JDK 17, Android SDK (for Android)
- Xcode + CocoaPods (for iOS)
The usual React Native 0.73 setup. If you haven't done this before, the RN environment guide is the canonical reference.
Running it
Install:
npm install
iOS only — install pods:
cd ios && pod install && cd ..
Start Metro in one terminal:
npm start
Then in another:
npm run android
# or
npm run ios
Tests
Unit tests (Jest + React Native Testing Library):
npm test
E2E (Detox, Android emulator):
npm run test:e2e:build
npm run test:e2e
The E2E build currently targets android.emu.debug. There's a launch-arg seed path (detoxSeedDocument=1) in App.tsx for preloading a fake document, but the bridge that wires it through to the native side isn't hooked up yet — so the viewer E2E is disabled for now.
Builds
Android release APKs are split per-ABI (armeabi-v7a, arm64-v8a, x86_64) — see android/app/build.gradle. Per-arch APKs are smaller than a universal one.
CI builds live in .github/workflows/.
Project layout
App.tsx # screen switcher + top-level state
src/
screens/ # Home, Scan, Review, Viewer
components/ # DocumentCard, EdgeOverlay, FilterPicker
hooks/ # useDocumentStore
utils/ # generatePdf, imageProcessing
types/ # shared types
e2e/ # Detox specs
patches/ # patch-package patches applied postinstall
Notes
Alert.promptis iOS-only; the rename flow falls back to a modal on Android (seeApp.tsx).postinstallrunspatch-package— if a patch fails to apply after a dependency bump, checkpatches/.