Ship Your UI Faster With Turborepo

Rate this content
Bookmark

Iteration velocity is the key to unlocking the potential of your technical teams and business. In this talk, we'll build the groundwork for a highly scalable monorepo using Turborepo and talk about the philosophies behind architecting codebases for teams of all scales. Through the power of Remote Caching, we'll never do the same work twice and we'll deliver your applications at the speed of Turbo.

Anthony Shew
Anthony Shew
21 min
14 Nov, 2023

Comments

Sign in or register to post your comment.

Video Summary and Transcription

The Turboverse focuses on making the development process faster and more efficient. TurboPak is an incremental bundler with function-level caching, and TurboRepo is a high-performance build system with features like incremental building, remote caching, and parallel execution. TurboRepo can optimize task runners, set up monorepos, and speed up development time. vclink-repo enables seamless integration with the Vercel remote cache, and Conformance and Codoners provide static analysis and automated code reviews. TurboPak and TurboRepo offer faster CI processes and exciting advancements in web bundling.

1. Introduction to Turboverse

Short description:

You're writing, building, and shipping more code than ever. But your CI times have been increasing, and your local developer experience is getting worse. Welcome to the Turboverse, where we focus on making your development process faster and more efficient, from start to finish.

You're writing, building, and shipping more code than ever. It's great to be building a product that your customers love, but your CI times have slowly been creeping upwards. Your local developer experience keeps getting a little worse, and your CI complexity continues to increase. The time it takes to get from idea to ship has slowly gone upwards. That's because you have to sit and wait for things. A lot like these ships. But what if that didn't have to be the case? Hello and welcome to the Turboverse. I'm Anthony. I'm TurboDX. I like to joke that I'm a full stack comedian, but real job TurboDX. These problems I described are things that I get to think a lot about in my role. How can we make sure you never do the same work twice? When you do need to do new work, how do we just make sure it's plain fast and that it's as little work as possible? How do we make sure that all the way from solo developer to the largest enterprise applications in the world, that you have a great experience all the way from start to finish?

2. Exploring TurboPak and TurboRepo

Short description:

Let's explore TurboPak, an incremental bundler optimized for JavaScript and TypeScript. It features function-level caching for faster bundle creation. TurboPack is currently being tested with the Next.js development server and has achieved a 93.9% passing rate for Next.js tests. TurboRepo is a high-performance build system for JavaScript and TypeScript codebases, leveraging learnings from organizations like Meta and Google. It offers features such as incremental building, remote caching, and parallel execution to make your builds faster. Our Vercel team has saved over 8,500 hours in the past two weeks using TurboRepo.

Let's explore TurboPak and talk a little bit about the underlying architecture. And then we'll jump into a demo and use both of these tools to ship our first set of applications with a fully distributed caching layer. We'll also talk about how this repo works mechanically, the benefits of monorepos, and things to think about at a higher level when you're architecting a monorepo.

So first, let's jump into TurboPak. TurboPak is an incremental bundler optimized for JavaScript and TypeScript. We're writing in Rust for bare metal speeds led by the creator of Webpack, Tobias Koppers. On top of that raw speed, we're also making it smarter. If I jump over here to the core concepts, you'll see some information about the TurboEngine. With the TurboEngine, we're getting down to doing as little work as possible, like we were talking about before. The TurboEngine features function-level caching so that we can do as little work as possible to create the bundles for your application. Previously in Webpack, we could only do this at the module level, at the file level. But with function-level caching, we can understand your module graphs much deeper. Because we can analyze the relationships throughout your code more deeply, we can just be faster by going straight to the things that we need to bundle, look at, and analyze, instead of creating a much larger graph. Additionally, Webpack is designed such that it creates an unoptimized graph first, and then optimizes that graph. In TurboPack, we're just making that optimized graph the first time, as you can imagine, a bit faster. At the time of this recording, we're using the Next.js development server as the proving ground for TurboPack. You can visit areweterboyet.com to see that no, we're not Turbo Yet completely. These are all the tests that are in the Webpack bundler. And additionally, we've stacked a few on top now that we've got better coverage for TurboPack to find out if the Next.js development server TurboPack is ready to go and be shipped out of beta and to stable. You can see that we're currently sitting at 93.9% of those Next.js tests passing. But once we're done there, we'll actually have a really nice head start on getting TurboPack to build for production those Next.js applications. You can try this out today in your Next.js 14 project using //Turbo on the dev script of your Next.js application. We look forward to hearing your experience, and we would appreciate if you run into any issues to report those bugs on the Next.js repo on GitHub.

But your bundler is only one part of the story. Now let's talk about TurboRepo and do a little bit of a demoing and talk about some mechanics. TurboRepo is a high-performance build system for JavaScript and TypeScript codebases. We're taking some of the learnings from the largest monorepoing organizations in the world, like Meta and Google, and making those techniques friendly, usable, and productive for everyone. Through features like incremental building, remote caching, parallel execution, and much more, we can make your builds, lints, tests, and any other tasks that you need done as fast as possible. As a proof point, here's a quick screen grab that I grabbed off of Vercel.com for our Vercel team to show how much time we've saved over the past two weeks. Looks like we've saved almost more than 8,500 hours.

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

Canva’s App UI Kit: Empowering Developers With Modern Web Technologies
React Summit US 2023React Summit US 2023
8 min
Canva’s App UI Kit: Empowering Developers With Modern Web Technologies
At Canva, we help 150 million + monthly users create and design. How do we enable developers to do the same? Intro Canva's Apps SDK, which is built to empower developers to efficiently create UIs for their Canva Apps using React. Canva recently streamlined the app creation process by compiling some of the most frequently used and requested UI components by our developers in our @Canva /app-ui-kit package. I'll be sharing how we iterated upon our Apps SDK to empower developers globally to build their brand into Canva.
JS on the Big Screen: Making TV Apps
JSNation 2024JSNation 2024
22 min
JS on the Big Screen: Making TV Apps
The ever-expanding landscape of JavaScript applications has now reached the big screen - yes, you heard it right, you can build TV apps with JavaScript! 
The TV operating space is a mess; there’s more fragmentation than the Android ecosystem, and that’s saying something. Each manufacturer has tried to reinvent the wheel by making their own OS. At the moment, the main players are Android TV, tvOS, WebOS, Tizen, among a whole myriad of others. 
This makes it a unique place where Javascript and web technologies can become a uniting factor and save you from the stress of trying to develop and maintain handfuls of apps for the big screen. 
We’ll talk about how to build TV apps, what JS frameworks can help in this, and explore the challenges that come hand-in-hand with TV app development, namely performance bottlenecks and focus management using remote controls.
Nested Interactive Elements: A Nightmare in Accessibility
React Summit 2024React Summit 2024
9 min
Nested Interactive Elements: A Nightmare in Accessibility
There have been numerous remarkable new UX experiences developed over the years, such as cards displaying an array of products and clickable list items with dynamic menu options, among others. However, only a few are aware of the challenges involved in building structures with nested interactive elements, and unfortunately, some of them are completely inaccessible. 
In today's talk, we will explore some of these prevalent web UX patterns and delve into the hidden challenges they present. While we may be able to mitigate some of these issues, others serve as cautionary tales in accessibility.
Technically Included (The Best Kind of Included)
React Summit 2024React Summit 2024
30 min
Technically Included (The Best Kind of Included)
The design-development gap hurts your React projects: slower timelines, compromised quality, and repetitive handoffs. This talk explores the origins of this problem, the differences in language and environment, and offers solutions through processes, tools, and collaboration. Discover how including designers throughout the implementation process helps developers reduce friction, speed updevelopment, and deliver exceptional UIs.