Frontend at organisation scale · mid
Monorepos for frontend teams
A monorepo keeps many apps and packages in one repository with a workspace tool and a task runner that builds only what changed and caches results, which makes sharing code easy but needs clear ownership and boundaries.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Workspaces (pnpm, npm, yarn) link local packages and share one lockfile.
- Task runners (Turborepo, Nx) know the dependency graph, run only affected tasks, and cache results by a hash of inputs (source files, lockfile, task config, env); only declared outputs are cached and restored; remote caching shares results between developers and CI.
- Boundaries: package.json exports, lint rules for allowed imports, CODEOWNERS per folder.
- Internal packages can stay unpublished ('workspace:*') or be published with changesets when other repos need them.
- Monorepo is not monolith: apps still deploy separately; it pairs well with micro-frontends (RazorpayX moved its Vendor Portal into a monorepo during the split).
- Costs: tooling to learn, big clones, CI configuration, one bad shared change can break many apps — so strong tests and ownership matter.
The red pen
Common traps: mistake → fix
Mistake: Monorepo means one big deploy
Fix: each app keeps its own pipeline.
Mistake: Caching is automatic for every file
Fix: undeclared outputs or env vars cause wrong cache hits.
Mistake: Everyone can import anything
Fix: without boundaries the repo becomes a tangle.
Easy to hard
Questions interviewers ask, easy to hard
- Why would you move several frontend repos into a monorepo?
- How does a monorepo keep CI fast?
- How do you stop one team breaking another team's app?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.