octaviotastico/Rappi_Delivery-App ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Scala API for a delivery app like Rappi or Glovo for a university project.
I want two kinds of users, consumers and providers, with locations for each one. Providers can create items they sell, consumers can place orders with one or more items, and the app should only allow orders when the consumer is within the provider delivery distance using simple x and y coordinates. When an order is created, the payment should happen automatically, the provider should receive the money, and then the order can be marked as delivered. After delivery, the consumer should be able to leave a review with a star rating and a short comment, and the provider reputation should be the average of all ratings.
Please make it work with simple REST style endpoints for locations, consumers, providers, items, orders, and reviews, using JSON input and output. Keep the data model clean, with unique ids and reusable helper methods for finding and filtering records. If you need to check current Scala docs or best practices, feel free to look them up online.
Are you gonna build this?
make sure you review the code using coderabbit