As mentioned earlier, the backend code for a full stack application such as GoMusic needs to interact with the frontend component through RESTful APIs. This simply means that a major component of our backend code is the RESTful API layer. This layer is what we'll discuss from this point on until the end of the chapter.
Before we start writing code, we need to first agree on our requirements. The first step of any well-designed RESTful API backend is to first figure out the different interactions between the frontend component and the backend component.
Here is what our RESTful API needs to do:
- Our backend needs to provide a list of available products to the frontend.
- Our backend needs to provide a list of available promotions to the frontend.
- Our frontend needs to send user information to our backend in order to sign in...