test for Sr nodeJs developers, part 1, api creation
Part 1 - Api creation
- Develop a Rest API for restaurant/delivery, each restaurant should follow the following data structure:
{ id : any logo : text (url) commercialName : text legalName : text rating : (float max 5 min 1) reviews : [ { name : text review : text rating : number } ] meals : [ { name : text description : text price : float } ] commercialEmail : text adminNumber : text address : text Location : latLng }
- Provide endpoints to delete, list (with the possibility of filter by rating), edit information
- Provide endpoint to rate each restaurant (the total rate of the place should be an average of all user ratings)
- Provide a endpoint to create a order, should have one or more meals, total cost, address and a latLng position of the place, this endpoint should save the order on a different table/document and return ETA (estimated time of arrival) based on user location and restaurant location (transport media being a motorcycle), this time should have in count traffic at the moment, also when a order is triggered a message needs to be created and queue in ActiveMQ server 1 message for the notification and another for the order
- NodeJS , you can use express or any framework you like
- Postgress DB is desired but you can use any you feel more useful for the exercise
- You can use google maps or any API or any you feel more convenient
- ActiveMQ