Close Menu

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    How to Become a Product Designer: A Complete Guide for Career-Changers and Tech Pivoters

    September 30, 2025

    Socratic Questioning: A Powerful Tool for Deeper Learning and Critical Thinking

    September 28, 2025

    How to Become an AI Engineer: A Complete Guide for Career-Changers and Tech Pivoters

    September 27, 2025
    Facebook X (Twitter) Instagram
    The BridgeTechAcademy BlogThe BridgeTechAcademy Blog
    • Home
    • About
    • Courses
    • Testimonials
    • Blog
    • Contact
    The BridgeTechAcademy BlogThe BridgeTechAcademy Blog
    Home » How to Migrate Production Code to a Monorepo
    Artificial Intelligence

    How to Migrate Production Code to a Monorepo

    adeyemsBy adeyemsJune 1, 2025Updated:July 17, 2025No Comments3 Mins Read
    Facebook Twitter LinkedIn Copy Link
    Share
    Facebook Twitter LinkedIn Copy Link

    In February 2024, the UI Platform team moved 1.3M lines of React micro-frontend code to a monorepo while retaining git history. Our team is responsible for the frontend architecture and UI Engineer experience at DigitalOcean, and moving to a monorepo is part of our frontend vision, of which much is lifted from Monica Lent’s Building Resilient Frontend Architecture talk. With a monorepo, we aimed to reduce our dependency management burdens and simplify our micro-frontend boilerplate to ultimately increase developer velocity.

    While there are plenty of guides for getting started with monorepos, there are few that touch on migrating existing repositories over. This is the guide I wish I had when we started and I hope it helps someone else!

    What is a monorepo?

    A monorepo is a collection of isolated packages that live in a single repository. It reduces friction between shared code while keeping the safety gained from isolation. In contrast to a monolithic repository where the entire application is deployed as one, a monorepo allows packages to be deployed on their own.

    Approach: moving to a monorepo

    We’re fans of Kent Beck’s famous refactoring quote, “First make the change easy (warning this may be hard), then make the easy change”, and applied it to this work as best we could. In its essence, a monorepo is code colocation, so we restricted the actual migration to that alone; there would be no functional change in any of the apps but they would live next to each other. Any changes required to an app would get applied while it was in its own repo, so problems with colocation were isolated.

    Our apps had been created over a period of roughly three years, and in many cases, the things that were learned from newer apps were not applied to older apps. It created a fair bit of inconsistency which added complexity to colocation and kicked off refactoring cycles. As we worked through each app, they needed to: run the local dev environment, tests, linters, and IDE plugins; run the CI/CD pipelines; and deploy to our staging environment. At least one of those steps broke with any two apps colocated, so we’d refactor the independent repos until the problem was resolved. Eventually, any two apps worked together, which actually meant all of the apps worked together.

    For this article, I’ll break the project into three stages, though some pre-migration steps only became apparent as we worked through the task:

    1. Pre-migration: making the change easy
    2. Migration: colocating the apps
    3. Post-migration: optimizing the monorepo

    monorepo
    Share. Facebook Twitter LinkedIn Email Copy Link
    adeyems
    • Website

    Add A Comment
    Leave A Reply Cancel Reply

    Latest Posts

    Oculus Quest X Headset: Discover a Shining New Star

    January 5, 2021

    iPhone Pro 13 Rumored to Feature 1 TB of Storage

    January 5, 2021

    Fujifilm’s 102-Megapixel Camera is the Size of a Typical DSLR

    January 5, 2021

    Apple Watch review: price drop makes Apple’s smartwatch more affordable

    January 30, 2016
    Artificial Intelligence
    The BridgeTechAcademy Blog
    Facebook X (Twitter) Instagram YouTube LinkedIn
    • Courses
    • Tech
    • Gadgets
    • Buy Now
    © 2026 BridgeTechAcademy

    Type above and press Enter to search. Press Esc to cancel.