MarsalaMarsala
Back to articles
InsightJan 28, 2025·7 min read

Why I Only Push Headless When It Hurts (and Pays)

Lessons from migrating DTC brands to headless architectures without burning the team.

Honest look at when headless is worth it, how I plan releases and what mistakes to avoid.

By Marsala Engineering Team·
#Architecture#Commerce#Web

Why I Only Push Headless When It Hurts (and Pays)

I'm not dogmatic—I only push headless when it accelerates experiments and kills toxic fees.

Context

My experience has led me to a pragmatic, rather than dogmatic, stance on headless architecture: I only advocate for it when the pain points of a monolithic system become undeniable, and the potential for accelerated experimentation and significant cost savings is clear. I've personally guided three complex migrations for Direct-to-Consumer (DTC) brands where their existing Shopify Plus setups, while initially effective, eventually exhausted their runway for growth and innovation. These brands found themselves constrained by the limitations of a tightly coupled frontend and backend, struggling with slow page speeds, rigid content management, and exorbitant platform fees that stifled their ability to scale.

This piece is a distillation of those experiences, sharing my mental checklists for evaluating when a headless migration is truly warranted. It delves into how I meticulously plan releases to minimize disruption, and crucially, how I build a compelling business case to defend the significant upfront investment to finance teams. The decision to go headless is never taken lightly; it's a strategic move driven by a clear understanding of where the current architecture "hurts" the business—be it in terms of agility, performance, or cost—and where a headless approach can demonstrably "pay" dividends in the form of faster innovation, superior customer experiences, and optimized operational expenses.

Stack I leaned on

  • Next.js 15 + edge runtime: Next.js 15, with its powerful App Router and Edge Runtime capabilities, formed the foundation of our headless frontend. This allowed us to build highly performant, SEO-friendly, and dynamic user experiences that could be deployed globally with minimal latency.
  • Sanity + Portable Text: Sanity served as our headless Content Management System (CMS). Its flexible content modeling and Portable Text editor empowered marketing and content teams to create rich, structured content without developer intervention, while ensuring content could be delivered to any frontend.
  • Medusa.js or Shopify Storefront API: For the commerce backend, we opted for either Medusa.js (a powerful open-source headless commerce platform) or the Shopify Storefront API. This provided the flexibility to decouple the frontend experience from the core commerce logic, allowing for custom checkout flows, personalized product displays, and integration with various third-party services.
  • Vercel + Netlify hybrid deploy: To maximize performance and leverage the strengths of different deployment platforms, we implemented a hybrid deployment strategy using both Vercel and Netlify. This allowed us to optimize for specific use cases, suchs as deploying static content on Netlify and dynamic, server-rendered pages on Vercel's Edge Network.

Playbook

  1. Start with performance, content and governance audit to ensure it's worth it: Before committing to a headless migration, we conduct a thorough audit of the existing monolithic system. This includes a deep dive into current performance metrics (e.g., Core Web Vitals), an assessment of content management workflows and pain points, and a review of existing governance structures. This initial audit helps to clearly define the "pain" points and build a solid business case for the headless investment.
  2. Lay out incremental roadmap (frontend, CMS, backend) with feature flags and dark launches: A full-scale, big-bang migration is inherently risky. Instead, we advocate for an incremental roadmap, breaking down the migration into manageable phases (e.g., first frontend, then CMS, then specific backend services). We leverage feature flags for controlled rollouts and "dark launches" to test new components in production without exposing them to all users, minimizing disruption and risk.
  3. Version the design system in Figma + Storybook before touching production: Consistency is paramount in a decoupled architecture. Before any code is written for the new headless frontend, we ensure our design system is fully versioned and documented in Figma and Storybook. This provides a single source of truth for UI components, ensuring that designers and developers are aligned and that the new frontend adheres strictly to brand guidelines.
  4. Integrate analytics and SEO from day zero to avoid losing ranking: SEO and analytics are not afterthoughts; they are integrated from the very beginning of the planning process. This includes meticulously planning URL redirects, implementing structured data, ensuring proper server-side rendering for discoverability, and setting up comprehensive analytics tracking. Our goal is to not only preserve but enhance search rankings and data visibility post-migration.
  5. Plan module-level rollback runbooks so no one pulls all-nighters: Despite meticulous planning, issues can arise. To mitigate risk and ensure business continuity, we develop detailed, module-level rollback runbooks. These runbooks outline precise steps to revert to a previous stable state for individual components or services, ensuring that our teams can quickly address any unforeseen problems without resorting to stressful "all-nighters."

