# perk/legacy-takeover ## Hero ### From outsourced codebase to production-grade in 90 days — without stopping delivery. Perk inherited an outsourced Rails monolith on GitLab. No CI. No PR reviews. No tests running. Bleu took ownership, rebuilt the engineering process, and shipped product simultaneously. ## Context Perk's codebase had been built by an outsourced team in India and handed off. The team was gone. There was no continuous integration, no pull request reviews, no test suite running. People pushed directly to branches and merged without review. Deployments were manual. The question wasn't whether to fix this — it was whether a new team could take ownership of someone else's production system, understand it deeply, and modernize it without breaking what was already working. - No CI pipeline — code shipped without automated checks - No PR reviews — direct branch merges without oversight - No test suite running — no safety net for changes - Manual deployments — each release a manual, error-prone process - Previous team gone — no knowledge transfer, no documentation ## Our role Instead of just fixing bugs on top of the existing setup, we rebuilt the engineering process while shipping product. Both happened at the same time — stabilization was not separate from delivery. ### Quote > "What you wished your last team was." ## What changed Within 90 days, the codebase went from ungoverned to professionally managed. Every change went through CI, got reviewed, and was deployed automatically. And product kept shipping throughout. - Migrated from GitLab to GitHub with branch protection and mandatory reviews - CI pipeline running on every push — tests, lints, builds - Containerized with Docker for consistent environments - Introduced background job processing (Sidekiq) - Integrated TailwindCSS for frontend consistency - Linear for project tracking (864 tickets to date) - Shipped social feed challenges, email delivery fixes, and admin auth fixes simultaneously ## Areas we took ownership of #### Engineering Process Rebuilt the development workflow from the ground up. - **Version Control & Code Review**: Migrated from GitLab to GitHub. Set up branch protection rules, mandatory PR reviews, and a merge workflow that ensures every change is reviewed before it ships. - **Continuous Integration**: Built a CI pipeline from scratch. Tests, lints, and builds run on every push. No code reaches production without passing automated checks. - **Containerization**: Containerized the application with Docker, eliminating environment inconsistencies and establishing repeatable builds from development to production. #### Infrastructure Modernization Replaced manual processes with automated, repeatable systems. - **Automated Deployments**: Replaced manual deployments with automated pipelines. Each merge to main triggers a build, test, and deploy cycle with zero human intervention required. - **Background Processing**: Introduced Sidekiq for background job processing, moving email delivery, media processing, and data sync out of the request cycle. #### Product Delivery Shipped features while modernizing — not after. - **Social Feed Challenges**: Built social feed challenge mechanics while the engineering overhaul was underway. Users could post, share, and earn rewards through social interactions. - **Email & Media Fixes**: Fixed email delivery reliability and S3 media link issues that had been degrading the user experience. Stabilized auth flows across the platform. ## Why this matters Most teams won't touch someone else's legacy system. The ones that do usually propose a ground-up rewrite — months of work before any value is delivered. We modernized incrementally: shipped product on day one while rebuilding the foundation underneath. Not a single day of downtime during the transition. Three years later, that codebase is a 16-app monorepo serving Fortune 500 clients with 99.984% uptime. ## Outcome The stabilization set the foundation for everything that followed. The CI pipeline, PR reviews, and automated deployments we put in place in the first 90 days are still running three years later — now processing 12,000+ commits across 1,600+ pull requests. What started as a rescue became a partnership.