The API behind a chatbot that books rides. The bot calls it to recognise a passenger by phone number, register a new one, create a trip, repeat the last trip and collect a rating. The client name is withheld.
- An Express API where every request passes an API-key middleware and is refused with a 403 without a valid key.
- Two MySQL databases through Sequelize, one for passengers and their trip requests and one for drivers, trip details, ratings and payments, both checked at startup before the server listens.
- Endpoints for the whole conversation: look up or register a passenger, create a trip, check trip history, rebook the last trip, rate a trip, ask for help and record a payment receipt.
- A resolver that turns a Google Maps share link into coordinates: it follows short-link redirects, reads the returned page when the address is not enough, and tries eleven link patterns.