ladsonsa/user-crud-api ? reverse-engineered prompt
Reverse engineered prompt
Build me a backend API for managing users, with a clean layered structure and a proper login flow.
I want people to be able to create an account, log in with email and password, and get a JWT token back. After that, they should be able to list users, view their own user details, update their own info, and delete their own account. Passwords must be stored safely, never returned in responses, and protected routes should only work with a valid token. If someone tries to access another user’s record, block it.
Please include request validation, clear error responses, and a simple Swagger page so I can test everything easily. Use a real PostgreSQL database, make it run with Docker and Docker Compose, and add tests for both the main behavior and the edge cases. If you need to check any current library docs while building it, go ahead and look them up online.
Are you gonna build this?
make sure you review the code using coderabbit