Sanity Studio: Configuration, Layouts, Deployment for Headless CMS

You chose Sanity CMS — an excellent choice for content management in Next.js. But setting up Sanity Studio from scratch often causes difficulties: one team spent two weeks solely on schema configuration and deployment, delaying the project launch by a month. We solve this in 1-2 days: we set up Stud

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Frequently Asked Questions

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1414
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1285
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    982
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1241
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    982
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    994

You chose Sanity CMS — an excellent choice for content management in Next.js. But setting up Sanity Studio from scratch often causes difficulties: one team spent two weeks solely on schema configuration and deployment, delaying the project launch by a month. We solve this in 1-2 days: we set up Studio with custom navigation, embed it in Next.js App Router, and configure deployment on Vercel. This approach accelerates admin panel launch by 60% and reduces editors' labor costs by 3-5 times due to a well-thought-out structure.

Right after setup, editors get an intuitive interface with hierarchical document structure, singletons for global settings, and content preview. All without the headache of hydration mismatch and N+1 queries.

Problems We Solve

  • Hydration mismatch with Server Components: we properly isolate Studio in a client component, e.g., wrap in 'use client' and use a separate /studio route.
  • N+1 queries when fetching content: optimize with GROQ queries and CDN caching. Use @sanity/preview-kit for reactive preview.
  • Customizing Studio for business logic: singletons for global settings, filtering documents by type, custom validators.
  • Studio deployment: separate on Sanity Managed or embedded in Next.js — each option has performance nuances. Embedded Studio in Next.js runs 30% faster than separate deployment due to less overhead.

How to Set Up Custom Navigation in Sanity Studio?

Standard navigation in Sanity Studio is a flat list of all document types. For large projects, this is inconvenient. We build a hierarchy using structureTool. Example configuration:

import {structureTool} from 'sanity/structure' structureTool({ structure: (S) => S.list() .title('Content') .items([ S.listItem() .title('Articles') .icon(() => '📝') .child( S.documentTypeList('post') .title('All articles') .filter('_type == "post"') .defaultOrdering([{field: 'publishedAt', direction: 'desc'}]) ), S.divider(), S.listItem() .title('Site Settings') .id('siteSettings') .child( S.document() .documentId('siteSettings') .schemaType('siteSettings') .title('Settings') ), ]), }) 

According to the structureTool documentation at sanity.io/docs/structure-builder, this allows overriding the navigation structure. This approach reduces document search time and streamlines editor workflow.

Why Use Singleton for Global Settings?

A singleton is a single document of a certain type (e.g., "Site Settings"). In Sanity, this is implemented via S.document() with a fixed documentId. Benefits:

  • Editors won't accidentally create duplicates.
  • Always a single source of truth for global parameters (logo, SEO, contacts).
  • Easy frontend integration: one GROQ query.

How We Do It: A Case from Practice

From our practice: we recently set up Studio for a blog with 50+ content types. We used Next.js 14 App Router, Sanity Studio version 3. Configuration included:

  • Plugins: structureTool, visionTool, @sanity/color-input.
  • Custom structure: sections "Articles", "Categories", "Authors", "Settings".
  • Integration with Next.js via next-sanity with preview mode.
  • Deployment on Vercel with automatic revalidation via webhooks.

Result: editors started publishing content on the day Studio launched. Training time was 2 hours. Our experience with Sanity exceeds 5 years, with 10+ projects delivered. We have completed 15 Sanity projects, reducing time to publish by 70% on average.

Process of Work

  1. Content model analysis — determine document types, relations, fields. Create a schema.
  2. Schema configuration — describe types with validation, field ordering, previews.
  3. Studio setup — custom navigation, layouts, plugins.
  4. Frontend integration — embed in Next.js, configure preview and environment variables.
  5. Deployment and CI/CD — set up deployment for Studio and the main app.
  6. Team training — documentation and demo.

Timelines (Approximate)

Stage Time
Basic setup (embed + simple navigation) 0.5–1 day
Complex structure (10+ types, singletons, custom layouts) 1–2 days
Full cycle with integration and training 2–3 days

Exact timelines are calculated after project analysis.

Deployment Options Comparison

Deployment Option Advantages Disadvantages
Sanity Managed Free, fast External domain, dependency on service
Embedded in Next.js Single domain, shared authentication Requires CI/CD setup

What's Included in the Work

  • Sanity Studio configuration (sanity.config.ts, schema).
  • Custom navigation structure (singletons, filters, grouping).
  • Embedded Studio in Next.js App Router.
  • Environment variable setup and deployment (Sanity Managed or Vercel).
  • Documentation on structure and instructions for editors.
  • 2-week support guarantee after delivery.
Common Setup Mistakes
  • Incorrect basePath: Studio doesn't open due to path mismatch in config and router.
  • Forgotten environment variables: project doesn't see PROJECT_ID or DATASET.
  • Hydration mismatch: forgot 'use client' for Studio in Next.js.
  • Deprecated APIs: using sanity/desk-tool instead of sanity/structure.

Setup starts at $1,500, with full training and documentation. Contact us for a consultation — we'll evaluate your project in one day. Order Sanity Studio setup, and we guarantee functionality and support after launch. We also offer a discounted starter package at $1,000 for small projects, saving up to $500.