£10M B2B eCommerce Platform
Wigmore Medical’s eCommerce platform handles over £10M of trade a year, mostly from medical and aesthetics professionals who reorder regularly.
I led its frontend rebuild as the only engineer: new UX flows, a new design system and every customer-facing page, built on a decade-old .NET site whose backend I couldn’t change.
The whole site shipped in the new design, and page loads dropped from about 5s to 1.1s.
I expected a frontend project. The hard part turned out to be strategy: working out what could change, what couldn’t, and making the case for it.
The setup
The site is a custom .NET eCommerce platform, built around 2015 and showing its age. It sells B2B and B2C products, offers, training courses and webinars under strict UK regulations: who can buy what, at what price, with which credentials. That’s why it was never on Shopify.
I worked alongside a project manager and a UX designer. The backend belonged to a separate team, fully (and rightly) committed to moving the business onto a new ERP. The designs were ambitious: complete multi-step flows, such as managing patients from a clinic dashboard and building a prescription, drawn for the platform the business wanted rather than the one it had.


Choosing an approach
My toxic trait first instinct was to rebuild headless in Next.js. Instead, I wrote an options paper covering four architectures: a decoupled Next.js frontend on the existing backend, Shopify Plus with custom middleware for the regulated parts, Salesforce Health Cloud and Adobe Commerce.

The off-the-shelf platforms were the most expensive, with no clear timeline, and headless was the most work, at six months or more. I recommended the least exciting route: update the existing ASP.NET frontend in place, in roughly 2–3 months, on three conditions:
- Backend visibility, so we could understand why things broke or ran slowly.
- A real dev environment, so changes could be tested against realistic data.
- Stable data contracts, so frontend work didn’t have to wait for the ERP migration.
With backend capacity going to the ERP, two of the conditions were never met: there was no dev environment, and backend access stayed at a Swagger page. The data contracts did stay stable, which made rebuilding in place possible, but also meant they couldn’t change.
Much of my week became translating designs into cost, and as the only technical person in the room, I was the one saying “yes, but”. I didn’t always say it early enough.
What the code looked like
To make the scope argument, I needed numbers. The site had 729 Razor views, about 547,000 lines, with nearly 24,000 id attributes and over 4,000 inline onclick handlers.
The IDs are the point. They aren’t styling hooks: the markup is the API between Razor, inline jQuery, Kendo widgets and the backend’s response shapes. Rename a <div> on one page and you might break a feature on a page you’ve never opened.
Attempt #1: the clean rewrite
I still wanted a path to something modern, so I planned a Strangler Fig: new views written from scratch in Tailwind and Alpine on a parallel v2 layout, ported page by page from a prototype.
The prototype was a component library built in Vite and Tailwind, so the design system existed in code before any Razor view was touched. You can browse the full component library.


Here’s why:
- The data contract was frozen. Without backend changes, rebuilding the basket in Alpine didn’t improve it; it cloned it, quirks and all.
- The state lived in jQuery. Thousands of handlers, Kendo widgets and AJAX callbacks touch the DOM directly. Making Alpine the source of truth meant rewriting all of them.
- Two layouts doubled the work. Old and new pages had to share a basket, header and checkout, and every fix had to land twice.
It was a hard call to make alone, two months into a project with a deadline. But continuing would have meant delivering half of two sites instead of all of one.
Attempt #2: improve the look, optimise the behaviour
The new rule fitted on one line:
Improve the look, optimise the behaviour. Keep every
id,name, JS-hook class,onclickand the DOM structure JS reads, so nothing that works today breaks.
Rebuild each page in place, and where possible fix whole categories of problems with one global layer instead of hundreds of edits. Alpine stayed only where it’s the right tool: drawers, the header, the cart counter and search.
- One modal coordinator instead of 1,078 edits. A 75-line
modal.jslistens to Bootstrap’s ownshow/hiddenevents, assigns z-indexes and derives scrim visibility from state, so double or orphaned scrims become impossible. No call sites changed. - One toast system. I rewired the helpers every page already called to fire a single global
toast(). - One
:has()selector. A dozen FAQ, legal and account pages shared a Bootstrap sidebar layout. One rule turned them all into a CSS grid:
.row:has(> .index) {
display: grid;
grid-template-columns: 1fr 2fr;
gap: 0.75rem;
}
Bugs that depended on backend logic went on a list for the backend team rather than being fixed blind, because they couldn’t be tested safely without backend access.
Why Alpine
Alpine was the main thing I kept from the prototype. We couldn’t safely change the existing code, so anything added on top had to be as light as possible. Alpine is one small script with no build step, and it handles interactive pieces like drawers and search without a framework.
Speed: measure first
A .NET Core migration was being floated to make the site faster. Instead, I added a Server-Timing header to every response, which showed most page time going on synchronous, sequential backend calls, not our web code. That ruled out the migration, and pointed to the fixes:
- A category list fetched three times per page, cut to one
- Homepage caching, so a warm load makes no backend calls
- 548 images converted to WebP (155MB → 16.5MB)
- Hover-prefetching to hide the remaining latency
What shipped
- The whole site in the new design, from the homepage and PDPs to the basket, checkout, account pages and training.
- Page loads down from about 5s to 1.1s. Core Web Vitals, mobile p75, before → after:
- LCP: 4.7s → 1.9s
- INP: 410ms → 150ms
- CLS: 0.26 → 0.03
- A design system in code: the prototype’s components, ported to SCSS over Bootstrap.
What it cost:
- About four months of build against a 2–3 month estimate, including a full change of direction halfway through.
- The Tailwind and Alpine rewrite didn’t happen. Rebuilding in place was the right call, but it’s not the codebase I first pitched.
- The data layer is unchanged. That was always out of the frontend’s reach.
What I’d do differently
If you’re the only technical person, the strategy is your job too. Nobody else will write the options paper or explain why a design change costs three weeks. Do it early and in writing, with the conditions in the document so you can point back at them.
Find out who owns the data contract before choosing a stack. Alpine and Tailwind weren’t the wrong tools. They were the wrong strategy for a frontend whose state belongs to someone else. I still think they’re a lovely stack, and I’ll use them properly on a project where I own the data.