
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGreat question! Organizing your Sanity Studio folder structure can definitely get messy as projects grow. While Sanity doesn't enforce a strict folder structure (since everything is schema-as-code), here are some practical patterns that work well:
Group by content type categories:
schemas/
├── documents/ # Top-level content types
│ ├── page.ts
│ ├── post.ts
│ └── author.ts
├── objects/ # Reusable nested objects
│ ├── seo.ts
│ ├── hero.ts
│ └── cta.ts
├── blocks/ # Portable Text blocks
│ ├── customImage.ts
│ └── callout.ts
└── singletons/ # One-off documents
├── settings.ts
└── navigation.tsOr group by feature/domain:
schemas/
├── blog/
│ ├── post.ts
│ ├── category.ts
│ └── author.ts
├── commerce/
│ ├── product.ts
│ └── collection.ts
├── pages/
│ ├── page.ts
│ └── landingPage.ts
└── shared/
├── seo.ts
└── media.tsSeparate by schema type hierarchy:
type: 'document'): Top-level content that appears in your desk structuretype: 'object'): Reusable components that nest inside documentsConsider what editors see: Your folder structure doesn't affect the Studio UI that editors see - that's controlled by your Structure tool configuration. So organize files for developer clarity, not editor experience.
Keep related schemas together: If a schema is only used by one document type, consider keeping them in the same folder or file.
Use an index file: Create an index.ts in your schemas folder that imports and exports all schema types. This gives you one place to manage what's registered in your Studio.
The beauty of Sanity's schema-as-code approach is there's no "wrong" answer - it's just JavaScript/TypeScript files. Pick a structure that makes sense for your team's mental model and refactor as needed. The schemas will work the same regardless of folder organization!
Most teams find the first pattern (documents/objects/blocks/singletons) works well as a starting point, then add domain-specific folders as the project grows. Good luck with the cleanup! 😄
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