Bringing shared foundations into one place — merging five shared repositories into one
In June 2026, I had five separate repositories holding shared logic, scattered across my workspace. A utility toolkit, DynamoDB helpers, a rate limiter, a block-editor engine, and notifications. Each was born at a different time, was referenced from a different product, and had no consistency in its dependency direction or publish target. This article covers how I consolidated them into a single…
In June 2026, the author identified five separate repositories containing shared logic scattered across their workspace: a utility toolkit, DynamoDB helpers, a rate limiter, a block-editor engine, and notifications. Each repository had a different origin, was referenced by different products, and lacked consistency in dependencies and publish targets.
This article discusses merging these repositories into a single monorepo, redrawing the boundary between shared foundation (provider) and products (consumers), and the most important design decision. After an inventory of the current state, the author chose to consolidate the five repositories into a single monorepo. The shared foundation would hold no runtime, with API, screens, and data-access implementations residing in consumer-side products.
A crucial design decision was to draw the boundary so that shared packages do not read process.env, instead receiving environment-dependent values from consumers as arguments or config objects. This allows the shared package to remain a set of pure functions, portable across environments, simplifying testing and avoiding implicit contracts between products.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.