Schema Reference
Overview
Section titled “Overview”Schema types live in packages/sanity/src/schema/: documents (content types) and objects (reusable embedded types). The main export is schemaTypes in schema/index.ts.
Schema Layout
Section titled “Schema Layout”packages/sanity/src/schema/├── index.ts # schemaTypes = [...schemaDocuments, ...schemaObjects]├── documents/│ ├── index.ts # Exports schemaDocuments│ ├── settings.ts│ ├── artist.ts│ ├── contact.ts│ ├── event.ts│ ├── newsletter.ts│ ├── page.ts│ ├── playlist.ts│ ├── song.ts│ └── venue.ts└── objects/ └── index.ts # schemaObjects (currently empty)Documents
Section titled “Documents”Settings (settings) — Singleton
Section titled “Settings (settings) — Singleton”Site-wide venue and SEO. Uses groups from utils/groups.ts: General Information, Operations, SEO & Social.
| Group | Fields (summary) |
|---|---|
| General | venueName, logo, address (street, city, state, zip, country), contact (phone, email, bookingEmail) |
| Operations | hours (mon–sun strings), booking (reservationsEnabled, reservationUrl, bookingInstructions), ageRestriction (list), coverCharge |
| SEO & Social | title, url (from constants), description, keywords (tags), socialMedia (facebook, instagram, twitter, youtube, spotify, soundcloud) |
Artist (artist)
Section titled “Artist (artist)”name, description, photo, contactInfo (reference → contact).
Contact (contact)
Section titled “Contact (contact)”name, phone, email, notes. Referenced by Artist and others.
Venue (venue)
Section titled “Venue (venue)”name, city. Referenced by Event (for in-person events).
Event (event)
Section titled “Event (event)”name, slug (required), eventType (in-person | virtual), date (datetime), doorsOpen (number), venue (reference → venue, for in-person), headline (reference → artist), image, details (block array), tickets (url). Preview shows name, artist, date, venue.
Page (page)
Section titled “Page (page)”Groups: Content, SEO, Settings. title, slug, content (blocks), metaDescription, keywords (tags), ogImage, ogTitle, ogDescription, canonicalUrl, createdAt, createdBy (userSelect), lastModifiedAt, lastModifiedBy (userSelect).
Song (song)
Section titled “Song (song)”title, artist, album, releaseDate (year), slug, plus other fields. See packages/sanity/src/schema/documents/song.ts for full list.
Playlist (playlist)
Section titled “Playlist (playlist)”name, songs (array of references → song).
Newsletter (newsletter)
Section titled “Newsletter (newsletter)”title.
Objects
Section titled “Objects”No custom object types are defined; schemaObjects is an empty array. Inline object fields are used (e.g. Settings address, contact, socialMedia).
Field Groups
Section titled “Field Groups”utils/groups.tsdefinesGROUPconstants and group arrays:- GROUPS — used by Page (Content, SEO, Settings)
- SETTINGS_GROUPS — used by Settings (General Information, Operations, SEO & Social)
Adding New Types
Section titled “Adding New Types”New document
Section titled “New document”- Add
packages/sanity/src/schema/documents/myDocument.tswithdefineType({ name: 'myDocument', type: 'document', fields: [...] }). - Export from
schema/documents/index.ts:import { myDocument } from './myDocument'and add toschemaDocuments.
New object
Section titled “New object”- Add a file under
schema/objects/and export fromschema/objects/index.tsinschemaObjects.
Field Types (reference)
Section titled “Field Types (reference)”Common types: string, text, number, boolean, datetime, url, email, slug, image, array, object, reference, block. This project also uses tags (sanity-plugin-tags-v4) and userSelect (sanity-plugin-user-select-input). See Sanity schema types.