Monorepos & Spaceships – Navigating Successfully Through Code and Cosmos

This ad is not shown to multipass and full ticket holders
JSNation US
JSNation US 2026
November 16 - 19, 2026
New York, US & Online
Upcoming event
JSNation US 2026
JSNation US 2026
November 16 - 19, 2026. New York, US & Online
Bookmark
Rate this content
Sentry
Promoted
Code breaks, fix it faster

Crashes, slowdowns, regressions in prod. Seer by Sentry unifies traces, replays, errors, profiles to find root causes fast.

Get started

Building a monorepo is like flying a spaceship: many people work together to make sure things don't go up in flames.
In this talk we'll go over tools, techniques and best practices to help us put out fires and stay on course throughout our intergalactic journey.

Disclaimer: attending this talk probably doesn't qualify you to fly spaceships! 

This talk has been presented at JSNation US 2024, check out the latest edition of this JavaScript Conference.

FAQ

Yes, monorepos can be adopted incrementally by grouping projects that make sense together, allowing for flexibility in organizing code.

Dan is a metaphorical character representing developers. He is described as a mechanic who fixes spaceships, symbolizing the tasks and challenges faced by developers.

The main topic of the talk is about monorepos, their benefits, and how they compare to polyrepos in software development.

Polyrepos refer to a structure where each team or project has its own repository. Advantages include team autonomy, technological freedom, and a cleanly separated architecture.

Challenges include inefficient code sharing, high code duplication, complex dependency management, and isolation, which can harm collaboration.

A monorepo is a single repository containing multiple distinct projects with well-defined relationships, allowing for easier code sharing and collaboration.

Monorepos offer benefits such as atomic changes, reduced code duplication, consistent tooling, and improved velocity, safety, and mobility in development.

Monorepos allow changes to be made across multiple projects with a single PR, reducing overhead and encouraging code sharing by simplifying the process.

Yes, teams can still have autonomy over their code, tools, and deployment within a monorepo, but a basic level of collaboration and agreement on certain tools is needed.

NX provides tools for analyzing project dependencies, caching computations, and distributing tasks across agents to optimize CI processes and improve efficiency.

Max Kless
Max Kless
28 min
21 Nov, 2024

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Hello everyone. I'd like to start off by telling you a story about a guy named Dan. He's a mechanic and his job is fixing spaceships. Dan is a metaphor for all of us developers. Let's talk about monorepos as you've probably guessed from the title. I'll start off by talking about polyrepos, what they do well, but also where they fall short. Then I'll talk about monorepos and what issues they solve, as well as why you need good monorepo tooling, especially at scale. A Monorepo is a single repository containing multiple distinct projects with well-defined relationships. It allows teams to work together in a unified manner. Monorepos help with velocity, safety, and mobility. Monorepos can be adopted incrementally and good tooling can help with running tests. CI time is now coupled to the size of the change made, rather than the size of the monorepo. By generating a task graph from the project graph, we can optimize the build process by parallelizing and scheduling tasks. NX offers a solution by distributing tasks across multiple agents, allowing for time and cost optimization. Visit monorepo.tools or nx.dev to learn more and achieve focus and contentment like Dan.

1. Introduction to Monorepos

Short description:

Hello everyone. I'd like to start off by telling you a story about a guy named Dan. He's a mechanic and his job is fixing spaceships. Dan is a metaphor for all of us developers. Let's talk about monorepos as you've probably guessed from the title. I'll start off by talking about polyrepos, what they do well, but also where they fall short. Then I'll talk about monorepos and what issues they solve, as well as why you need good monorepo tooling, especially at scale. Every spaceship is an analogy for one repository. This is a perfectly logical way to organize a fleet of spaceships. In the world of code, I would call this approach a polyrepo. What we're trying to achieve and why this is such a popular way to develop software is the team autonomy it gets. They have technological freedom.

Hello everyone. I'd like to start off by telling you a story about a guy named Dan. So this is Dan right here. He's a mechanic and his job is fixing spaceships. So you can see him here sitting in this spaceport bar, you know, he's drinking a beer that is technically derived from fungus. But he's just sitting, you know, he's enjoying, he's having a good time.

And Dan is really a metaphor for all of us developers. And like any developer during the day, Dan will go from being cautiously optimistic to falling into a pit of utter despair and depression. But he will come out on the other side on top feeling like he's understood everything and he's on top of the world.

My name is Max and I've personally gone through that cycle of disillusionment and understanding many times in my life. And I hope I can make it a little bit easier for you today. So let's talk about monorepos as you've probably guessed from the title. And I work at a company called NX where we built monorepo tooling. And I also work within monorepo all day every day. So that's kind of my perspective on it.

