Creating the backend
While we will be working with the same data, this chapter will employ a significantly simplified backend for our purposes, as we do not need to repeat things that have already been covered. We will create a new, simpler backend with just some READ routes (GET requests) as we will not need to update, create, or delete any cars. We will also insert a pretty hefty number of cars into our database – we need data to work with and we need a realistic number of entities in order to showcase the dashboard functionalities.
Our plan will be the following:
- Create a new collection inside our Mongo database
- Import the provided sample data from a Comma-Separated Values (CSV) document
- Create a new Python environment and install the required packages
- Scaffold our FastAPI application
- Create some MongoDB aggregations and map them into a FastAPI endpoint
- Finally, we will add some backend functionality that isn’t going to be directly...