Sitecore Symposium 2024: What is Sitecore JSS Copilot?
An innovative approach to accelerate XM Cloud adoption for existing Sitecore customers
Start typing to search...
Ahmed Okour and Alex Lentz delivered a very interesting session at Sitecore Symposium 2024 named “Accelerate Sitecore XM Cloud adoption using generative AI”. The challenge was to use generative AI to find ways to get to XM Cloud faster by converting MVC over to Next.js, or by going from Figma or design images and generating the code.
One of the first tips that the pair provided was that for any developers introducing generative AI chat tools into their flow, you absolutely need to be revising your prompts. You can even ask the AI itself to help you improve your prompts by asking it to explain what it understood the request to be. This can help you get better outputs by having clearer and more refined prompts.
When looking at the tools available out there, their team outlined several:
Ahmed and Alex then introduced their Sitecore JSS Copilot project. The tool has 2 main uses:

The tool is publicly available for free, but it comes with limitations. You must be sign in with a Google account to use it and you can only ask for 25 conversions.
The general settings allow to select the model between Anthropic Claude 3.5 Sonnet and OpenAI GPT-4o, and provide custom prompt instructions that are included in all conversion requests.
In this mode, you can upload a component Figma design, a screenshot or a wireframe image.
The results are 2 Next.js components. The first one is a plain React component receiving other components as props for the fields. The second is a Sitecore JSS component wrapping the previous React component by setting the props as the Sitecore fields rendered with the JSS primitive field components like <Text> and <Link>. This allows easier unit tests of the component without having to mock the JSS fields and their values.
At the moment, only Next.js is available for the JS framework selection. Tailwind, CSS modules, and Styled components are available for styling.
If you are not entirely happy with the result, you can even chat with the Copilot to refine and iterate on the work to get the generation to where you want it to be!
This mode also has the ability to preview the component on mobile, tablet, and desktop breakpoints so that you can validate that the design is coming across as expected.
I find this to be really useful for fresh “greenfield” projects where you are starting a new project from a creative design. It is also a great tool when a customer wants to implement a redesign to their existing site, or even if you just wanted to spin up a few quick landing pages without involving a lot of dev time.
The second mode has the ability to convert older Sitecore code to XM Cloud compatible code:
Unlike the design to code mode, the code conversion mode does not allow to chat with the Copilot to refine the result. It also only generates a single component instead of two.
Their roadmap includes adding a user library of generated or saved code, and also the ability to preview a generated component on your own JSS site.
I left the session with the understanding that the code was open-source, allowing anyone to clone it, run it with their own LLM API keys, and use it without limits. Unfortunately, the repository is currently private. I contacted one of the authors and will update this blog if it becomes a possibility.
Try it out right now: https://jss-copilot.vercel.app/