Just to give you an idea of what you're up against, I'm going to start off by talking about polyrepos, what they do well, but also where they fall short. Then I'll talk about monorepos and what issues they solve, as well as why you need good monorepo tooling, especially at scale. So in this talk, every spaceship is an analogy for one repository. So on his first day of work, Dan hires onto a fleet of spaceships, actually. You know, there's some in the front, they're fighting space pirates, they're exploring, they're doing cool main character type stuff. There's some in the middle, transporting crew, handling repairs, and the like. And then there are some ships in the back end of the fleet, you know, handling supplies with back home and communications. So all these ships, they have their individual responsibilities, but they're also all connected in some way.

And I would say that this is a perfectly logical way to organize a fleet of spaceships. And it also makes sense in the world of code. In the world of code, I would call this approach a polyrepo. Where every team or project has their own repository hosted on GitHub or the like. And what we're trying to achieve and why this is such a popular way to develop software is the team autonomy it gets. So every team has experts in their domain and for their projects, right? And they're free to make decisions. For example, they have technological freedom.

2. Challenges of Sharing Code

Short description:

In this case, there's two React apps and an Angular app. They share some code with TypeScript, and there's a backend written in Kotlin. Polyrepos offer team autonomy, technological freedom, and a cleanly separated architecture. However, there are challenges when teams want to share code. Creating separate repositories for shared code involves a lot of overhead that developers would rather avoid.

In this case, there's two React apps and an Angular app. They share some code with TypeScript, and there's a backend written in Kotlin. Because this is structured so nicely, it's actually way easier to get an overview and grasp what your entire system is doing and how it's structured, versus just having one big ball of mud with no discernible internal structure.

So to summarize, I would say polyrepos are great. Because they offer team autonomy, technological freedom, and a cleanly separated architecture. But if polyrepos are so great, then why am I here? Why am I giving this talk to a lot of repos, right?

Well, let's say the landing page and the web app team, they want to share some code. They want to share some React hooks. How do we go about this? Well, they would create a repository for those hooks. They'd have to set up publishing, building, linting, testing, CI pipeline. They have to make PRs to the repos to consume that library, and then maybe go through those steps a couple of times to iterate until everything works. As you can imagine, that is a lot of overhead. It's a lot of work that developers don't want to go through.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Scaling Up with Remix and Micro Frontends
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Scaling Up with Remix and Micro Frontends
Top Content
This talk discusses the usage of Microfrontends in Remix and introduces the Tiny Frontend library. Kazoo, a used car buying platform, follows a domain-driven design approach and encountered issues with granular slicing. Tiny Frontend aims to solve the slicing problem and promotes type safety and compatibility of shared dependencies. The speaker demonstrates how Tiny Frontend works with server-side rendering and how Remix can consume and update components without redeploying the app. The talk also explores the usage of micro frontends and the future support for Webpack Module Federation in Remix.
Routing in React 18 and Beyond
React Summit 2022React Summit 2022
20 min
Routing in React 18 and Beyond
Top Content
Routing in React 18 brings a native app-like user experience and allows applications to transition between different environments. React Router and Next.js have different approaches to routing, with React Router using component-based routing and Next.js using file system-based routing. React server components provide the primitives to address the disadvantages of multipage applications while maintaining the same user experience. Improving navigation and routing in React involves including loading UI, pre-rendering parts of the screen, and using server components for more performant experiences. Next.js and Remix are moving towards a converging solution by combining component-based routing with file system routing.
Design Systems: Walking the Line Between Flexibility and Consistency
React Advanced 2021React Advanced 2021
47 min
Design Systems: Walking the Line Between Flexibility and Consistency
Top Content
The Talk discusses the balance between flexibility and consistency in design systems. It explores the API design of the ActionList component and the customization options it offers. The use of component-based APIs and composability is emphasized for flexibility and customization. The Talk also touches on the ActionMenu component and the concept of building for people. The Q&A session covers topics such as component inclusion in design systems, API complexity, and the decision between creating a custom design system or using a component library.
Understanding React’s Fiber Architecture
React Advanced 2022React Advanced 2022
29 min
Understanding React’s Fiber Architecture
Top Content
This Talk explores React's internal jargon, specifically fiber, which is an internal unit of work for rendering and committing. Fibers facilitate efficient updates to elements and play a crucial role in the reconciliation process. The work loop, complete work, and commit phase are essential steps in the rendering process. Understanding React's internals can help with optimizing code and pull request reviews. React 18 introduces the work loop sync and async functions for concurrent features and prioritization. Fiber brings benefits like async rendering and the ability to discard work-in-progress trees, improving user experience.
Thinking Like an Architect
Node Congress 2025Node Congress 2025
31 min
Thinking Like an Architect
Top Content
In modern software development, architecture is more than just selecting the right tech stack; it involves decision-making, trade-offs, and considering the context of the business and organization. Understanding the problem space and focusing on users' needs are essential. Architectural flexibility is key, adapting the level of granularity and choosing between different approaches. Holistic thinking, long-term vision, and domain understanding are crucial for making better decisions. Effective communication, inclusion, and documentation are core skills for architects. Democratizing communication, prioritizing value, and embracing adaptive architectures are key to success.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
RemixConf EU discussed full stack components and their benefits, such as marrying the backend and UI in the same file. The talk demonstrated the implementation of a combo box with search functionality using Remix and the Downshift library. It also highlighted the ease of creating resource routes in Remix and the importance of code organization and maintainability in full stack components. The speaker expressed gratitude towards the audience and discussed the future of Remix, including its acquisition by Shopify and the potential for collaboration with Hydrogen.

