Use the reviewed architecture contract
Driver App is a React Native client composed from an application shell, Ordering state providers, device-permission state, and nested navigation. Use this contract to decide which layer owns a visible state before changing configuration, navigation, or an integration.
This is a source-defined public contract. It does not certify a running backend, an installed binary, or the success of a network, realtime, native, or provider effect.
Availability
The contract applies to the reviewed Driver App release source and its matching Ordering Components release. Exact behavior can vary by project configuration, account and session state, driver schedule, device permission, platform, connectivity, lifecycle, and provider availability.
Public driver application and operator-side assignment remain adjacent-product workflows. They are not Driver App routes and do not prove that the mobile client has admitted an account or task.
Prerequisites
- Use a Driver App build configured for one Ordering project.
- Supply configuration through the supported app and Ordering provider boundaries instead of changing navigation state directly.
- Treat local session state, server authorization, and provider identity as separate inputs.
- Review the permission and lifecycle contracts before adding native or background behavior.
- Keep order, location, communication, account, and provider effects in their dedicated public contracts.
Responsibility boundaries
| Layer | Public responsibility | Does not establish |
|---|---|---|
| Native application shell | Start React Native, provide safe-area layout, load the configured theme, and hand control to the Driver App tree. | React navigation readiness or backend availability |
| Driver App composition | Supply project settings, Ordering providers, device-permission state, navigation, toast, and app-owned assets. | Authorization for a task or success of an effect |
| Ordering providers | Coordinate API configuration, language, project configuration, session, realtime, order, business, customer, and shared UI state. | That every provider completed successfully or uses a deployed contract matching this source |
| Root navigation | Choose loading, signed-out, schedule-blocked, or authenticated navigation from current local state. | Server acceptance, data freshness, or provider success |
| Authenticated navigation | Provide a detail stack around the main tab navigator. | Eligibility for any visible detail action |
| Main tabs | Present Orders first, plus Map view, Messages, and Profile; substitute the permission surface for Map view when required locally. | Successful reads, writes, location access, or message delivery |
| API | Independently authorize and validate each request before owning an accepted server-side read, write, or follow-on effect. Affected task contracts remain excluded when that boundary is not proven. | Native navigation, local storage, or operating-system handoffs |
| Operating system and providers | Own permissions, lifecycle, notification, realtime, maps, location, media, contact, and other external behavior after handoff. | Completion inside Driver App |
The navigation container has no reviewed inbound-link configuration. Generic signup, network-error, and not-found page sources are not registered Driver App destinations. Keep productive errors within the article and surface that owns the affected task.
Inputs and result
| Input | Consuming boundary | Observable result | Limit |
|---|---|---|---|
| Project and API configuration | Driver App and Ordering providers | Providers initialize for the configured project. | Initialization does not prove service availability. |
| Theme and local assets | Native/app shell | Loading, navigation, and task surfaces use the configured presentation. | Presentation is not product or API authority. |
| Saved session state | Session and root navigation | The root can select a signed-out or authenticated branch after loading settles. | Stored state is not server validation. |
| Driver schedule configuration | Root navigation | A schedule prerequisite can appear before the authenticated shell. | The client check does not define every server rule. |
| Permission and platform state | Permission provider and Map tab | The app can show the map or a permission-specific substitute. | Requested, declared, effective, granted, and blocked permissions differ. |
| Connectivity and realtime state | Authenticated providers and screens | Reads, subscriptions, loading, empty, or error states can change. | Connection or room intent is not receipt, freshness, or completion. |
| Navigation event and route input | Root, authenticated stack, or tab navigation | The matching registered surface can become visible. | A visible route does not prove its data or action succeeded. |
Provider ordering is part of the contract: inner consumers depend on state supplied by outer API, language, configuration, session, and realtime layers. Do not reorder providers or bypass their loading boundaries without reviewing every downstream consumer.
Security and privacy
- Store and transmit only the minimum account and task information required by the dedicated public contract.
- Never expose tokens, provider identifiers, account records, order data, messages, contact details, coordinates, media, or private configuration in logs or documentation.
- Treat a restored local session as untrusted until each server request applies its own authorization and validation.
- Keep permission, location, notification, realtime, contact, and media providers disabled in test or documentation environments unless isolation is independently proven.
- Do not add an unreviewed public route to a dormant page or internal helper.
Limits and failure states
| State | Architectural meaning | Maintainer response |
|---|---|---|
| Native splash or app loading | The next navigation state has not been admitted locally. | Inspect the app and provider readiness boundaries separately. |
| Signed-out entry | Local session state did not admit the authenticated branch. | Use the authentication contract; do not force the authenticated navigator. |
| Schedule prerequisite | The configured client schedule gate has priority. | Review schedule ownership and server limits before changing the gate. |
| Permission substitute | The Map tab does not have the required local permission result. | Keep OS permission state separate from navigation. |
| Empty or error task area | A mounted route did not produce usable content. | Diagnose that route's read/provider contract; do not add a global error route as a shortcut. |
| Realtime disconnected or delayed | Transport state is separate from navigation and API reads. | Preserve task state and use the realtime contract. |
| External handoff unavailable | The operating system or provider did not admit the requested surface. | Return an observable local failure without claiming provider completion. |
The current documentation lane is source-only. Order, assignment, status, location, message, read receipt, contact, notification, session, review, proof, PIN, media, and provider effects require their own evidence and must never be used as architecture smoke tests.
Troubleshooting
| Symptom | Boundary to inspect | Safe diagnostic |
|---|---|---|
| The first visible screen is unexpected | Root readiness, saved session, tutorial, schedule, and permission state | Record only the visible route class and platform, then compare with the startup contract. |
| A registered tab is visible but empty | Tab navigation versus its data provider | Confirm which layer is loading, empty, unavailable, or in error without replaying an action. |
| A detail screen cannot be reached | Registered stack route, route input, and originating task state | Verify the public route contract and sanitized input shape; do not use an internal navigation helper as proof. |
| A generic error page seems available in source | Route registration | Treat it as non-public until the productive navigator registers and reviews it. |
| State differs after foregrounding | App lifecycle, permission, session refresh, location, and realtime boundaries | Compare before/after visible state without logging personal or operational values. |
Re-review this contract whenever provider order, root branch priority, navigator registration, main tabs, project configuration, session hydration, permission substitution, or native/provider ownership changes.
Related guides: Driver App overview · Startup and loading · Authenticated bootstrap