
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThis is actually expected behavior for the clean template! The --template clean option is specifically designed to create a Sanity project without predefined schemas, giving you a blank slate to start from.
When you run:
npm create sanity@latest -- --template clean --create-project "Sanity Project" --dataset productionYou'll get a project structure with a schemaTypes folder that contains only an index.ts file with an empty array:
// src/schemaTypes/index.ts
export const schemaTypes = []This is intentional! The clean template is meant for developers who want to build their schema from scratch without any example content types.
You now need to create your own schema types. Here's how to add your first one:
src/schemaTypes/, for example postType.ts:// src/schemaTypes/postType.ts
import {defineField, defineType} from 'sanity'
export const postType = defineType({
name: 'post',
title: 'Post',
type: 'document',
fields: [
defineField({
name: 'title',
type: 'string',
}),
],
})// src/schemaTypes/index.ts
import {postType} from './postType'
export const schemaTypes = [postType]There is no schema.js file in modern Sanity projects because:
schemaTypes folder with an index.ts fileIf you'd prefer to start with pre-built example schemas to learn from, use the blog template instead:
npm create sanity@latest -- --template blogThis will give you a complete blog setup with example document types like post, author, and category that you can learn from and modify.
The clean template is working exactly as designed - it provides the basic project structure but leaves all schema definition up to you!
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store