In late 2025, UK homeware retailer Homesware hit the ceiling of Shopify Plus. Their B2B wholesale flow needed customer-tier pricing across 12 segments, a custom approval workflow for new accounts, and integrations with their warehouse-management system that Shopify's apps couldn't deliver. We migrated them to a custom Next.js + Postgres + Stripe stack over 11 weeks. Page load went from 4.2s to 0.9s. Lighthouse score went from 52 to 96. Conversion lifted 18% within 60 days. Here's the full technical breakdown — the stack choices, the bugs we hit, the patterns that worked.
Homesware sells home decor wholesale to ~600 UK retailers and decorators, plus a B2C arm that's about 30% of revenue. Their B2B operation requires:
Shopify Plus handles ~70% of the above out of the box. The remaining 30% required 4 custom Shopify apps (built by us), an external pricing engine, and a fragile webhook chain. By mid-2025, the architecture had become:
Shopify Plus → 4 custom apps → external Node.js pricing service → external account-approval workflow → external WMS bridge. Total monthly platform cost (Shopify Plus + Stripe + app subscriptions): £3,800. Page-load median: 4.2 seconds, mostly from the custom apps fetching pricing serially. Lighthouse score (mobile): 52. Conversion was visibly suffering from speed; the team's Storefront API queries were timing out under load.
We modeled two paths: rebuild the custom apps to be faster within Shopify, or migrate to fully custom. Custom won on three axes: (1) page-load could drop below 1s with edge rendering, (2) checkout could be customized fully (Shopify's checkout is locked unless you're on Shopify Plus + Checkout Extensibility, and even that's limited), (3) platform cost would drop by ~£3,000/month after migration.
Three Next.js routes handle ~95% of traffic: /products/[handle] (product detail), /collections/[slug] (category browse), and /cart. All three use React Server Components by default — meaning the HTML is rendered on Vercel's edge with data already inlined, and the client hydrates only the interactive parts (size selector, add-to-cart button, quantity picker).
Pricing for a logged-in B2B customer is computed in a single SQL query that joins the customer's tier, any bespoke overrides, and any active promotion. The query is wrapped in a Postgres function so it can be called from a single Server Component fetch with row-level security enforcing that customers can only see their own pricing.
The checkout flow is custom — we don't use Stripe Checkout for B2B because we need to support 'order now, pay on invoice.' Instead we render a custom checkout form, validate inventory via a server action, create a Stripe PaymentIntent (B2C) or Invoice (B2B), and write the order to Postgres with status 'pending payment' or 'pending fulfillment.' The WMS bridge is a separate background job that polls every 60 seconds for orders ready to ship.
Shopify is genuinely good at what it does. Don't migrate just because custom is shinier — migrate because Shopify has hit a ceiling that's measurable in revenue or cost. For Homesware, the ceiling was clear: platform cost £3,800/month, page-load 4.2s, conversion suffering visibly.
Plan for 10-14 weeks, not 4-6. Migration projects nearly always take longer than greenfield because the existing edge cases have to be reproduced or explicitly retired.
Keep Shopify admin running through migration. The B2B team didn't switch admin UIs until week 10, which kept ops smooth.
Invest in observability from day one. Sentry caught 8 production bugs in the first 48 hours that would have hurt revenue if we'd waited for user reports.
Total engagement: £58,000 over 11 weeks, fixed-bid. ROI hit within 8 months from platform-cost savings alone (£3,180/month saved × 8 months ≈ £25K), plus the conversion lift. By month 18 the migration was net-positive even before accounting for the conversion improvement.
We evaluated all three. Next.js won on (a) Vercel hosting maturity, (b) React Server Components for fast PDPs, (c) ecosystem (Stripe / Clerk / Sanity all have first-class Next.js examples), and (d) team familiarity. Remix would have worked; Astro is great for content but we needed more interactivity than Astro is optimized for.
The pricing model is genuinely relational. A B2B customer's price for SKU X depends on their tier, active promotions, bespoke overrides, and inventory location. Joining these in SQL is clean; doing it in document or KV stores becomes a tangle. Postgres on Neon scales to 100K+ rows/second of reads with read replicas; nothing about Homesware's load required NoSQL.
We built a custom admin in the same Next.js codebase. Shopify's admin is genuinely good; ours is purpose-built for Homesware's workflows (bulk order entry, customer-tier management, approval queue). Took ~3 weeks of the 11 to build.
Yes. We've done ~12 of these. We always start with a 1-2 week paid discovery to determine if migration is the right call — sometimes the answer is 'stay where you are, but fix X.' If migration is right, expect 10-14 weeks at USD 40K-150K depending on scope.
Want help with this? Apex IT Solutions builds custom software, web, mobile apps, and DevOps for B2B clients in the US, UK, UAE, KSA, Canada, and Pakistan. Talk to an engineer for a free consultation.