Turborepo

repository·main·Indexed 12 days ago

https://github.com/vercel/turborepo

A high-performance build system for JavaScript and TypeScript codebases, written in Rust. It optimizes monorepo build pipelines and task execution through features like remote caching, architectural boundary enforcement via turborepo-boundaries, and a background daemon for rapid file hashing.

Tokens
247.6K
Snippets
984
Records
1.4K
Agent score
97%

What's inside Turborepo

  1. Overview of turborepo-filewatch

    main
    The turborepo-filewatch crate provides cross-platform file watching utilities designed to consume file system events and produce derived data, such as identifying which packages have changed. It is built to ensure consistent behavior across different operating systems while leveraging native APIs.
  2. Overview of the VueJS/NuxtJS starter structure

    main

    This starter template demonstrates a monorepo architecture using Vue and Nuxt. It includes:

    Apps

    • docs: A Nuxt application.
    • web: A Vue3 application.

    Packages

    • ui: A shared Vue component library used by both web and docs.
    • eslint-config-custom: Shared ESLint configurations (utilizing @nuxtjs/eslint-config-typescript and @vue/eslint-config-typescript).
    • tsconfig: Shared TypeScript configurations.

    Integrated Utilities

    • TypeScript: For static type checking.
    • ESLint: For code linting.
    • Prettier: For code formatting.
  3. Overview of turborepo-analytics

    main
    The turborepo-analytics package provides cache usage analytics for Turborepo. It monitors and records cache hit and miss events for both the filesystem and HTTP cache. These events are sent to the Vercel API in the background to ensure that analytics collection does not impact the performance of task execution.
  4. Overview of the Next.js + Elysia starter architecture

    main

    This starter demonstrates a full-stack monorepo architecture using the following stack:

    Apps and Packages

    • apps/web: A Next.js 15 application (using App Router) with an embedded ElysiaJS server.
    • packages/@repo/contract: Shared TypeBox contracts and Drizzle ORM schemas for type-safe API communication.
    • packages/@repo/typescript-config: Shared tsconfig.json configurations.
    • packages/@repo/ui: A shareable React component library.

    Tech Stack

    • Frontend: Next.js 15 (App Router)
    • Backend: ElysiaJS (High-performance web framework)
    • Database: PostgreSQL with Drizzle ORM
    • API Contract: TypeBox (Runtime type validation)
    • Package Manager: Bun
    • Linting/Formatting: Biome
  5. What is Turborepo?

    main

    Turborepo is a high-performance build system for JavaScript and TypeScript codebases. It is designed to scale monorepos and optimize workflows in single-package workspaces by speeding up common tasks like building, testing, and linting.

    Key features include:

    • Remote Caching: Stores task results so CI and local environments never repeat the same work.
    • Task Scheduling: Parallelizes tasks across all available CPU cores for maximum speed.
    • Incremental Adoption: Can be added to existing repositories in minutes using your existing package.json scripts and dependencies.
    • Package Manager Agnostic: Works with npm, yarn, or pnpm by leveraging standard npm ecosystem conventions.
  6. What is turborepo-auth and what does it do?

    main
    The turborepo-auth package manages authentication with the Vercel API. It is responsible for handling login flows, SSO (Single Sign-On) verification, secure token storage, and automatic token refreshing. It ensures that Turbo sessions are correctly scoped and persisted locally.
  7. Explore Turborepo examples with Next.js

    main

    Turborepo provides several example repositories demonstrating how to integrate Next.js applications into different monorepo and toolchain configurations. These examples cover various scenarios including package managers (npm, yarn, berry), styling (tailwind), database integration (prisma), and deployment patterns (docker).

    Available Next.js examples:
    - basic
    - kitchen-sink
    - non-monorepo
    - with-changesets
    - with-docker
    - with-prisma
    - with-yarn
    - with-berry
    - with-npm
    - with-react-native-web
    - with-tailwind