
Legacy Migration
Strangler Fig Migration from Yii2 to Next.js and NestJS: SMW Music Academy
How we moved SMW Music Academy off a legacy PHP Yii2 monolith to Next.js 15 and NestJS using the Strangler Fig pattern - zero downtime, 40% faster pages.
Project Overview
SMW Music Academy ran its entire platform on a legacy PHP Yii2 monolith, managing customers, students, lessons, payments, and reporting across multiple locations. We migrated the full stack to Next.js 15 and NestJS using the Strangler Fig pattern, replacing modules one at a time while maintaining zero downtime and 100% data integrity. The result: 40% faster page loads, 60% reduction in development time for new features, and a modern, API-first architecture ready for mobile apps and future integrations.
Why the Strangler Fig Pattern
A big-bang rewrite was not an option. The platform was in active use across multiple school locations, with no tolerance for downtime or data disruption. The Strangler Fig pattern allowed the new system to grow module by module alongside the legacy codebase, each migrated feature routed to the new stack while remaining features stayed on Yii2, until the old system was fully replaced and decommissioned.
Migration Architecture & Outcome
The diagram below illustrates how the new Next.js 15 and NestJS stack was built in parallel with the legacy system, with a proxy bridge routing traffic to the appropriate backend per module. Each phase delivered a working, tested feature set (customer management, reporting, lessons, payments) until full feature parity was confirmed and the Yii2 application was shut down permanently.

Key Technical Decisions
The migration introduced TypeORM for version-controlled database migrations, shadcn/ui for consistent component design, ApexCharts for interactive reporting dashboards, and Redux Toolkit for predictable state management. Each decision was made to reduce long-term maintenance cost and accelerate future feature development across the modernized platform.
Client Objectives
The engagement was guided by clear objectives that defined success for business leadership and delivery teams.
Full Stack Migration
Migrate the entire platform from PHP Yii2 to Next.js 15 (frontend) and NestJS (backend) using a gradual, module-by-module approach.
Maintain Data Integrity
Preserve 100% data integrity throughout the migration with version-controlled TypeORM migrations and zero business disruption.
Improve Performance & DX
Deliver faster page loads, modern developer tooling, and independent scaling of frontend and backend.
The challenge
Complex constraints hindering growth
Monolithic PHP Architecture
The legacy Yii2 application tightly coupled frontend views, business logic, and data access into a single monolithic MVC structure running on PHP 7.1.
Performance Bottlenecks
Server-side rendering with complex database queries caused slow page loads, and the system struggled to scale individual components independently.
Outdated Tooling & Tech Debt
PHP 7.1 was reaching end-of-life with outdated dependencies, and the development workflow lacked modern tooling like hot reload, TypeScript, or component-based UI.
Difficult Feature Development
The large codebase with mixed concerns made implementing new features cumbersome, slowing down development velocity and team onboarding.

The solution
Strangler Fig Migration
A phased, module-by-module migration from Yii2 to Next.js and NestJS, replacing legacy components gradually with zero downtime.
Core Infrastructure Setup
Established the NestJS API with JWT authentication, created the Next.js 15 frontend with App Router, and implemented core entities including User, Location, and Customer.
- NestJS
- Next.js 15
- JWT Auth
Customer Management Module
Migrated customer CRUD operations to the new stack, built modern listing views with advanced filtering, and implemented customer detail views with related data.
- CRUD Migration
- shadcn/ui
- TypeORM
Reporting & Dashboard
Migrated key reports to the new system with interactive dashboards using modern charts, and implemented data export functionality.
- Analytics
- ApexCharts
- Data Export
Module Completion & Decommission
Migrated remaining modules including lessons, payments, and equipment management. Achieved full feature parity and decommissioned the legacy PHP application.
- Feature Parity
- Decommission
- Full Migration
Technologies Implemented
- Next.js 15
- NestJS
- TypeORM
- Redux Toolkit
- 40%
- Faster Page Load Times
- 60%
- Reduction in Dev Time
- 100%
- Data Integrity Maintained
- 0
- Downtime During Transition
Business impact
Measurable Migration Results
The phased migration delivered immediate improvements across performance, productivity, and platform readiness.
Development Savings
- 60%
- Reduction in new feature development time
- Lower
- Maintenance costs with modern codebase
Performance
- 40%
- Faster page load times
- Independent
- Frontend and backend scaling
Platform Readiness
- API-First
- Architecture enabling mobile apps
- Modern
- Tooling for faster team onboarding
How we drive results
Turning Strategy into Measurable Business Impact
Our case studies reflect a consistent delivery model focused on outcomes, helping organizations modernize technology, reduce risk, and accelerate growth through practical, scalable solutions.
Outcome-Driven Strategy
Every engagement starts with clear business objectives, success metrics, and a roadmap aligned to real operational and financial outcomes.
Proven Execution Model
We apply proven frameworks, agile delivery, and industry best practices to execute complex initiatives with speed, quality, and predictability.
Secure & Scalable Delivery
Our solutions are built with security, compliance, and scalability at the core, ensuring long-term resilience and sustainable growth.
Ready to Migrate Your Legacy System?
From Yii2 to a modern stack, we use the Strangler Fig pattern to migrate your platform module by module with zero downtime.
Start Your Migration