Node.js · Chatbot backend

Ride Booking Bot API

Role
Sole backend engineer
Year
2025
Stack
Node.js, Express, Sequelize, MySQL, Axios, Helmet

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.
Ride Booking Bot API architectureA chat platform calls an Express API over HTTPS. Requests pass an API-key middleware and reach the controllers, which read and write two MySQL databases through Sequelize and use a resolver that follows Google Maps short links to get coordinates.Express APIChat platformchatbot flowAPI-key middleware403 without a valid keyControllerspassengers · trips · ratingsMaps-link resolvershare link to coordinatesMySQLpassengers databaseMySQLtrips databaseGoogle Mapsshort-link redirectsHTTPSSequelize
How a chat message becomes a trip record
Next projectAdvenShare