CoursesDay One with Sanity StudioPrerequisites
Certification
Sanity developer certification
Track
Sanity developer essentials

Day One with Sanity Studio

Lesson
1

Prerequisites

Day One with Sanity Studio

In this course, you'll set up a Sanity Studio from scratch. You'll create content types for events, venues, and artists. Improve the authoring experience, query content with GROQ, and render it to a front end.

Simeon Griggs
Simeon GriggsPrincipal Educator at Sanity
Knut Melvær
Knut MelværHead of Developer Community and Education
Log in to mark your progress for each Lesson and Task

To complete this course you will need the following:

  • A free Sanity account to create new projects and initialize a new Sanity Studio. If you do not have yet have an account, running the command below will prompt you to create one.
  • Some familiarity with running commands from the terminal. Wes Bos' Command Line Power User video course is free and can get you up to speed with the basics.
  • Node and npm installed (or an npm-compatible JavaScript runtime) to install and run the Sanity Studio development server locally.
  • Some familiarity with JavaScript. The code examples in this course can all be copied and pasted and are written in TypeScript, but you will not need advanced knowledge of TypeScript to take advantage.
See Installation for more options when starting new Sanity projects

If you're stuck or have feedback on the lessons here on Sanity Learn join the Community Slack or use the Feedback form at the bottom of every lesson.

Create a new free project from the command line:
npm create sanity@latest -- --template clean --create-project "Day one with Sanity" --dataset production --typescript --output-path day-one-with-sanity

This command creates a new project and dataset, and sets up a new project folder with all the files and dependencies you need to get started.

  • A dataset is a collection of content within a project that's hosted in the Sanity Content Lake.
  • A project can have many datasets and is also where you'd configure other project-level settings like members, webhooks, and API tokens.

Project-level settings are configured in sanity.io/manage.

The command above prepares code for a Sanity Studio that connects to the new project and dataset. Even though the configuration for the Studio is in your local development environment, all the content will be automatically synced to your hosted dataset.

In the following lessons, you'll configure the Studio locally by modifying its code and, when ready, deploy it for other authors. In this course, you will deploy the Studio to Sanity's provided hosting, but know that you can host it with most web hosting providers.

Courses in the "Sanity developer essentials" track