Code organization strategy where multiple projects coexist in a single repository, sharing dependencies, configuration, and build tooling.
A monorepo is a single repository containing multiple distinct projects with well-defined relationships between them. It's not just "all code in one folder" — it's an architectural strategy backed by specialized tooling.
In a polyrepo model (one repository per project), teams face:
The monorepo centralizes everything in one place with tools that manage the complexity.
Good fit when:
Avoid when:
| Tool | Focus | Language | Key features |
|---|---|---|---|
| Turborepo | Build caching | JS/TS | Remote cache, declarative pipelines, zero-config |
| Nx | Full-featured | JS/TS | Generators, affected commands, graph visualization |
| pnpm workspaces | Package manager | JS/TS | Efficient symlinks, strict dependencies |
| Lerna | Publishing | JS/TS | Coordinated versioning, changelogs (now part of Nx) |
| Bazel | Hermetic builds | Polyglot | Reproducibility, extreme scalability (Google-scale) |
| Pants | Hermetic builds | Python/Go/Java | Similar to Bazel, better DX |
| Rush | Enterprise | JS/TS | Strict policies, phantom dependencies detection |
The most common comparison in the JavaScript ecosystem:
Turborepo — minimalist, integrates with your existing setup, excellent remote cache with Vercel. Ideal if you already have a monorepo and want to speed up builds without changing much.
Nx — more opinionated, includes generators for scaffolding, framework-specific plugins, dependency visualization. Better if starting from scratch or wanting guided structure.
monorepo/
├── apps/
│ ├── web/ # Next.js app
│ ├── mobile/ # React Native app
│ └── api/ # Backend service
├── packages/
│ ├── ui/ # Shared components
│ ├── utils/ # Shared utilities
│ └── config/ # Shared ESLint, TS configs
├── turbo.json # Pipeline configuration
├── pnpm-workspace.yaml
└── package.json
Packages that are never published to npm — only consumed within the monorepo:
{
"name": "@repo/ui",
"private": true,
"exports": {
".": "./src/index.ts"
}
}Define dependencies between tasks for correct parallelization:
{
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
},
"test": {
"dependsOn": ["build"]
}
}
}A package build that hasn't changed is retrieved from cache instead of re-executing:
# First time: runs build
turbo build # 45s
# Second time (no changes): retrieved from cache
turbo build # 0.3s@repo/utils that grows unchecked and everything depends onjonmatum.com uses Turborepo + pnpm workspaces with apps/web (Next.js) and packages/knowledge (content pipeline). Turborepo's cache reduces the build from ~45s to under 1s when only MDX content changes.
The decision between monorepo and polyrepo affects development velocity, CI/CD complexity, and the ability to share code across teams. There is no universal answer — but understanding the trade-offs prevents months of painful migration when the initial choice doesn't scale.
Distributed version control system created by Linus Torvalds in 2005. Foundation of every modern development workflow — from local commits to global collaboration.
Minimalist branching model designed for continuous deployment. Only two elements — main and feature branches — with PRs as the integration point and immediate deploy after merge.
Set of technical and cultural practices that implement DevOps principles — from Infrastructure as Code to blameless post-mortems. The "how" behind the philosophy.
Chronicle of building a second brain with a knowledge graph, bilingual pipeline, and agent endpoints — in days, not weeks, and what that teaches about the gap between theory and working systems.
Reusable template for creating micro frontends with React, TypeScript, Tailwind CSS, and Vite. Includes design system, testing, and CI/CD.
Micro frontend shell with a complete design system, 24 components, 666 tests, and WCAG AA compliance. Published on npm as @jonmatum/react-mfe-shell.
Interactive demo application for the React MFE Shell design system with PWA support, automated metrics, and component showcase.
Architectural style structuring an application as a collection of small, independent, deployable services, each with its own business logic and data.
Architectural pattern extending microservices to the frontend, allowing independent teams to develop and deploy parts of a web application autonomously.
Application of open-source development practices within an organization, allowing teams to contribute to other teams' projects with transparent processes.
Discipline focused on optimizing developer productivity, satisfaction, and effectiveness through well-designed tools, processes, and environments.