Workshops on related topic

Master JavaScript Patterns
JSNation 2024JSNation 2024
145 min
Master JavaScript Patterns
Top Content
Featured Workshop
Adrian Hajdin
Adrian Hajdin
During this workshop, participants will review the essential JavaScript patterns that every developer should know. Through hands-on exercises, real-world examples, and interactive discussions, attendees will deepen their understanding of best practices for organizing code, solving common challenges, and designing scalable architectures. By the end of the workshop, participants will gain newfound confidence in their ability to write high-quality JavaScript code that stands the test of time.
Points Covered:
1. Introduction to JavaScript Patterns2. Foundational Patterns3. Object Creation Patterns4. Behavioral Patterns5. Architectural Patterns6. Hands-On Exercises and Case Studies
How It Will Help Developers:
- Gain a deep understanding of JavaScript patterns and their applications in real-world scenarios- Learn best practices for organizing code, solving common challenges, and designing scalable architectures- Enhance problem-solving skills and code readability- Improve collaboration and communication within development teams- Accelerate career growth and opportunities for advancement in the software industry
AI on Demand: Serverless AI
DevOps.js Conf 2024DevOps.js Conf 2024
163 min
AI on Demand: Serverless AI
Top Content
Featured WorkshopFree
Nathan Disidore
Nathan Disidore
In this workshop, we discuss the merits of serverless architecture and how it can be applied to the AI space. We'll explore options around building serverless RAG applications for a more lambda-esque approach to AI. Next, we'll get hands on and build a sample CRUD app that allows you to store information and query it using an LLM with Workers AI, Vectorize, D1, and Cloudflare Workers.
React Patterns Made Simple
React Day Berlin 2024React Day Berlin 2024
62 min
React Patterns Made Simple
Top Content
Featured Workshop
Adrian Hajdin
Adrian Hajdin
Learn widely used React patterns, including HOCs, Compound Components, Provider Patterns, Functions as Child, and Portals, to write cleaner, more efficient code and create scalable, maintainable applications.Overview In this workshop, viewers will learn about key React patterns that can make their code more efficient, readable, and maintainable. We'll introduce each pattern, explain how it works, and demonstrate practical examples. By the end of the session, participants will have a solid understanding of how to use these patterns in their projects.Learning GoalsHOCs Compound Components Provider Patterns Functions as Child Portals Modularity Maintainability Real-world Application.
Building a Shopify App with React & Node
React Summit Remote Edition 2021React Summit Remote Edition 2021
87 min
Building a Shopify App with React & Node
Top Content
Workshop
Jennifer Gray
Hanna Chen
2 authors
Shopify merchants have a diverse set of needs, and developers have a unique opportunity to meet those needs building apps. Building an app can be tough work but Shopify has created a set of tools and resources to help you build out a seamless app experience as quickly as possible. Get hands on experience building an embedded Shopify app using the Shopify App CLI, Polaris and Shopify App Bridge.We’ll show you how to create an app that accesses information from a development store and can run in your local environment.
Build a chat room with Appwrite and React
JSNation 2022JSNation 2022
41 min
Build a chat room with Appwrite and React
Workshop
Wess Cope
Wess Cope
API's/Backends are difficult and we need websockets. You will be using VS Code as your editor, Parcel.js, Chakra-ui, React, React Icons, and Appwrite. By the end of this workshop, you will have the knowledge to build a real-time app using Appwrite and zero API development. Follow along and you'll have an awesome chat app to show off!