Skip to content

feat: add _scaffold starter template#17

Open
kenjonespizza wants to merge 9 commits into
mainfrom
feat-starter-scaffold
Open

feat: add _scaffold starter template#17
kenjonespizza wants to merge 9 commits into
mainfrom
feat-starter-scaffold

Conversation

@kenjonespizza

@kenjonespizza kenjonespizza commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

What this adds

A starter scaffold (_scaffold/) — the template you copy to create a new Sanity starter. Instead of building from scratch or adapting an existing starter, run cp -r _scaffold my-new-starter and start customizing.

What's in the box

  • Sanity Studio v5 — sample post schema (title, slug, portable text), Presentation Tool wired to the frontend, Vision Tool, and auto-updating TypeGen
  • Next.js 16 frontend — React 19, Tailwind v4 + typography plugin, next-sanity v12 with live previews, draft mode, and visual editing — all pre-connected to the Studio
  • Sanity Functions — hello-world documentEventHandler with Blueprint registration and Rolldown bundler, ready to extend
  • Shared config packages@starter/eslint-config, @starter/tsconfig, @starter/sanity-types so every workspace shares lint rules, compiler settings, and generated types
  • pnpm workspace with catalog: — single-source dependency versions across studio, frontend, and functions
  • One-command bootstrappnpm bootstrap deploys the blueprint, deploys the schema, extracts + generates TypeGen types, and seeds 3 sample posts
  • CI workflow — validates template structure, type-checks all workspaces, verifies function bundles build
  • Agent contextAGENT.md + CLAUDE.md symlink, plus a skills placeholder for Claude Code

How to use it

cp -r _scaffold my-new-starter
cd my-new-starter
# Customize schema, frontend, functions, README, seed data...

See the updated CONTRIBUTING.md for the full 9-step checklist.

Docs changes

  • CONTRIBUTING.md — "Adding a new starter" now starts with cp -r _scaffold and includes a step-by-step customization guide
  • README.md — points to _scaffold/ for creating new starters
  • _scaffold/README.md — framed as a template-for-templates, not a standalone app

Also in this PR

  • Fixes pre-commit hook to run oxfmt per-starter so local .oxfmtrc.json configs are respected
  • Adds _scaffold job to monorepo CI (format check, lint, template validation)

Test plan

  • pnpm create sanity@latest --template sanity-labs/starters/_scaffold works end-to-end
  • CI passes: format check, lint, and @sanity/template-validator
  • Pre-commit hook correctly formats files using each starter's local config
  • Studio loads at localhost:3333 with post schema and seed data
  • Frontend renders post list at localhost:3000 and individual posts at /posts/:slug
  • pnpm validate passes

Starter scaffold that gives new starters a running start with
production-ready architecture out of the box.
Clarify that _scaffold is a template for creating new starters, not a
standalone starter. Update CONTRIBUTING.md with step-by-step workflow.
Also updates studio .env.example with placeholder values and a comment header.
The scaffold is a template without a real Sanity project, so typegen
and typecheck don't apply.
@kenjonespizza kenjonespizza temporarily deployed to agentic-localization March 10, 2026 21:29 — with GitHub Actions Inactive
@kenjonespizza kenjonespizza temporarily deployed to agentic-localization March 10, 2026 21:29 — with GitHub Actions Inactive
@kenjonespizza kenjonespizza temporarily deployed to ai-shopping-assistant March 10, 2026 21:29 — with GitHub Actions Inactive
@vercel

vercel Bot commented Mar 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agentic-localization Ready Ready Preview, Comment Mar 30, 2026 6:22pm
ai-shopping-assistant Ready Ready Preview, Comment Mar 30, 2026 6:22pm

Request Review

The bootstrap script was running `blueprints deploy` without first
initializing the `.sanity/` config (created by `blueprints init`),
causing "Missing scope configuration for Blueprint." Now checks for
the config and runs init/config as needed.

Also adds `src` to the document function so the CLI deploys the
bundled output directory, and builds functions before deploying.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant