From One Controller to Thirteen Handlers: A Webhook Refactor

A webhook controller is the natural place to put webhook code. You name it WebhooksController , you put a def stripe action in it, and you start writing. Six months later it is 200 lines long and you cannot remember what half of it does. This post is about the moment I noticed mine had become a god object, and the small architectural shift that fixed it. The code is real. It is from Seams , the…