Joshua-likesjs/Delta-Bank-Backend-In-Golang — reverse-engineered prompt
Reverse engineered prompt
Build me a Go backend for a simple digital bank called Delta Bank.
I want a REST API where someone can create an account with name, CPF, password and starting balance, log in or authenticate safely, check their balance, deposit money, withdraw money, send PIX transfers, and manage PIX keys. It should store everything in PostgreSQL and keep money values safe, preferably as cents, not floating point.
Please include real business rules like valid CPF, no duplicate accounts, no negative balances, daily transfer limits, password hashing, and clear error messages. PIX, deposits, and withdrawals should be done safely so balances don’t get out of sync if something fails.
Make it production ready enough to deploy on Railway, with environment variables for the database and port, JSON logging, request IDs, CORS, panic recovery, timeouts, and body size limits. Keep the code organized in a clean architecture style so handlers, services, domain logic, validation, and database code are separate. Include the SQL tables and basic curl examples in the README.
Want more depth? Deep Reverse