Replaced Spentra's Ruby monolith with a serverless Money Earned API
After six years running Spentra's AWS environment, we rewrote the core Money Earned API from an aging Ruby monolith into a serverless distributed system on AWS Lambda and API Gateway. Daily deploys, lower costs, no servers to patch.
The problem
The Money Earned® API was the backbone of Spentra’s flagship product. Every paycheck advance, every balance check, every transaction the mobile app made flowed through it. It was also a Ruby monolith nobody currently on the team had written and few wanted to touch.
The monolith had reached the predictable inflection point: changes were risky, deploys were rare and stressful, scaling required provisioning headroom that mostly sat unused, and the operational knowledge to maintain it lived in tribal memory rather than in the code. None of that was sustainable for a product that needed to grow with payroll cycles and seasonal workforce surges.
What we built
After six years running Spentra’s AWS environment, Spentra asked us to take on the larger build: a full rewrite of the Money Earned API as a distributed serverless system on AWS.
API Gateway handles HTTPS, routing, and authentication at the edge. AWS Lambda runs the business logic in isolated, independently-deployable functions written in Node.js. Serverless Framework manages infrastructure-as-code so every function and route is versioned, reviewable, and deployable from a pull request.
The old monolith’s responsibilities were broken into focused services. Each endpoint can be deployed, scaled, and monitored independently. A bug in one part of the API can no longer take down the rest of the surface. A spike in one workflow doesn’t require provisioning capacity for everything else.
We didn’t just port the Ruby code. We re-derived the data flows, simplified the contract Spentra’s mobile app depends on in practice, and built the new API around how Money Earned behaves in production, not how the original architecture assumed it would.
Results
Production deploys went from rare and rehearsed to a daily occurrence. Engineers can ship a change from pull request to production in the time it takes to run the test suite, without coordinating a release window or worrying about which other part of the system might break.
Costs dropped because the system pays for actual request volume rather than reserved capacity sitting idle between paydays. Fault tolerance improved because Lambda’s per-request isolation means a failure in one function path can’t cascade into the rest of the API. And the architecture now scales elastically with no manual intervention when payroll cycles or seasonal workforce surges drive traffic spikes.
More importantly: Spentra’s engineering team can confidently change the Money Earned API now. The code is understandable, the deploys are safe, and the system is built around how the product works in practice rather than how a long-departed team assumed it would.