JM
JMPTR

Connect with me

How I led Dr Squatch to a Hydrogen storefront

Written by: JM

How a Shared Component Library Set the Stage for Ruggable’s Headless Migration

When I joined Ruggable, the engineering team was shipping features on a Shopify Theme. It worked — until it didn’t. As the company grew and set its sights on international expansion, we kept running into the same walls: tightly coupled templates, duplicated UI across codebases, and a frontend architecture that made every new market launch feel like starting from scratch.

Over the course of my time there, I led two initiatives that fundamentally reshaped how Ruggable builds and ships its web experience. And the order mattered — the first made the second possible.

Building a Shared UI Component Library

Before we could rethink the storefront architecture, we had to get our house in order. As Ruggable expanded to multiple storefronts, we were living the classic scaling problem: the same button, the same modal, the same product card — built slightly differently in two different codebases with two slightly different sets of bugs.

I designed and implemented a shared UI component library in TypeScript and React to fix this. The library gave both storefronts a single source of truth for UI. Every component was typed, documented, and built for reuse. Designers and engineers could reference the same vocabulary, and new features that touched shared UI could be built once and deployed everywhere.

The impact was immediate. Feature delivery accelerated because engineers weren’t rebuilding common patterns from scratch. Design consistency improved because the components enforced the system. And onboarding new engineers got easier — instead of learning the quirks of two different codebases, they could learn the library and be productive on either storefront.

But the component library did something else that wasn’t obvious at the time: it decoupled our UI from the Shopify theme layer. By extracting our design system into standalone React components, we had — almost by accident — built the foundation for a much bigger move.

Migrating to a Headless Next.js Storefront

With a portable component library in hand, we were in a position to take on what would have otherwise been a far riskier project. I led a team of nine engineers through a full migration from Shopify’s monolithic theme architecture to a headless Next.js storefront.

If you’ve ever done a migration of this scale on a live e-commerce site, you know it’s not just a technical lift — it’s an exercise in coordination, risk management, and maintaining business continuity while swapping out the engine mid-flight. Having a proven, self-contained component library meant we weren’t rebuilding the UI from scratch alongside the architecture. The team could focus on routing, data fetching, and infrastructure while dropping in components that already worked.

Shopify Themes had given us rigid templating, limited control over performance, and a development workflow that slowed us down as the team and product grew. With Next.js, we gained full control over rendering, routing, and data fetching. Server-side rendering and static generation gave us the performance improvements we needed, and the decoupled architecture meant frontend and backend teams could move independently. Most importantly, the new storefront gave us the flexibility to support international market expansion — localized experiences, region-specific logic, and multi-storefront configurations that would have been painful to maintain in the old system.

The migration wasn’t a big-bang rewrite. We planned it carefully, rolled it out incrementally, and made sure the team had the patterns and tooling in place to build confidently on the new stack from day one.

What I Took Away

These projects reinforced a few things I believe deeply about engineering work at this scale. First, the best migrations are won before they start — by investing in the foundational work that reduces risk and scope when the big move comes. Second, shared infrastructure like a component library isn’t a nice-to-have — it’s a multiplier that pays dividends on every feature you ship after it exists. And third, the best technical work is the kind that makes everyone around you faster.

I’m proud of what we built at Ruggable, and I’m grateful to the team that made it possible.