Overview
The client planned to move its legacy Sitecore MVC application to the Sitecore headless platform on Next.js. Before committing to a full migration, it wanted to know how much of the conversion large language models could take on, and what quality of code they would produce.
Solution
We ran a four-month proof of concept (PoC) with OpenAI and open-source LLMs. The PoC converted legacy MVC code to the headless Sitecore setup, worked with Sitecore headless CMS features and used Microsoft Azure OpenAI services. Developers, machine learning engineers and software architects worked on it together.
Technology Stack
Features
- LLM-assisted code conversion from MVC to Next.js
- Support for both Sitecore classic MVC and headless Sitecore on Next.js
- Integration with OpenAI and open-source LLMs through Azure

Outcome
The proof of concept showed the client, on its own codebase, which kinds of components a model can convert and which still need an engineer. That gave the client a factual basis for planning the full migration.
Key Outcomes:
- Automatic code conversion tested: converted components were checked against the originals, which showed where conversion works and where engineers must step in.
- Headless Sitecore as the target: the PoC produced code for headless Sitecore on Next.js, the platform the client is moving to.
- Azure AI services in the workflow: the conversion pipeline used Azure OpenAI within the client's Microsoft environment.
- Code quality reviewed: engineers read the generated code for readability and maintainability.
- A plan for the next step: the client could scope the full migration from what the PoC measured.
proof of concept timeline
platforms bridged: Sitecore MVC to headless Sitecore on Next.js
specialists: 7 engineers, QA, PM
How LLM-Assisted Code Migration Works
A language model does not migrate an application by being asked to. Reliable results come from a pipeline in which the model does the repetitive translation and automated checks decide whether each result is accepted:
- Inventory. The legacy solution is parsed into migration units: Razor views, controller renderings, models, helpers. A dependency graph sets the order in which they can be converted.
- Pattern library. Engineers convert a small set of representative components by hand. These become the reference examples: how a Razor view becomes a React component, how a model class becomes typed props fed by the headless layout service.
- Generation. For each unit, the pipeline retrieves the closest reference examples and the unit's dependencies, and the model produces the Next.js equivalent.
- Verification. Generated code must compile under TypeScript, pass linting and unit tests, and render the same output as the original page in a visual comparison.
- Self-repair. Compiler and test errors go back to the model with the failing code. Units that still fail after a fixed number of attempts are routed to an engineer.
- Review. Engineers review accepted units in batches, and their corrections are added to the pattern library so later batches improve.
Today we build this loop as a LangGraph workflow with every step traced in LangSmith, which shows the acceptance rate per component type and where the model keeps failing.
What Stays Manual
Automatic conversion handles presentation code well. It does not handle decisions. Personalization rules, custom pipeline processors, search configuration, authentication and anything that relies on undocumented behaviour of the old platform still need an engineer who understands why the code exists.
The published evidence points the same way. In Google's study of code migrations with LLMs, covering 39 migrations over a year, about three quarters of the submitted code changes were generated by the model, and developers estimated that total migration time was cut in half. The remaining work was review, edge cases and coordination, which is where experienced engineers are still needed.
A proof of concept is the right first step for this reason. It measures, on your own codebase, what share of components converts automatically and what the rest will cost, before the full migration is planned. More on our approach: generative AI development services and AI development services.