Skip to content

Case study

getMickled

A multi-tenant commerce platform, grown from one shop's store into storefronts, tenant admin and an operator console on one serverless AWS stack.

Client
Bates Solutions
Dates
2019 to now
Live
getmickled.com (opens in a new tab)
merged PRs
1,188
Terraform modules
19
tenant storefronts, one a demo that proves the isolation
2
lines of Terraform for a tenant's backend in dev, down from 588
87

The problem

Mandi’s Mickles has sold online since 2019 on a store I built for it. That store served one business. Serving a second by copying the codebase would have meant fixing every bug twice, then three times, then once per client forever.

So in December 2025 I converted the store into a platform and called it getMickled. That makes mandismickles.com and getmickled.com one project: the store is the platform’s first business. getMickled runs every business from one codebase: each gets its own storefront, its own admin site, its own data and its own payment and shipping accounts, and a fix ships to all of them at once. Bisque & Co, a demo business I set up in June 2026, is the second tenant: it proves the isolation without another client’s data at stake. The hard rule underneath: one business must never be able to see or change another’s.

My role

Founder and principal engineer. I designed and built the platform alone: the Angular apps, the Lambda backend, the Terraform, and the move from one store to many. For Mandi’s Mickles I’ve also handled the business side beyond the software.

What I built

  • Eight apps on one Nx monorepo. Two storefronts (Mandi’s Mickles, live, and Bisque & Co, a demo tenant), a tenant admin site, an operator console for running the platform, the getMickled marketing site, the Super Mickles Mob game, and two end-to-end test suites.
  • A serverless backend. Node 22 Lambdas behind API Gateway, with DynamoDB and Cognito, all in Terraform across 19 modules and deployed by CI through GitHub OIDC.
  • Data and secrets per tenant. Each business gets its own admin table, and its secrets (Square, Shippo and the rest) live in Parameter Store under a path for that business and environment, so a development role can never read a production secret. The code refuses any secret that isn’t stored encrypted.
  • Checkout that knows the products. A box is chosen from the order’s item dimensions, shipping rates come from the business’s own Shippo account through a Lambda (the key used to sit in the browser bundle), and local delivery zones are map polygons with a fee each, holes included, matched against the server-geocoded address.
  • Payments through Square, connected per business, with each Square merchant claimable by exactly one tenant.
  • Hi scores, as a module a business switches on. The first game on it is Super Mickles Mob, a platformer starring the Mickles characters. Players save a score with a nickname, and the business runs contests on a world’s table from its admin site. The browser never decides a score: the game records the buttons held on each step, and the server plays the run back through the same engine to get the score that counts. The engine keeps clear of anything that could differ between browsers, so a run played in Safari replays exactly in Node. A business’s games are registered from the operator console.

Architecture

Every storefront and admin site is a static Angular app on S3 and CloudFront. The hostname picks which business’s configuration loads, but it only decides what you see. Admin requests are scoped on the server by the business in the user’s verified Cognito token. Public requests are moving to a gateway per business. Bisque & Co’s is in production for its contact and testimonials pages, and runs in full in development.

getMickled architectureFour kinds of site, the Mandi's Mickles and Bisque & Co storefronts, each tenant's admin site and the operator console, are static Angular apps on CloudFront and S3; the hostname only chooses which tenant's configuration loads. Requests reach either the shared platform, an API Gateway and Lambdas where admin routes take the tenant from the user's verified Cognito token, public routes such as contact take it from their deployment, and checkout and shipping rates still read it from a header, or a per-tenant runtime, running for Bisque & Co, in production for its contact and testimonials and in full in development, where the tenant is the gateway itself and secret grants are derived from the routes it serves. Data lives in one DynamoDB admin table per tenant, secrets in Parameter Store under each tenant's path, and Square, Shippo and Google are each tenant's own accounts.Storefrontmandismickles.comStorefrontbisqueco.comTenant admin<slug>.getmickled.comOperator consoleconsole.getmickled.comCloudFront + S3 · static Angular appsthe hostname loads the tenant's configuration: what you see, not what you can touchshared platform · every tenantAPI Gatewayadmin + publicCognitocustom:tenant claimLambdasadmin: verified token · checkout: headerper-tenant runtime · Bisque & CoTenant HTTP APIthe tenant is the gatewayTenant Lambdassecret grants derived from routesDynamoDBone admin table per tenantParameter Store/tenant/<slug>/<integration>Square · Shippo · Googleeach tenant's own accounts
Hostnames choose the look. Admin data is chosen by the verified token; public routes are moving to a gateway per business. Each business's table and secrets are its own.

The hard part

Taking the tenant out of the request

The shared backend works out the tenant from the request: the hostname, or a tenant header. That’s fine for picking a logo and wrong for anything that matters, because a caller controls both. The public contact form shows why: had it used that lookup, anyone could have stamped a message with another business’s tenant and dropped it in that business’s inbox. It was written to read its tenant from its own deployment instead, and so were the feedback and orders routes.

The goal is a tenant that never comes from the request. It comes from one of two places.

Admin requests use the verified token. Each admin user’s Cognito token carries their business, and the admin Lambdas pick the table from that claim, never from anything in the request. An unknown tenant fails closed with a 403. This is how production works today.

Public requests use the gateway. Each business gets its own API gateway and its own copies of the Lambdas, and the tenant is simply the gateway the request arrived at, with nothing in the request to forge. Until they move over, checkout and shipping rates on the shared gateway still take the tenant from the header, and closing that gap is what this work is for.

Giving every business its own backend could have meant hundreds of lines of Terraform per tenant per environment: Bisque & Co’s first version took 588. So I folded it into one module. A business now declares which routes it serves, and the module builds the functions, their roles, the gateway and the secret grants from that list. Bisque & Co’s block went from 588 lines to 87, and the next tenant needs two routes.

Deriving the grants from the routes wasn’t only about saving lines. Reviewing the first version, I found a flag that gave Bisque & Co’s catalogue publisher write access to every business’s catalogue snapshot, Mandi’s Mickles’ included, for a function it didn’t even run. I confirmed it in live IAM, then made the grant exist exactly when the function does, so it can’t be switched on by hand, copied by mistake or outlive the route that needed it.

Bisque & Co’s gateway is in production at api.bisqueco.com, carrying its contact and testimonials pages; moving checkout and shipping rates onto it is next. The module’s own notes are just as plain about what it doesn’t cover yet.

Outcome

  • Two tenants on one codebase: Mandi’s Mickles, live and selling, and Bisque & Co, a demo tenant that proves one business can’t see or change another’s.
  • In development, a new business’s backend is a list of routes: 87 lines where the first one took 588.
  • Three ways to sell on one platform: online, wholesale to retailers, and markets and events. Each is a set of modules a business switches on, and they all share one picture of the business: its products, stock, markets and retailers. Because the platform knows all of it, new features come cheaply. The Market Day page, a tablet display for Mandi’s Mickles’ market stall, draws on what the platform already holds: the market’s next dates and the nearby shops that stock the products.
  • The same foundation is what comes next. A nutrition label generator, under way, builds Canadian Nutrition Facts labels from recipes; once ingredient purchases are tracked in the inventory, the same recipes give a cost per jar. The Instagram integration is the base for social posts drafted by AI whenever something changes: a new product, a restock, a new shop stocking the range, this weekend’s markets.
  • Super Mickles Mob is live with two worlds and a hi-score table for each, ready for an event: players scan a QR code and play on their own phones.
  • 1,188 merged pull requests on the platform, across 19 Terraform modules.

Tell me what you're building