FieldOps is a Flutter application for managing field work orders with an offline-first workflow. It combines local persistence, background sync, role- aware access control, and export utilities so teams can keep working even when connectivity is unreliable.
- Work order list, detail, create, and edit flows
- Notes and photo attachments linked to work orders
- Audit log tracking
- CSV and PDF export, plus native sharing support
- Authentication and permission-based route guards
- Local SQLite storage with Drift
- Sync queue handling with reconnect-triggered sync and Android background sync
- Supabase integration, with a local mock backend fallback
- Flutter
- Riverpod +
flutter_riverpod - GoRouter
- Drift + SQLite
- Supabase
- Workmanager
lib/
core/
auth/ Authentication, user state, local auth persistence
config/ App-level configuration such as Supabase credentials
database/ Drift database, schema, and generated data layer
export/ CSV, PDF, and share services
network/ Remote client abstractions and implementations
permissions/ Role and permission checks
router/ App navigation and guarded routes
sync/ Sync queue, conflict handling, retry policy, sync engine
features/
audit_log/
notes/
photos/
work_orders/
- Flutter SDK compatible with Dart
^3.9.2 - Xcode / Android Studio toolchains as required by your target platform
flutter pub getThe app currently defaults to Supabase:
lib/core/providers.dartsetsuseSupabase = truelib/core/config/supabase_config.dartcontains placeholder credentials
Before running the app, do one of the following:
- Replace
SupabaseConfig.urlandSupabaseConfig.anonKeywith real values. - Or switch
useSupabasetofalseto use the local mock backend instead.
If you leave placeholder credentials in place while useSupabase is true,
startup will fail when Supabase initializes.
This project uses code generation for Drift, Riverpod, and JSON models.
dart run build_runner build --delete-conflicting-outputsflutter runRun tests:
flutter testRegenerate generated files while developing:
dart run build_runner watch --delete-conflicting-outputsFormat source files:
dart format lib test- The app stores data locally in a Drift-backed SQLite database.
- Pending changes are queued and synced when connectivity returns.
- On Android,
Workmanagerregisters a periodic background sync task every 15 minutes. - When the app detects a reconnect event, it triggers a foreground sync.
- The local database file is created as
fieldops.sqlitein the app documents directory. - Route access to the audit log is guarded by the permission layer.
- Generated files such as
*.g.dartshould be kept in sync with schema and model changes.