Skip to content

Boarding

This page specifies how a Driver records Passenger boarding, how boarded_at represents the result, and how the update reaches live operations. It draws from Build Spec §5.7.

Sources: Build Spec §5.7, System Architecture §5, API Conventions, Domain Glossary.

1. Purpose

Boarding records that a Passenger has entered the vehicle for a trip. The Driver marks the Passenger boarded by tapping the manifest entry or scanning a QR code on the manifest. The result is stored in bookings.boarded_at and broadcast as an update.

2. Actors and Responsibilities

Actor Responsibility
Driver Opens the assigned trip manifest and marks a Passenger boarded by tap or QR scan.
Passenger Is the subject of the boarding record. No Passenger action is specified.
Manager Monitors boarded counts and the live operations update in the Fleet Dashboard.
API Authorizes the action, records boarded_at, and initiates the broadcast.
Reverb Delivers the boarding update to authorized channel subscribers.

3. Boarding Flow

  1. The Driver opens the manifest for an assigned trip.
  2. The Driver selects a Passenger entry by tapping it or scanning its QR code on the manifest.
  3. The API authorizes the Driver and validates that the Passenger belongs to the trip.
  4. The API records the boarding time in bookings.boarded_at.
  5. The API broadcasts the boarding update.
  6. The Fleet Dashboard updates the boarded count and live operations view for authorized Managers.

The sources do not define a Passenger notification or a Passenger-facing boarding confirmation.

4. Boarding States and Statuses

The data model defines a timestamp, not a boarding-status enum:

State Representation Meaning
Not yet boarded boarded_at is null No boarding has been recorded for the booking.
Boarded boarded_at contains the boarding timestamp The Driver has recorded the Passenger as boarded.

No unboarding, correction, no-show, or cancelled-boarding state is defined. A Driver's passenger absent feedback message is a status message, not a defined boarding status. Boarding must not be assumed to change the Trip lifecycle status; the canonical Trip status transitions remain open in Trips and Cars.

5. Data and API Contract

  • Persisted field: bookings.boarded_at.
  • Driver actions belong under the /driver/* route prefix.
  • The exact boarding method, path, request body, response resource, and validation errors are not specified.
  • When defined, the endpoint must follow the standard API error shape: { "message": string, "errors"?: Record<string, string[]> }.
  • Repeated tap/scan behavior and timestamp correction rules are not specified.

6. Realtime and Visibility

  • private-company.{companyId} includes the passenger boarded event and is restricted to Managers of that Company.
  • The Fleet Dashboard Live tab shows boarded counts.
  • The sources do not explicitly include boarding in the trip.{tripId} event catalog.
  • Passenger, Driver, and Platform Admin visibility of an individual boarding update beyond the documented Manager view is not specified.

7. Authorization and Tenancy

  • The initiating actor is the assigned Driver in the Driver App.
  • A Driver sees only trips for the Driver's Company and assignment.
  • Manager live visibility is Company-scoped.
  • Cross-tenant API access returns 404, and a suspended Company returns 403 with a clear message.
  • Manager overrides and Platform Admin boarding access are not specified.

8. Open Questions

  • Endpoint contract: What method, path, payload, response, and error cases define a boarding request?
  • QR contract: What does the QR code contain, who issues it, and is it unique per booking, Passenger, manifest, or trip?
  • Duplicate actions: Are repeated taps or scans idempotent, and can they overwrite an existing boarded_at?
  • Corrections: Who may undo or correct boarding, and is an audit record required?
  • Status model: Is a boarding-status enum needed, and how does Passenger absence relate to feedback and no-show handling?
  • Event recipients: Should boarding also broadcast on trip.{tripId} or notify the Passenger?
  • Offline conflict handling: How is boarding synchronized when the Driver App records an action offline?