Exploring API functionality
To illustrate how to build a RESTful API, we will build a cooking application. We will cover how to integrate, deploy, and test the app using the Gin framework. The application will do the following:
- Display the recipes that are submitted by the users, along with their ingredients and instructions.
- Allow anyone to post a new recipe.
The application architecture and flow are shown in the following diagram:
The architecture is composed of a microservice written with the Gin framework and a database for data persistency. The microservice exposes a RESTful API to manage the recipes through the HTTP protocol.
Note
Later in this book, we will cover how to build a frontend application with the React web framework so that we can consume the RESTful API.
Before we get started, we need to create a GitHub repository where the code source will be stored. To structure...