# Documentation

Go from clone to live preview in minutes. Initialize Turbo Start Sanity with one Sanity CLI command, add your env vars, and run web and studio together.

## From first clone to a live visual preview

One Sanity CLI command scaffolds the monorepo. Install, add your environment variables, and run both apps with a single pnpm command.

![hero-light.jpg](https://cdn.sanity.io/images/s6kuy1ts/production/529d8acd07ad7194739e314d71f06bd8c95cf503-3408x2160.jpg?w=1600&fm=webp&q=80&auto=format)

- [Get started](https://robotostudio.com?ref=template-sanity)
- [View README](https://github.com/robotostudio/turbo-start-sanity)

- ![GCN](https://cdn.sanity.io/images/s6kuy1ts/production/42ef7d6affff336cd513838ff02c841aad89ea9b-98x28.svg?w=1600&fm=webp&q=80&auto=format)
- ![Session](https://cdn.sanity.io/images/s6kuy1ts/production/879b4e1238fb226a42632f735546711f6aeaf16f-104x22.svg?w=1600&fm=webp&q=80&auto=format)
- ![Tabby](https://cdn.sanity.io/images/s6kuy1ts/production/8756d14ea8771337c1e8e1e8636bbe3b286a515b-84x27.svg?w=1600&fm=webp&q=80&auto=format)
- ![Discovery](https://cdn.sanity.io/images/s6kuy1ts/production/9513f0de80639cee872afa97b66bd66b8299516f-113x24.svg?w=1600&fm=webp&q=80&auto=format)
- ![Helix](https://cdn.sanity.io/images/s6kuy1ts/production/d084be5e8e200d5f3a8d5b4e77be855352450c78-86x24.svg?w=1600&fm=webp&q=80&auto=format)
- ![Serch](https://cdn.sanity.io/images/s6kuy1ts/production/1b041b49b5d9f8f62cffb3f0240de7635f79ace6-102x24.svg?w=1600&fm=webp&q=80&auto=format)
- ![Synacti](https://cdn.sanity.io/images/s6kuy1ts/production/8637af8ce057a4789a97b1dfbb446440e2a472dc-100x24.svg?w=1600&fm=webp&q=80&auto=format)
- ![Teckro](https://cdn.sanity.io/images/s6kuy1ts/production/4a1aeb7e444fc1a0f39c2eb9c7f2104c2e57d4a7-92x28.svg?w=1600&fm=webp&q=80&auto=format)
- ![Topaz Labs](https://cdn.sanity.io/images/s6kuy1ts/production/d66c42e4c03ed4dca9136ec35b67674d3c733579-141x25.svg?w=1600&fm=webp&q=80&auto=format)

**Three steps**

## Up and running fast

The template is designed so a new developer can get a working page builder on their first afternoon.

### 1. Initialize

Run npm create sanity@latest with the robotostudio/turbo-start-sanity template to scaffold the whole monorepo.

### 2. Configure

Add your Sanity project ID, dataset, and API tokens to the web and studio env files — all validated at startup.

### 3. Run

Start both apps with pnpm dev: Next.js on localhost:3000 and Sanity Studio on localhost:3333.

**Good to know**

## Working with the schema

Block schemas live in packages/sanity-blocks — each block bundles its schema, GROQ projection, and component together, and the Studio registers them automatically. After changing a schema, run pnpm type to regenerate the TypeScript types your queries and components rely on.

Every page is also available as Markdown — append .md to any URL — so your content stays readable to LLMs and agents as well as browsers.

**Help**

## Stuck on a step?

Open an issue, or ask the community — most setup problems have been solved by somebody already.

- [GitHub](https://github.com/robotostudio/turbo-start-sanity)
- [YouTube](https://www.youtube.com/@robotostudio)
- [X \[Twitter\]](https://x.com/studioroboto)
- [Reddit](https://www.reddit.com)

**FAQ**

## Common setup questions

Editing, components, and deployment — answered.

### How does live preview work?

The Studio's Presentation tool shows your live site next to the editor. Click any element to jump to its field, and edits appear instantly without refreshing.

### Can editors build pages themselves?

Yes. Pages are assembled from reusable blocks like hero, FAQ, and CTA. Editors add, reorder, and edit them in the Studio with no code.

### Can pages be read as Markdown?

Yes. Add `.md` to any URL (like `/about.md`) or send an `Accept: text/markdown` header to get a clean Markdown version, which is handy for LLMs and agents.

### Does it support multiple languages?

No. This starter has no localization set up — every document type is single-language.

### What happens to old URLs when I change a page slug?

When a page's slug changes, the `auto-redirect` Sanity Function creates a `redirect` document pointing the old path at the new one. Next.js reads those in `next.config.ts`, so the redirect goes live on the next build.

### Are the components accessible?

Yes. The shared components in `@workspace/ui` wrap Base UI primitives, so keyboard navigation, focus management, and ARIA roles come built in.

### Can I customize the components?

Yes. They use Tailwind v4 with CVA variants, and the theme tokens live in `globals.css`. Edit the tokens to restyle everything, or tweak a single component's variants.

### How do I add a new block?

Add a folder under `packages/sanity-blocks/src/` and export its schema from `blockSchemas` — the Studio picks it up automatically. Run `pnpm type`, add the projection to `pageBuilderFragment`, then register the component in `renderBlockComponent`.

### How do I update types after a schema change?

Run `pnpm type` from the repo root — it regenerates `packages/sanity/src/sanity.types.ts`. To refresh the schema snapshot first, run `pnpm extract` inside `apps/studio`.

### Where do shared UI components live?

Generic primitives like buttons and inputs live in `@workspace/ui`. Page-builder blocks live in `packages/sanity-blocks/src/<block>/index.tsx` and are rendered by `apps/web/src/components/pagebuilder.tsx`.

### How do I deploy?

Deploy the web app to Vercel with the root directory set to `apps/web`. For the Studio, run `pnpm run deploy` from `apps/studio` — not `pnpm deploy`, which is pnpm's own command.

### What environment variables do I need?

The web app needs your Sanity project ID, dataset, API version, Studio URL, and read/write tokens — all Zod-validated by `@workspace/env` at startup. The Studio reads its own `SANITY_STUDIO_*` values; see the `.env.example` in each app.

### Why do I need to set CORS origins?

Sanity blocks unknown origins, so add your production and preview URLs under API > CORS origins in sanity.io/manage. Enable "Allow credentials" for live preview.

### Does it work with Vercel previews?

Yes, as long as the preview URL is added to your Sanity CORS origins under API > CORS origins in Sanity Manage.

### How do I deploy the Studio?

Run `pnpm run deploy` from `apps/studio`. The first deploy has to run locally so Sanity can create the hosted Studio and return an app ID — save it as `SANITY_STUDIO_APP_ID` for later deploys.

[Ask Roboto Studio directly](https://robotostudio.com?ref=template-sanity)

## Docs updates, when they matter

New guides, schema changes and upgrade notes, summarised so you know what to re-read.

Roughly monthly. Unsubscribe at any time.

**Next step**

## Make it yours

Explore the blocks, tweak the schema, and start shipping pages.

- [Get started now](https://sanity.robotostudio.com/documentation)
- [Work with Roboto](https://robotostudio.com)
