vientorepublic/hashguard ? reverse-engineered prompt
Reverse engineered prompt
Build me a backend service that issues and checks proof of work CAPTCHAs for blocking bots.
I want a NestJS TypeScript API that uses Redis to store challenges, keep them short lived, prevent replay, and track request rates per IP. The flow should be simple, a client asks for a challenge, solves a SHA 256 hash puzzle, sends back the nonce, and then gets a short lived proof token if it passes. That proof token should be a signed JWT that can be checked later through an introspection endpoint, and it should be single use by default.
Please include health checks, a metrics endpoint, and a public key endpoint so other services can verify tokens. Add sensible dynamic difficulty so heavy traffic and failures make the puzzle harder, and reject challenge requests if one IP goes over the limit. I’d also like Docker support, a clean README friendly setup, and Swagger docs. If anything is unclear, look up the current docs online if you need to.
Are you gonna build this?
make sure you review the code using coderabbit