π sanitypress/
βββ public/ # Static assets (favicon, etc.)
βββ src/
β βββ app/ # Next.js App Router
β β βββ (frontend)/ # Public-facing site
β β β βββ layout.tsx # Frontend root layout
β β β βββ not-found.tsx # 404 page
β β β βββ [[...slug]]/ # Catch-all for all standard pages
β β β βββ blog/[slug]/ # Individual blog post pages
β β β βββ blog/rss.xml/ # RSS feed endpoint
β β β βββ api/ # API route handlers
β β β βββ draft-mode/ # Enable/disable Sanity draft mode
β β β βββ og/ # Open Graph image generation
β β β βββ revalidate/ # ISR revalidation
β β βββ (studio)/admin/ # Sanity Studio (CMS editor UI)
β β βββ sitemap.ts # Auto-generated sitemap
β βββ ui/ # React components
β β βββ modules/ # One component per Sanity module
β β β βββ blog/ # Blog-specific components (post list, filters, etc.)
β β β βββ prose/ # Rich text components / portable text renderer
β β β βββ search/ # Search form + results
β β β βββ custom-html/ # Custom HTML/CSS/JS injection
β β βββ header/ # Header, navigation, megamenu
β β βββ footer/ # Footer and link list
β β βββ table-of-contents/ # Auto-generated TOC for long pages
β β βββ ... # Shared components (CTA, Img, Logo, etc.)
β βββ sanity/ # Sanity CMS configuration
β β βββ schemaTypes/
β β β βββ documents/ # Top-level content types (page, blog.post, site, navigationβ¦)
β β β βββ modules/ # Page-building blocks (heroes, grids, prose, searchβ¦)
β β β βββ objects/ # Reusable field groups (cta, link, metadataβ¦)
β β β βββ fragments/ # Shared GROQ fragment definitions
β β βββ lib/ # Queries, fetch helpers, image builder
β β βββ ui/ # Custom Studio UI components
β β βββ structure.ts # Studio sidebar layout
β β βββ types.ts # Auto-generated TypeScript types (via TypeGen)
β βββ lib/ # Shared app utilities and env helpers
β βββ hooks/ # Custom React hooks
β βββ types/ # Global TypeScript declarations
βββ .env.example # Environment variable template
βββ next.config.ts # Next.js configuration
βββ sanity.config.ts # Sanity Studio configuration
βββ sanity.cli.ts # Sanity CLI configuration
βββ package.jsonFile Structure
Build with confidence
SanityPress gives you a modern, scalable starting point that stays out of your way.