Stripe's Monorepo Developer Environment

Nix, devenv, and containers

  • Several commenters advocate Nix-based tools (e.g., devenv, Guix, Flox) for declarative, reproducible dev environments.
  • They argue containers/devcontainers often “rot” due to unpinned dependencies; Nix/flakes enforce pinning and can also build OCI images.
  • Others emphasize that Nix focuses on reproducibility, not isolation, so combining Nix with containers (e.g., devcontainers, devcontainers-with-Nix) is common for security.
  • Some find Nix powerful but complain about language ergonomics; Guix is praised for its Scheme-based language but lacks macOS support.

Monorepos, dev tooling, and Stripe’s scale

  • Monorepos are described as both widely used at large companies and contentious:
    • Pros: atomic changes across services, consistent dependencies, single history for debugging, easier large-scale refactors, and smoother cross-team collaboration.
    • Cons: operational complexity, slow git operations/builds if tooling is weak, and risk of giant autoformat/linters making reviews painful.
  • Many stress that success or failure depends more on investment in tooling teams than on mono vs multi-repo itself.
  • Some see monorepos as recommended practice at scale; others view them as overkill or harmful for smaller orgs.

Stripe’s devboxes and evolution

  • Original system: code on laptops synced to cloud devboxes, with a proxy lazily starting services; language servers ran remotely.
  • Issues: occasional sync glitches, complexity; for a huge Ruby monorepo, running everything locally was impractical.
  • Newer setup: “remote devboxes” where both code and services live on the server; editors connect via SSH (VS Code, JetBrains, or terminal editors).
  • Codebase is now split into several monorepos by stack (Ruby, Go/Scala, JS), and Stripe has heavily invested in Bazel and editor UX.

Local vs remote development

  • Some argue most teams are better served by local dev (possibly with Docker Compose or a local VM), citing lower latency, simpler mental model, and cheaper hardware vs cloud.
  • Others highlight advantages of remote devboxes: centralized management, easier “reset” of broken environments, richer telemetry, stronger security controls, and more compute than laptops.
  • There’s debate about whether devboxes are necessary outside very large, complex organizations; several warn smaller teams against copying Stripe/Google-style setups without matching scale.