Creating the cashier app required creating a model of the Orders, buttons in the view that would trigger an action value to make REST API calls, and the actual API calls themselves. I added in-store drink selection through the use of dropdown menus for the drink, milk, and size options. These selected values would then be set in the "NEW ORDER" call and would create a new order with these customizations. I also implemented a "CLEAR ORDER" call that would clear orders that have not been paid for on the register in the case that a cashier may have messed up an order.
Initially, I had drink selection and customization on the same page with drop-down menus, but I add more pages to make it more intuitive and visually-appealing. The landing page for the cashier app is just the console and a button to select the drinks and a button to clear the order.
Displayed here are the drinks with pictures and their names.
Upon clicking one of the drinks, the milk and size options can be customized with a button to place the order.
Kong API Gateway also used in deployment. We can see the API key configured below.
External load balancer for cashier app and internal load balancer for API.
The Kong API Key is stored in the application.properties file and was then added as a header in the API calls.
The most challenging part of this project was most likely porting the cashier app to a Spring MVC application. That required front end work and learning how to implement the API calls. This was very difficult, but I used Professor Nguyen's Starbucks Client for reference on how to make RESTful API calls.