eyop23/ledger_service ? reverse-engineered prompt
Reverse engineered prompt
Build me a double entry bookkeeping API in Go that I can run with Docker. It should let me create accounts, post transactions with debits and credits that always balance to zero, and then look up account details, current balance, entries, and transactions later. I want every transaction post to be safe to retry with an idempotency key so the same request never creates duplicates, and I want an audit log for every action, including rejected requests. Please include a health check, structured JSON logging, and Prometheus metrics too. It should use PostgreSQL with migrations, and the balance should be calculated from the entries instead of stored directly. Also add integration tests that spin up a real database so I can run the whole thing locally and verify it works end to end. If you need to check current docs for any library behavior, go ahead and look them up online.
Are you gonna build this?
make sure you review the code using coderabbit