Imagine a neighborhood where each house has a bag of mixed waste placed outside the door. Each bag can contain several types of waste, like paper, plastics, or electronics. Garbage collectors from different recycling centers will come and pick up some bags based on their contents. The recycling centers have different rules of what types of waste they collect. All of them accept paper and plastics, but only some of them accept electronics. The rules change regularly.
Write the Backend for an app that lets the households classify what types of waste their bag contains, and the garbage collectors to know which bags to pick. Identify each bag with at minimum the street number by which they are placed.
- Install Docker.
- Clone this repository.
- Run
docker-compose up --build
in the project folder. - Add two endpoints:
- POST endpoint for letting households create a listing of a bag of waste, that accepts a payload containing only the waste types and the street number at which it is located.
- GET endpoint for letting a garbage collector list the bags, with a single parameter for specifying the id of a recycling center.
- Bonus: remove the recycling center id, and get it in some other way.
- Bonus: add a GET endpoint for listing which recycling centers allow a collection of certain bags.