CURRENT CANONICAL BASELINE
Version: v41
Status: CRM timeline edit and deletion governance refinement
Next planned package: v42

# Mobile Readiness Plan

## Current phase note
- v42 timeline governance preserves clean mobile-safe operator actions for edit, complete, and delete flows while keeping audit context visible.

# Mobile Readiness Plan

## Purpose
This document tracks the architectural choices in Dispatch Spot that preserve a clean path to future Android and iOS apps.

## Current Mobile Readiness Status
Dispatch Spot is being built as an API-driven dispatch operating system first, which is the correct foundation for mobile expansion later.

## Mobile-Ready Foundations Already In Place
- Core business rules live in service modules instead of only inside page components.
- Primary workflows already run through API routes.
- Load status progression is explicit and reusable.
- Dashboard and operational alerts are data-driven.
- Quick Assign and conflict detection are workflow concepts that can later be reused in mobile screens.
- Authentication can now work with either the web session cookie or a bearer token, which preserves a clean future path for native apps.
- Login can now optionally return the signed session token for future mobile clients.


## Mobile-Relevant Notes Added In This Phase
- Time-sensitive operational alerts are now generated from backend dashboard logic rather than only from visual board cues.
- This preserves a clean path for future mobile alert surfaces and push notification mapping because urgency detection now lives in the shared backend layer.

## Important Mobile Gaps Still On The Roadmap
- Session expiry and refresh-token lifecycle.
- Push notification infrastructure.
- Mobile-friendly file and camera upload workflow.
- Pagination and incremental sync for larger datasets.
- Offline-aware behavior for future driver-side workflows.

## Build Rule Going Forward
Every significant backend or workflow change must be evaluated against this question:

Will this support future Android and iOS apps without requiring a major re-architecture?

## Current Conclusion
No major re-architecture is required at this stage. The web application can continue forward, but all new backend and workflow work should preserve API-first, service-first patterns.

- Saved dispatch views now exist as backend-compatible filter presets, which can later map directly to tabs or segmented controls in the mobile apps without changing business logic.

## Mobile-Relevant Notes Added In This Phase
- Density mode and saved dispatch views continue to separate operational state from presentation, which preserves a clean future path to mobile-specific compact list layouts, segmented tabs, and role-based board views without changing backend workflow logic.


## Mobile-Relevant Notes Added In This Phase
- The Dispatch Board now adapts responsively for smaller screens by switching from a full multi-lane desktop board to a single-lane mobile board with a scrollable lane selector.
- This preserves the same dispatch workflow states while reducing presentation complexity, which is a strong bridge toward future native mobile queue tabs and segmented dispatch views.


## Mobile-Relevant Notes Added In This Phase
- Loads list now has a dedicated stacked mobile card view for smaller screens instead of forcing the desktop table into cramped layouts.
- Action groups now wrap naturally across screen sizes, which keeps core dispatch actions reachable on tablets and smaller laptops.
- Desktop and tablet views continue using the same data and workflow rules, which preserves a clean path to future native list/detail mobile patterns.

- Dispatch Board now uses a cleaner phone-first lane selector and more resilient responsive controls, which maps better to future mobile queue navigation.

- Mobile web readiness improved in v11.1: phone layouts now use a drawer-based nav shell instead of shrinking the desktop sidebar into the viewport. This mirrors future native navigation patterns more closely.


## Newly completed mobile-preparatory infrastructure
- The load detail page now uses a stacked action hierarchy and compact summary metrics suitable for future mobile list/detail patterns.
- Core workflow actions remain API-backed rather than page-only, supporting future native clients.
## Dashboard scope readiness
- Dashboard now uses one KPI contract for both organization-wide and per-truck views.
- This is mobile-safe because the future mobile app can switch scope without changing response schema.


## KPI presentation groundwork
- The dashboard scorecard now separates KPI data contracts from presentation emphasis, which supports future mobile card prioritization.
- RPM thresholds are currently global in the web UI. For future mobile and per-truck tuning, add warning/critical RPM threshold fields to truck financial settings instead of hardcoding device-specific logic.


## v15.1 dashboard KPI refinement
- Average RPM renamed from RPM.
- Average RPM card now renders with a black background and white supporting text.
- Average RPM value shifts to orange below $3.00 and red below $2.50.
- Projected RPM placeholder card now appears only in single-truck scope and remains hidden in All Trucks scope.
- Loads Booked YTD and Cancelled Loads continue to show both count and value.

## Dashboard Threshold Readiness
- Truck financial settings now carry truck-specific RPM threshold fields so future mobile clients can render truck health states consistently without duplicating threshold logic in the app.

- v16.1 adds responsive mobile card layouts for Trucks, Drivers, and Brokers list views to prevent horizontal scrolling for actions on small screens.


## v17 update
Dashboard period selection now flows through the same API contract used for company and truck scope. This keeps future mobile KPI views aligned across web, iOS, and Android.

## Field Access Mobile Readiness
Field-user access is now a formal planning stream. This is critical for future Android and iOS because:
- drivers and owner operators should not use the same surface as dispatchers
- field users need restricted load, document, and truck-metric visibility
- future native mobile apps can be built on a focused field portal model rather than a shrunken office dashboard

The new planning anchor for this is `FIELD_OPERATIONS_ACCESS_PLAN.md`.


## Routing Readiness
- The roadmap now explicitly preserves a future routing and geospatial layer for pickup/delivery search, route miles, duration, and provider abstraction.
- This is important for future mobile apps because native clients will eventually need place search, route previews, mileage validation, and navigation handoff without changing the core load model.
- See `ROUTING_AND_DISTANCE_PLAN.md`.


## v22 mobile-readiness impact
Field-visible document groundwork is now part of the schema direction. This is important for the future mobile experience because a driver or owner-operator app will need:
- document visibility scoped by role
- load-linked and truck-linked document retrieval
- field-safe labels for documents like BOL and POD
- field-facing load instructions kept separate from internal dispatcher notes
- linked login users mapped to driver records

## Document Access API Readiness
- Added mobile-compatible document list/detail endpoints with role-aware filtering.
- This supports future native field document screens without copying office-only access rules into mobile clients.


## CRM Mobile Readiness
- Future mobile surfaces should support contact lookup, relationship notes, tasks, and partner/customer stage visibility.
- Owner operator and driver relationship views should remain API-first so mobile apps can reuse the same lifecycle, document, and KPI data contracts.
- See `CRM_AND_PARTNER_LIFECYCLE_PLAN.md` for the commercial relationship roadmap.


## CRM mobile readiness
The new CRM schema groundwork supports future mobile experiences by keeping partner/customer lifecycle state and activity history in backend data structures rather than UI-only assumptions. This will later allow mobile-friendly list/detail CRM views, follow-up tasks, and relationship-specific alerts.
