Skip to content



turbo-start-sanity

Our open-source Sanity + Next.js page-builder template. A type-safe monorepo with a real editorial experience, ready to clone and ship.

entry 03 of 12 · starter · updated 2026-07-23



What it is

turbo-start-sanity is the starter we reach for on most Sanity builds. It pairs a Next.js 16 front end with Sanity Studio 6 in a single Turborepo, wired up with a flexible page builder, visual editing, and type safety that runs from the GROQ query through to the React prop. It runs on React 19 and Tailwind CSS v4, and you can see it live at sanity.robotostudio.com.

The monorepo holds a web app and a studio app under one roof, with a shared sanity-blocks package that keeps block schemas, GROQ fragments, and their React renderers in one place. It ships with a blog system, custom document types for pages, FAQs, and redirects, and an editorial experience editors can use without help from a developer.

The part worth studying is the query file. The first hundred or so lines of packages/sanity/src/query.ts define the base GROQ fragments everything else composes from: imageFields (asset ref, LQIP preview, a four-way alt text fallback, hotspot and crop), a customLink fragment that resolves internal references and external URLs into one href, and a rich text fragment that layers the link handling into portable text mark defs and inline images. Higher fragments nest the lower ones, so a blog card is the image fragment plus the author fragment, and the page builder projection is one fragment per block type, each imported from the block's own package. Every query in the project projects images, links, and portable text the same way, and a fix to any of them lands everywhere at once. When you add your own document types, extending these fragments instead of writing ad hoc projections is what keeps the type safety and the editorial experience intact.

It is the foundation behind our Sanity website development work, open-sourced so you can start from the same place we do.

What you get

  • A page builder your editors can use without a developer explaining every field.
  • Generated TypeScript types for every query, so a schema change shows up as a type error before it ships.
  • Visual editing and live preview wired up out of the box.
  • A blog system with rich text, table of contents generation, and responsive layouts.
  • Shadcn-style UI components on Tailwind CSS v4, with SEO metadata, sitemaps, and structured data included.
  • Markdown twins for every page (append .md to the URL) and generated llms.txt, so AI assistants can read the site as plain text.
  • Redirects managed as Sanity documents, so editors can fix a moved URL without a deploy.
  • Playwright smoke tests and CI workflows included, plus seed data to import so the demo content is one command away.
  • Sensible project structure that holds together past the first ten pages.

How to use it

Initialize a new project with the Sanity CLI. It scaffolds the full monorepo, prompts for a project name, and connects to your Sanity account.

bash
npm create sanity@latest -- --template robotostudio/turbo-start-sanity

From there: pnpm install, copy the .env.example files in apps/web and apps/studio, and run pnpm dev to get the Next.js front end on port 3000 and the Studio on port 3333. You'll need Node 22.12 or later. To start with content in place, import the bundled seed data:

bash
cd apps/studio && npx sanity dataset import ./seed-data.tar.gz <your-dataset> --replace

How we use it

It is the starting point for our Sanity engagements. When a build calls for something bespoke, we branch from here rather than from an empty folder.





Get in touch

Tell us what you're building. We reply within one working day. Jono or someone on the team picks up every message personally.

By sending this you agree to our privacy policy. We only use your details to reply.