Key Principles of Headless Architecture Adoption

  • Strategic justification: Adopt headless only when it demonstrably solves critical business problems (e.g., performance, flexibility, cost) that a monolithic architecture cannot.
  • Incremental migration: Plan a phased approach, migrating components or functionalities incrementally to minimize risk and disruption.
  • Content ownership and governance: Empower content teams with user-friendly headless CMS tools and clear governance guidelines to ensure content velocity and consistency.
  • Performance-first approach: Leverage modern frontend frameworks and edge computing to deliver lightning-fast user experiences, a key benefit of headless.
  • Robust SEO strategy: Integrate SEO considerations from day zero, including URL redirects, structured data, and server-side rendering, to protect and enhance search rankings.
  • Comprehensive monitoring and rollback plans: Implement detailed monitoring for all decoupled services and prepare module-level rollback runbooks to ensure business continuity.
  • Clear communication and team enablement: Educate all stakeholders on the benefits and operational changes of headless, providing necessary training and support.

Common Failure Modes (and Fixes)

  1. Underestimating complexity and cost:
    • Problem: Headless architectures introduce more moving parts and require specialized expertise, often leading to higher initial development costs and longer timelines than anticipated.
    • Fix: Conduct a thorough cost-benefit analysis and a detailed technical assessment before committing. Plan for incremental migration, focusing on high-impact areas first. Ensure your team has the necessary skills or budget for external expertise.
  2. Content management chaos:
    • Problem: Decoupling the frontend from the CMS can lead to content teams struggling with new workflows, lack of visual context, or difficulty managing content across multiple channels.
    • Fix: Invest in a user-friendly headless CMS (e.g., Sanity) with strong visual editing capabilities. Provide extensive training and support for content editors. Establish clear content governance and workflow guidelines.
  3. SEO degradation:
    • Problem: Improper implementation of a headless architecture can negatively impact SEO, leading to lost search rankings due to issues like poor server-side rendering, broken internal links, or incorrect redirects.
    • Fix: Prioritize SEO from day zero. Implement robust server-side rendering (SSR) or static site generation (SSG). Meticulously plan and implement 301 redirects. Continuously monitor SEO performance and address issues proactively.
  4. Performance bottlenecks:
    • Problem: While headless promises performance, poorly optimized frontends, inefficient data fetching, or reliance on too many third-party services can still lead to slow load times.
    • Fix: Focus on frontend performance optimization (e.g., image optimization, code splitting). Leverage edge computing and CDN caching. Monitor Core Web Vitals and user experience metrics continuously.
  5. Lack of clear ownership and governance:
    • Problem: With decoupled systems, it can become unclear who owns which part of the stack, leading to communication breakdowns, slower decision-making, and increased technical debt.
    • Fix: Establish clear ownership for each service and component. Implement a strong governance model for the entire architecture. Foster cross-functional collaboration and communication between frontend, backend, and content teams.

Metrics & Telemetry

  • Lighthouse score: Improved significantly from 42 to 96, indicating a drastic enhancement in website performance, accessibility, and SEO.
  • Platform fees: Reduced annual platform fees from $60,000 to $2,400, demonstrating substantial cost savings.
  • Deploy time: Decreased deployment time from 2 weeks to a mere 5 minutes, enabling rapid iteration and faster time-to-market.

What stuck with me

  • Headless without content ownership is a ticking bomb; I train editors and build playgrounds: A critical lesson learned is that simply implementing a headless CMS is not enough. Without clear content ownership and proper training for editors, the flexibility of headless can quickly devolve into chaos. Content teams need to understand how to leverage the new tools effectively. My approach involves extensive training for editors and building "playgrounds"—safe, sandboxed environments where they can experiment with content creation and publishing without fear of breaking the live site. This fosters confidence and ensures content velocity.
  • SEO cannot be an afterthought; migrations include URLs and redirects in every sprint: One of the biggest risks in any website migration, especially to a headless architecture, is losing hard-earned SEO rankings. SEO cannot be an afterthought; it must be integrated into every sprint from day zero. This means meticulously planning URL redirects, implementing structured data, ensuring server-side rendering for critical content, and continuously monitoring search performance. Each migration sprint includes dedicated tasks for SEO, ensuring that we not only maintain but ideally improve our search visibility post-launch.

What I'm building next

Building on my experience with headless commerce migrations, I'm currently iterating on a specialized headless commerce kit optimized for the unique challenges and opportunities of the LATAM market. This kit will include pre-configured Next.js storefronts, Sanity CMS setups, and integrations with local payment gateways and logistics providers, all designed to accelerate time-to-market for brands expanding into Latin America. The goal is to provide a robust, scalable, and culturally relevant foundation for headless commerce in the region. If you're a brand or developer interested in being a beta partner for this initiative, please reach out. Your insights and collaboration would be invaluable.

Want me to help you replicate this module? Drop me a note and we’ll build it together.

Marsala OS

Ready to turn this insight into a live system?

We build brand, web, CRM, AI, and automation modules that plug into your stack.

Talk to our team