Event Storm — Ride-Hailing Trip
Rider request, dispatch matching, trip and fare across four bounded contexts, with a driver cancellation event the model never causes.
Make it your own.
title "Ride-hailing trip — request to receipt"
context "Rider app"
actor Rider
aggregate "Trip request"
command "Request ride" by Rider on "Trip request"
event "Ride requested" from "Request ride"
readmodel "Live driver map"
hotspot "Surge is quoted before a driver is matched"
policy "When ride requested, match driver" then "Match driver"
context "Dispatch"
aggregate Matching
command "Match driver" by "Dispatch engine" on Matching
event "Driver matched" from "Match driver"
event "Driver cancelled"
external "Mapping and ETA service"
hotspot "Two riders matched to one driver during a network split"
policy "When driver matched, start trip" then "Start trip"
context "Trip"
aggregate Trip
actor Driver
command "Start trip" by Driver on Trip
event "Trip started" from "Start trip"
command "End trip" by Driver on Trip
event "Trip ended" from "End trip"
readmodel "Driver earnings summary"
policy "When trip ended, charge rider" then "Charge rider"
context "Payments"
aggregate Fare
command "Charge rider" by "Payment service" on Fare
event "Fare charged" from "Charge rider"
event "Receipt issued" from "Charge rider"
external "Card network"
hotspot "Tips are added after the receipt is issued"