Turbo Start Sanity
A bare-metal, nitro-fuelled Sanity template welded in the garage of Roboto Studio. Ready to rip with pagebuilders, hyper-optimised SEO, and a need for speed.
By Roboto Studio & Jono and 3 others
Turbo Start Sanity is an open-source Sanity template built as a pnpm
monorepo with Turborepo, a Next.js 16 frontend, and a Sanity Studio 6
workspace.
It is designed for teams that want a production-ready page-builder starter with visual editing, shared packages, and a clear split between the web app and the CMS.
What is included
apps/web: Next.js 16 App Router frontend with React 19, Tailwind CSS v4, Visual Editing, SEO routes, and Playwright smoke testsapps/studio: Sanity Studio 6 workspace with page, blog, FAQ, redirect, and singleton schemaspackages/sanity-blocks: shared page-builder block schemas, GROQ fragments, React renderers, Markdown serializers, and testspackages/sanity: shared Sanity client, live query helpers, image helpers, and GROQ queriespackages/ui,packages/tailwind-config,packages/env,packages/logger,packages/typescript-config: shared workspace packages for UI, styling, env validation, logging, and TypeScript config
Repo layout
apps/
studio/ Sanity Studio
web/ Next.js frontend
packages/
env/
logger/
sanity/
sanity-blocks/
tailwind-config/
typescript-config/
ui/Requirements
- Node.js
>=22.12 pnpm@10.32.1
Getting started
Create a new project from the template
npm create sanity@latest -- --template robotostudio/turbo-start-sanityInstall dependencies
If the template bootstrap step did not already install them:
pnpm installConfigure local environment variables
Copy the example env files:
cp apps/web/.env.example apps/web/.env
cp apps/studio/.env.example apps/studio/.envapps/web/.env:
NEXT_PUBLIC_SANITY_PROJECT_IDNEXT_PUBLIC_SANITY_DATASETNEXT_PUBLIC_SANITY_API_VERSIONNEXT_PUBLIC_SANITY_STUDIO_URLSANITY_API_READ_TOKENSANITY_API_WRITE_TOKENSANITY_REVALIDATE_SECRET
apps/studio/.env:
SANITY_STUDIO_PROJECT_IDSANITY_STUDIO_DATASETSANITY_STUDIO_TITLESANITY_STUDIO_PRESENTATION_URLSANITY_STUDIO_APP_IDSANITY_STUDIO_API_VERSIONNEXT_PUBLIC_SITE_URLSANITY_REVALIDATE_SECRET
Notes:
- Local development defaults are
http://localhost:3000for the web app andhttp://localhost:3333for Studio. - On Vercel, framework environment variables such as
NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URLare auto-injected and used for absolute URLs in features likellms.txtand Markdown output.
Start the apps
pnpm devThen open:
- Web:
http://localhost:3000 - Studio:
http://localhost:3333
Useful commands
pnpm dev # Run all dev tasks through Turbo
pnpm dev:web # Next.js only
pnpm dev:studio # Sanity Studio only
pnpm build # Build all packages
pnpm build:web # Build the web app
pnpm build:studio # Build Studio
pnpm lint # Biome lint across the workspace
pnpm format # Biome format across the workspace
pnpm format:check # Check formatting without writing
pnpm check-types # TypeScript checks across the workspace
pnpm type # Run Sanity type generation tasks
pnpm test:e2e # Playwright smoke testsContent model
The Studio currently includes these document types:
- Singletons:
homePage,blogIndex,settings,footer,navbar - Documents:
blog,page,faq,author,redirect
The document definitions live in
apps/studio/schemaTypes/documents, and the shared page-builder blocks live in
packages/sanity-blocks/src.
To load the included sample content:
cd apps/studio
npx sanity dataset import ./seed-data.tar.gz dataset --replaceAfter schema changes, regenerate types with:
pnpm typeNotable features
- Page-builder architecture backed by shared block schemas and renderers
- Sanity Visual Editing / Presentation integration
- Blog index and blog post routes
- Redirect support managed in Sanity
- Markdown twins for pages via
.mdURLs andAccept: text/markdown llms.txtgeneration at/llms.txt- GitHub Actions for CI, template validation, E2E smoke tests, and Studio deploy
Deploying
Web app
The frontend is intended to be deployed from apps/web.
For Vercel:
- Create a new project from this repository.
- Set the Root Directory to
apps/web. - Add the web environment variables from
apps/web/.env.example. - Add your production domain to Sanity CORS origins.
Sanity Studio
Studio can be deployed locally from apps/studio:
cd apps/studio
pnpm deployThe first Studio deploy must be done locally so Sanity can create the hosted
Studio app and return an app ID. Save that value as SANITY_STUDIO_APP_ID for
future deploys.
This repository also includes a manual GitHub Actions workflow at
.github/workflows/deploy-sanity.yml. It is triggered with
workflow_dispatch, not automatically on every push.
To use that workflow, configure these GitHub repository secrets:
SANITY_DEPLOY_TOKENSANITY_STUDIO_PROJECT_IDSANITY_STUDIO_DATASETSANITY_STUDIO_TITLESANITY_STUDIO_PRESENTATION_URLSANITY_STUDIO_APP_ID
Configure Sanity CORS origins
Add your web app URLs in Sanity Manage under API > CORS origins:
- your production URL
- your custom domain, if you use one
http://localhost:3000for local development
Enable credentials for origins that need authenticated preview or visual editing requests.
Workflows
The repository currently ships with:
.github/workflows/ci.yml: lint, format check, and type check on push/PR tomain.github/workflows/e2e.yml: Playwright smoke tests on successful deployment status events.github/workflows/deploy-sanity.yml: manual Studio deploy workflow.github/workflows/sanity-template.yml: Sanity template validation onmain