---
title: "File Structure"
description: "An overview of the directories and files of the SanityPress starter template."
---

# File Structure

```
SanityPress
├─ 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
│ │ ├─ (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
│ │ │ └─ ...           # Modules
│ │ ├─ header/         # Header, navigation, megamenu
│ │ ├─ footer/         # Footer and link list
│ │ └─ ...             # 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
│ │ └─ ...             # Sanity files
│ ├─ lib/              # Shared app utilities and env helpers
│ ├─ hooks/            # Custom React hooks
│ └─ types/            # Global TypeScript declarations
├─ public/             # Static assets (favicon, etc.)
├─ .env.*              # Environment variable template
├─ next.config.ts      # Next.js configuration
├─ sanity.config.ts    # Sanity Studio configuration
├─ sanity.cli.ts       # Sanity CLI configuration
└─ package.json
```

1. [Home](https://sanitypress.dev/)
2. [Docs](https://sanitypress.dev/docs)
3. File Structure

## Stop Scaffolding. Start Shipping.

[🚀 Start building](https://sanitypress.dev/docs/getting-started)[⭐ Star on GitHub](https://sanitypress.dev/repo)
