mmHazeem/policy-service ? reverse-engineered prompt

Reverse engineered prompt

Build me a Spring Boot insurance policy service that lets users register and log in, then create and view policies through secure API endpoints.

When someone creates a policy, I want the request to return right away with a success accepted response, then save the policy in the background through a message queue. It should be able to reject duplicate policy numbers, retry failed work a few times, and send bad messages to a dead letter queue if it still fails.

I also want a way to list policies, cache reads for speed, and clear the cache when data changes. Use PostgreSQL for storage, Redis for caching, and RabbitMQ for the async processing. Add Swagger so I can try the API easily, plus basic monitoring with Prometheus and Grafana. Make it feel production ready, with validation, error handling, JWT security, and tests that cover the main flows. If you need to, look up current docs online while building it.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab