Quick start
From a fresh clone to a running Nuxt app and Studio, in about ten minutes.
Getting running
Install and configure
One command handles the frontend, the Studio, both `.env` files, and the demo content. It is deliberately dependency-free, so it runs on a fresh clone before anything is installed.
Shell npm run setup:projectYou will be asked for your Sanity project ID, dataset, and API token. Pass
--yeswith--project-id=and--dataset=to run it unattended.Start both apps
Shell npm run dev:allNuxt on
:3000Studio on:3333- One terminal, colour-coded output.Import the demo content
Optional, and the fastest way to see what the blocks do. The setup script offers this; to run it later:
Shell cd studio && DATASET=development npm run demo:importYou get a home page, a typography reference page, three blog posts, colourthemes, navigation and footer.
Open the Studio and edit something
Go to Website → Pages → Home, drag a block, and watch it move on
:3000. That is the whole loop.
| Variable | What it's for |
|---|---|
| SANITY_STUDIO_PROJECT_ID | Your Sanity project |
| SANITY_STUDIO_DATASET | Usually `production` or `development` |
| SANITY_STUDIO_API_TOKEN | Read token for queries; write token for form submissions |
| SANITY_STUDIO_APP_ID | Studio app identifier |
| DOMAIN | Canonical URLs and sitemap |
| Command | What it does |
|---|---|
| npm run dev:all | Nuxt and Studio together |
| npm run scaffold:component -- custom.my-block | Generates a block and registers it |
| npm run staticnuxt | Static build - With htaccess created for Apache hosting (Most commonly shared hosting)) |
| npm run test:run | Unit and Nuxt tests |
| npm run typecheck | Full type check, including the component registry |
| npm run cssvars:generate | Rebuilds theme CSS variables from Sanity |