The Great Framework Pivot
We were trapped in a "Gatsby Build Tax." Every minor content change triggered a 20-minute CI pipeline because our HOC patterns were forcing double-generation of 500+ static pages.
Build times dropped from 20 minutes to 90 seconds

The Architectural Cleanup
I led the emergency migration to Next.js. We stripped out the GraphQL middle-layer in favor of direct REST fetches, reducing the mental overhead and eliminating build-time non-determinism.
Engineering the Solution
I replaced the complex HOC architecture with a Composition-first approach using ISR (Incremental Static Regeneration). This allowed us to decouple content updates from code deployments.
The 'Who Wrote This?' Chronicles
The hardest part was the "Data Detox." We had thousands of GraphQL fragments that were tightly coupled to our UI. I built a custom migration script that mapped those fragments back to Zod schemas, ensuring our new REST-based layer was strictly typed from day one.
Strategic Trade-offs
We traded the "automatic image optimization" of Gatsby for a more manual but predictable Next/Image setup. The trade-off was worth it for the 10x improvement in developer velocity.