Skip to content

Add offline support for field data collection #1

@StencilwashCoder

Description

@StencilwashCoder

Problem

Coffee farms often have poor/no connectivity. Workers need to:

  • Check in to shifts (scan QR)
  • Record lot weights
  • Take photos of harvest

Currently all these operations require immediate API connectivity. If offline, the app fails.

Use Case

Worker Maria scans QR to check in at 6am in a remote coffee field with no cell signal. The check-in should queue locally and sync when connectivity returns.

Suggested Implementation

  • Add AsyncStorage or SQLite for local queue
  • Create offline queue system for mutations (check-ins, lot creation)
  • Show pending sync count in UI
  • Background sync when app returns online
  • Conflict resolution for duplicate check-ins

Data to Cache Offline

  • Shift details (after first load)
  • Worker profile
  • Pending check-ins (queue until synced)
  • Draft lot records with photos (sync when online)

UI Changes Needed

  • Visual indicator when in offline mode
  • "Syncing..." status with progress
  • Retry button for failed syncs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions