Build & Deployment: Monorepo, CI/CD, Strategies & Release Safety
Learn the interview-ready mental model, practical trade-offs, and production patterns for this web fundamentals topic.
Topic content
Frontend build and deployment is not just DevOps — it directly shapes developer velocity, release confidence, cache correctness, and user safety. Key decisions include monorepo vs multi-repo, CI/CD strategy, deployment patterns (rolling, blue-green, canary), feature flags, and observability-driven rollback plans.
Code enters the line (build), passes multiple quality gates (CI checks, tests, previews), gets packaged as an immutable artifact, and is released progressively (canary/blue-green). Feature flags are emergency stop buttons, and rollback is the reverse conveyor belt. The goal is fast, safe, and repeatable delivery.
1Monorepo vs Multi-Repo
Monorepo enables atomic changes, shared libraries, and consistent tooling but requires strong affected-only builds and package boundaries. Multi-repo gives clear ownership and independence but leads to version drift and duplicated effort. Choose based on team topology and shared code needs.
2CI/CD Strategies
Trunk-Based Development enables fast feedback and continuous deployment. GitFlow provides explicit release branches but slows velocity. Strong pipelines include fast PR checks, selective execution, preview environments, and immutable artifacts.
3Deployment Strategies
Rolling: gradual replacement. Blue-Green: instant cutover with fast rollback. Canary: real-user validation with limited blast radius. All require strong observability and rollback plans.
4Feature Flags & Release Safety
Flags decouple deploy from release. Use for gradual rollout, kill switches, and experimentation. Maintain flag hygiene: owners, cleanup dates, and explicit testing of all states.
- ✓Delivery quality = speed + safety
- ✓Monorepo for shared velocity, multi-repo for isolation
- ✓Trunk-based development + preview environments = fast feedback
- ✓Build once, promote the same immutable artifact
- ✓Progressive rollout (canary/blue-green + feature flags) reduces risk
- ✓Always design for fast rollback and observability
- ✓Clean up feature flags and dead code regularly