Case study

One monorepo for two brands and their component library

Two brand storefronts and a component library merged into one monorepo, with a Storybook design system and performance dashboards per market.

Context

The client is a consumer goods company with more than one brand, which it sells direct to consumers online. Two brand storefronts and a component library ran on one e-commerce platform, and the brands sell in many markets.

Our role

We led the frontend architecture and the frontend chapter. The work in this case study ran from June 2022 to December 2023, within a wider engagement that ran from about 2019 to January 2024. Part of this work predates BMN Technologies, which started in September 2022.

We wrote the performance reports and the monorepo report, and we made the migration checklist together with the team. A developer in the team did the monorepo merge, which we helped with and reviewed. We also wrote the release notes and updated the documentation, and we did the image work together with the DevOps and backend teams.

Problem

  • The two storefronts and the component library were in separate repositories.
  • Each brand built the same components again.
  • Performance scores were low across markets, and one market had a 5 MB image on its homepage.

What we did

  1. Assess (June 2022 and June 2023). We produced automated performance reports from June 2022, and in June 2023 we wrote a report on a move to a monorepo.
  2. Pilot. The pilot was a component library in Storybook, based on atomic design, and one brand’s redesign was built with it.
  3. Scale (June to July 2023). The two storefronts and the component library moved into one monorepo. A checklist of sanity checks came first, then the merge followed in July 2023 and the migration to the Next.js App Router started.
  4. Images (June 2023). Together with the DevOps and backend teams, we optimised the images through the commerce platform and the image API of the CDN. On one product listing page, this brought the payload down from 3.5 MB to 567 KB.
  5. Monitoring. Each market got a performance dashboard in Datadog with a monthly report. These dashboards caught a storefront release that lowered the performance score by two points.
  6. Hand over (December 2023). We updated the documentation, and the team started working with rules for small pull requests and for reviews.

Results

MetricBeforeAfterPeriod
Product listing page payload, one market3.5 MB567 KBJune 2023
Let's connect

Talk about your project

Tell us about your team and your problem. In 30 minutes we find out whether one of our offers fits, and if none does, we tell you.

Book a 30-minute call