How xhowu/localscan works
LocalScan is a privacy-first inventory and item-management app whose default data stays on-device. The main workflow is scanning or entering item details, editing a draft, then saving and managing inventory. The graph focuses on the active app source under app/; v1.10.0 is documented as its archived source snapshot, so it is not duplicated here. Unsampled page and service responsibilities are included where established by the tree and README; edges are limited to relationships visible in excerpts or the source index.
Main entry points: App.tsx App shell · ScanPage.tsx Scan page · db.ts Local inventory store · EditItemPage.tsx Item editor
Components 24
App navigation
- App shell
app/src/App.tsx - Hash router
app/src/router.ts
Inventory management
- Inventory list
app/src/pages/ItemsPage.tsx - Item detail
app/src/pages/ItemDetailPage.tsx - Item editor
app/src/pages/EditItemPage.tsx - Recycle bin
app/src/pages/RecycleBinPage.tsx - Local inventory store
app/src/db.ts
Item capture
- Scan page
app/src/pages/ScanPage.tsx - Native scan bridge
app/src/lib/native-scan.ts - Camera overlay
app/src/lib/camera-overlay.ts - Android scanner plugin
app/android/app/src/main/java/com/localscan/app/LocalscanScannerPlugin.java - Scanner activity
app/android/app/src/main/java/com/localscan/app/ScannerActivity.java - Label OCR
app/src/services/ocr.ts - Label parser
app/src/lib/label-parse.ts - Capture draft
app/src/lib/draft.ts - Barcode lookup
app/src/services/barcode-lookup.ts
Data and settings
- Data sync
app/src/pages/SyncPage.tsx - Sync service
app/src/services/sync.ts - Data export
app/src/services/export.ts - Settings
app/src/pages/SettingsPage.tsx - Categories and locations
app/src/pages/TaxonomyPage.tsx - Field templates
app/src/pages/FieldTemplatesPage.tsx - User manual
app/src/pages/ManualPage.tsx
Other components
- Local user
Connections 27
- Local user → App shell: uses
README.md - App shell → Hash router: parses routes
app/src/App.tsx - App shell → Inventory list: renders
app/src/App.tsx - App shell → Scan page: renders
app/src/App.tsx - App shell → Item detail: renders
app/src/App.tsx - App shell → Item editor: renders
app/src/App.tsx - App shell → Data sync: renders
app/src/App.tsx - App shell → Settings: renders
app/src/App.tsx - Scan page → Native scan bridge: requests permission
app/src/pages/ScanPage.tsx - Scan page → Camera overlay: controls overlay
app/src/pages/ScanPage.tsx - Android scanner plugin → Scanner activity: launches
app/android/app/src/main/java/com/localscan/app/LocalscanScannerPlugin.java - Scan page → Label OCR: runs OCR
app/src/pages/ScanPage.tsx - Scan page → Label parser: parses OCR
app/src/pages/ScanPage.tsx - Scan page → Capture draft: creates draft
app/src/pages/ScanPage.tsx - Scan page → Item editor: navigates to
app/src/pages/ScanPage.tsx - Item editor → Local inventory store: reads and saves
app/src/pages/EditItemPage.tsx - Item editor → Capture draft: reads draft
app/src/pages/EditItemPage.tsx - Inventory list → Local inventory store: loads inventory
- Item detail → Local inventory store: loads item
- Recycle bin → Local inventory store: manages deleted items
- Data sync → Sync service: uses sync
- Data sync → Data export: exports data
- Settings → Local inventory store: configures local data
- Categories and locations → Local inventory store: manages taxonomy
- Field templates → Local inventory store: manages templates
- Scan page → Barcode lookup: looks up barcode
app/src/pages/ScanPage.tsx - App shell → User manual: renders manual
app/src/App.tsx