Whenever you're ready, walk me through how you'd approach this.
Improve a web app prototype that implements a webhook, queries a web API, and writes to a relational database; fix issues with maintainability and scalability in mind.
Review the prototype as a hands-on engineering task and propose or implement the changes you consider necessary. Address request validation, retries, duplicate delivery, API failures, database consistency, separation of concerns, observability, and safe configuration. Explain which work should remain synchronous and which should be processed asynchronously.