kursadbilgin/wallet-core-java — reverse-engineered prompt
Reverse engineered prompt
Build me a simple but solid command line digital wallet app in Java that runs against PostgreSQL. I want a menu driven CLI where I can create accounts, list them, check balances, deposit, withdraw, transfer money between accounts, view transaction history, and block or close accounts. Closed or blocked accounts should not allow money operations, and users should never be able to go negative.
Please make transfers and balance updates transaction safe so two things happening at once do not corrupt data. I also want duplicate request protection using a requestId, proper money rounding to 2 decimals, overflow protection for large amounts, and timestamps for audit history. Transaction history should show newest first.
Keep it framework free, just plain Java with JDBC, and make it easy to run locally with Maven or fully through Docker and Docker Compose. Add tests for the important behavior, especially transfers, rollback, duplicate requests, and blocked account rules. If anything is unclear, look up current docs online and finish it end to end.
Want more depth? Deep Reverse