# Features — mobile (LOGiiT)

Evidence date: 2026-10-09.

Source: `git@bitbucket.org:overdrive/mobile.git`, `main` at `8ef251f`.

Status words: **Current** means present and reachable in this tree. **Documented** means a changelog or README statement. **Planned** means described as future work and not wired up. **Unknown** means the tree does not show whether it is finished.

Git history does not record feature-by-feature delivery. Three commits on 2026-01-08 contain the whole tree. Older feature notes exist only in `CHANGELOG.md`.

## Current features

### App shell and session

| Feature | Behaviour | Evidence |
|---|---|---|
| Splash | Logo, mobile DB init, route to login or dashboard | `lib/pages/splash/splash_page.dart` |
| Four flavors | dev, staging, demo, production titles and API bases | `lib/env.dart`, `lib/main_*.dart`, `android/app/build.gradle` |
| Login | Email and password, visibility toggle, button spinner | `lib/pages/auth/login/login_page.dart` |
| Offline login | Hash compare after a previous online login | `lib/services/auth_service.dart` |
| Browser register and forgot-password | External URLs on the flavor host | `login_page.dart` |
| Logout | Cancels an in-progress sync, posts `api/logout` when online, clears session keys | `AuthService.logout`, drawer in `lib/widgets/app_page.dart` |
| Offline banner | Red "Offline Mode" strip when the API host is not reachable | `app_page.dart`, `NetworkController` |
| Version footer | `{title} - v1.3.0 [27/10/2025 9:30]`. Long-press opens action logs | `app_page.dart`, `lib/env.dart` |
| Social links | Facebook, Instagram, LinkedIn on the login screen | `login_page.dart` |

### Dashboard

| Feature | Behaviour | Evidence |
|---|---|---|
| Landing / Dashboard | Loads projects, dives, users, KYC, stamps, dive types, breathing apparatus, specialized tasks, contractor entries | `lib/pages/landing/landing_page.dart` |
| Role-based hour totals | Dive roles use completed-project dives. ROV roles use status id 3 | `landing_page.dart` |
| Sync snackbars | Polls every 10 seconds; success or failure snackbar | `landing_page.dart` |
| Profile card and role tag | Shows role title case | `profile_card_widget.dart`, landing |

### Dive logbook

| Feature | Behaviour | Evidence |
|---|---|---|
| Projects list | Diver drawer item | `app_page.dart`, `lib/pages/projects/projects_page.dart` |
| Project save | Required fields, industry logbook id, content hash, contractor, supervisors | `lib/pages/projects/project_widgets.dart` |
| Dive save | Supervisor check (dive supervisor role), specialized tasks, `SaveDiveLogbookService` | `lib/pages/projects/dive_widgets.dart`, `lib/services/save_dive__logbook_service.dart` |
| Dive images | `DiveImages` / `DivesDiveImages` models and services | `lib/models/dive_images/`, `lib/services/dives_dive_images_service.dart` |
| Rejection comments | Diver and dive rejection comment models | `lib/models/dive_rejection_comments/`, `diver_rejection_comments/` |
| Share Logbook | Diver, hidden for students. Verified account, selected dives, email | `lib/pages/logbook/logbook_page_old.dart` |
| Depth unit preference | `meters` or `feet` on the user model | `lib/enum/user_type.dart` (`DepthUnitPreference`) |

### ROV logbook

| Feature | Behaviour | Evidence |
|---|---|---|
| ROV Tours | ROV pilot drawer item | `lib/pages/rov/rov_page.dart` |
| ROV project save | Supervisor email check | `lib/pages/rov/widgets/rov_projects_crud.dart` |
| Manufacturer, model, unit | Services and models | `lib/services/rov_manufacturer*_service.dart` |
| Tour sensors and manipulators | Contractor-entry child models | `lib/models/logbook_contractor_entry_rov_sensor/`, `..._rov_manipulator/` |
| Status labels | Not approved, approved, verified, declined by approver, declined by verifier | `lib/utils/logbook_status_utils.dart` |
| SHARiiT | ROV drawer item, sharing page | `lib/pages/logbook/logbook_sharing_page.dart` |
| Vetters | Contractor and company entry vetter models, vetting status, vetter type | `lib/models/logbook_contractor_entry_vetter/`, `lib/models/vetting_status/`, `lib/models/vetter_type/` |

Changelog v1.3.0 lists "Implemented rov supervisor", "Added supervisor rov notifications", "Added the vetters", "Added creating log contractor dive", and "Have the new shariit using logbook entity". Those types and screens exist. **Current**, also **Documented** in the changelog.

### COMPiiT

| Feature | Behaviour | Evidence |
|---|---|---|
| Competency list | Contractors only. Rows for the current user id, newest first | `lib/pages/compiit/compiit.dart` |
| Create / view | Competence, vessel, documents, linked dives, linked ROV, approver | `create_compiit_page.dart`, `view_compiit_page.dart`, `lib/pages/compiit/widgets/` |
| Approver role labels | ODM, LSS, Supervisor, plus a required comment | `view_compiit_page.dart` |
| Scanner | `MobileScanner` on a COMPiiT widget | `compiit_widgets.dart` |
| Company competence data | Company, project, assessment, criteria, custom competence, documents | matching files under `lib/models/` and `lib/services/` |

### Notifications and profile

