A monorepo holds several related packages (a shared library, an API, a CLI) in one repository. npm/pnpm/yarn "workspaces" let those packages depend on each other locally (symlinked in `node_modules`) without publishing to a registry first, and installs dependencies for all packages in one pass.
json
{
"name": "my-web3-monorepo",
"private": true,
"workspaces": ["packages/*"]
}packages/ shared-types/ (name: "@app/shared-types") api/ (depends on "@app/shared-types": "workspace:*") indexer/
Workspaces make it practical to share types and utility code (e.g. chain configs, ABI definitions) between an API service and an indexer without copy-pasting or publishing an internal npm package for every small change.