← Back to work

Storefront Consolidation

Nine legacy e-commerce storefronts being rebuilt as one multi-tenant platform

  • Target: 9 stores on 1 platform
  • Target: 1 patch cycle instead of 9
Industry
Commercial printing and e-commerce
Status
In progress
  1. 9 storefronts
  2. 1 Next.js app
  3. PostgreSQL
  4. Production system

The Problem

A print company ran nine separate Magento storefronts, one per customer program, spread across several servers. Each store was its own codebase, its own patch schedule, and its own attack surface. Keeping nine stores patched and secure in place had stopped being realistic.

The Approach

I made the case for rebuild-and-migrate over remediate-in-place and got it approved. Then I wrote a functional spec for a single multi-tenant platform and ran a gap analysis against the product team's MVP document over two rounds of review, so everyone agreed on what "done" meant before code shipped.

The Architecture

One Next.js and TypeScript application with Prisma over PostgreSQL. Each storefront becomes a tenant with its own catalog, branding, and customers, sharing one codebase and one deployment pipeline. Orders flow straight into the print shop's production system instead of being re-keyed by hand.

The Results

This one is still being built, so these are targets, not results yet. Nine codebases become one. Security patches ship once instead of nine times. A new customer program launches as a tenant configuration instead of a new server, and orders land in production without anyone retyping them.

Built with Next.js, TypeScript, Prisma, PostgreSQL, Multi-tenant

Patching the same store over and over?

If you're paying to maintain several versions of one business, I'll tell you plainly whether to fix them or fold them into one.

Serving the Central Valley: Sacramento · Stockton · Modesto · Manteca, Tracy & Lathrop