Mobile
Mobile supports field workflows: receiving, tagging, document capture, offline queueing, and sync.
Current POC
The working Flutter proof of concept is in reference/mobile_app_demo/.
cd reference/mobile_app_demo
flutter pub get
flutter run
flutter analyze
There is no test/ directory in the current checkout. Add tests before treating the POC as production code.
POC Dependencies
| Package | Use |
|---|---|
mobile_scanner | QR/barcode scanning |
sqflite | Local event queue |
http | Sync endpoint calls |
connectivity_plus | Network status |
google_mlkit_text_recognition | OCR |
image_picker | Document and label photos |
pdf, printing | Batch tag PDF generation |
uuid | Client IDs |
POC Architecture
reference/mobile_app_demo/lib/
├── models/ plain Dart models
├── data/ in-memory ChangeNotifier repositories
├── db/ durable event queue
├── services/ OCR, parsers, sync, event emission, PDF
├── screens/ app flows and onboarding wizard
└── widgets/ shared scanner/OCR widgets
Current Limitations
- Backend URL is hard-coded in
lib/services/sync_service.dart. - Current asset view is in memory and disappears after restart.
- No authentication or secure token storage.
- No generated API client.
- No CI or release signing.
- Android is the only exercised platform.
Production Mobile Target
When porting to apps/mobile/:
- inject API base URLs through flavors or build-time configuration;
- use the generated Dart client;
- store credentials in platform secure storage;
- define offline behavior per workflow;
- preserve idempotent event sync;
- add unit, widget, mocked-client, and integration tests;
- configure Android and iOS signing outside source control.
POC Smoke Test
- Start on Home.
- Open seeded delivery
GRN-1234579. - Accept full delivery.
- Tag assets by scanning QR codes or choosing temporary/missing tag paths.
- Capture acceptance paperwork.
- Defer or attach GAN.
- Confirm and send to inventory.
- Open Event Log and verify queued or synced events.