-
search restaurant by name
-
order: item, quantity, note about diet, delivery address
-
access for orders (status: not payed, placed, delivered)
-
payment: credit card credentials -> payment ID, timestamp, estimated time
- the user searches restaurant by name and get menu
- the user orders by specifying items and according quantities (json)
- the user pays for the order successfully
- order is sent to designated restaurant
- order is being prepared, notify the order history
- order is on the way, notify both the user and the history
order placement -> order completion (permanent storage) -> preparation completion (possibly cancel) -> delivery completion (possibly cancel)
- payment failed
- order canceled by the restaurant
-
restaurant info (RDB for restaurant)
-
incomplete order info (Redis for pending orders)
-
payment info (DB for payment history)
-
payed order info (DB for payment history)
-
restaurant search service
-
order placement service
-
order status service
-
edging service (restaurant search, get menus, order, pay)
- order placement -> order history
- order placement -> restaurant delivery
Path | Method | Description |
---|---|---|
/restaurants/name/:keyword | GET | search by name |
/restaurants/id/:id/menu | GET | get menu from the specific restaurant |
Path | Method | Description | Options |
---|---|---|---|
/placements/userId/:userId | GET | get the incomplete orders | id-only (bool) |
/placements/id/:id | GET | get the info for an incomplete order | |
/placements | POST | place order; payload: {paymentCredential, order, address} | |
/orders/userId/:userId | GET | get payed order info |
Path | Method | Description |
---|---|---|
/card-verification | POST | card number verification |
/payments | POST | make payment; payload: {cardNum, ..., billing} |
Path | Method | Description |
---|---|---|
/orders/restaurant/:id | POST | place order to the restaurant |
Path | Method | Description |
---|---|---|
/orders/id/:id | GET | get info about specific order |
/orders | POST | add to history |
/orders/id/:id | PUT | update (status of order) |
- explicit dependencies
- store config in the environment
- treat backing services as attached resources
- keep dev, staging, prod as similar as possible
- treat logs as event streams
- each team gets one database and one service
- shared caches are platform provided services that are shared for consistency