SaaSWeb Development

Orbital Labs — legacy PHP to Next.js

2019 archive — placeholder, refresh in Phase 5. Migrated a monolithic PHP 5.6 SaaS platform to a modern Next.js + Postgres stack — zero downtime, feature parity in 14 weeks.

Client 2 logo

Built for Client 2

The challenge

Orbital Labs was running a 90,000-line PHP 5.6 codebase with no automated tests and a deployment process that required a 4-hour maintenance window every two weeks. Competitors were shipping features in days; Orbital was taking months.

The engineering team was paralysed. Every change broke something else. The CTO estimated it would take 3 years to pay off the technical debt incrementally — but the business couldn't wait that long.

How we solved it

We proposed a strangler-fig migration: build the new Next.js application alongside the legacy PHP system, routing new users to the new platform while existing users continued on the old one. Feature parity was reached in 14 weeks; the cutover happened on a Tuesday afternoon with zero downtime.

The new stack — Next.js App Router, Postgres with Prisma, Clerk for auth, Stripe for billing — was covered by a comprehensive test suite from day one. We implemented trunk-based development and a CI/CD pipeline that deployed to preview environments on every pull request.

The results

3 daysEngineering handover timevs 3-week baseline on the legacy system
12×/weekDeployment frequencyup from once a fortnight
84%Test coveragefrom 0% on the PHP codebase

Tech stack

Next.jsTypeScriptPostgreSQLPrismaClerkStripeVercel

They shipped a Next.js rebuild of our legacy PHP site that doubled our Lighthouse score and cut page loads by 60%.

Rahul Gupta

Head of Engineering, Orbital Labs