Introducing the application
It is much easier to start working with a framework while having a specific problem that needs solving, even if the requirements are somewhat vague. The task at hand is rather simple: you need to create a REST API backend for storing and retrieving data about used cars for a fictional car sales company.
The data structure that describes a vehicle is rather simple but can become more complicated as soon as you delve into the details such as engine models, interior colors, types of suspension, and so on.
In your first simple create, read, update, delete (CRUD) application, you will keep the resource data limited. A car will be described by the following fields:
Brand
: The brand of the car (Ford, Renault, etc.), represented by a string- Make or model: For example, Fiesta or Clio, represented by a string
Year
: The year of production, an integer limited to a reasonable range (1970–2024)Cm3
: The displacement of the engine, proportional...