sreeja124/-bank-api ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple bank API with Spring Boot and Java 21.
I want a REST service where I can open accounts, list accounts, get one account by number, deposit money, withdraw money, transfer money between accounts, and view an account’s transaction history. New account numbers should start at 1001, and I want the app to use an in memory H2 database so everything resets when it restarts.
Please make the responses friendly and consistent, and return clear JSON error messages for things like bad input, missing accounts, or trying to withdraw or transfer more money than is available. An account should only be deletable when its balance is zero.
It would be great if I could run it locally on port 8080, use the H2 console, and have tests that cover the main flows. If you need to check current Spring Boot or H2 docs online while building it, feel free to do that.
Are you gonna build this?
make sure you review the code using coderabbit