| Feature | Behaviour | Evidence |
|---|---|---|
| Notifications inbox | Approvers only, with badge | `lib/pages/notification/notification_page.dart` |
| Notification kinds | Dive logsheet, ROV logsheet, profile request, profile notification, diver certification request, tour logsheet, email changed | `lib/enum/notificationType.dart` |
| Diver profile | Contractors. Includes password reset | `lib/pages/profile/diver_profile.dart` |
| Supervisor profile | Approvers and any non-contractor. Includes password reset | `lib/pages/profile/supervisor_profile.dart` |
| Passport, medical certificates, allergies, stamps, supervisor certification | Models and services used from profile / sync | `lib/models/passport/`, `medical_certificates/`, `stamp/`, `supervisor_certification/` |
| Student chip | Shown when `isStudent` is true | `app_page.dart` |

### Sync, files, device

| Feature | Behaviour | Evidence |
|---|---|---|
| Action log | Offline mutations stored and replayed | `lib/models_isar/action_log/`, `lib/services/offline_log_service.dart`, `sync_service.dart` |
| Manual sync | Workmanager one-off `com.logiit.manualSync` | `lib/services/background_sync_service.dart` |
| Periodic sync toggle | Default off. 15-minute task `com.logiit.backgroundSync` when enabled | `periodic_sync_service.dart`, `lib/widgets/periodic_sync_toggle.dart` |
| Content hashes | SHA-256 over model fields, ignoring id, timestamps, and hash | `lib/services/hash_service.dart`. Changelog names user, user details, and project |
| File upload and secure URL | `api/uploadFile/{key}`, `api/getSecureUrl`, offline download path | `http_service.dart`, `file_service.dart` |
| Camera and gallery permissions | OS-specific | `lib/services/permissions.service.dart` |
| Offline API probe | Long-press forgot-password. Editable DNS, poll | `lib/widgets/network_status_dialog.dart` |
| Action log viewer | Long-press version footer | `lib/pages/action_logs/action_logs_page.dart` |

## Documented releases

| Version | Noted changes | In this tree |
|---|---|---|
| v1.0.28 | Offline API dialog, login spinner, per-environment offline URL, iOS 16 | Yes |
| v1.3.0 (changelog date 28/10/2025) | ROV supervisor, vetters, contractor dive, hashes, SHARiiT, password eye, tester bugfixes including small-screen overflow | Yes, as the current code. The "supervisor no longer verified before saving" line does not match `project_widgets.dart` (see business rules) |
| Build notes in the changelog header | Flutter 3.38.5, FVM, widget-test fix, environment unit test, code generation, debug signing fallback, dev APK 81.4MB on emulator-5554 | FVM pin, signing fallback, and the unit test are in the tree. The APK artefact is not in git. `TEST_RESULTS.md` records the emulator run |

`pubspec.yaml` version `1.3.0+82` matches the version name and versionCode cited by `TEST_RESULTS.md`. The footer date 27/10/2025 and the changelog date 28/10/2025 differ by one day.

## Planned

| Item | Evidence | Not done because |
|---|---|---|
| REST-shaped API paths | `REST_API_CONVERSION_ANALYSIS.md` | `OnlineCrudService` still calls `find/{collection}`, `find-by-id/...`, `find-by-value/...`, `find-by-value-set/...`, `put/{collection}`, `post/{collection}`, `delete/{collection}/{id}`, `post-link-table/...`, `delete-link-table/...` |
| Phased rollout and backward-compatible old routes | Same document, "Additional Considerations" | No versioned `/api/v1` client |
| `find-by-user-id` query-parameter design | Section 3 of that document | No `find-by-user-id` call was found in `OnlineCrudService`. The analysis still lists it. Whether the server still exposes it is **Unknown** |

The analysis estimates 31–40 hours. That figure is the document's estimate, not a scheduled milestone.

## In development

No branch, TODO owner, or ticket in this repository marks a feature as in progress. `android/app/build.gradle` still has a template TODO on the application id, but the id is already `co.logiit.app`.

Commented flavor lines (`applicationIdSuffix ".uat"`, extra signing configs) are unused. **Unknown** whether a UAT flavor was abandoned.

## Recently changed (git)

Only `8ef251f` ("Fixed null issues", 2026-01-08) is a reviewable delta on top of the initial import:

- Null-handling edits across cloud models and Isar local models.
- FVM config pinning Flutter 3.38.5.
- Small edits to README, changelog, `TEST_RESULTS.md`, `lib/main.dart`, `lib/env.dart`, and `lib/controller/state_controller.dart`.

`6748c92` ("First commit , chrome working") is the only hint that web/Chrome was worked on. Web database support is still a throwing stub.

## Deprecated or leftover

| Item | Evidence |
|---|---|
| `LogbookPageOld` | Class name says old. It is the live Share Logbook route for divers. Not deleted |
| `lib/config.dart` `Config.apiUrl` and `Config.apiKey` | No references. Superseded by `AppEnvironment` |
| Action Logs drawer row | `visible: title == 'Action Logs'`, so it never shows as a way to open the page. Long-press is the entry |
| Settings option `onTap` for Action Logs | Empty callback |
| Desktop Flutter folders | Present. No product screen is desktop-specific |

## Removed

Nothing in git history shows a removed product feature. The changelog does not list removals.

## Not a user-facing feature

`credits.md` is a note of two accounts and passwords. It is not referenced by the app. Do not treat those values as seed data that the client logs in with automatically. They are committed secrets and need a human security decision.
