Chico-wh/Financial-Fraud-Detection-Microservice ? reverse-engineered prompt
Reverse engineered prompt
Build me a fraud detection microservice for financial transactions that can score requests in real time and either approve, reject, or send them to manual review.
It should accept a transaction, check for an idempotency key so retries do not create duplicates, apply basic rate limiting and blacklist checks, then run fraud rules and return a risk decision fast. I also want endpoints to fetch a transaction result, add something to a blacklist, and a simple health check that confirms the app, database, cache, and storage are working.
Please include background processing for exporting reports, with the export job running asynchronously and the finished file stored somewhere private with a link I can retrieve later. Make it robust, with safe database locking, token revocation, logging that hides sensitive personal data, and a fallback when an external credit or risk service is down. Use Docker so I can run the whole thing locally, and add setup instructions so I can get it running easily.
Are you gonna build this?
make sure you review the code using coderabbit