Back to templates

Template details

Turborepo Gatsby.js Starter

A Turborepo monorepo starter combining a Gatsby site, a Next.js docs app, and a shared React component library in TypeScript.

About this template

The Turborepo Gatsby.js Starter is a community-maintained monorepo boilerplate that scaffolds a Gatsby site, a Next.js documentation app, and a shared React component library inside a single Turborepo workspace, generated with one command.

What is the Turborepo Gatsby.js Starter?

The Turborepo Gatsby.js Starter is a community-maintained example template that sets up a Turborepo monorepo containing two applications and three shared packages, all written in TypeScript. Running the command npx create-turbo@latest -e with-gatsby generates the workspace, after which pnpm run build builds every app and package and pnpm dev starts them in development mode. Turborepo itself is a Rust-written build system for JavaScript and TypeScript repositories, and this example is distributed as one of its official starter examples rather than as a standalone product.

What makes the Turborepo Gatsby.js Starter stand out?

  • Two frameworks in one repo — the web app is a Gatsby.js site while the docs app is a Next.js application, so both static-site and React server-rendered setups share one toolchain.
  • Shared UI library — @repo/ui is a stub React component library consumed by both web and docs, demonstrating cross-app component reuse.
  • Shared ESLint config — @repo/eslint-config centralizes lint rules, including eslint-config-next and eslint-config-prettier.
  • Shared TypeScript config — @repo/typescript-config holds the tsconfig.json files used throughout the monorepo.
  • Full TypeScript coverage — every package and app in the workspace is written in TypeScript for static type checking.
  • Prettier formatting — Prettier is preconfigured for code formatting across the repo.
  • Remote Caching support — build artifacts can be shared across machines and CI pipelines through Turborepo's Remote Caching, enabled with turbo login and turbo link against a Vercel account.
  • pnpm workspaces — the documented commands use pnpm as the package manager.

Who should use the Turborepo Gatsby.js Starter?

  • Developers starting a multi-app frontend repo: they get a working Turborepo layout with two apps and shared packages instead of wiring up workspaces, TypeScript, and linting by hand.
  • Teams migrating a Gatsby site into a monorepo: the web Gatsby app sits beside a Next.js docs app, giving a reference for adding a second framework to the same pipeline.
  • Library authors prototyping a shared React package: @repo/ui shows how to consume one component library from two different frameworks.

What can you do with this starter?

  • Gatsby site owners: run a Gatsby marketing site in web while authoring docs in the Next.js docs app, sharing components through @repo/ui.
  • Monorepo beginners: use it as a minimal reference for Turborepo task running, caching, and filtering before adding real applications.
  • CI maintainers: connect Remote Caching so build artifacts are reused across machines and pipelines, shortening repeat builds.

How does the starter work?

  1. Scaffold the workspace by running npx create-turbo@latest -e with-gatsby.
  2. Enter the generated directory and run pnpm run build to build all apps and packages, or pnpm dev for development.
  3. Optionally authenticate with pnpm dlx turbo login and enable shared caching with pnpm dlx turbo link.

Pros and cons

  • Pros: includes two real app frameworks, a shared UI package, and shared TypeScript and ESLint configurations out of the box; Remote Caching can be enabled with two CLI commands.
  • Cons: it is a community-maintained example, so issues are closed and fixes are expected to arrive as pull requests; Remote Caching requires a Vercel account, and caching runs locally by default.

Pricing

The starter is free to generate and use, and Vercel Remote Cache is free on all Vercel plans according to the page. Turborepo itself is open source.

Alternatives

Nx, another JavaScript monorepo build tool, which centers on a plugin-driven project graph rather than Turborepo's pipeline configuration.

FAQ

Is the Turborepo Gatsby.js Starter free?

Yes. The example is free to scaffold with npx create-turbo@latest -e with-gatsby, and the page states that Vercel Remote Cache is free on all plans. Turborepo itself is open source software.

What apps and packages does it include?

It contains a Gatsby.js web app, a Next.js docs app, a shared React component library named @repo/ui, an @repo/eslint-config package, and an @repo/typescript-config package. Every app and package is written in TypeScript.

Does it support remote build caching?

Yes, but caching is local by default. To share cache artifacts across machines and CI pipelines you run pnpm dlx turbo login followed by pnpm dlx turbo link, and this requires a Vercel account.

Who maintains this starter?

It is a community-maintained example rather than an officially supported product. The page asks users who hit a problem to submit a pull request with a fix and notes that GitHub Issues will be closed.

screenshot of Turborepo Gatsby.js Starter on template0.com