Busflow Docs

Internal documentation portal

Skip to content

Global Command Line Specification ​

Goal: Define the UX, UI, and backend requirements for the Global Command Lineβ€”a spotlight-style search designed to replace complex navigation trees and boost power-user efficiency.

Overview ​

The "Global Command Line" (CMD+K or CTRL+K) is an intelligent overlay accessible from anywhere within the Backoffice and Driver App. It acts as a unified entry point for entity resolution (search) and action execution (commands).

UX & UI Behavior ​

  • Trigger: Omni-present keyboard shortcut (CMD+K) or clicking the top-bar search input.
  • Display: Centered, floating modal with a glassmorphic background effect in the Backoffice interface.
  • Fuzzy Search: Typo-tolerant matching for passengers, bookings, and destinations.
  • Context Awareness: The default prompt prioritizes actions based on the current view. (e.g., CMD+K while viewing a TourDeparture suggests "Assign Driver" or "Send Broadcast").

Data Model & Search Index ​

To achieve <50ms keystroke response times, the Command Line does not query core Postgres tables directly.

The Search Index (Redis / Meilisearch) ​

The system maintains a flattened, denormalized read-model:

  • Entity ID: UUID of the target row.
  • Entity Type: passenger, booking, tour_departure, incident, vehicle.
  • Primary Text: "Klaus MΓΌller", "Booking #INV-2409".
  • Deep Link: URI to immediately pop the specific detail view in the router.
  • Tags: e.g., ["VIP", "balance_due"] for rapid filtering.

Command Execution Parameters ​

Beyond search, the system supports natural language aliases resolving to parametrized actions.

User Types...Resolves to ActionParameters Required
"delay tyrol 30m"TriggerIncidentWorkflowTourID: latest Tyrol, Delay: 30m
"refund MUELLER"PartialRefundFlowBookingRef matching "MUELLER"
"available drivers"RouteToDispatchBoardFiltering by state: IDLE

Architecture & Flow ​

  1. Client Keystroke: Debounced (150ms).
  2. Gateway: API routes to the Search Service.
  3. Resolution: Redis/Meilisearch returns top 10 ranked hits (mixed entities).
  4. Action Handling: If the user selects an Action, the UI triggers the appropriate Vue router push or dispatches an event to the backend using the Hasura GraphQL mutations.

Internal documentation β€” Busflow