Rsingh230105/ecommerce-order-service ? reverse-engineered prompt

Reverse engineered prompt

Build me an order service for an ecommerce app.

I want a small Python API that lets me create, list, view, update, and delete customer orders under /orders, plus a simple /health check and interactive docs. When someone creates an order, it should look up the product info and current price from a separate Product Service, calculate the order total, and save everything in PostgreSQL.

Please also make it reliable for events. When an order is created, save an ORDER_CREATED event in the database in the same transaction as the order, then have a separate worker process that reads pending events later and publishes them to SNS. If SNS is down, the order should still be saved and the event can be retried later.

I’d like it to run locally with Docker Compose, use env based config, and include tests for the API and outbox flow. If you need to check current library docs or best practices, look them up online first.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab